Test for module 'truncl'.
[gnulib.git] / ChangeLog
1 2007-10-04  Bruno Haible  <bruno@clisp.org>
2
3         * modules/truncl-tests: New file.
4         * tests/test-truncl.c: New file.
5
6         * modules/truncl: New file.
7         * lib/truncl.c: New file.
8         * m4/truncl.m4: New file.
9         * lib/math.in.h (truncl): New declaration.
10         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCL and
11         HAVE_DECL_TRUNCL.
12         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCL and
13         HAVE_DECL_TRUNCL.
14         * doc/functions/truncl.texi: Mention the 'truncl' module.
15
16 2007-10-04  Bruno Haible  <bruno@clisp.org>
17
18         * modules/truncf-tests: New file.
19         * tests/test-truncf.c: New file.
20
21         * modules/truncf: New file.
22         * lib/trunc.c: Make paramerizable through USE_* macros.
23         * lib/truncf.c: New file.
24         * m4/truncf.m4: New file.
25         * lib/math.in.h (truncf): New declaration.
26         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCF and
27         HAVE_DECL_TRUNCF.
28         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCF and
29         HAVE_DECL_TRUNCF.
30         * doc/functions/truncf.texi: Mention the 'truncf' module.
31
32 2007-10-03  Bruno Haible  <bruno@clisp.org>
33
34         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
35         augmentation also for tests modules.
36         * modules/argp-tests (Makefile.am): Remove EXTRA_DIST augmentation.
37         * modules/atexit-tests (Makefile.am): Likewise.
38         * modules/binary-io-tests (Makefile.am): Likewise.
39         * modules/c-strcase-tests (Makefile.am): Likewise.
40         * modules/canonicalize-lgpl-tests (Makefile.am): Likewise.
41         * modules/canonicalize-tests (Makefile.am): Likewise.
42         * modules/closein-tests (Makefile.am): Likewise.
43         * modules/fprintf-posix-tests (Makefile.am): Likewise.
44         * modules/freadahead-tests (Makefile.am): Likewise.
45         * modules/fseek-tests (Makefile.am): Likewise.
46         * modules/fseeko-tests (Makefile.am): Likewise.
47         * modules/ftell-tests (Makefile.am): Likewise.
48         * modules/ftello-tests (Makefile.am): Likewise.
49         * modules/isnanl-nolibm-tests (Makefile.am): Likewise.
50         * modules/isnanl-tests (Makefile.am): Likewise.
51         * modules/lseek-tests (Makefile.am): Likewise.
52         * modules/mbscasecmp-tests (Makefile.am): Likewise.
53         * modules/mbscasestr-tests (Makefile.am): Likewise.
54         * modules/mbschr-tests (Makefile.am): Likewise.
55         * modules/mbscspn-tests (Makefile.am): Likewise.
56         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
57         * modules/mbspbrk-tests (Makefile.am): Likewise.
58         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
59         * modules/mbsrchr-tests (Makefile.am): Likewise.
60         * modules/mbsspn-tests (Makefile.am): Likewise.
61         * modules/mbsstr-tests (Makefile.am): Likewise.
62         * modules/printf-posix-tests (Makefile.am): Likewise.
63         * modules/snprintf-posix-tests (Makefile.am): Likewise.
64         * modules/sprintf-posix-tests (Makefile.am): Likewise.
65         * modules/tsearch-tests (Makefile.am): Likewise.
66         * modules/uniname/uniname-tests (Makefile.am): Likewise.
67         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
68         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
69         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
70         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
71         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
72         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
73         * modules/vprintf-posix-tests (Makefile.am): Likewise.
74         * modules/vsnprintf-posix-tests (Makefile.am): Likewise.
75         * modules/vsprintf-posix-tests (Makefile.am): Likewise.
76         * modules/xstrtoimax-tests (Makefile.am): Likewise.
77         * modules/xstrtol-tests (Makefile.am): Likewise.
78         * modules/xstrtoumax-tests (Makefile.am): Likewise.
79         * modules/yesno-tests (Makefile.am): Likewise.
80
81 2007-10-03  Bruno Haible  <bruno@clisp.org>
82
83         * modules/trunc-tests: New file.
84         * tests/test-trunc.c: New file.
85
86         * modules/trunc: New file.
87         * lib/trunc.c: New file.
88         * m4/trunc.m4: New file.
89         * lib/math.in.h (trunc): New declaration.
90         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNC and
91         HAVE_DECL_TRUNC.
92         * modules/math (Makefile.am): Substitute also GNULIB_TRUNC and
93         HAVE_DECL_TRUNC.
94         * doc/functions/trunc.texi: Mention the 'trunc' module.
95
96 2007-10-03  Bruno Haible  <bruno@clisp.org>
97
98         * tests/test-fpending.c: New file, mostly copied
99         from coreutils/lib/t-fpending.c.
100         * modules/fpending-tests: New file.
101
102 2007-10-03  Bruno Haible  <bruno@clisp.org>
103
104         Port the stdio extensions to QNX (untested).
105         * lib/fseterr.c (fseterr): Add support for QNX.
106         * lib/fbufmode.c (fbufmode): Likewise.
107         * lib/freadable.c (freadable): Likewise.
108         * lib/fwritable.c (fwritable): Likewise.
109         * lib/freading.c (freading): Likewise.
110         * lib/fwriting.c (fwriting): Likewise.
111         * lib/freadahead.c (freadahed): Likewise.
112         * lib/fpurge.c (fpurge): Likewise.
113         * lib/fseeko.c (rpl_fseeko): Likewise.
114
115 2007-10-03  Bruno Haible  <bruno@clisp.org>
116             Jim Meyering  <jim@meyering.net>
117             Eric Blake  <ebb9@byu.net>
118
119         * doc/relocatable.texi: Use @command instead of @program.
120
121 2007-10-02  Jim Meyering  <jim@meyering.net>
122
123         Perform one more "_.h" -> ".in.h" substitution.
124         * modules/unistd (Makefile.am) [unistd.h]: Use unistd.h.in
125         instead of unistd_.h here, too.
126
127 2007-10-01  Bruno Haible  <bruno@clisp.org>
128
129         * gnulib-tool (func_emit_initmacro_done): Special case for alloca.c.
130         Needed for the alloca-opt module.
131
132 2007-09-30  Bruno Haible  <bruno@clisp.org>
133
134         * lib/alloca.in.h: Renamed from lib/alloca_.h.
135         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
136         alloca_.h.
137         * lib/argz.in.h: Renamed from lib/argz_.h.
138         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
139         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
140         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
141         byteswap_.h.
142         * lib/dirent.in.h: Renamed from lib/dirent_.h.
143         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
144         dirent_.h.
145         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
146         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
147         fcntl_.h.
148         * lib/float.in.h: Renamed from lib/float_.h.
149         * modules/float (Files, Makefile.am): Use float.in.h instead of
150         float_.h.
151         * lib/fnmatch.in.h: Renamed from lib/fnmatch_.h.
152         * modules/fnmatch (Files, Makefile.am): Use fnmatch.in.h instead of
153         fnmatch_.h.
154         * lib/getopt.in.h: Renamed from lib/getopt_.h.
155         * modules/getopt (Files, Makefile.am): Use getopt.in.h instead of
156         getopt_.h.
157         * lib/glob.in.h: Renamed from lib/glob_.h.
158         * modules/glob (Files, Makefile.am): Use glob.in.h instead of glob_.h.
159         * lib/iconv.in.h: Renamed from lib/iconv_.h.
160         * modules/iconv_open (Files, Makefile.am): Use iconv.in.h instead of
161         iconv_.h.
162         * lib/inttypes.in.h: Renamed from lib/inttypes_.h.
163         * modules/inttypes (Files, Makefile.am): Use inttypes.in.h instead of
164         inttypes_.h.
165         * lib/locale.in.h: Renamed from lib/locale_.h.
166         * modules/locale (Files, Makefile.am): Use locale.in.h instead of
167         locale_.h.
168         * lib/math.in.h: Renamed from lib/math_.h.
169         * modules/math (Files, Makefile.am): Use math.in.h instead of math_.h.
170         * lib/netinet_in.in.h: Renamed from lib/netinet_in_.h.
171         * modules/netinet_in (Files, Makefile.am): Use netinet_in.in.h instead
172         of netinet_in_.h. Add dependency.
173         * lib/poll.in.h: Renamed from lib/poll_.h.
174         * modules/poll (Files, Makefile.am): Use poll.in.h instead of poll_.h.
175         * lib/search.in.h: Renamed from lib/search_.h.
176         * modules/search (Files, Makefile.am): Use search.in.h instead of
177         search_.h.
178         * lib/signal.in.h: Renamed from lib/signal_.h.
179         * modules/signal (Files, Makefile.am): Use signal.in.h instead of
180         _signal.h.
181         * lib/stdbool.in.h: Renamed from lib/stdbool_.h.
182         * modules/stdbool (Files, Makefile.am): Use stdbool.in.h instead of
183         stdbool_.h.
184         * lib/stdint.in.h: Renamed from lib/stdint_.h.
185         * modules/stdint (Files, Makefile.am): Use stdint.in.h instead of
186         stdint_.h.
187         * lib/stdio.in.h: Renamed from lib/stdio_.h.
188         * modules/stdio (Files, Makefile.am): Use stdio.in.h instead of
189         stdio_.h.
190         * lib/stdlib.in.h: Renamed from lib/stdlib_.h.
191         * modules/stdlib (Files, Makefile.am): Use stdlib.in.h instead of
192         stdlib_.h.
193         * lib/string.in.h: Renamed from lib/string_.h.
194         * modules/string (Files, Makefile.am): Use string.in.h instead of
195         string_.h.
196         * doc/gnulib-tool.texi (Initial import): Update.
197         * lib/sys_select.in.h: Renamed from lib/sys_select_.h.
198         * modules/sys_select (Files, Makefile.am): Use sys_select.in.h instead
199         of sys_select_.h. Add dependency.
200         * lib/sys_socket.in.h: Renamed from lib/sys_socket_.h.
201         * modules/sys_socket (Files, Makefile.am): Use sys_socket.in.h instead
202         of sys_socket_.h.
203         * lib/sys_stat.in.h: Renamed from lib/sys_stat_.h.
204         * modules/sys_stat (Files, Makefile.am): Use sys_stat.in.h instead of
205         sys_stat_.h.
206         * lib/sys_time.in.h: Renamed from lib/sys_time_.h.
207         * modules/sys_time (Files, Makefile.am): Use sys_time.in.h instead of
208         sys_time_.h.
209         * lib/sysexits.in.h: Renamed from lib/sysexits_.h.
210         * modules/sysexits (Files, Makefile.am): Use sysexits.in.h instead of
211         sysexits_.h.
212         * lib/time.in.h: Renamed from lib/time_.h.
213         * modules/time (Files, Makefile.am): Use time.in.h instead of time_.h.
214         * lib/unistd.in.h: Renamed from lib/unistd_.h.
215         * modules/unistd (Files, Makefile.am): Use unistd.in.h instead of
216         unistd_.h.
217         * lib/wchar.in.h: Renamed from lib/wchar_.h.
218         * modules/wchar (Files, Makefile.am): Use wchar.in.h instead of
219         wchar_.h.
220         * lib/wctype.in.h: Renamed from lib/wctype_.h.
221         * modules/wctype (Files, Makefile.am): Use wctype.in.h instead of
222         wctype_.h.
223         * build-aux/bootstrap (slurp): Update.
224         * lib/.cppi-disable: Update.
225
226 2007-09-30  Bruno Haible  <bruno@clisp.org>
227
228         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
229         Needed on BeOS.
230
231 2007-09-30  Bruno Haible  <bruno@clisp.org>
232
233         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
234
235 2007-09-29  Bruno Haible  <bruno@clisp.org>
236
237         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
238
239 2007-09-29  Bruno Haible  <bruno@clisp.org>
240
241         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
242         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
243         * build-aux/install-reloc: Compile also areadlink.c.
244         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
245
246 2007-09-29  Bruno Haible  <bruno@clisp.org>
247
248         * gnulib-tool (func_emit_initmacro_done): Indentation.
249
250 2007-09-29  Bruno Haible  <bruno@clisp.org>
251
252         * README: Add CVS checkout update instructions.
253         Info from Bob Proulx <bob@proulx.com>.
254
255 2007-09-28  Eric Blake  <ebb9@byu.net>
256
257         Provide move-if-change.
258         * build-aux/move-if-change: New file, based on best practice
259         rather than any canonical upstream location.
260
261 2007-09-28  Jim Meyering  <jim@meyering.net>
262
263         Fix canonicalize loop-detection corner case.
264         Do not attempt to stat the symlink values stored via seen_triple.
265         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
266         on linux-2.6.18, (but not 2.6.22).
267         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
268         triple_compare.  The former compares dev,ino,filename, while the latter
269         would actually stat dirname(filename) when dev and ino were equal.
270         * lib/hash-triple.c: Install <string.h>.
271         (STREQ): Define.
272         (triple_compare_ino_str): New function.
273         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
274
275 2007-09-28  Eric Blake  <ebb9@byu.net>
276
277         Enforce that AC_REPLACE_FUNCS files exist.
278         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
279         override check for typos.
280
281         Fix test-closein on Solaris 10.
282         * tests/test-closein.c (main): Don't assume stdin can be inherited
283         closed on all systems.
284         * tests/test-closein.sh: Likewise.
285         Reported by Piotr Tarnowski.
286
287 2007-09-28  Jim Meyering  <jim@meyering.net>
288
289         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
290
291 2007-09-27  Jim Meyering  <jim@meyering.net>
292
293         canonicalize: Avoid a false-positive cycle failure.
294         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
295         Sort.  Remove cycle-check.
296         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
297         not cycle-check.h.
298         (seen_triple): New function.
299         (canonicalize_filename_mode): Use it instead of cycle-check.
300         * tests/test-canonicalize.c: Add a test for this bug.
301         * tests/test-canonicalize.sh: Set up and run the test.
302
303         New module, file-set, from coreutils.
304         * modules/file-set: Define it.
305         * lib/file-set.c, lib/file-set.h: Implement.
306
307         New module, hash-triple, from coreutils.
308         * modules/hash-triple: Define it.
309         * lib/hash-triple.c, lib/hash-triple.h: Implement.
310
311 2007-09-25  Eric Blake  <ebb9@byu.net>
312
313         Fix strerror on Interix.
314         * lib/string_.h (strerror): Declare replacement.
315         * doc/functions/strerror.texi (strerror): Document the Interix
316         shortcoming.
317         * modules/string (Makefile.am): Support new hooks.
318         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
319         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
320         gl_FUNC_STRERROR_SEPARATE.
321         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
322         * lib/strerror.c (rpl_strerror): Provide replacement.
323         * modules/strerror (Depends-on): Add string.
324         (configure.ac): Detect use of module.
325         * tests/test-strerror.c: New file.
326         * modules/strerror-tests: New test module.
327         * modules/argp (Depends-on): Add strerror.
328         * modules/error (Depends-on): Likewise.
329         Reported by Martin Koeppe.
330
331 2007-09-24  Bruno Haible  <bruno@clisp.org>
332
333         * README: Update git instructions.
334
335 2007-09-24  Eric Blake  <ebb9@byu.net>
336
337         Revert fpending breakage from 2007-09-08.
338         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
339         __fpending.c.
340
341 2007-09-24  Jim Meyering  <jim@meyering.net>
342
343         filenamecat.c: Add a test.
344         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
345         showing how the function works when DIR is the empty string.
346
347 2007-09-21  Simon Josefsson  <simon@josefsson.org>
348
349         * tests/test-canonicalize.sh: Turn on executable bit.
350
351 2007-09-19  Eric Blake  <ebb9@byu.net>
352
353         * README: Update CVS instructions.
354
355 2007-09-18  Bruno Haible  <bruno@clisp.org>
356
357         * modules/areadlink: New file.
358         * lib/areadlink.h (areadlink): New declaration.
359         * lib/areadlink.c: New file, based on lib/xreadlink.c.
360
361 2007-09-17  Jim Meyering  <jim@meyering.net>
362
363         * lib/savewd.c (ESTALE) [!defined]: Define.
364         Reported to be required on Interix by Martin Koeppe.
365
366 2007-09-17  Bruno Haible  <bruno@clisp.org>
367
368         * gnulib-tool (func_version): Use $version.
369
370 2007-09-16  Bruno Haible  <bruno@clisp.org>
371
372         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
373         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
374         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
375         Reported by Greg Schafer <gschafer@zip.com.au>.
376
377 2007-09-15  Bruno Haible  <bruno@clisp.org>
378
379         * gnulib-tool (sed): Try a little harder to make bash understand the
380         alias.
381         Reported by Bruce Korb <bruce.korb@gmail.com>.
382
383 2007-09-13  Eric Blake  <ebb9@byu.net>
384
385         * ChangeLog: Remove conflict markers.
386
387 2007-09-13  Simon Josefsson  <simon@josefsson.org>
388
389         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
390         Reported by Bruno Haible <bruno@clisp.org>.
391
392 2007-09-12  Bruno Haible  <bruno@clisp.org>
393
394         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
395         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
396         is not defined.
397
398 2007-09-12  Eric Blake  <ebb9@byu.net>
399
400         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
401         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
402         Autoconf definition.
403         * modules/euidaccess (Depends-on): Add extensions, for
404         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
405         * modules/fnmatch (Depends-on): Likewise.
406         * modules/getaddrinfo (Depends-on): Likewise.
407         * modules/getdelim (Depends-on): Likewise.
408         * modules/getline (Depends-on): Likewise.
409         * modules/getsubopt (Depends-on): Likewise.
410         * modules/gettext (Depends-on): Likewise.
411         * modules/group-member (Depends-on): Likewise.
412         * modules/mbchar (Depends-on): Likewise.
413         * modules/memmem (Depends-on): Likewise.
414         * modules/mempcpy (Depends-on): Likewise.
415         * modules/memrchr (Depends-on): Likewise.
416         * modules/pagealign_alloc (Depends-on): Likewise.
417         * modules/readutmp (Depends-on): Likewise.
418         * modules/stpcpy (Depends-on): Likewise.
419         * modules/stpncpy (Depends-on): Likewise.
420         * modules/strchrnul (Depends-on): Likewise.
421         * modules/strndup (Depends-on): Likewise.
422         * modules/strsep (Depends-on): Likewise.
423         * modules/strverscmp (Depends-on): Likewise.
424         * modules/vasprintf (Depends-on): Likewise.
425         * modules/wcwidth (Depends-on): Likewise.
426         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
427         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
428         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
429         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
430         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
431         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
432         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
433         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
434         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
435         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
436         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
437         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
438         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
439         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
440         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
441         * m4/readutmp.m4 (gl_READUTMP): Likewise.
442         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
443         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
444         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
445         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
446         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
447         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
448         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
449         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
450         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
451         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
452         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
453         so that lock.m4 can be used in gettext without extensions module.
454
455 2007-09-11  Bruno Haible  <bruno@clisp.org>
456
457         * m4/isc-posix.m4: Remove file.
458         Suggested by Eric Blake.
459
460 2007-09-11  Eric Blake  <ebb9@byu.net>
461
462         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
463
464 2007-09-10  Bruno Haible  <bruno@clisp.org>
465
466         * posix-modules: Fix typo in error message.
467         Reported by Matt <mkraai@beckman.com>.
468
469 2007-09-09  Bruno Haible  <bruno@clisp.org>
470
471         * doc/functions/getdelim.texi: Update list of platforms lacking the
472         function.
473         * doc/functions/getline.texi: Likewise.
474
475 2007-09-09  Jim Meyering  <jim@meyering.net>
476
477         * lib/hash.c (hash_initialize): Detect calloc failure.
478         Reported by Bruno Haible.
479
480 2007-09-09  Bruno Haible  <bruno@clisp.org>
481
482         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
483         malloc or realloc fails.
484
485 2007-09-09  Bruno Haible  <bruno@clisp.org>
486
487         * modules/getcwd (Depends-on): Add malloc-posix.
488         * modules/glob (Depends-on): Likewise.
489         * modules/putenv (Depends-on): Likewise.
490         * modules/strdup (Depends-on): Likewise.
491         * modules/getdelim (Depends-on): Add realloc-posix.
492         * modules/read-file (Depends-on): Likewise.
493
494 2007-09-09  Bruno Haible  <bruno@clisp.org>
495
496         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
497         (gl_FUNC_MALLOC_POSIX): Require it.
498         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
499         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
500         * modules/realloc (Files): Add m4/malloc.m4.
501         * modules/calloc (Files): Likewise.
502
503 2007-09-09  Bruno Haible  <bruno@clisp.org>
504
505         * modules/malloc-posix: New file.
506         * modules/malloc (Depends-on): Add malloc-posix.
507         * lib/malloc.c: Include errno.h.
508         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
509         and a POSIX-compatible malloc into a single function. Set ENOMEM
510         when returning NULL.
511         * m4/malloc.m4: New file.
512         * doc/functions/malloc.texi: Mention the malloc-posix module.
513         * lib/stdlib_.h (malloc): New declaration.
514         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
515         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
516         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
517         and HAVE_MALLOC_POSIX.
518
519 2007-09-09  Bruno Haible  <bruno@clisp.org>
520
521         * modules/realloc-posix: New file.
522         * modules/realloc (Depends-on): Add realloc-posix.
523         * lib/realloc.c: Include errno.h.
524         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
525         and a POSIX-compatible realloc into a single function. Set ENOMEM
526         when returning NULL.
527         * m4/realloc.m4: New file.
528         * doc/functions/realloc.texi: Mention the realloc-posix module.
529         * lib/stdlib_.h (realloc): New declaration.
530         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
531         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
532         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
533         and HAVE_REALLOC_POSIX.
534
535 2007-09-09  Bruno Haible  <bruno@clisp.org>
536
537         * modules/calloc-posix: New file.
538         * modules/calloc (Depends-on): Add calloc-posix.
539         * lib/calloc.c: Include errno.h.
540         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
541         and a POSIX-compatible calloc into a single function. Set ENOMEM
542         when returning NULL.
543         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
544         * doc/functions/calloc.texi: Mention the calloc-posix module.
545         * lib/stdlib_.h (calloc): New declaration.
546         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
547         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
548         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
549         and HAVE_CALLOC_POSIX.
550
551 2007-09-09  Bruno Haible  <bruno@clisp.org>
552
553         Allow for modules to show an arbitrary notice.
554         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
555         * gnulib-tool: New option --extract-notice.
556         (func_usage): Document it.
557         (sed_extract_prog): Update.
558         (func_get_notice): New function.
559         (func_modules_notice): New function.
560         (func_import, func_create_testdir): Invoke it.
561         Suggested by Jim Meyering.
562
563 2007-09-09  Bruno Haible  <bruno@clisp.org>
564
565         * gnulib-tool: New options --verbose, --quiet.
566         (func_usage): Document them.
567         (verbose): New variable.
568         (func_execute_command): New function.
569         (func_import): Don't show the module list and the file list if
570         $verbose < 0.
571         (func_create_testdir): Likewise. Use func_execute_command.
572         (func_create_megatestdir): Use func_execute_command.
573
574 2007-09-08  Bruno Haible  <bruno@clisp.org>
575
576         * gnulib-tool (func_import): Prefer rsync over wget when available,
577         for fetching the PO files.
578
579 2007-09-08  Bruno Haible  <bruno@clisp.org>
580
581         * posix-modules: New file. Portions copied from gnulib-tool.
582         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
583
584 2007-09-08  Jim Meyering  <jim@meyering.net>
585
586         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
587         * lib/fpending.h: Rename from __fpending.h.
588         * lib/fpending.c: Rename from __fpending.c.
589         Include "fpending.h", not "__fpending.h".
590         * lib/__fpending.h, lib/__fpending.c: Remove files.
591         * modules/fpending (Files): Reflect new file names.
592         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
593
594 2007-09-08  Bruno Haible  <bruno@clisp.org>
595
596         * m4/inttypes-h.m4: Remove stub file.
597
598 2007-09-07  Simon Josefsson  <simon@josefsson.org>
599
600         * doc/headers/stdint.texi: Discuss #include_next issue.
601
602 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
603
604         * build-aux/bootstrap: Remove obsolete comment about wget --help.
605
606 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
607
608         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
609         in variable name.
610
611 2007-09-03  Jim Meyering  <jim@meyering.net>
612
613         New module: git-version-gen.
614         * modules/git-version-gen: New file.
615
616         Import changes from coreutils for bootstrap script.
617
618         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
619
620         bootstrap: uses rsync to download the .po files
621         * build-aux/bootstrap (po_download_command_format): New global.
622         (download_po_files): Use rsync.
623         (update_po_files): Don't remove .po files after download,
624         so future rsync runs can take advantage of the copies.
625
626         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
627
628         Solve the unnecessary-.po-file-regeneration problem once and for all.
629         * build-aux/bootstrap (download_po_files): New function, renamed from
630         get_translations.  Now, downloads, but doesn't update LINGUAS.
631         (update_po_files): New function.
632
633         bootstrap: Ignore more.
634         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
635         uniwidth to e.g., lib/.gitignore.
636         (slurp): Handle the sys_stat_.h -> sys mapping, too.
637
638         * build-aux/bootstrap: New setting: vc_ignore.
639         (insert_sorted_if_absent): Create $file if absent.
640         Adapt to new, possibly empty, list: $vc_ignore.
641
642         bootstrap: generate more ignorable names
643         * build-aux/bootstrap (slurp): When generating ignorable names,
644         also map .sin to .sed, .gperf to .c, and .y to .c.
645
646 2007-09-03  Jim Meyering  <jim@meyering.net>
647
648         * build-aux/git-version-gen: New file, from coreutils.  For details, see
649         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
650
651 2007-09-02  Bruno Haible  <bruno@clisp.org>
652
653         Fix mis-recognition of 'mcs' on QNX 6.
654         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
655         output contains the string "Mono".
656         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
657         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
658
659 2007-09-01  Bruno Haible  <bruno@clisp.org>
660
661         Fix collision between uniwidth/* and linebreak modules.
662         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
663         u32_width): Remove declarations.
664         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
665         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
666         streq3, streq2, streq1, streq0): Remove functions.
667         (STREQ): Remove macro.
668         (is_cjk_encoding): Remove function.
669         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
670         (uc_width, u8_width, u16_width, u32_width): Remove functions.
671         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
672         * NEWS: Document the change.
673
674 2007-09-01  Bruno Haible  <bruno@clisp.org>
675
676         * lib/streq.h: Add double-inclusion guard.
677
678 2007-09-01  Karl Berry  <karl@gnu.org>
679
680         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
681
682 2007-08-28  Jim Meyering  <jim@meyering.net>
683
684         Rename mreadlink_with_size to areadlink_with_size.
685         * NEWS: Document the change.
686         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
687         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
688         * lib/mreadlink.h: Rename this to...
689         * lib/areadlink.h: ...this.
690         * modules/mreadlink-with-size: Rename this to...
691         * modules/areadlink-with-size: ...this.
692         * lib/canonicalize.c: Reflect the renaming.
693         * modules/canonicalize: Likewise.
694
695 2007-08-26  Bruno Haible  <bruno@clisp.org>
696
697         * gnulib-tool (func_import): When deciding which files to remove,
698         consider also dangling symbolic links.
699         Reported by Eric Blake.
700
701 2007-08-26  Bruno Haible  <bruno@clisp.org>
702
703         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
704
705 2007-08-23  Simon Josefsson  <simon@josefsson.org>
706
707         * lib/readline.c: Don't include getline.h, the prototype is now
708         found in stdio.h.
709
710 2007-08-23  Jim Meyering  <jim@meyering.net>
711
712         Getdelim touchup.
713         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
714         around the funlockfile call, since funlockfile never sets errno.
715         Don't set errno upon failed realloc.
716
717 2007-08-22  Eric Blake  <ebb9@byu.net>
718
719         Getline touchups.
720         * lib/getdelim.c (getdelim): Revert regression that required *n to
721         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
722         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
723         getdelim, rather than whether implementation is missing.
724         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
725         * lib/stdio_.h (getline): Also declare if replacement is
726         required.
727         * doc/functions/getdelim.texi: New file.
728         * doc/functions/getline.texi: Likewise.
729         * doc/gnulib.texi (Function Substitutes): Add new files.
730         Reported by Bruno Haible.
731
732 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
733
734         * users.txt: Add Guile.
735
736 2007-08-22  Eric Blake  <ebb9@byu.net>
737
738         * tests/test-getdelim.c (main): Use remove, not unlink.
739         * tests/test-getline.c (main): Likewise.
740
741         Move getline and getdelim into stdio.h, per POSIX 200x.
742         * modules/getline (Files): Remove getline.h.
743         (Depends-on): Add stdio.
744         (configure.ac): Add module indicator.
745         * modules/getdelim (Files): Remove getdelim.h.
746         (Depends-on): Add stdio.
747         (configure.ac): Add module indicator.
748         * modules/stdio (Makefile.am): Work with new indicators.
749         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
750         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
751         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
752         * lib/getdelim.h: Delete.
753         * lib/getline.h: Delete.
754         * lib/stdio_.h (getdelim, getline): Declare.
755         * modules/getdelim-tests: New module.
756         * modules/getline-tests: Likewise.
757         * tests/test-getdelim.c: New file.
758         * tests/test-getline.c: Likewise.
759         * NEWS: Document the change.
760         * lib/getline.c: Update choice of header.
761         * lib/csharpcomp.c: Likewise.
762         * lib/getpass.c: Likewise.
763         * lib/javacomp.c: Likewise.
764         * lib/javaversion.c: Likewise.
765         * lib/yesno.c: Likewise.
766         * lib/getdelim.c: Likewise.
767         (getdelim): Set errno on failure, and avoid memory leak.
768
769 2007-08-19  Bruno Haible  <bruno@clisp.org>
770
771         * modules/closein (Depends-on): Add freadahead.
772         * lib/closein.c: Include freadahead.h.
773         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
774         is zero.
775
776 2007-08-19  Bruno Haible  <bruno@clisp.org>
777
778         * modules/freadahead-tests: New file.
779         * tests/test-freadahead.sh: New file.
780         * tests/test-freadahead.c: New file.
781
782         * modules/freadahead: New file.
783         * lib/freadahead.h: New file.
784         * lib/freadahead.c: New file.
785         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
786         fbufmode, fpurge, freadable, fwritable.
787
788 2007-08-19  Eric Blake  <ebb9@byu.net>
789
790         Test yesno in combination with closein.
791         * lib/yesno.c (yesno): Document use of stdin.
792         * modules/yesno-tests (Files): New module.
793         * tests/test-yesno.c (main): New file.
794         * tests/test-yesno.sh: Likewise.
795
796 2007-08-19  Bruno Haible  <bruno@clisp.org>
797
798         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
799         * lib/fseeko.c (rpl_fseeko): Likewise.
800         * lib/fseterr.c (fseterr): Likewise.
801
802 2007-08-19  Bruno Haible  <bruno@clisp.org>
803
804         * tests/test-lseek.c (main): Disable a test for BeOS.
805         * doc/functions/lseek.texi: Document the BeOS bug.
806
807 2007-08-19  Bruno Haible  <bruno@clisp.org>
808             Eric Blake  <ebb9@byu.net>
809
810         * lib/lseek.c: Include <sys/stat.h>.
811         (rpl_lseek): Add workaround code also for Unix platforms.
812         Needed for BeOS.
813         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
814         * doc/functions/lseek.texi: Document BeOS definiency.
815
816 2007-08-18  Bruno Haible  <bruno@clisp.org>
817
818         * modules/fstrcmp-tests: New file.
819         * tests/test-fstrcmp.c: New file.
820
821 2007-08-18  Bruno Haible  <bruno@clisp.org>
822
823         * modules/fstrcmp: New file, from GNU gettext with modifications.
824         * lib/fstrcmp.h: New file, from GNU gettext.
825         * lib/fstrcmp.c: New file, from GNU gettext.
826         * MODULES.html.sh (String handling): Add fstrcmp.
827
828 2007-08-18  Bruno Haible  <bruno@clisp.org>
829
830         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
831         'bool'.
832         (diag, compareseq): Remove const from the ctxt argument.
833         (USE_HEURISTIC): Undefine at the end.
834
835 2007-08-18  Jim Meyering  <jim@meyering.net>
836
837         New file: lib/idcache.h
838         * NEWS: Mention the addition.
839         * modules/idcache (Files): Add lib/idcache.h
840         * lib/idcache.c: Include "idcache.h".
841         Don't include <sys/types.h>.
842         Add a FIXME comment.
843         Move file-scoped "static" declarations to the top.
844         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
845
846 2007-08-17  Bruno Haible  <bruno@clisp.org>
847         and Paul Eggert  <eggert@cs.ucla.edu>
848
849         * MODULES.html.sh: Add diffseq.
850         * modules/diffseq: New file.
851         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
852         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
853
854 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
855
856         Import changes from coreutils for bootstrap script.
857
858         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
859
860         * build-aux/bootstrap (slurp): Work even in environments where
861         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
862         current code does not slurp files whose names start with ".", and
863         this looks like it might be a troublesome area.
864
865         2007-07-11  Jim Meyering  <jim@meyering.net>
866
867         If there's a GPL vN copyright comment, require that N == 3.
868
869         2007-07-08  Jim Meyering  <jim@meyering.net>
870
871         Run the coreutils-specific code only if tests/Makefile.am.in exists.
872         * build-aux/bootstrap (mam_template): Move definition out of loop.
873
874         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
875
876         * build-aux/bootstrap (symlink_to_dir): Rename function from
877         symlink_to_gnulib.  Add a directory parameter.  Update all
878         callers.
879         (cp_mark_as_generated): Also check for -- and link to -- files in
880         gl/.
881
882         2007-07-08  Jim Meyering  <jim@meyering.net>
883
884         Adapt to deeper hierarchy in gnulib.
885         * build-aux/bootstrap (symlink_to_dir): If the destination
886         directory doesn't exist, create it. This is required at least for
887         "lib/uniwidth/cjk.h".
888
889         2007-05-15  Jim Meyering  <jim@meyering.net>
890
891         * build-aux/bootstrap: Now that generated Makefile.am files
892         are no longer under version control, they must be created at
893         bootstrap time.
894
895 2007-08-14  Ben Pfaff  <blp@gnu.org>
896
897         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
898
899 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
900
901         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
902         given the changes below.
903         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
904         even on hosts that have padding bits beyond the supported 64.
905
906 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
907
908         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
909         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
910         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
911         depends on it.
912         (xstrtol_error): Remove.
913         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
914         but with a different signature.
915         (ATTRIBUTE_NORETURN, __attribute__): New macros.
916         * lib/xstrtol-error.c: Include exitfail.h.
917         (xstrtol_fatal): New function, with a different signature from the
918         old xstrtol_error, so that the caller need not worry about passing
919         in an exit status, or about storage management of the option argument.
920         (xstrtol_error): Now a static function.  Redo signature to
921         implement xstrtol_fatal.  Output the correct number of hyphens in
922         front of the option so that the caller need not worry about
923         storage management.
924         (N_): New macro.
925         (_): Remove; not used now.
926         * modules/xstrtol: Depend on getopt.
927         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
928         of old STRTOL_FATAL_ERROR macro.
929         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
930         of test program.
931         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
932         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
933
934 2007-08-08  Eric Blake  <ebb9@byu.net>
935
936         * lib/xstrtol-error.c: Add missing include.
937
938         Move xstrtol messages into gnulib domain, when --pobase is used.
939         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
940         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
941         * modules/xstrtol (Files): Distribute new file.
942         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
943         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
944         * tests/test-xstrtol.c: ...into new file.
945         * tests/test-xstrtoul.c: Also test xstrtoul.
946         * tests/test-xstrtoimax.c: Also test xstrtoimax.
947         * tests/test-xstrtoumax.c: Also test xstrtoumax.
948         * tests/test-xstrtol.sh: Drive the tests.
949         * tests/test-xstrtoimax.sh: Likewise.
950         * tests/test-xstrtoumax.sh: Likewise.
951         * modules/xstrtol-tests: New module.
952         * modules/xstrtoimax-tests: Likewise.
953         * modules/xstrtoumax-tests: Likewise.
954
955 2007-08-08  Jim Meyering  <jim@meyering.net>
956
957         New function: mfile_name_concat.
958         * lib/filenamecat.c (mfile_name_concat): New function, just like
959         file_name_concat, but return NULL upon failure rather than exiting
960         with a diagnostic.
961         * lib/filenamecat.h: Declare it.
962
963 2007-08-07  Bruno Haible  <bruno@clisp.org>
964
965         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
966         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
967         warning from gcc.
968         Reported by Eric Blake.
969
970 2007-08-07  Simon Josefsson  <simon@josefsson.org>
971
972         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
973         * modules/crypto/arcfour (License): Likewise.
974         * modules/crypto/des-tests (License): Likewise.
975         * modules/crypto/gc-arctwo-tests (License): Likewise.
976         * modules/crypto/gc-des-tests (License): Likewise.
977         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
978         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
979         * modules/crypto/gc-md2-tests (License): Likewise.
980         * modules/crypto/gc-md4-tests (License): Likewise.
981         * modules/crypto/gc-md5-tests (License): Likewise.
982         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
983         * modules/crypto/gc-rijndael-tests (License): Likewise.
984         * modules/crypto/gc-sha1-tests (License): Likewise.
985         * modules/crypto/gc-tests (License): Likewise.
986         * modules/crypto/hmac-md5 (License): Likewise.
987         * modules/crypto/hmac-sha1 (License): Likewise.
988         * modules/crypto/md2-tests (License): Likewise.
989         * modules/crypto/md4-tests (License): Likewise.
990         * modules/crypto/md5 (License): Likewise.
991         * modules/crypto/rijndael (License): Likewise.
992         * modules/crypto/sha1 (License): Likewise.
993         * modules/memxor (License): Likewise.
994
995 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
996         and Bruno Haible  <bruno@clisp.org>
997
998         * NEWS: Describe interface changes to human, xstrtol.
999         * lib/human.h: Include <xstrtol.h>.
1000         (human_options): Return enum strtol_error, not int.  Remove
1001         bool arg; take int * instead.
1002         * lib/human.c: Don't include "gettext.h".
1003         (_): Remove; no longer used.
1004         Don't include <xstrtol.h>, since human.h does it.
1005         (human_options): Adjust to abovementioned interface changes.
1006         Do not report error to stderr; that's now the caller's
1007         responsibility.
1008         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
1009         interface change.
1010         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
1011         Str, Argument_type_string.  All uses changed.  Put " argument"
1012         in diagnostics to make them clearer.  Change wording of suffix
1013         message for clarity.
1014         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
1015         Argument_type_string.
1016         (STRTOL_FATAL_WARN): Remove; no longer used.
1017         * modules/human (Depends-on): Remove gettext-h.
1018
1019 2007-08-06  Simon Josefsson  <simon@josefsson.org>
1020
1021         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
1022
1023 2007-07-31  Bruno Haible  <bruno@clisp.org>
1024
1025         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
1026         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
1027         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
1028
1029 2007-07-31  Bruno Haible  <bruno@clisp.org>
1030
1031         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
1032         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
1033
1034 2007-07-30  Bruno Haible  <bruno@clisp.org>
1035
1036         * modules/base64 (License): Use the synonymous term "LGPLv2+".
1037         * modules/c-ctype (License): Likewise.
1038         * modules/c-strcase (License): Likewise.
1039         * modules/check-version (License): Likewise.
1040         * modules/iconv (License): Likewise.
1041         * modules/iconv_open (License): Likewise.
1042         * modules/read-file (License): Likewise.
1043         * modules/striconv (License): Likewise.
1044         * modules/strverscmp (License): Likewise.
1045         * modules/vasprintf (License): Likewise.
1046         * modules/crypto/des (License): Likewise.
1047         * modules/crypto/gc (License): Likewise.
1048         * modules/crypto/gc-arcfour (License): Likewise.
1049         * modules/crypto/gc-arctwo (License): Likewise.
1050         * modules/crypto/gc-des (License): Likewise.
1051         * modules/crypto/gc-hmac-md5 (License): Likewise.
1052         * modules/crypto/gc-hmac-sha1 (License): Likewise.
1053         * modules/crypto/gc-md2 (License): Likewise.
1054         * modules/crypto/gc-md4 (License): Likewise.
1055         * modules/crypto/gc-md5 (License): Likewise.
1056         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
1057         * modules/crypto/gc-random (License): Likewise.
1058         * modules/crypto/gc-rijndael (License): Likewise.
1059         * modules/crypto/gc-sha1 (License): Likewise.
1060         * modules/crypto/md2 (License): Likewise.
1061         * modules/crypto/md4 (License): Likewise.
1062
1063 2007-07-30  Jim Meyering  <jim@meyering.net>
1064
1065         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
1066         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
1067         it has valid stat data.  This bug would cause du not to count the
1068         sizes of inaccessible directories.
1069         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
1070         in <http://bugzilla.redhat.com/250077>.
1071
1072 2007-07-25  Peter O'Gorman  <peter@pogma.com>
1073             Bruno Haible  <bruno@clisp.org>
1074
1075         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
1076         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
1077         #include_next, gives a diagnostic about it, but reports no error in
1078         the exit code.
1079         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
1080
1081 2007-07-24  Ben Pfaff  <blp@gnu.org>
1082
1083         Improve name: "count-one-bits" is better than "popcount".
1084         * MODULES.html.sh: Update name.
1085         * lib/popcount.h: Renamed lib/count-one-bits.h.
1086         (popcount): Renamed count_one_bits.
1087         (popcountl): Renamed count_one_bits_l.
1088         (popcountll): Renamed count_one_bits_ll.
1089         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
1090         * modules/popcount: Renamed module/count-one-bits.
1091         * modules/popcount-tests: Renamed module/count-one-bits-tests.
1092         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
1093
1094 2007-07-23  Ben Pfaff  <blp@gnu.org>
1095
1096         * lib/popcount.h (popcount32): Reduce size of constants, to allow
1097         better code generation, and add U to large constants to avoid
1098         warnings, in non-GCC case.
1099         Suggested by Bruno Haible.
1100
1101 2007-07-23  Ben Pfaff  <blp@gnu.org>
1102
1103         * lib/popcount.h: Use verify_true instead of if...abort.
1104         * modules/popcount: Depend on verify module.
1105         Suggested by Jim Meyering.
1106
1107 2007-07-23  Bruno Haible  <bruno@clisp.org>
1108
1109         * gnulib-tool (func_import): Create a .cvsignore file also when the
1110         directory is not yet in CVS but the toplevel directory is. When
1111         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
1112         Reported by Karl Berry.
1113
1114 2007-07-22  Ben Pfaff  <blp@gnu.org>
1115
1116         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
1117         case.
1118         Suggested by Eric Blake.
1119
1120 2007-07-22  Ben Pfaff  <blp@gnu.org>
1121
1122         New module: popcount.
1123         * MODULES.html.sh: Add popcount.
1124         * modules/popcount: New file.
1125         * modules/popcount-tests: New file.
1126         * tests/test-popcount.c: New file.
1127         * lib/popcount.h: New file.
1128         * m4/popcount.m4: New file.
1129
1130 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
1131
1132         * build-aux/announce-gen: Update to GPLv3.
1133
1134         * build-aux/config.guess: Update from config.
1135
1136 2007-07-21  Bruno Haible  <bruno@clisp.org>
1137
1138         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
1139         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
1140
1141 2007-07-20  Jim Meyering  <jim@meyering.net>
1142
1143         * check-module: Diagnose a self-dependency.
1144
1145 2007-07-19  Bruno Haible  <bruno@clisp.org>
1146
1147         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
1148         empty.
1149         Reported by Eric Blake.
1150
1151 2007-07-18  Bruno Haible  <bruno@clisp.org>
1152
1153         * gnulib-tool: New options --po-base, --po-domain.
1154         (func_usage): Document them.
1155         (pobase, po_domain): New variables.
1156         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
1157         DEFAULT_TEXT_DOMAIN.
1158         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
1159         (func_import): Consider pobase and po_domain. Create a po/ directory.
1160         (func_create_testdir): Set pobase and po_domain to empty.
1161         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
1162         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
1163
1164 2007-07-18  Bruno Haible  <bruno@clisp.org>
1165
1166         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1167         EXTRA_DIST augmentation for files in build-aux/.
1168
1169 2007-07-16  Bruno Haible  <bruno@clisp.org>
1170
1171         * modules/lseek (License): Use the synonymous term "LGPLv2+".
1172         * modules/getdelim (License): Likewise.
1173
1174 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1175
1176         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
1177         * modules/d-type (License): Likewise.
1178         * modules/extensions (License): Likewise.
1179         * modules/fnmatch (License): Likewise.
1180         * modules/fseeko (License): Likewise.
1181         * modules/getaddrinfo (License): Likewise.
1182         * modules/getline (License): Likewise.
1183         * modules/getlogin_r (License): Likewise.
1184         * modules/getpass (License): Likewise.
1185         * modules/gettimeofday (License): Likewise.
1186         * modules/glob (License): Likewise.
1187         * modules/inet_ntop (License): Likewise.
1188         * modules/malloc (License): Likewise.
1189         * modules/malloca (License): Likewise.
1190         * modules/memmem (License): Likewise.
1191         * modules/mempcpy (License): Likewise.
1192         * modules/memset (License): Likewise.
1193         * modules/minmax (License): Likewise.
1194         * modules/mktime (License): Likewise.
1195         * modules/netinet_in (License): Likewise.
1196         * modules/pathmax (License): Likewise.
1197         * modules/poll (License): Likewise.
1198         * modules/regex (License): Likewise.
1199         * modules/snprintf (License): Likewise.
1200         * modules/stdbool (License): Likewise.
1201         * modules/stdint (License): Likewise.
1202         * modules/stdio (License): Likewise.
1203         * modules/strcase (License): Likewise.
1204         * modules/strcasestr (License): Likewise.
1205         * modules/strdup (License): Likewise.
1206         * modules/string (License): Likewise.
1207         * modules/strndup (License): Likewise.
1208         * modules/strnlen (License): Likewise.
1209         * modules/strpbrk (License): Likewise.
1210         * modules/strptime (License): Likewise.
1211         * modules/strsep (License): Likewise.
1212         * modules/sys_select (License): Likewise.
1213         * modules/sys_socket (License): Likewise.
1214         * modules/sys_stat (License): Likewise.
1215         * modules/sys_time (License): Likewise.
1216         * modules/time (License): Likewise.
1217         * modules/time_r (License): Likewise.
1218         * modules/timegm (License): Likewise.
1219         * modules/unistd (License): Likewise.
1220         * modules/vsnprintf (License): Likewise.
1221         * modules/wctype (License): Likewise.
1222
1223 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1224
1225         * modules/argz (License): LGPLv2+.
1226
1227 2007-07-15  Karl Berry  <karl@gnu.org>
1228
1229         * doc/gnulib.texi: revise node structure per new fdl.texi.
1230
1231 2007-07-14  Bruno Haible  <bruno@clisp.org>
1232
1233         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
1234         the output file.
1235         * lib/uniname/uninames.h: Regenerated.
1236
1237 2007-07-14  Karl Berry  <karl@gnu.org>
1238
1239         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
1240         omitting sectioning and index commands.
1241
1242 2007-07-13  Bruno Haible  <bruno@clisp.org>
1243
1244         New gnulib-tool option --more-symlinks.
1245         * gnulib-tool (func_usage): Document --more-symlinks.
1246         (do_copyrights): New variable.
1247         Recognize option --more-symlinks.
1248         (func_import): Don't add a copyright notice transform to
1249         sed_transform_lib_file if do_copyrights is empty.
1250
1251 2007-07-13  Bruno Haible  <bruno@clisp.org>
1252
1253         * lib/vasnprintf.c (decimal_point_char): Define also if
1254         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
1255         && !NEED_PRINTF_DIRECTIVE_A.
1256         Reported by Clemens Koller <clemens.koller@anagramm.de> via
1257         Gary V. Vaughan <gary@gnu.org>.
1258
1259 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
1260
1261         * lib/inttypes_.h: Undo previous change, since it was fixed
1262         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
1263
1264 2007-07-13  Bruno Haible  <bruno@clisp.org>
1265
1266         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
1267         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
1268
1269 2007-07-13  Jim Meyering  <jim@meyering.net>
1270
1271         df: Don't fail for Tru64's "file-on-file mount".
1272         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
1273         so we fall through and use statfs instead.  Details here:
1274         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
1275         Reported by Albert Chin.
1276
1277 2007-07-13  Bruno Haible  <bruno@clisp.org>
1278
1279         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
1280         * modules/configmake (License): Likewise.
1281         * modules/gettext (License): Likewise.
1282         * modules/gettext-h (License): Likewise.
1283         * modules/include_next (License): Likewise.
1284         * modules/link-warning (License): Likewise.
1285         * modules/localcharset (License): Likewise.
1286         * modules/localename (License): Likewise.
1287         * modules/lock (License): Likewise.
1288         * modules/relocatable-lib-lgpl (License): Likewise.
1289         * modules/size_max (License): Likewise.
1290         * modules/vasnprintf (License): Likewise.
1291         * modules/wchar (License): Likewise.
1292         * modules/xsize (License): Likewise.
1293
1294 2007-07-13  Bruno Haible  <bruno@clisp.org>
1295
1296         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
1297         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
1298
1299 2007-07-12  Bruno Haible  <bruno@clisp.org>
1300
1301         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
1302         in the modules files.
1303
1304 2007-07-11  Karl Berry  <karl@gnu.org>
1305
1306         * MODULES.html.sh (func_module): use
1307          sed -e '\|^'"${includefile}"'$|d'
1308          instead of /.../d, to avoid errors on $includefile's containing /.
1309
1310 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1311
1312         * gnulib-tool (func_import): Avoid duplication of --avoid
1313         statements
1314         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
1315         names to `_' in variable names.
1316
1317 2007-07-10  Eric Blake  <ebb9@byu.net>
1318
1319         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
1320         * NEWS: Document this change.
1321
1322 2007-07-08  Bruno Haible  <bruno@clisp.org>
1323
1324         Update to Unicode 5.0.
1325         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
1326         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
1327         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
1328         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
1329         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
1330         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
1331         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
1332         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
1333         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
1334         U+10A3F, U+1D242..U+1D244.
1335         (nonspacing_table_ind): Update.
1336         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
1337         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
1338
1339 2007-07-08  Bruno Haible  <bruno@clisp.org>
1340
1341         Update to Unicode 5.0.
1342         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
1343         code transform. Extend the name index field of unicode_name_to_code and
1344         unicode_code_to_name from 16 to 24 bits.
1345         * lib/uniname/uniname.c (unicode_character_name,
1346         unicode_name_character): Add the range 0x12xxx to the code transform.
1347         * lib/uniname/uninames.h: Regenerated.
1348         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
1349
1350 2007-07-07  Bruno Haible  <bruno@clisp.org>
1351
1352         * modules/wcwidth-tests: New file.
1353         * tests/test-wcwidth.c: New file.
1354
1355         Work around MacOS X wcwidth() bug.
1356         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
1357         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
1358         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
1359         original wcwidth in non-UTF-8 locales.
1360         * modules/wcwidth (Depends-on): Add localcharset, streq,
1361         uniwidth/width.
1362         * doc/functions/wcwidth.texi: Update.
1363
1364 2007-07-07  Bruno Haible  <bruno@clisp.org>
1365
1366         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
1367         (wcwidth): New declaration.
1368         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
1369         macros.
1370         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
1371         here. Prepare for creating <wchar.h> unconditionally.
1372         * modules/wchar (Depends-on): Add link-warning.
1373         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
1374         REPLACE_WCWIDTH, and GL_LINK_WARNING.
1375         * lib/wcwidth.h: Remove file.
1376         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
1377         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
1378         * modules/wcwidth (Files): Remove lib/wcwidth.h.
1379         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
1380         (Include): Replace wcwidth.h with <wchar.h>.
1381         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
1382         * lib/mbchar.h: Don't include wcwidth.h.
1383         * lib/mbswidth.c: Likewise.
1384         * NEWS: Mention the change.
1385
1386 2007-07-07  Bruno Haible  <bruno@clisp.org>
1387
1388         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
1389         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
1390         definition with an external declaration.
1391         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
1392         defined as a function. Remove AC_C_INLINE requirement.
1393         * modules/wcwidth (Files): Add lib/wcwidth.c.
1394         (Makefile.am): Remove redundant statement.
1395
1396 2007-07-07  Bruno Haible  <bruno@clisp.org>
1397
1398         * MODULES.html.sh (Unicode string functions): Add the new modules.
1399
1400         * tests/uniwidth/test-u32-strwidth.c: New file.
1401         * modules/uniwidth/u32-strwidth-tests: New file.
1402
1403         * lib/uniwidth/u32-strwidth.c: New file.
1404         * modules/uniwidth/u32-strwidth: New file.
1405
1406         * tests/uniwidth/test-u16-strwidth.c: New file.
1407         * modules/uniwidth/u16-strwidth-tests: New file.
1408
1409         * lib/uniwidth/u16-strwidth.c: New file.
1410         * modules/uniwidth/u16-strwidth: New file.
1411
1412         * tests/uniwidth/test-u8-strwidth.c: New file.
1413         * modules/uniwidth/u8-strwidth-tests: New file.
1414
1415         * lib/uniwidth/u8-strwidth.c: New file.
1416         * modules/uniwidth/u8-strwidth: New file.
1417
1418         * tests/uniwidth/test-u32-width.c: New file.
1419         * modules/uniwidth/u32-width-tests: New file.
1420
1421         * lib/uniwidth/u32-width.c: New file.
1422         * modules/uniwidth/u32-width: New file.
1423
1424         * tests/uniwidth/test-u16-width.c: New file.
1425         * modules/uniwidth/u16-width-tests: New file.
1426
1427         * lib/uniwidth/u16-width.c: New file.
1428         * modules/uniwidth/u16-width: New file.
1429
1430         * tests/uniwidth/test-u8-width.c: New file.
1431         * modules/uniwidth/u8-width-tests: New file.
1432
1433         * lib/uniwidth/u8-width.c: New file.
1434         * modules/uniwidth/u8-width: New file.
1435
1436         * tests/uniwidth/test-uc_width.c: New file.
1437         * modules/uniwidth/width-tests: New file.
1438
1439         * lib/uniwidth/width.c: New file, from GNU libiconv.
1440         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
1441         * modules/uniwidth/width: New file.
1442
1443         * lib/uniwidth.h: New file, from GNU libiconv.
1444         * modules/uniwidth/base: New file.
1445
1446 2007-07-07  Bruno Haible  <bruno@clisp.org>
1447
1448         * lib/uniname.h: New file, from GNU gettext.
1449         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
1450         * lib/uniname/uninames.h: New file, from GNU gettext.
1451         * lib/uniname/uniname.c: New file, from GNU gettext.
1452         * tests/uniname/test-uninames.sh: New file.
1453         * tests/uniname/test-uninames.c: New file, from GNU gettext.
1454         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
1455         * modules/uniname/base: New file.
1456         * modules/uniname/uniname: New file.
1457         * modules/uniname/uniname-tests: New file.
1458         * MODULES.html.sh (Unicode string functions): Add the new modules.
1459
1460 2007-07-06  Bruno Haible  <bruno@clisp.org>
1461
1462         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
1463
1464 2007-07-06  Bruno Haible  <bruno@clisp.org>
1465
1466         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
1467         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
1468         includes <cygwin/sys_time.h> which includes <sys/select.h> which
1469         include <sys/time.h>.
1470         Reported by Eric Blake.
1471
1472 2007-07-06  Eric Blake  <ebb9@byu.net>
1473
1474         Fix testing canonicalize on cygwin.
1475         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1476         Revert patch from 2007-06-19.
1477         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
1478         canonicalize module is also in use.
1479         * tests/test-canonicalize.c: New file.
1480         * tests/test-canonicalize.sh: Likewise.
1481         * modules/canonicalize-tests: Likewise.
1482
1483 2007-07-06  Jim Meyering  <jim@meyering.net>
1484
1485         * lib/getugroups.c (getugroups): Detect getgrent failure.
1486         Adjust comment to reflect reality: this function may return -1.
1487
1488 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1489
1490         * build-aux/bootstrap (TP_URL,get_translations): Update to use
1491         the new TP address.
1492         (usage): Fix typo
1493         (gnulib_mk): New variable.
1494
1495 2007-07-05  Jim Meyering  <jim@meyering.net>
1496
1497         Don't let endgrent clobber errno, no matter how improbable.
1498         * lib/getugroups.c (getugroups): Save and restore errno around
1499         endgrent call.
1500
1501         Close the group DB even when failing with 2^31 or more members.
1502         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
1503
1504 2007-07-04  Jim Meyering  <jim@meyering.net>
1505
1506         * lib/getugroups.h: New file.
1507         * lib/getugroups.c: Include "getugroups.h".
1508         Remove uses of "register" keyword.
1509         Move local variable, "cp", down into scope where used.
1510         Give "username" parameter the "const" attribute.
1511         * modules/getugroups (Files): Add lib/getugroups.h
1512
1513 2007-07-04  Karl Berry  <karl@gnu.org>
1514
1515         * MODULES.html.sh (func_all_modules): Complete rename of
1516         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
1517
1518 2007-07-02  Bruno Haible  <bruno@clisp.org>
1519
1520         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
1521         mode, when inttypes.h comes from gnulib.
1522         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1523
1524 2007-07-02  Simon Josefsson  <simon@josefsson.org>
1525
1526         * NEWS: Mention lgpl module name change.
1527
1528         * modules/lgpl-2.1: Renamed from lgpl.
1529
1530         * NEWS: Mention gpl module name change.
1531
1532         * modules/gpl-3.0: New file, based on gpl-2.0.
1533
1534         * modules/gpl-2.0: Renamed from gpl.
1535
1536         * modules/gpl: Fix filename, doc/gpl.texi is now found at
1537         doc/gpl-2.0.texi.
1538
1539 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1540
1541         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
1542         #define __STDC_LIMIT_MACROS temporarily while including
1543         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
1544         Problem reported by Joel E. Denny in
1545         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
1546
1547 2007-07-01  Bruno Haible  <bruno@clisp.org>
1548
1549         * lib/unistdio.h: New file.
1550         * lib/unistdio/u-asnprintf.h: New file.
1551         * lib/unistdio/u-asprintf.h: New file.
1552         * lib/unistdio/u-printf-args.c: New file.
1553         * lib/unistdio/u-printf-args.h: New file.
1554         * lib/unistdio/u-printf-parse.h: New file.
1555         * lib/unistdio/u-snprintf.h: New file.
1556         * lib/unistdio/u-sprintf.h: New file.
1557         * lib/unistdio/u-vasprintf.h: New file.
1558         * lib/unistdio/u-vsnprintf.h: New file.
1559         * lib/unistdio/u-vsprintf.h: New file.
1560         * lib/unistdio/ulc-asnprintf.c: New file.
1561         * lib/unistdio/ulc-asprintf.c: New file.
1562         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
1563         * lib/unistdio/ulc-printf-parse.c: New file.
1564         * lib/unistdio/ulc-snprintf.c: New file.
1565         * lib/unistdio/ulc-sprintf.c: New file.
1566         * lib/unistdio/ulc-vasnprintf.c: New file.
1567         * lib/unistdio/ulc-vasprintf.c: New file.
1568         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
1569         * lib/unistdio/ulc-vsnprintf.c: New file.
1570         * lib/unistdio/ulc-vsprintf.c: New file.
1571         * lib/unistdio/u8-asnprintf.c: New file.
1572         * lib/unistdio/u8-asprintf.c: New file.
1573         * lib/unistdio/u8-printf-parse.c: New file.
1574         * lib/unistdio/u8-snprintf.c: New file.
1575         * lib/unistdio/u8-sprintf.c: New file.
1576         * lib/unistdio/u8-vasnprintf.c: New file.
1577         * lib/unistdio/u8-vasprintf.c: New file.
1578         * lib/unistdio/u8-vsnprintf.c: New file.
1579         * lib/unistdio/u8-vsprintf.c: New file.
1580         * lib/unistdio/u8-u8-asnprintf.c: New file.
1581         * lib/unistdio/u8-u8-asprintf.c: New file.
1582         * lib/unistdio/u8-u8-snprintf.c: New file.
1583         * lib/unistdio/u8-u8-sprintf.c: New file.
1584         * lib/unistdio/u8-u8-vasnprintf.c: New file.
1585         * lib/unistdio/u8-u8-vasprintf.c: New file.
1586         * lib/unistdio/u8-u8-vsnprintf.c: New file.
1587         * lib/unistdio/u8-u8-vsprintf.c: New file.
1588         * lib/unistdio/u16-asnprintf.c: New file.
1589         * lib/unistdio/u16-asprintf.c: New file.
1590         * lib/unistdio/u16-printf-parse.c: New file.
1591         * lib/unistdio/u16-snprintf.c: New file.
1592         * lib/unistdio/u16-sprintf.c: New file.
1593         * lib/unistdio/u16-vasnprintf.c: New file.
1594         * lib/unistdio/u16-vasprintf.c: New file.
1595         * lib/unistdio/u16-vsnprintf.c: New file.
1596         * lib/unistdio/u16-vsprintf.c: New file.
1597         * lib/unistdio/u16-u16-asnprintf.c: New file.
1598         * lib/unistdio/u16-u16-asprintf.c: New file.
1599         * lib/unistdio/u16-u16-snprintf.c: New file.
1600         * lib/unistdio/u16-u16-sprintf.c: New file.
1601         * lib/unistdio/u16-u16-vasnprintf.c: New file.
1602         * lib/unistdio/u16-u16-vasprintf.c: New file.
1603         * lib/unistdio/u16-u16-vsnprintf.c: New file.
1604         * lib/unistdio/u16-u16-vsprintf.c: New file.
1605         * lib/unistdio/u32-asnprintf.c: New file.
1606         * lib/unistdio/u32-asprintf.c: New file.
1607         * lib/unistdio/u32-printf-parse.c: New file.
1608         * lib/unistdio/u32-snprintf.c: New file.
1609         * lib/unistdio/u32-sprintf.c: New file.
1610         * lib/unistdio/u32-vasnprintf.c: New file.
1611         * lib/unistdio/u32-vasprintf.c: New file.
1612         * lib/unistdio/u32-vsnprintf.c: New file.
1613         * lib/unistdio/u32-vsprintf.c: New file.
1614         * lib/unistdio/u32-u32-asnprintf.c: New file.
1615         * lib/unistdio/u32-u32-asprintf.c: New file.
1616         * lib/unistdio/u32-u32-snprintf.c: New file.
1617         * lib/unistdio/u32-u32-sprintf.c: New file.
1618         * lib/unistdio/u32-u32-vasnprintf.c: New file.
1619         * lib/unistdio/u32-u32-vasprintf.c: New file.
1620         * lib/unistdio/u32-u32-vsnprintf.c: New file.
1621         * lib/unistdio/u32-u32-vsprintf.c: New file.
1622         * tests/unistdio/test-ulc-asnprintf1.c: New file.
1623         * tests/unistdio/test-ulc-asnprintf1.h: New file.
1624         * tests/unistdio/test-ulc-printf1.h: New file.
1625         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
1626         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
1627         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
1628         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
1629         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
1630         * tests/unistdio/test-ulc-vasprintf1.c: New file.
1631         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
1632         * tests/unistdio/test-ulc-vsprintf1.c: New file.
1633         * tests/unistdio/test-u8-asnprintf1.c: New file.
1634         * tests/unistdio/test-u8-asnprintf1.h: New file.
1635         * tests/unistdio/test-u8-printf1.h: New file.
1636         * tests/unistdio/test-u8-vasnprintf1.c: New file.
1637         * tests/unistdio/test-u8-vasnprintf2.c: New file.
1638         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
1639         * tests/unistdio/test-u8-vasnprintf3.c: New file.
1640         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
1641         * tests/unistdio/test-u8-vasprintf1.c: New file.
1642         * tests/unistdio/test-u8-vsnprintf1.c: New file.
1643         * tests/unistdio/test-u8-vsprintf1.c: New file.
1644         * tests/unistdio/test-u16-asnprintf1.c: New file.
1645         * tests/unistdio/test-u16-asnprintf1.h: New file.
1646         * tests/unistdio/test-u16-printf1.h: New file.
1647         * tests/unistdio/test-u16-vasnprintf1.c: New file.
1648         * tests/unistdio/test-u16-vasnprintf2.c: New file.
1649         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
1650         * tests/unistdio/test-u16-vasnprintf3.c: New file.
1651         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
1652         * tests/unistdio/test-u16-vasprintf1.c: New file.
1653         * tests/unistdio/test-u16-vsnprintf1.c: New file.
1654         * tests/unistdio/test-u16-vsprintf1.c: New file.
1655         * tests/unistdio/test-u32-asnprintf1.c: New file.
1656         * tests/unistdio/test-u32-asnprintf1.h: New file.
1657         * tests/unistdio/test-u32-printf1.h: New file.
1658         * tests/unistdio/test-u32-vasnprintf1.c: New file.
1659         * tests/unistdio/test-u32-vasnprintf2.c: New file.
1660         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
1661         * tests/unistdio/test-u32-vasnprintf3.c: New file.
1662         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
1663         * tests/unistdio/test-u32-vasprintf1.c: New file.
1664         * tests/unistdio/test-u32-vsnprintf1.c: New file.
1665         * tests/unistdio/test-u32-vsprintf1.c: New file.
1666         * modules/unistdio/base: New file.
1667         * modules/unistdio/u-printf-args: New file.
1668         * modules/unistdio/ulc-asnprintf: New file.
1669         * modules/unistdio/ulc-asprintf: New file.
1670         * modules/unistdio/ulc-fprintf: New file.
1671         * modules/unistdio/ulc-printf-parse: New file.
1672         * modules/unistdio/ulc-snprintf: New file.
1673         * modules/unistdio/ulc-sprintf: New file.
1674         * modules/unistdio/ulc-vasnprintf: New file.
1675         * modules/unistdio/ulc-vasprintf: New file.
1676         * modules/unistdio/ulc-vfprintf: New file.
1677         * modules/unistdio/ulc-vsnprintf: New file.
1678         * modules/unistdio/ulc-vsprintf: New file.
1679         * modules/unistdio/u8-asnprintf: New file.
1680         * modules/unistdio/u8-asprintf: New file.
1681         * modules/unistdio/u8-printf-parse: New file.
1682         * modules/unistdio/u8-snprintf: New file.
1683         * modules/unistdio/u8-sprintf: New file.
1684         * modules/unistdio/u8-vasnprintf: New file.
1685         * modules/unistdio/u8-vasprintf: New file.
1686         * modules/unistdio/u8-vsnprintf: New file.
1687         * modules/unistdio/u8-vsprintf: New file.
1688         * modules/unistdio/u8-u8-asnprintf: New file.
1689         * modules/unistdio/u8-u8-asprintf: New file.
1690         * modules/unistdio/u8-u8-snprintf: New file.
1691         * modules/unistdio/u8-u8-sprintf: New file.
1692         * modules/unistdio/u8-u8-vasnprintf: New file.
1693         * modules/unistdio/u8-u8-vasprintf: New file.
1694         * modules/unistdio/u8-u8-vsnprintf: New file.
1695         * modules/unistdio/u8-u8-vsprintf: New file.
1696         * modules/unistdio/u16-asnprintf: New file.
1697         * modules/unistdio/u16-asprintf: New file.
1698         * modules/unistdio/u16-printf-parse: New file.
1699         * modules/unistdio/u16-snprintf: New file.
1700         * modules/unistdio/u16-sprintf: New file.
1701         * modules/unistdio/u16-vasnprintf: New file.
1702         * modules/unistdio/u16-vasprintf: New file.
1703         * modules/unistdio/u16-vsnprintf: New file.
1704         * modules/unistdio/u16-vsprintf: New file.
1705         * modules/unistdio/u16-u16-asnprintf: New file.
1706         * modules/unistdio/u16-u16-asprintf: New file.
1707         * modules/unistdio/u16-u16-snprintf: New file.
1708         * modules/unistdio/u16-u16-sprintf: New file.
1709         * modules/unistdio/u16-u16-vasnprintf: New file.
1710         * modules/unistdio/u16-u16-vasprintf: New file.
1711         * modules/unistdio/u16-u16-vsnprintf: New file.
1712         * modules/unistdio/u16-u16-vsprintf: New file.
1713         * modules/unistdio/u32-asnprintf: New file.
1714         * modules/unistdio/u32-asprintf: New file.
1715         * modules/unistdio/u32-printf-parse: New file.
1716         * modules/unistdio/u32-snprintf: New file.
1717         * modules/unistdio/u32-sprintf: New file.
1718         * modules/unistdio/u32-vasnprintf: New file.
1719         * modules/unistdio/u32-vasprintf: New file.
1720         * modules/unistdio/u32-vsnprintf: New file.
1721         * modules/unistdio/u32-vsprintf: New file.
1722         * modules/unistdio/u32-u32-asnprintf: New file.
1723         * modules/unistdio/u32-u32-asprintf: New file.
1724         * modules/unistdio/u32-u32-snprintf: New file.
1725         * modules/unistdio/u32-u32-sprintf: New file.
1726         * modules/unistdio/u32-u32-vasnprintf: New file.
1727         * modules/unistdio/u32-u32-vasprintf: New file.
1728         * modules/unistdio/u32-u32-vsnprintf: New file.
1729         * modules/unistdio/u32-u32-vsprintf: New file.
1730         * modules/unistdio/ulc-asnprintf-tests: New file.
1731         * modules/unistdio/ulc-vasnprintf-tests: New file.
1732         * modules/unistdio/ulc-vasprintf-tests: New file.
1733         * modules/unistdio/ulc-vsnprintf-tests: New file.
1734         * modules/unistdio/ulc-vsprintf-tests: New file.
1735         * modules/unistdio/u8-asnprintf-tests: New file.
1736         * modules/unistdio/u8-vasnprintf-tests: New file.
1737         * modules/unistdio/u8-vasprintf-tests: New file.
1738         * modules/unistdio/u8-vsnprintf-tests: New file.
1739         * modules/unistdio/u8-vsprintf-tests: New file.
1740         * modules/unistdio/u16-asnprintf-tests: New file.
1741         * modules/unistdio/u16-vasnprintf-tests: New file.
1742         * modules/unistdio/u16-vasprintf-tests: New file.
1743         * modules/unistdio/u16-vsnprintf-tests: New file.
1744         * modules/unistdio/u16-vsprintf-tests: New file.
1745         * modules/unistdio/u32-asnprintf-tests: New file.
1746         * modules/unistdio/u32-vasnprintf-tests: New file.
1747         * modules/unistdio/u32-vasprintf-tests: New file.
1748         * modules/unistdio/u32-vsnprintf-tests: New file.
1749         * modules/unistdio/u32-vsprintf-tests: New file.
1750         * MODULES.html.sh (Unicode string functions): Add the new modules.
1751
1752 2007-07-01  Bruno Haible  <bruno@clisp.org>
1753
1754         * lib/sprintf.c (sprintf): Limit the available length estimation,
1755         to avoid address wraparound.
1756         * lib/vsprintf.c (vsprintf): Likewise.
1757         * modules/sprintf-posix (Dependencies): Add stdint.
1758         * modules/vsprintf-posix (Dependencies): Likewise.
1759
1760 2007-07-01  Bruno Haible  <bruno@clisp.org>
1761
1762         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1763         Windows PATH as well. Conservative double-quoting. Comments.
1764
1765 2007-07-01  Bruno Haible  <bruno@clisp.org>
1766             Eric Blake  <ebb9@byu.net>
1767             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1768
1769         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1770         empty components in $PATH, denoting '.'.
1771
1772 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1773
1774         * gnulib-tool: Fix indentation.
1775         (func_create_megatestdir): Likewise.
1776         Report by Bruno Haible.
1777
1778 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1779
1780         Sync from Automake.
1781         * build-aux/gnupload: Fix shell portability issues with for loops.
1782         Report by Karl Berry.
1783
1784 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1785
1786         * build-aux/maint.mk (POURL): Use translationproject.org.
1787
1788 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1789             Bruno Haible  <bruno@clisp.org>
1790
1791         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1792         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1793         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1794         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1795         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1796
1797 2007-06-27  Bruno Haible  <bruno@clisp.org>
1798
1799         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1800         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1801
1802 2007-06-26  Karl Berry  <karl@gnu.org>
1803
1804         * MODULES.html.sh: remove xreadlink-with-size.
1805
1806 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1807
1808         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1809         method that I hope also handles the double-include problem noted
1810         by Bruno Haible in
1811         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1812
1813 2007-06-23  Bruno Haible  <bruno@clisp.org>
1814
1815         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1816         Don't let the 'mostlyclean' target fail if the last subdirectory could
1817         not be removed.
1818         Reported by Karl Berry.
1819
1820 2007-06-23  Bruno Haible  <bruno@clisp.org>
1821
1822         * gnulib-tool (echo): Add a speedier workaround for ksh.
1823         * tests/test-echo.sh: Likewise.
1824
1825 2007-06-23  Bruno Haible  <bruno@clisp.org>
1826
1827         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1828         * tests/test-echo.sh: Likewise.
1829
1830 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1831
1832         * gnulib-tool (IFS): Initialize early, so we don't set it to
1833         empty later.
1834         (self_abspathname): Rewrite algorithm to set it, reindent.
1835         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1836         (func_create_megatestdir): Merge some sed scripts.
1837
1838 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1839
1840         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1841         exposed by Sun Studio 11 cc on Solaris 8.
1842
1843 2007-06-22  Bruno Haible  <bruno@clisp.org>
1844
1845         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1846         backslashes.
1847         * tests/test-echo.sh: New file.
1848
1849 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1850
1851         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1852         simplify `sed_replace_build_aux' scripts, they are portable but
1853         echoing them with `echo' is not.
1854         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1855
1856 2007-06-21  Karl Berry  <karl@gnu.org>
1857
1858         * config/srclist.txt: guess we can't handle the licenses via
1859         srclist at the moment.
1860
1861 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1862
1863         * MODULES.html.sh: Add include_next.
1864         * modules/include_next: New file.
1865
1866 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1867
1868         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1869         INCLUDE_NEXT.
1870         (gl_CHECK_NEXT_HEADERS): New macro.
1871         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1872         the obsolescent gl_ABSOLUTE_HEADER.
1873         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1874         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1875         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1876         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1877         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1878         * m4/math_h.m4 (gl_MATH_H): Likewise.
1879         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1880         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1881         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1882         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1883         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1884         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1885         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1886         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1887         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1888         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1889         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1890         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1891         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1892         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1893         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1894         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1895         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1896         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1897         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1898         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1899         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1900         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1901         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1902         * lib/float_.h: Likewise.
1903         * lib/inttypes_.h: Likewise.
1904         * lib/math_.h: Likewise.
1905         * lib/search_.h: Likewise.
1906         * lib/signal_.h: Likewise.
1907         * lib/stdint_.h: Likewise.
1908         * lib/stdio_.h: Likewise.
1909         * lib/stdlib_.h: Likewise.
1910         * lib/string_.h: Likewise.
1911         * lib/sys_stat_.h: Likewise.
1912         * lib/sys_time_.h: Likewise.
1913         * lib/time_.h: Likewise.
1914         * lib/unistd_.h: Likewise.
1915         * lib/wchar_.h: Likewise.
1916         * lib/wctype_.h: Likewise.
1917         * lib/dirent_.h: Likewise.
1918         * lib/iconv_.h: Likewise.
1919         * lib/locale_.h: Likewise.
1920         * lib/netinet_in_.h: Likewise.
1921         * lib/sys_select_.h: Likewise.
1922         * lib/sys_socket_.h: Likewise.
1923         * lib/sysexits_.h: Likewise.
1924         * modules/fcntl (Depends-on): Depend on include_next, not
1925         absolute_header.
1926         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1927         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1928         * modules/fchdir: Likewise.
1929         * modules/float: Likewise.
1930         * modules/iconv_open: Likewise.
1931         * modules/inttypes: Likewise.
1932         * modules/locale: Likewise.
1933         * modules/math: Likewise.
1934         * modules/netinet_in: Likewise.
1935         * modules/search: Likewise.
1936         * modules/signal: Likewise.
1937         * modules/stdint: Likewise.
1938         * modules/stdio: Likewise.
1939         * modules/stdlib: Likewise.
1940         * modules/string: Likewise.
1941         * modules/sys_select: Likewise.
1942         * modules/sys_socket: Likewise.
1943         * modules/sys_stat: Likewise.
1944         * modules/sys_time: Likewise.
1945         * modules/sysexits: Likewise.
1946         * modules/time: Likewise.
1947         * modules/unistd: Likewise.
1948         * modules/wchar: Likewise.
1949         * modules/wctype: Likewise.
1950         * modules/sys_stat: Change maintainer to "all".
1951         * modules/unistd: Likewise.
1952
1953 2007-06-20  Karl Berry  <karl@gnu.org>
1954
1955         * config/srclist.txt: track www changes in license files.
1956
1957 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1958
1959         * build-aux/bootstrap: Remove stray dot.
1960         Make sure build_aux settings are honored when linking
1961         gnulib_extra_files.
1962
1963 2007-06-19  Eric Blake  <ebb9@byu.net>
1964
1965         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1966         Allow compilation on cygwin.
1967
1968 2007-06-19  Jim Meyering  <jim@meyering.net>
1969
1970         xreadlink-with-size: Remove module.  No longer used.
1971         Ex-callers now use xreadlink or mreadlink-with-size.
1972         * modules/xreadlink-with-size: Remove module.
1973         * lib/xreadlink-with-size.c: Remove file.
1974         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1975         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1976         just before the function definition *is* accurate.
1977
1978         Eliminate one way canonicalize_filename_mode could exit.
1979         * lib/canonicalize.c (canonicalize_filename_mode):
1980         Use mreadlink_with_size, not xreadlink_with_size.
1981
1982 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1983
1984         Detect porting problems to FreeBSD/arm, which has time_t wider than
1985         long int.  Original problem reported for GNU diff by Xin Li in
1986         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1987         * modules/getdate (Depends-on): Add intprops, verify.
1988         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1989         is an integer type no wider than long int.
1990
1991 2007-06-18  Jim Meyering  <jim@meyering.net>
1992
1993         New module: mreadlink-with-size.
1994         * MODULES.html.sh: Add mreadlink-with-size.
1995         * modules/mreadlink-with-size: New module
1996         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1997         not xreadlink-with-size.
1998         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1999
2000 2007-06-16  Bruno Haible  <bruno@clisp.org>
2001
2002         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
2003         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
2004         Reported by Gary V. Vaughan <gary@gnu.org>.
2005
2006 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
2007
2008         Revamp lchown so that it lives in unistd.h where it belongs.
2009         * lib/lchown.h: Remove.
2010         * lib/dirchownmod.c: Don't include lib/lchown.h.
2011         * lib/fchownat.c: Likewise.
2012         * lib/openat.c: Likewise.
2013         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
2014         does not follow symlinks.
2015         (EOPNOTSUPP): Define if not defined.
2016         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
2017         is defined to 0.
2018         (lchown): New decl.
2019         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
2020         Do not check for lchown decl.
2021         Set REPLACE_LCHOWN.
2022         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
2023         REPLACE_LCHOWN.
2024         * modules/chown: Make it clear it follows symlinks.
2025         * modules/lchown: Make it clear it doesn't follow symlinks.
2026         (Files): Remove lib/lchown.h
2027         (Depends-on): Add unistd.
2028         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
2029         (Include): Include <unistd.h>, not "lchown.h".
2030         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
2031         REPLACE_LCHOWN.
2032
2033 2007-06-15  Jim Meyering  <jim@meyering.net>
2034
2035         Change license (GPL to LGPL) of fsusage and dependents.
2036         * modules/fsusage (License): Change to LGPL.
2037         * modules/full-read (License): Likewise.
2038         * modules/full-write (License): Likewise.
2039         * modules/safe-read (License): Likewise.
2040         * modules/safe-write (License): Likewise.
2041
2042 2007-06-14  Ben Pfaff  <blp@gnu.org>
2043
2044         Missing part of allocsa -> malloca transition.
2045         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
2046         gl_MALLOCA.
2047
2048 2007-06-12  Bruno Haible  <bruno@clisp.org>
2049
2050         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
2051         to ia64, x86_64, i386.
2052         Reported by Eric Blake.
2053
2054 2007-06-12  Bruno Haible  <bruno@clisp.org>
2055
2056         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
2057         cross-compiling to x86_64.
2058
2059 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
2060
2061         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
2062         glitch reported by Ralf Wildenhues in
2063         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
2064
2065         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
2066         Vin Shelton.
2067
2068 2007-06-11  Bruno Haible  <bruno@clisp.org>
2069
2070         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
2071         replacement string.
2072         Reported by Eric Blake.
2073
2074 2007-06-10  Bruno Haible  <bruno@clisp.org>
2075
2076         Prepare vasnprintf code for use with Unicode strings.
2077         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
2078         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
2079         TYPE_U32_STRING.
2080         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
2081         a_u32_string variants.
2082         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
2083         * lib/printf-args.c: Don't include config.h and the specification
2084         header if PRINTF_FETCHARGS is already defined.
2085         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
2086         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
2087         TYPE_U16_STRING, TYPE_U32_STRING.
2088         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
2089         u16_directive, u16_directives, u32_directive, u32_directives): New
2090         types.
2091         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
2092         New declarations.
2093         * lib/printf-parse.c: Don't include config.h and the specification
2094         header if PRINTF_PARSE is already defined. Eliminate the set of
2095         parameters for WIDE_CHAR_VERSION; the user of this file must provide
2096         them now. Include c-ctype.h.
2097         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
2098         directive and CHAR_T_ONLY_ASCII.
2099         * lib/vasnprintf.c: Don't include config.h and the specification header
2100         if VASNPRINTF is already defined.
2101         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
2102         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
2103         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
2104         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
2105         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
2106         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
2107         code accordingly.
2108         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
2109         pad_ourselves also in this case, with the 'c' and 's' directives, and
2110         with a different notion of "width".
2111         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
2112
2113 2007-06-10  Bruno Haible  <bruno@clisp.org>
2114
2115         * modules/unistr/u32-mbsnlen: New file.
2116         * lib/unistr/u32-mbsnlen.c: New file.
2117
2118         * modules/unistr/u16-mbsnlen: New file.
2119         * lib/unistr/u16-mbsnlen.c: New file.
2120
2121         * modules/unistr/u8-mbsnlen: New file.
2122         * lib/unistr/u8-mbsnlen.c: New file.
2123
2124         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
2125         declarations.
2126
2127 2007-06-10  Bruno Haible  <bruno@clisp.org>
2128
2129         * lib/string_.h (mbsnlen): New declaration.
2130         * lib/mbsnlen.c: New file.
2131         * m4/mbsnlen.m4: New file.
2132         * modules/mbsnlen: New file.
2133         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
2134         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
2135         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
2136
2137 2007-06-10  Bruno Haible  <bruno@clisp.org>
2138
2139         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
2140
2141 2007-06-10  Bruno Haible  <bruno@clisp.org>
2142
2143         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
2144         * lib/mbuiter.h: Likewise.
2145
2146 2007-06-10  Bruno Haible  <bruno@clisp.org>
2147
2148         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
2149         declaration.
2150
2151 2007-06-10  Karl Berry  <karl@gnu.org>
2152
2153         * config/srclist.txt: remove gettext entries, Bruno prefers
2154         to update individually.
2155
2156 2007-06-10  Bruno Haible  <bruno@clisp.org>
2157
2158         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
2159         'maxlen'. Ensure only length + width bytes are allocated, not
2160         length + 1 + width.
2161
2162 2007-06-09  Bruno Haible  <bruno@clisp.org>
2163
2164         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
2165         (CHAR_T): Remove macro.
2166         (VASNPRINTF): Update.
2167
2168 2007-06-09  Bruno Haible  <bruno@clisp.org>
2169
2170         * MODULES.html.sh (Unicode string functions): Add the new modules.
2171
2172         * modules/uniconv/u32-conv-to-enc: New file.
2173         * lib/uniconv/u32-conv-to-enc.c: New file.
2174         * modules/uniconv/u32-conv-to-enc-tests: New file.
2175         * tests/uniconv/test-u32-conv-to-enc.c: New file.
2176
2177         * modules/uniconv/u16-conv-to-enc: New file.
2178         * lib/uniconv/u16-conv-to-enc.c: New file.
2179         * lib/uniconv/u-conv-to-enc.h: New file.
2180         * modules/uniconv/u16-conv-to-enc-tests: New file.
2181         * tests/uniconv/test-u16-conv-to-enc.c: New file.
2182
2183         * modules/uniconv/u8-conv-to-enc: New file.
2184         * lib/uniconv/u8-conv-to-enc.c: New file.
2185         * modules/uniconv/u8-conv-to-enc-tests: New file.
2186         * tests/uniconv/test-u8-conv-to-enc.c: New file.
2187
2188         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
2189         u32_conv_to_encoding): New declarations.
2190
2191 2007-06-09  Bruno Haible  <bruno@clisp.org>
2192
2193         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
2194
2195 2007-06-09  Bruno Haible  <bruno@clisp.org>
2196
2197         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
2198         * modules/malloca: Renamed from modules/allocsa, updated.
2199         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
2200         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
2201         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
2202         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
2203         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
2204         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
2205         * modules/xmalloca: Renamed from modules/xallocsa, updated.
2206         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
2207         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
2208         * modules/c-strcasestr (Depends-on): Update.
2209         * lib/c-strcasestr.c: Update.
2210         * modules/c-strstr (Depends-on): Update.
2211         * lib/c-strstr.c: Update.
2212         * modules/canonicalize-lgpl (Depends-on): Update.
2213         * lib/canonicalize-lgpl.c: Update.
2214         * modules/clean-temp (Depends-on): Update.
2215         * lib/clean-temp.c: Update.
2216         * modules/csharpcomp (Depends-on): Update.
2217         * lib/csharpcomp.c: Update.
2218         * modules/csharpexec (Depends-on): Update.
2219         * lib/csharpexec.c: Update.
2220         * modules/javacomp (Depends-on): Update.
2221         * lib/javacomp.c: Update.
2222         * modules/javaexec (Depends-on): Update.
2223         * lib/javaexec.c: Update.
2224         * modules/mbscasestr (Depends-on): Update.
2225         * lib/mbscasestr.c: Update.
2226         * modules/mbsstr (Depends-on): Update.
2227         * lib/mbsstr.c: Update.
2228         * modules/setenv (Depends-on): Update.
2229         * lib/setenv.c: Update.
2230         * modules/strcasestr (Depends-on): Update.
2231         * lib/strcasestr.c: Update.
2232         * modules/striconveha (Depends-on): Update.
2233         * lib/striconveha.c: Update.
2234         * modules/relocatable-prog-wrapper (Files): Update.
2235         * lib/relocwrapper.c: Update.
2236         * build-aux/install-reloc: Update.
2237         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
2238
2239 2007-06-08  Bruno Haible  <bruno@clisp.org>
2240
2241         Port to uClibc.
2242         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
2243         * lib/fpurge.c (fpurge): Likewise.
2244         * lib/freading.c (freading): Likewise.
2245         * lib/fseeko.c (rpl_fseeko): Likewise.
2246         * lib/fseterr.c (fseterr): Likewise.
2247         * lib/fwriting.c (fwriting): Likewise.
2248         * tests/test-fflush.c (main): Avoid a failure on uClibc.
2249
2250 2007-06-08  Bruno Haible  <bruno@clisp.org>
2251
2252         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
2253         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
2254         * modules/gettext (Files): Add m4/intlmacosx.m4.
2255
2256 2007-06-07  Bruno Haible  <bruno@clisp.org>
2257
2258         * modules/localename-tests: New file.
2259         * tests/test-localename.c: New file.
2260
2261         New module 'localename'.
2262         * lib/localename.h: New file.
2263         * lib/localename.c: New file, from GNU gettext.
2264         * m4/localename.m4: New file.
2265         * modules/localename: New file.
2266
2267 2007-06-07  Bruno Haible  <bruno@clisp.org>
2268
2269         Work around the lack of <wchar.h> on some builds of uClibc.
2270         * doc/headers/wchar.texi: Update.
2271         * lib/wchar_.h: Include <wchar.h> only if it exists.
2272         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
2273         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
2274         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
2275         doesn't exist.
2276         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
2277         * modules/mbfile (Depends-on): Add wchar.
2278         * modules/mbiter (Depends-on): Likewise.
2279         * modules/mbuiter (Depends-on): Likewise.
2280         Reported by Simon Josefsson.
2281
2282 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2283
2284         Work around problem reported by Steven M. Schweda in
2285         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
2286         Tru64 5.1B with the Compaq compiler environment installed declares
2287         an 'isblank' function but does not define it in the C library.
2288         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
2289         * lib/regex_internal.h (isblank): Likewise.
2290         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
2291         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2292
2293 2007-06-05  Bruno Haible  <bruno@clisp.org>
2294
2295         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
2296         ia64.
2297         * modules/printf-safe: New file.
2298         * modules/fprintf-posix (Depends-on): Add printf-safe.
2299         * modules/printf-posix (Depends-on): Likewise.
2300         * modules/snprintf-posix (Depends-on): Likewise.
2301         * modules/sprintf-posix (Depends-on): Likewise.
2302         * modules/vasnprintf-posix (Depends-on): Likewise.
2303         * modules/vasprintf-posix (Depends-on): Likewise.
2304         * modules/vfprintf-posix (Depends-on): Likewise.
2305         * modules/vprintf-posix (Depends-on): Likewise.
2306         * modules/vsnprintf-posix (Depends-on): Likewise.
2307         * modules/vsprintf-posix (Depends-on): Likewise.
2308         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
2309         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
2310         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
2311         "no" on i386, x86_64, ia64.
2312         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
2313         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2314         on i386, x86_64, ia64.
2315         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
2316         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2317         on i386, x86_64, ia64.
2318         * tests/test-vasnprintf-posix.c: Include float.h.
2319         (LDBL80_WORDS): New macro.
2320         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2321         on i386, x86_64, ia64.
2322         * tests/test-vasprintf-posix.c: Include float.h.
2323         (LDBL80_WORDS): New macro.
2324         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2325         on i386, x86_64, ia64.
2326         * tests/test-snprintf-posix.c: Include float.h.
2327         * tests/test-sprintf-posix.c: Likewise.
2328         * tests/test-vsnprintf-posix.c: Likewise.
2329         * tests/test-vsprintf-posix.c: Likewise.
2330
2331 2007-06-05  Bruno Haible  <bruno@clisp.org>
2332
2333         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
2334         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
2335         non-IEEE numbers on i386, x86_64, ia64.
2336         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
2337         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
2338         * tests/test-isnanl.h: Include float.h.
2339         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
2340
2341 2007-06-05  Bruno Haible  <bruno@clisp.org>
2342
2343         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
2344         also the %a / %A. Handle the %a / %A code before this extra handling.
2345
2346 2007-06-05  Bruno Haible  <bruno@clisp.org>
2347
2348         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
2349         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
2350
2351 2007-06-05  Bruno Haible  <bruno@clisp.org>
2352
2353         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
2354         typo in variable name.
2355
2356 2007-06-05  Eric Blake  <ebb9@byu.net>
2357
2358         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
2359         Reported by Simon Josefsson.
2360
2361 2007-06-04  Bruno Haible  <bruno@clisp.org>
2362
2363         Avoid test failures on some PowerPC platforms.
2364         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
2365         Define differently for PowerPC.
2366         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
2367         Reported by Gary V. Vaughan <gary@gnu.org>.
2368
2369 2007-06-02  Bruno Haible  <bruno@clisp.org>
2370
2371         Fix test-stdint failure on FreeBSD/ia64.
2372         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
2373         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
2374         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
2375         * doc/headers/stdint.texi: Update.
2376
2377 2007-06-01  Bruno Haible  <bruno@clisp.org>
2378
2379         * tests/test-binary-io.c (main): Pass a third argument to open().
2380         Reported by Gary V. Vaughan <gary@gnu.org>.
2381
2382 2007-06-01  Bruno Haible  <bruno@clisp.org>
2383
2384         * doc/functions/frexpl.texi: Update for mingw.
2385
2386 2007-06-01  Bruno Haible  <bruno@clisp.org>
2387
2388         * tests/test-lseek.c (main): Disable test of errno for invalid third
2389         argument.
2390         * doc/functions/lseek.texi: Update.
2391         Reported by Gary V. Vaughan <gary@gnu.org>.
2392
2393 2007-05-28  Bruno Haible  <bruno@clisp.org>
2394
2395         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
2396
2397 2007-05-31  Eric Blake  <ebb9@byu.net>
2398
2399         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
2400         cross compiling.
2401
2402 2007-05-30  Eric Blake  <ebb9@byu.net>
2403         and Bruno Haible  <bruno@clisp.org>
2404
2405         Work around mingw test failures exposed by m4-1.4.9b.
2406         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
2407         * tests/test-unistd.c: Disable uid_t and git_t tests for the
2408         moment.
2409
2410 2007-05-30  Bruno Haible  <bruno@clisp.org>
2411
2412         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
2413         assuming that they are closed. Needed on HP-UX 11.
2414
2415 2007-05-29  Bruno Haible  <bruno@clisp.org>
2416
2417         Fix a problem with #include_next.
2418         * lib/dirent_.h: Split the double-inclusion guard.
2419         * lib/fcntl_.h: Likewise.
2420         * lib/float_.h: Likewise.
2421         * lib/iconv_.h: Likewise.
2422         * lib/inttypes_.h: Likewise.
2423         * lib/locale_.h: Likewise.
2424         * lib/math_.h: Likewise.
2425         * lib/netinet_in_.h: Likewise.
2426         * lib/search_.h: Likewise.
2427         * lib/signal_.h: Likewise.
2428         * lib/stdint_.h: Likewise.
2429         * lib/stdio_.h: Likewise.
2430         * lib/stdlib_.h: Likewise.
2431         * lib/string_.h: Likewise.
2432         * lib/sys_select_.h: Likewise.
2433         * lib/sys_socket_.h: Likewise.
2434         * lib/sys_stat_.h: Likewise.
2435         * lib/sys_time_.h: Likewise.
2436         * lib/sysexits_.h: Likewise.
2437         * lib/time_.h: Likewise.
2438         * lib/unistd_.h: Likewise.
2439         * lib/wchar_.h: Likewise.
2440         * lib/wctype_.h: Likewise.
2441
2442 2007-05-29  Bruno Haible  <bruno@clisp.org>
2443
2444         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
2445         for the moment.
2446
2447 2007-05-29  Bruno Haible  <bruno@clisp.org>
2448
2449         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
2450         invocation.
2451         Reported by Eric Blake.
2452
2453 2007-05-29  Bruno Haible  <bruno@clisp.org>
2454
2455         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
2456         compiling case.
2457
2458 2007-05-29  Eric Blake  <ebb9@byu.net>
2459             Bruno Haible  <bruno@clisp.org>
2460
2461         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
2462         cross compiles.
2463
2464 2007-05-28  Eric Blake  <ebb9@byu.net>
2465
2466         * modules/closein-tests (test_closein_LDADD): Support test on
2467         cygwin with libtool.
2468
2469 2007-05-28  Bruno Haible  <bruno@clisp.org>
2470
2471         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
2472         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
2473         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
2474         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
2475         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
2476         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
2477         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
2478         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
2479         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
2480
2481 2007-05-28  Eric Blake  <ebb9@byu.net>
2482
2483         Unconditionally include <config.h> in unit tests.
2484         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
2485         * tests/test-allocsa.c, tests/test-arcfour.c,
2486         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
2487         tests/test-array_list.c, tests/test-array_oset.c,
2488         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
2489         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
2490         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
2491         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
2492         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
2493         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
2494         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
2495         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
2496         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
2497         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
2498         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
2499         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
2500         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
2501         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
2502         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
2503         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
2504         test-md5.c, test-memmem.c, test-printf-posix.c,
2505         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
2506         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
2507         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
2508         test-strcasestr.c, test-striconv.c, test-striconveh.c,
2509         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
2510         test-vasnprintf-posix2.c, test-vasnprintf.c,
2511         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
2512         test-vfprintf-posix.c, test-vprintf-posix.c,
2513         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
2514         test-xvasprintf.c: Likewise.
2515
2516 2007-05-28  Bruno Haible  <bruno@clisp.org>
2517
2518         * gnulib-tool (func_import): Remember the --with-tests command-line
2519         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
2520         Reported by Eric Blake.
2521
2522 2007-05-28  Bruno Haible  <bruno@clisp.org>
2523
2524         * modules/ftell-tests: New file.
2525         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
2526         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
2527
2528         * lib/ftell.c: New file.
2529         * modules/ftell: New file.
2530         * m4/ftell.m4: New file.
2531         * doc/functions/ftell.texi: Update.
2532         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
2533         REPLACE_FTELL.
2534         * lib/stdio_.h (rpl_ftell): New declaration.
2535         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
2536         REPLACE_FTELL.
2537
2538 2007-05-28  Eric Blake  <ebb9@byu.net>
2539
2540         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
2541
2542 2007-05-28  Bruno Haible  <bruno@clisp.org>
2543
2544         * modules/fseek-tests: New file.
2545         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
2546         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
2547
2548         * lib/fseek.c: New file.
2549         * modules/fseek: New file.
2550         * m4/fseek.m4: New file.
2551         * doc/functions/fseek.texi: Update.
2552         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
2553         REPLACE_FSEEK.
2554         * lib/stdio_.h (rpl_fseek): New declaration.
2555         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
2556         REPLACE_FSEEK.
2557
2558 2007-05-28  Bruno Haible  <bruno@clisp.org>
2559
2560         * lib/stdio_.h (fflush): More comments.
2561
2562 2007-05-28  Bruno Haible  <bruno@clisp.org>
2563
2564         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
2565         runtime test.
2566
2567 2007-05-28  Eric Blake  <ebb9@byu.net>
2568
2569         Improve lseek module.
2570         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
2571         * lib/unistd_.h (lseek): Scale back link warning message.
2572         * tests/test-lseek.c: Beef up test.
2573         * tests/test-lseek.sh: Exercise more facets of lseek.
2574         Reported by Bruno Haible.
2575
2576 2007-05-28  Bruno Haible  <bruno@clisp.org>
2577
2578         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
2579         to define.
2580
2581 2007-05-27  Bruno Haible  <bruno@clisp.org>
2582
2583         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
2584
2585 2007-05-27  Bruno Haible  <bruno@clisp.org>
2586
2587         * modules/openmp: New file.
2588         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
2589         Noah Misch.
2590
2591 2007-05-26  Bruno Haible  <bruno@clisp.org>
2592
2593         * modules/chdir-long (Depends-on): Add fchdir.
2594         * modules/chdir-safer (Depends-on): Likewise.
2595         * modules/fts (Depends-on): Likewise.
2596         * modules/fts-lgpl (Depends-on): Likewise.
2597         * modules/openat (Depends-on): Likewise.
2598         * modules/savewd (Depends-on): Likewise.
2599
2600 2007-05-24  Eric Blake  <ebb9@byu.net>
2601
2602         Fix lseek on mingw.
2603         * modules/lseek: New module.
2604         * m4/lseek.m4: New file.
2605         * lib/lseek.c: New file.
2606         * modules/lseek-tests: New file.
2607         * tests/test-lseek.c: New file.
2608         * tests/test-lseek.sh: New file.
2609         * MODULES.html.sh: Document lseek module.
2610         * modules/fflush (Depends-on): Add lseek, fseeko.
2611         * modules/fseeko (Depends-on): Likewise.
2612         * modules/ftello (Depends-on): Likewise.
2613         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
2614         broken.
2615         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
2616         broken.
2617         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
2618         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
2619         * lib/ftello.c (rpl_ftello): Likewise.
2620         * tests/test-fseeko.c (main): Test this.
2621         * tests/test-fseeko.sh: Likewise.
2622         * tests/test-ftello.c (main): Likewise.
2623         * tests/test-ftello.sh: Likewise.
2624         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
2625         implies replacing fseek.
2626         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
2627         HAVE_FTELLO.
2628         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
2629         * modules/unistd (Makefile.am): Likewise.
2630         * lib/unistd_.h (lseek): Declare a replacement.
2631         * doc/functions/lseek.texi (lseek): Document this fix.
2632         * doc/functions/fseek.texi (fseek): Likewise.
2633         * doc/functions/ftell.texi (ftell): Likewise.
2634
2635 2007-05-24  Bruno Haible  <bruno@clisp.org>
2636
2637         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
2638         in the printed representation of a NaN.
2639         * tests/test-vasprintf-posix.c (test_function): Likewise.
2640         * tests/test-snprintf-posix.h (test_function): Likewise.
2641         * tests/test-sprintf-posix.h (test_function): Likewise.
2642         Reported by Eric Blake.
2643
2644 2007-05-23  Eric Blake  <ebb9@byu.net>
2645
2646         Fix fseeko/ftello on cygwin 1.5.24.
2647         * doc/functions/fseeko.texi (fseeko): Document the fix.
2648         * doc/functions/ftello.texi (ftello): Document the fix.
2649         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
2650         * doc/functions/stdout.text (stdout): New file.
2651         * doc/functions/stderr.text (stderr): New file.
2652         * doc/gnulib.texi (Function Substitutes): Use new files.
2653         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
2654         prior to 1.7.0.
2655         * tests/test-ftello.c (main): Likewise for ftello.
2656         * tests/test-fseeko.sh: New file.
2657         * tests/test-ftello.sh: New file.
2658         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
2659         with seekable stdin.
2660         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
2661         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
2662         (gl_REPLACE_FSEEKO): New macro.
2663         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
2664         * modules/fseeko (Files): Distribute fseeko.c.
2665         * modules/ftello (Files): Distribute ftello.c.
2666         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
2667         mode.
2668         * lib/ftello.c (rpl_ftello): New file.
2669         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
2670         fseeko, ftello.
2671         (gl_STDIN_LARGE_OFFSET): New macro.
2672         * modules/stdio (Makefile.am): Perform the replacement.
2673         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
2674
2675 2007-05-23  Bruno Haible  <bruno@clisp.org>
2676
2677         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
2678         GNULIB_POSIXCHECK is defined.
2679
2680 2007-05-21  Bruno Haible  <bruno@clisp.org>
2681
2682         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
2683         Check also the output for NaN arguments. When cross-compiling, guess
2684         no on IRIX.
2685         * lib/vasnprintf.c: Update comments.
2686         * tests/test-vasnprintf-posix.c (strisnan): New function.
2687         (test_function): Use it.
2688         * tests/test-vasprintf-posix.c (strisnan): New function.
2689         (test_function): Use it.
2690         * tests/test-snprintf-posix.h (strisnan): New function.
2691         (test_function): Use it.
2692         * tests/test-sprintf-posix.h (strisnan): New function.
2693         (test_function): Use it.
2694         Reported by Eric Blake.
2695
2696 2007-05-20  Bruno Haible  <bruno@clisp.org>
2697
2698         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
2699         numbers that fails on BeOS.
2700         * doc/functions/frexpl.texi: Update.
2701
2702 2007-05-20  Jim Meyering  <jim@meyering.net>
2703
2704         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2705         forced upon us by glibc-2.6.
2706
2707 2007-05-20  Bruno Haible  <bruno@clisp.org>
2708
2709         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2710         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2711         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2712         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2713         NEED_PRINTF_INFINITE.
2714         (is_infinitel): New function.
2715         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2716         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2717         gl_PREREQ_VASNPRINTF_INFINITE.
2718         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2719         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2720         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2721         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2722         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2723         gl_PREREQ_VASNPRINTF_INFINITE.
2724         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2725         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2726         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2727         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2728         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2729         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2730         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2731         * doc/functions/fprintf.texi: Update.
2732         * doc/functions/printf.texi: Update.
2733         * doc/functions/snprintf.texi: Update.
2734         * doc/functions/sprintf.texi: Update.
2735         * doc/functions/vfprintf.texi: Update.
2736         * doc/functions/vprintf.texi: Update.
2737         * doc/functions/vsnprintf.texi: Update.
2738         * doc/functions/vsprintf.texi: Update.
2739
2740 2007-05-20  Bruno Haible  <bruno@clisp.org>
2741
2742         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2743         was not found in libc.
2744         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2745
2746 2007-05-20  Bruno Haible  <bruno@clisp.org>
2747
2748         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2749         printed as "-nan" instead of "nan".
2750         * tests/test-vasprintf-posix.c (test_function): Likewise.
2751         * tests/test-snprintf-posix.h (test_function): Likewise.
2752         * tests/test-sprintf-posix.h (test_function): Likewise.
2753         Needed for HP-UX 11.
2754
2755 2007-05-20  Jim Meyering  <jim@meyering.net>
2756
2757         Fix buggy test for the fchownat-deref bug.
2758         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2759         symlink required for the run-test.  Without it, this test would
2760         always declare that fchownat doesn't work, and client code would
2761         unnecessarily use the replacement function with fixed libc.
2762         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2763         Reported by Greg Schafer.
2764
2765 2007-05-19  Bruno Haible  <bruno@clisp.org>
2766
2767         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2768         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2769         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2770         Needed for IRIX 6.5 and Solaris 2.5.1.
2771
2772 2007-05-19  Bruno Haible  <bruno@clisp.org>
2773
2774         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2775         (test_function): Skip tests involving -0.0 on platforms where
2776         -0.0 = 0.0.
2777         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2778         (test_function): Skip tests involving -0.0 on platforms where
2779         -0.0 = 0.0.
2780         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2781         (test_function): Skip tests involving -0.0 on platforms where
2782         -0.0 = 0.0.
2783         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2784         (test_function): Skip tests involving -0.0 on platforms where
2785         -0.0 = 0.0.
2786         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2787         tests.
2788         * tests/test-printf-posix.h (test_function): Likewise.
2789         * tests/test-printf-posix.output: Remove all -0.0 related results.
2790         Needed for IRIX 6.5.
2791
2792 2007-05-19  Bruno Haible  <bruno@clisp.org>
2793
2794         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2795         printed as "nan0x7fffffff" instead of "nan".
2796         * tests/test-vasprintf-posix.c (test_function): Likewise.
2797         * tests/test-snprintf-posix.h (test_function): Likewise.
2798         * tests/test-sprintf-posix.h (test_function): Likewise.
2799         * tests/test-fprintf-posix.h (NaN): Remove macro.
2800         (test_function): Remove all NaN related tests.
2801         * tests/test-printf-posix.h (NaN): Remove macro.
2802         (test_function): Remove all NaN related tests.
2803         * tests/test-printf-posix.output: Remove all NaN related results.
2804         Needed for IRIX 6.5.
2805
2806 2007-05-19  Bruno Haible  <bruno@clisp.org>
2807
2808         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2809         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2810
2811 2007-05-19  Bruno Haible  <bruno@clisp.org>
2812
2813         * lib/float_.h: New file.
2814         * m4/float_h.m4: New file.
2815         * modules/float: New file.
2816         * modules/isnanl (Dependencies): Add float.
2817         * modules/isnanl-nolibm (Dependencies): Likewise.
2818         * modules/mathl (Dependencies): Likewise.
2819         * modules/printf-frexpl (Dependencies): Likewise.
2820         * modules/signbit (Dependencies): Likewise.
2821         * modules/vasnprintf (Dependencies): Likewise.
2822         * doc/headers/float.texi: Update.
2823
2824 2007-05-19  Jim Meyering  <jim@meyering.net>
2825
2826         * lib/utimens.c (gl_futimens): Rename from futimens,
2827         now that glibc-2.6 declares futimens.
2828         * lib/utimens.h: Likewise.
2829
2830 2007-05-19  Bruno Haible  <bruno@clisp.org>
2831
2832         Avoid test failures on mingw.
2833         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2834         * tests/test-printf-posix.sh: Likewise.
2835         * tests/test-vfprintf-posix.sh: Likewise.
2836         * tests/test-vprintf-posix.sh: Likewise.
2837
2838 2007-05-19  Bruno Haible  <bruno@clisp.org>
2839
2840         Fix *printf result for NaN, Inf, -0.0 on mingw.
2841         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2842         * lib/vasnprintf.c: Include math.h and isnan.h.
2843         (is_infinite_or_zero): New function.
2844         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2845         values in the %f, %F, %e, %E, %g, %G directives.
2846         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2847         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2848         gl_PRINTF_INFINITE and test its result. Invoke
2849         gl_PREREQ_VASNPRINTF_INFINITE.
2850         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2851         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2852         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2853         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2854         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2855         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2856         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2857         * doc/functions/fprintf.texi: Update.
2858         * doc/functions/printf.texi: Update.
2859         * doc/functions/snprintf.texi: Update.
2860         * doc/functions/sprintf.texi: Update.
2861         * doc/functions/vfprintf.texi: Update.
2862         * doc/functions/vprintf.texi: Update.
2863         * doc/functions/vsnprintf.texi: Update.
2864         * doc/functions/vsprintf.texi: Update.
2865
2866 2007-05-19  Bruno Haible  <bruno@clisp.org>
2867
2868         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2869         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2870         Instead of multiplying with 10^k, set extra_zeroes to k.
2871         (scale10_round_long_double): Remove function.
2872
2873 2007-05-18  Bruno Haible  <bruno@clisp.org>
2874
2875         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2876         introduced on 2007-05-06.
2877
2878 2007-05-18  Bruno Haible  <bruno@clisp.org>
2879
2880         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2881         %g directives.
2882         * tests/test-vasprintf-posix.c (test_function): Likewise.
2883         * tests/test-snprintf-posix.h (test_function): Likewise.
2884         * tests/test-sprintf-posix.h (test_function): Likewise.
2885
2886 2007-05-18  Bruno Haible  <bruno@clisp.org>
2887
2888         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2889         (strmatch): New function.
2890         (test_function): Test the %f directive on numbers of various exponents.
2891         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2892         (strmatch): New function.
2893         (test_function): Test the %f directive on numbers of various exponents.
2894         * tests/test-snprintf-posix.h (strmatch): New function.
2895         (test_function): Test the %f directive on numbers of various exponents.
2896         * tests/test-sprintf-posix.h (strmatch): New function.
2897         (test_function): Test the %f directive on numbers of various exponents.
2898         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2899         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2900         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2901         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2902
2903 2007-05-18  Bruno Haible  <bruno@clisp.org>
2904
2905         Add support for 'long double' number output.
2906         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2907         * lib/vasnprintf.c: Include math.h and float+.h.
2908         (mp_limb_t): New type.
2909         (GMP_LIMB_BITS): New macro.
2910         (mp_twolimb_t): New type.
2911         (GMP_TWOLIMB_BITS): New macro.
2912         (mpn_t): New type.
2913         (multiply, divide, convert_to_decimal, decode_long_double,
2914         scale10_round_long_double, scale10_round_decimal_long_double,
2915         floorlog10l): New functions.
2916         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2917         for the %f, %F, %e, %E, %g, %G directives.
2918         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2919         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2920         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2921         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2922         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2923         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2924         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2925         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2926         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2927         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2928         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2929         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2930         * modules/snprintf-posix (Depends-on): Likewise.
2931         * modules/sprintf-posix (Depends-on): Likewise.
2932         * modules/vasnprintf-posix (Depends-on): Likewise.
2933         * modules/vasprintf-posix (Depends-on): Likewise.
2934         * modules/vfprintf-posix (Depends-on): Likewise.
2935         * modules/vsnprintf-posix (Depends-on): Likewise.
2936         * modules/vsprintf-posix (Depends-on): Likewise.
2937         * modules/vasnprintf (Files): Add lib/float+.h.
2938         * doc/functions/fprintf.texi: Update.
2939         * doc/functions/printf.texi: Update.
2940         * doc/functions/snprintf.texi: Update.
2941         * doc/functions/sprintf.texi: Update.
2942         * doc/functions/vfprintf.texi: Update.
2943         * doc/functions/vprintf.texi: Update.
2944         * doc/functions/vsnprintf.texi: Update.
2945         * doc/functions/vsprintf.texi: Update.
2946
2947 2007-05-18  Bruno Haible  <bruno@clisp.org>
2948
2949         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2950
2951 2007-05-18  Bruno Haible  <bruno@clisp.org>
2952
2953         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2954         for printing 64-bit integers. Needed for mingw.
2955
2956 2007-05-18  Bruno Haible  <bruno@clisp.org>
2957
2958         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2959         gl_FUNC_FREXPL_WORKS.
2960         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2961
2962 2007-05-18  Bruno Haible  <bruno@clisp.org>
2963
2964         * modules/frexpl-nolibm-tests: New file.
2965
2966         * modules/frexpl-nolibm: New file.
2967         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2968
2969 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2970
2971         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2972         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2973         GCC 4.2, which otherwise issues a lot of warnings.
2974         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2975         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2976         Likewise.
2977         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2978         * modules/iconv_open (iconv.h): Likewise.
2979         * modules/locale (locale.h): Likewise.
2980         * modules/netinet_in (netinet/in.h): Likewise.
2981         * modules/sys_select (sys_select.h): Likewise.
2982         * modules/sys_socket (sys/socket.h): Likewise.
2983         * modules/sys_stat (sys/stat.h): Likewise.
2984         * modules/sysexits (sysexits.h): Likewise.
2985         * modules/unistd (unistd.h): Likewise.
2986
2987 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2988
2989         * modules/closein-tests (Makefile.am): Distribute
2990         `test-closein.sh'.
2991
2992 2007-05-17  Bruno Haible  <bruno@clisp.org>
2993
2994         * tests/test-printf-posix.output: Renamed from
2995         tests/test-fprintf-posix.out.
2996         * modules/fprintf-posix-tests: Update.
2997         * modules/printf-posix-tests: Update.
2998         * modules/vfprintf-posix-tests: Update.
2999         * modules/vprintf-posix-tests: Update.
3000         * tests/test-fprintf-posix.sh: Update.
3001         * tests/test-printf-posix.sh: Update.
3002         * tests/test-vfprintf-posix.sh: Update.
3003         * tests/test-vprintf-posix.sh: Update.
3004         Reported by Ralf Wildenhues.
3005
3006 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
3007
3008         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
3009         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
3010         GCC 4.2, which otherwise issues a lot of warnings.
3011         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
3012         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
3013         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
3014         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
3015         it should no longer be needed.
3016         * lib/string_.h: Likewise.
3017         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
3018         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
3019         * modules/inttypes (inttypes.h): Likewise.
3020         * modules/math (math.h): Likewise.
3021         * modules/search (search.h): Likewise.
3022         * modules/signal (signal.h): Likewise.
3023         * modules/stdint (stdint.h): Likewise.
3024         * modules/stdio (stdio.h): Likewise.
3025         * modules/stdlib (stdlib.h): Likewise.
3026         * modules/string (string.h): Likewise.
3027         * modules/sys_time (sys/time.h): Likewise.
3028         * modules/time (time.h): Likewise.
3029         * modules/wchar (wchar.h): Likewise.
3030         * modules/wctype (wtype.h): Likewise.
3031
3032 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
3033
3034         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
3035
3036 2007-05-13  Bruno Haible  <bruno@clisp.org>
3037
3038         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
3039         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
3040         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
3041         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3042         (gl_PREREQ_STRTOK_R): Don't require it here.
3043
3044 2007-05-13  Bruno Haible  <bruno@clisp.org>
3045
3046         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
3047         when used in C++ mode.
3048
3049 2007-05-12  Bruno Haible  <bruno@clisp.org>
3050
3051         * lib/linebuffer.h: Tweak doc.
3052         * lib/linebuffer.c: Likewise.
3053
3054 2007-05-12  James Youngman  <jay@gnu.org>
3055
3056         * lib/linebuffer.c (readlinebuffer_delim): New function,
3057         like readlinebuffer, but use a caller-specified delimiter.
3058         (readlinebuffer): Just call readlinebuffer_delim with '\n'
3059         as the delimiter.
3060         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
3061
3062 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3063
3064         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
3065         * modules/openat (Files): Remove openat-die.c.
3066         (Depends-on): Add openat-die.
3067         * modules/openat-die: New module.
3068
3069 2007-05-06  Bruno Haible  <bruno@clisp.org>
3070
3071         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
3072         Update with info about Cygwin.
3073         * doc/functions/fprintf.texi: Update.
3074         * doc/functions/printf.texi: Update.
3075         * doc/functions/snprintf.texi: Update.
3076         * doc/functions/sprintf.texi: Update.
3077         * doc/functions/vfprintf.texi: Update.
3078         * doc/functions/vprintf.texi: Update.
3079         * doc/functions/vsnprintf.texi: Update.
3080         * doc/functions/vsprintf.texi: Update.
3081         Reported by Eric Blake.
3082
3083 2007-05-06  Bruno Haible  <bruno@clisp.org>
3084
3085         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
3086         padding ourselves for the floating-point directives.
3087         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
3088         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
3089         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3090         gl_PRINTF_FLAG_ZERO and test its result. Invoke
3091         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
3092         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3093         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
3094         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3095         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3096         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3097         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3098         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3099         * tests/test-snprintf-posix.h (test_function): Also check the width
3100         and some flags in the %f directive.
3101         * tests/test-sprintf-posix.h (test_function): Likewise.
3102         * tests/test-vasnprintf-posix.c (test_function): Likewise.
3103         * tests/test-vasprintf-posix.c (test_function): Likewise.
3104         * doc/functions/fprintf.texi: Update.
3105         * doc/functions/printf.texi: Update.
3106         * doc/functions/snprintf.texi: Update.
3107         * doc/functions/sprintf.texi: Update.
3108         * doc/functions/vfprintf.texi: Update.
3109         * doc/functions/vprintf.texi: Update.
3110         * doc/functions/vsnprintf.texi: Update.
3111         * doc/functions/vsprintf.texi: Update.
3112
3113 2007-05-06  Bruno Haible  <bruno@clisp.org>
3114
3115         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
3116         pass the ' flag character to sprintf or snprintf.
3117         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
3118         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
3119         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3120         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
3121         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
3122         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3123         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
3124         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3125         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3126         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3127         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3128         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3129         * tests/test-snprintf-posix.h (test_function): Also check the grouping
3130         flag.
3131         * tests/test-sprintf-posix.h (test_function): Likewise.
3132         * tests/test-vasnprintf-posix.c (test_function): Likewise.
3133         * tests/test-vasprintf-posix.c (test_function): Likewise.
3134         * doc/functions/fprintf.texi: Update.
3135         * doc/functions/printf.texi: Update.
3136         * doc/functions/snprintf.texi: Update.
3137         * doc/functions/sprintf.texi: Update.
3138         * doc/functions/vfprintf.texi: Update.
3139         * doc/functions/vprintf.texi: Update.
3140         * doc/functions/vsnprintf.texi: Update.
3141         * doc/functions/vsprintf.texi: Update.
3142
3143 2007-05-01  Bruno Haible  <bruno@clisp.org>
3144
3145         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
3146
3147 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
3148
3149         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
3150         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
3151
3152 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
3153
3154         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
3155         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
3156         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
3157
3158 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
3159
3160         * lib/argp-help.c (struct hol_entry): New member `ord'.
3161         (HOL_ENTRY_PTRCMP): Use ord for comparison
3162         (hol_sort): Initialize ord.
3163
3164 2007-05-01  Bruno Haible  <bruno@clisp.org>
3165
3166         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
3167         Reported by Eric Blake.
3168         * doc/gnulib.texi (Function Substitutes): Update.
3169
3170 2007-05-01  Bruno Haible  <bruno@clisp.org>
3171
3172         * doc/functions.texi: Remove file, now redundant through
3173         doc/functions/*.texi.
3174
3175 2007-05-01  Bruno Haible  <bruno@clisp.org>
3176
3177         * modules/argp (Depends-on): Add sleep.
3178
3179 2007-05-01  Bruno Haible  <bruno@clisp.org>
3180
3181         * modules/sleep-tests: New file.
3182         * tests/test-sleep.c: New file.
3183
3184         * modules/sleep: New file.
3185         * lib/sleep.c: New file.
3186         * m4/sleep.m4: New file.
3187         * lib/unistd_.h (sleep): New declaration.
3188         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
3189         HAVE_SLEEP.
3190         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
3191         * doc/functions/sleep.texi: Document the sleep module.
3192
3193 2007-05-01  Bruno Haible  <bruno@clisp.org>
3194
3195         * lib/sigprocmask.h: Remove file.
3196         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
3197         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
3198         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
3199         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
3200         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
3201         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
3202         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
3203         HAVE_SIGSET_T as a shell variable.
3204         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
3205         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
3206         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
3207         (Depends-on): Add signal. Remove verify.
3208         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
3209         (Include): Mention <signal.h> instead of sigprocmask.h.
3210         * NEWS: Mention the change.
3211         * lib/fatal-signal.c: Don't include sigprocmask.h.
3212
3213 2007-05-01  Bruno Haible  <bruno@clisp.org>
3214
3215         * modules/signal: New file.
3216         * lib/signal_.h: New file.
3217         * m4/signal_h.m4: New file.
3218
3219 2007-05-01  Bruno Haible  <bruno@clisp.org>
3220
3221         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
3222         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
3223         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
3224         HAVE_WCTYPE_CTMP_BUG into wctype.h.
3225
3226 2007-05-01  Bruno Haible  <bruno@clisp.org>
3227
3228         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
3229         configure time.
3230         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
3231         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
3232         * modules/sys_stat (Makefile.am): Substitute their values into
3233         sys/stat.h.
3234
3235 2007-05-01  Bruno Haible  <bruno@clisp.org>
3236
3237         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
3238         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
3239         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
3240
3241 2007-05-01  Bruno Haible  <bruno@clisp.org>
3242
3243         * doc/header/assert.texi: Undo last change: don't mention the gnulib
3244         'assert' module here.
3245
3246 2007-05-01  Bruno Haible  <bruno@clisp.org>
3247
3248         * doc/functions/*.texi: New files.
3249         * doc/functions/google-ranking.txt: New file.
3250         * doc/gnulib.texi (Function Substitutes): New chapter.
3251         (ctime, inet_ntoa): Remove sections.
3252         * doc/ctime.texi: Remove file.
3253         * doc/inet_ntoa.texi: Remove file.
3254         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
3255         dependencies.
3256         (%.info): New rule, specifying a --reference-limit.
3257
3258 2007-05-01  Bruno Haible  <bruno@clisp.org>
3259
3260         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
3261
3262 2007-05-01  Bruno Haible  <bruno@clisp.org>
3263
3264         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
3265         the portability of 'mkdir' to mingw systems.
3266
3267 2007-05-01  Bruno Haible  <bruno@clisp.org>
3268
3269         * doc/headers/google-ranking.txt: New file.
3270
3271 2007-04-30  Eric Blake  <ebb9@byu.net>
3272
3273         Prefer fseeko to fseek.
3274         * modules/getpass (Depends-on): Add fseeko.
3275         * lib/getpass.c (getpass): Use fseeko, not fseek.
3276
3277 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3278
3279         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
3280         assumes the sorting is stable, while most qsort implementations
3281         are not.  Use argument addresses to ensure they never compare as
3282         equal.
3283
3284         * tests/test-argp-2.sh (usage-indent test): Fix output
3285         (func_compare): Restore diff options
3286         * tests/test-argp.c: Restore #include "progname.h"
3287
3288 2007-04-29  Bruno Haible  <bruno@clisp.org>
3289
3290         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
3291         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3292         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
3293         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3294         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
3295         (configure.ac): Define CHECK_SNPRINTF_POSIX.
3296         (TESTS, check_PROGRAMS): Add test-snprintf.
3297         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
3298         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
3299         (TESTS, check_PROGRAMS): Add test-vsnprintf.
3300         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
3301         assertions that fail on HP-UX, OSF/1, or IRIX.
3302         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
3303
3304 2007-04-29  Bruno Haible  <bruno@clisp.org>
3305
3306         * MODULES.html.sh (posix_functions): Remove 'contents'.
3307
3308 2007-04-29  Karl Berry  <karl@gnu.org>
3309
3310         * config/srclist.txt (gendocs_template_min): new entry.
3311
3312 2007-04-29  Bruno Haible  <bruno@clisp.org>
3313
3314         Work around fpurge bug on BSD systems.
3315         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
3316         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
3317         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
3318         fpurge to rpl_fpurge if the system already has this function.
3319         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
3320         the case where the system already has this function. Correct invariants
3321         on BSD systems.
3322         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
3323         BSD systems.
3324
3325 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3326
3327         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
3328         proposed by Sven Verdoolaege.
3329
3330         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
3331         options.
3332         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
3333         (usage and help tests): Update
3334
3335 2007-04-29  Bruno Haible  <bruno@clisp.org>
3336
3337         * tests/test-fflush.c (main): Use a file of size 17, not 10.
3338         Print more information in case of failure. Disable a test on BeOS.
3339
3340 2007-04-29  Bruno Haible  <bruno@clisp.org>
3341
3342         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
3343         This helps debugging on systems on which no gdb is available.
3344
3345 2007-04-29  Bruno Haible  <bruno@clisp.org>
3346
3347         * lib/freading.h: Improve comments.
3348         * lib/fwriting.h: Likewise.
3349         * tests/test-freading.c (main): Don't check freading immediately after
3350         repositioning. Needed for glibc.
3351
3352 2007-04-29  Bruno Haible  <bruno@clisp.org>
3353
3354         * lib/freading.c (freading): Trivial simplification.
3355
3356 2007-04-28  Bruno Haible  <bruno@clisp.org>
3357
3358         * tests/test-fwriting.c (main): Also test the interaction between
3359         fflush and fwriting.
3360         * modules/fwriting-tests (Depends-on): Add fflush.
3361
3362         * tests/test-freading.c (main): Also test the interaction between
3363         fflush and freading.
3364         * modules/freading-tests (Depends-on): Add fflush.
3365
3366 2007-04-28  Bruno Haible  <bruno@clisp.org>
3367
3368         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
3369         fseeko and ftello.
3370         Suggested by Eric Blake.
3371
3372 2007-04-28  Jim Meyering  <jim@meyering.net>
3373
3374         Avoid false-negative in gl_STDINT_H's C99 conformance test.
3375         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
3376         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
3377
3378 2007-04-27  Eric Blake  <ebb9@byu.net>
3379
3380         * doc/headers/assert.texi (assert.h): Document assert module use.
3381
3382 2007-04-27  Bruno Haible  <bruno@clisp.org>
3383
3384         * doc/headers/*.texi: New files.
3385         * doc/gnulib.texi (Header File Substitutes): New chapter.
3386         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
3387         dependencies.
3388         (standards.info ,standards.html, standards.dvi): Update dependencies.
3389         (mostlyclean, clean): New targets.
3390
3391 2007-04-27  Bruno Haible  <bruno@clisp.org>
3392
3393         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
3394         * modules/sysexits (Files, Makefile.am): Update.
3395
3396         * lib/sys_socket_.h: Renamed from lib/socket_.h.
3397         * modules/sys_socket (Files, Makefile.am): Update.
3398
3399         * lib/sys_stat_.h: Renamed from lib/stat_.h.
3400         * modules/sys_stat (Files, Makefile.am): Update.
3401
3402 2007-04-27  Eric Blake  <ebb9@byu.net>
3403
3404         * lib/freading.h: Improve comments.
3405         * lib/fwriting.h: Likewise.
3406         * lib/fflush.c: Likewise.
3407
3408         Fix closein for mingw.
3409         * modules/closein-tests: Add tests for closein.
3410         * tests/test-closein.c: New file.
3411         * tests/test-closein.sh: Likewise.
3412         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
3413         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
3414
3415 2007-04-27  Bruno Haible  <bruno@clisp.org>
3416
3417         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
3418         version is < 6.
3419         * lib/math_.h [__DECC]: Likewise.
3420         * lib/stdio_.h [__DECC]: Likewise.
3421         * lib/stdlib_.h [__DECC]: Likewise.
3422         * lib/string_.h [__DECC]: Likewise.
3423         * lib/time_.h [__DECC]: Likewise.
3424         * lib/wchar_.h [__DECC]: Likewise.
3425         * lib/wctype_.h [__DECC]: Likewise.
3426
3427 2007-04-27  Bruno Haible  <bruno@clisp.org>
3428
3429         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
3430
3431 2007-04-27  Bruno Haible  <bruno@clisp.org>
3432
3433         * lib/fflush.c: Add comments.
3434         * modules/fpurge-tests (Depends-on): Add fflush.
3435         * modules/freadable-tests (Depends-on): Likewise.
3436         * modules/fwritable-tests (Depends-on): Likewise.
3437
3438 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
3439
3440         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
3441         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
3442         Report by Bruno Haible <bruno@clisp.org>.
3443
3444 2007-04-26  Eric Blake  <ebb9@byu.net>
3445
3446         Fix fflush on mingw.
3447         * modules/fflush (Depends-on): Add freading.
3448         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
3449         but unread data.
3450
3451 2007-04-26  Eric Blake  <ebb9@byu.net>
3452         and Bruno Haible  <bruno@clisp.org>
3453
3454         Implement freading and fwriting.
3455         * lib/freading.c: New file.
3456         * lib/freading.h: Likewise.
3457         * m4/freading.m4: Likewise.
3458         * modules/freading: Likewise.
3459         * modules/freading-tests: Likewise.
3460         * tests/test-freading.c: Likewise.
3461         * lib/fwriting.c: New file.
3462         * lib/fwriting.h: Likewise.
3463         * m4/fwriting.m4: Likewise.
3464         * modules/fwriting: Likewise.
3465         * modules/fwriting-tests: Likewise.
3466         * tests/test-fwriting.c: Likewise.
3467         * MODULES.html.sh (File stream based Input/Output): Mention them.
3468
3469 2007-04-26  Bruno Haible  <bruno@clisp.org>
3470
3471         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
3472         'long' when we assume it.
3473         Suggested by Eric Blake.
3474
3475 2007-04-26  Bruno Haible  <bruno@clisp.org>
3476
3477         Ensure fseeko, ftello are declared on glibc systems.
3478         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
3479         * modules/fseeko (configure.ac-early): Likewise.
3480         * modules/ftello (configure.ac-early): Likewise.
3481         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
3482         AC_FUNC_FSEEKO for this.
3483         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
3484         (gl_CHECK_FSEEKO): Remove macro.
3485
3486 2007-04-26  Bruno Haible  <bruno@clisp.org>
3487
3488         * tests/test-fflush.c (main): Also check the ftell result after
3489         fflush and fseek/fseeko.
3490         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
3491         file descriptor position cache in the stream.
3492         * lib/fseeko.c (rpl_fseeko): Likewise.
3493
3494 2007-04-26  Bruno Haible  <bruno@clisp.org>
3495
3496         * modules/fflush-tests (Depends-on): Add fseeko.
3497
3498 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
3499             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3500
3501         * lib/argz_.h: ensure error_t definition is obtained in same
3502         mechanism system argz.h would have.
3503         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
3504         argz facilities are known bad.  Err on the side of caution if
3505         cross-compiling.
3506
3507 2007-04-25  Eric Blake  <ebb9@byu.net>
3508
3509         * lib/fpurge.c (includes): Use stdlib.h for free.
3510         * tests/test-fflush.c (main): Also test fflush-fseeko.
3511
3512 2007-04-25  Bruno Haible  <bruno@clisp.org>
3513
3514         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
3515         * lib/fseeko.c: New file.
3516         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
3517         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
3518         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
3519         gl_FUNC_FSEEKO.
3520         (gl_FUNC_FSEEKO): Invoke it.
3521         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
3522         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
3523         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
3524
3525 2007-04-25  Bruno Haible  <bruno@clisp.org>
3526
3527         * modules/fflush (Depends-on): Add ftello.
3528
3529 2007-04-25  Bruno Haible  <bruno@clisp.org>
3530
3531         * modules/ftello-tests: New file.
3532         * tests/test-ftello.c: New file.
3533
3534         * modules/ftello: New file.
3535         * m4/ftello.m4: New file.
3536         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
3537         HAVE_FTELLO.
3538         * lib/stdio_.h (ftello): New declaration.
3539         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
3540         HAVE_FTELLO.
3541
3542 2007-04-25  Bruno Haible  <bruno@clisp.org>
3543
3544         * modules/fseeko-tests: New file.
3545         * tests/test-fseeko.c: New file.
3546
3547         * modules/fseeko: New file.
3548         * m4/fseeko.m4: New file.
3549         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
3550         HAVE_FSEEKO.
3551         * lib/stdio_.h (fseeko): New declaration.
3552         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
3553         HAVE_FSEEKO.
3554
3555 2007-04-25  Bruno Haible  <bruno@clisp.org>
3556
3557         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
3558
3559 2007-04-25  Bruno Haible  <bruno@clisp.org>
3560
3561         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
3562         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
3563         * tests/test-unistd.c: Likewise.
3564         * tests/test-fcntl.c: Likewise.
3565
3566 2007-04-23  Eric Blake  <ebb9@byu.net>
3567
3568         * lib/fflush.c: Fix missing include.
3569         Reported by Bruno Haible.
3570
3571 2007-04-23  Bruno Haible  <bruno@clisp.org>
3572
3573         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
3574         Reported by Eric Blake.
3575
3576 2007-04-23  Bruno Haible  <bruno@clisp.org>
3577
3578         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
3579
3580 2007-04-23  Bruno Haible  <bruno@clisp.org>
3581
3582         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
3583
3584 2007-04-23  Bruno Haible  <bruno@clisp.org>
3585
3586         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
3587         Needed on HP-UX 11.
3588
3589 2007-04-16  Eric Blake  <ebb9@byu.net>
3590
3591         Make fflush rely on fpurge.
3592         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
3593         open coding all variants.
3594         * modules/fflush (Depends-on): Add fpurge and unistd.
3595         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
3596         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
3597
3598         Fix --with-tests compilation on cygwin.
3599         * modules/argmatch-tests (Makefile.am): List gnulib library first
3600         in LDADD.
3601         * modules/argp-tests (Makefile.am): Likewise.
3602         * modules/array-list-tests (Makefile.am): Likewise.
3603         * modules/array-oset-tests (Makefile.am): Likewise.
3604         * modules/avltree-list-tests (Makefile.am): Likewise.
3605         * modules/avltree-oset-tests (Makefile.am): Likewise.
3606         * modules/avltreehash-list-tests (Makefile.am): Likewise.
3607         * modules/carray-list-tests (Makefile.am): Likewise.
3608         * modules/dirname-tests (Makefile.am): Likewise.
3609         * modules/frexp-tests (Makefile.am): Likewise.
3610         * modules/isnanl-tests (Makefile.am): Likewise.
3611         * modules/linked-list-tests (Makefile.am): Likewise.
3612         * modules/linkedhash-list-tests (Makefile.am): Likewise.
3613         * modules/lock-tests (Makefile.am): Likewise.
3614         * modules/rbtree-list-tests (Makefile.am): Likewise.
3615         * modules/rbtree-oset-tests (Makefile.am): Likewise.
3616         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
3617         * modules/tls-tests (Makefile.am): Likewise.
3618         * modules/tsearch-tests (Makefile.am): Likewise.
3619         * modules/xvasprintf-tests (Makefile.am): Likewise.
3620
3621         Fix fpurge for cygwin.
3622         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
3623         value.
3624         * modules/fpurge-tests (Depends-on): Clean up trash.
3625
3626 2007-04-16  Simon Josefsson  <simon@josefsson.org>
3627
3628         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
3629
3630         * m4/autobuild.m4: Re-indent.
3631
3632 2007-04-13  Bruno Haible  <bruno@clisp.org>
3633
3634         * modules/fpurge-tests: New file.
3635         * tests/test-fpurge.c: New file.
3636
3637         * modules/fpurge: New file.
3638         * lib/fpurge.h: New file.
3639         * lib/fpurge.c: New file.
3640         * m4/fpurge.m4: New file.
3641
3642 2007-04-13  Bruno Haible  <bruno@clisp.org>
3643
3644         * modules/fbufmode-tests: New file.
3645         * tests/test-fbufmode.c: New file.
3646
3647         * modules/fbufmode: New file.
3648         * lib/fbufmode.h: New file.
3649         * lib/fbufmode.c: New file.
3650         * m4/fbufmode.m4: New file.
3651
3652 2007-04-13  Bruno Haible  <bruno@clisp.org>
3653
3654         * modules/fwritable-tests: New file.
3655         * tests/test-fwritable.c: New file.
3656
3657         * modules/fwritable: New file.
3658         * lib/fwritable.h: New file.
3659         * lib/fwritable.c: New file.
3660         * m4/fwritable.m4: New file.
3661
3662 2007-04-13  Bruno Haible  <bruno@clisp.org>
3663
3664         * modules/freadable-tests: New file.
3665         * tests/test-freadable.c: New file.
3666
3667         * modules/freadable: New file.
3668         * lib/freadable.h: New file.
3669         * lib/freadable.c: New file.
3670         * m4/freadable.m4: New file.
3671
3672 2007-04-13  Bruno Haible  <bruno@clisp.org>
3673
3674         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
3675         MOSTLYCLEANFILES.
3676
3677 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
3678
3679         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
3680         gzip bootstrap.conf to avoid dragging in i18n machinery.
3681         (gnulib_tool_option): Use it.
3682
3683 2007-04-13  Bruno Haible  <bruno@clisp.org>
3684
3685         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
3686         %F directives.
3687         * tests/test-vasprintf-posix.c (test_function): Likewise.
3688         * tests/test-snprintf-posix.h (test_function): Likewise.
3689         * tests/test-sprintf-posix.h (test_function): Likewise.
3690         * tests/test-fprintf-posix.h (test_function): Likewise.
3691         * tests/test-printf-posix.h (test_function): Likewise.
3692         * tests/test-fprintf-posix.out: Likewise.
3693
3694 2007-04-13  Bruno Haible  <bruno@clisp.org>
3695
3696         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
3697         * modules/tls-tests (configure.ac): Likewise.
3698         Reported by Arto C. Nirkko <anirkko@insel.ch>.
3699
3700 2007-04-13  Bruno Haible  <bruno@clisp.org>
3701
3702         * lib/tls.c (glthread_tls_get): Fix return type.
3703         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3704
3705 2007-04-12  Eric Blake  <ebb9@byu.net>
3706
3707         * modules/gettime (Depends-on): Remove gettime.
3708         Reported by Dmitry V. Levin.
3709
3710 2007-04-12  Bruno Haible  <bruno@clisp.org>
3711
3712         * modules/fflush (Include): Mention <stdio.h>.
3713         * modules/strtoimax (Include): Mention <inttypes.h>.
3714         * modules/strtoumax (Include): Likewise.
3715
3716 2007-04-12  Eric Blake  <ebb9@byu.net>
3717
3718         * .cvsignore: New file.
3719         * .gitignore: Likewise.
3720
3721 2007-04-12  Bruno Haible  <bruno@clisp.org>
3722
3723         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3724         not before, since $(LDADD) often contains libgnu.a.
3725         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3726         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3727         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3728         Needed on Cygwin.
3729
3730 2007-04-12  Eric Blake  <ebb9@byu.net>
3731
3732         Work around glibc's failure to flush stdin on fclose.
3733         * lib/closein.c (close_stdin): Flush stdin before closing.
3734
3735         Work around glibc's failure to reset seekable stdin on exit.
3736         * modules/closein: New module.
3737         * lib/closein.c: New file.
3738         * lib/closein.h: Likewise.
3739         * m4/closein.m4: Likewise.
3740         * MODULES.html.sh (File stream based Input/Output): Document it.
3741
3742 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3743
3744         * gnulib-tool: Rename generated 'autobuild' script to
3745         'do-autobuild' in --create-megatestdir output.
3746
3747         * doc/gnulib.texi (Build robot for gnulib): Fix.
3748
3749 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3750
3751         * modules/sysexits (Depends-on): Add absolute-header.
3752
3753 2007-04-12  Eric Blake  <ebb9@byu.net>
3754
3755         No need to preserve errno on success.
3756         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3757         Reported by Bruno Haible.
3758
3759 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3760
3761         * MODULES.html.sh (Support for maintaining and releasing
3762         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3763
3764 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3765
3766         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3767
3768 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3769
3770         * modules/autobuild: New module.
3771
3772         * m4/autobuild.m4: New file.
3773
3774 2007-04-11  Bruno Haible  <bruno@clisp.org>
3775
3776         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3777         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3778         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3779         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3780         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3781         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3782         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3783         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3784         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3785         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3786         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3787         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3788         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3789         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3790         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3791         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3792         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3793         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3794         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3795         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3796         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3797         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3798         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3799         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3800         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3801         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3802         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3803         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3804         Reported by Eric Blake.
3805
3806 2007-04-11  Bruno Haible  <bruno@clisp.org>
3807
3808         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3809
3810 2007-04-10  Bruno Haible  <bruno@clisp.org>
3811
3812         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3813         for NaN and Infinity. Needed on FreeBSD 6.1.
3814         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3815         regarding results for "%010a" of Infinity and NaN.
3816         * tests/test-vasprintf-posix.c (test_function): Likewise.
3817         * tests/test-snprintf-posix.h (test_function): Likewise.
3818         * tests/test-sprintf-posix.h (test_function): Likewise.
3819         * tests/test-fprintf-posix.h (test_function): Likewise.
3820         * tests/test-printf-posix.h (test_function): Likewise.
3821         * tests/test-fprintf-posix.out: Likewise.
3822
3823 2007-04-10  Bruno Haible  <bruno@clisp.org>
3824
3825         * modules/locale-tests: New file.
3826         * tests/test-locale.c: New file.
3827
3828         * modules/locale: New file.
3829         * lib/locale_.h: New file.
3830         * m4/locale_h.m4: New file.
3831
3832 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3833             Bruno Haible  <bruno@clisp.org>
3834
3835         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3836         be determined, test for availability of the copysignf, copysign,
3837         copysignl functions.
3838         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3839         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3840         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3841
3842 2007-04-09  Eric Blake  <ebb9@byu.net>
3843
3844         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3845         * modules/stdio (Makefile.am): Support fflush.
3846         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3847         * modules/fflush: New file.
3848         * lib/fflush.c: Likewise.
3849         * m4/fflush.m4: Likewise.
3850         * modules/fflush-tests: New test.
3851         * tests/test-fflush.c: Likewise.
3852         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3853
3854 2007-04-06  Bruno Haible  <bruno@clisp.org>
3855
3856         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3857         (VASNPRINTF): Use signbit for faster determination whether to print a
3858         minus sign.
3859         * modules/vasnprintf (Files): Remove lib/float+.h.
3860         * modules/fprintf-posix (Depends-on): Add signbit.
3861         * modules/snprintf-posix (Depends-on): Likewise.
3862         * modules/sprintf-posix (Depends-on): Likewise.
3863         * modules/vasnprintf-posix (Depends-on): Likewise.
3864         * modules/vasprintf-posix (Depends-on): Likewise.
3865         * modules/vfprintf-posix (Depends-on): Likewise.
3866         * modules/vsnprintf-posix (Depends-on): Likewise.
3867         * modules/vsprintf-posix (Depends-on): Likewise.
3868
3869 2007-04-06  Bruno Haible  <bruno@clisp.org>
3870
3871         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3872         * tests/test-frexpl.c (main): Likewise.
3873         * tests/test-ldexpl.c (main): Likewise.
3874         * modules/frexp-tests (Depends-on): Add signbit.
3875         * modules/frexpl-tests (Depdends-on): Likewise.
3876         * modules/ldexpl-tests (Depdends-on): Likewise.
3877
3878 2007-04-06  Bruno Haible  <bruno@clisp.org>
3879
3880         * modules/signbit-tests: New file.
3881         * tests/test-signbit.c: New file.
3882
3883         * modules/signbit: New file.
3884         * lib/signbitf.c: New file.
3885         * lib/signbitd.c: New file.
3886         * lib/signbitl.c: New file.
3887         * m4/signbit.m4: New file.
3888         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3889         (signbit): New macro.
3890         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3891         REPLACE_SIGNBIT.
3892         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3893         REPLACE_FREXPL into math.h.
3894
3895 2007-04-06  Bruno Haible  <bruno@clisp.org>
3896
3897         * modules/isnanf-nolibm-tests: New file.
3898         * tests/test-isnanf.c: New file.
3899
3900         * modules/isnanf-nolibm: New file.
3901         * lib/isnanf.h: New file.
3902         * lib/isnanf.c: New file.
3903         * lib/isnan.c: Consider the USE_FLOAT macro.
3904         * m4/isnanf.m4: New file.
3905
3906 2007-04-06  Bruno Haible  <bruno@clisp.org>
3907
3908         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3909         (Link): New section.
3910
3911         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3912
3913 2007-04-06  Bruno Haible  <bruno@clisp.org>
3914
3915         Assume the 'long double' type.
3916         * m4/longdouble.m4: Remove file.
3917         * config/srclist.txt: Don't mention longdouble.m4.
3918         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3919         * lib/float+.h: Likewise.
3920         * lib/frexp.c: Likewise.
3921         * lib/printf-args.h: Likewise.
3922         * lib/printf-args.c: Likewise.
3923         * lib/printf-frexp.c: Likewise.
3924         * lib/printf-parse.c: Likewise.
3925         * lib/vasnprintf.c: Likewise.
3926         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3927         * m4/intl.m4: Likewise.
3928         * m4/isnanl.m4: Likewise.
3929         * m4/printf.m4: Likewise.
3930         * m4/printf-frexpl.m4: Likewise.
3931         * m4/vasnprintf.m4: Likewise.
3932         * modules/allocsa (Files): Remove m4/longdouble.m4.
3933         * modules/gettext (Files): Likewise.
3934         * modules/relocatable-prog-wrapper (Files): Likewise.
3935         * modules/vasnprintf (Files): Likewise.
3936         * modules/isnanl (Files): Likewise.
3937         (Include): Simplify.
3938         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3939         (Include): Simplify.
3940         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3941         (Include): Simplify.
3942         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3943         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3944         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3945         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3946         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3947         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3948         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3949         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3950         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3951         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3952         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3953         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3954         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3955         * tests/test-isnanl.c: Likewise.
3956         * tests/test-snprintf-posix.h: Likewise.
3957         * tests/test-sprintf-posix.h: Likewise.
3958         * tests/test-vasnprintf-posix.c: Likewise.
3959         * tests/test-vasnprintf-posix2.c: Likewise.
3960         * tests/test-vasprintf-posix.c: Likewise.
3961
3962 2007-04-06  Bruno Haible  <bruno@clisp.org>
3963
3964         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3965         * lib/math_.h [__DECC]: Include the overridden include file through
3966         #include_next, outside the double-inclusion guard.
3967         * lib/stdio_.h [__DECC]: Likewise.
3968         * lib/stdlib_.h [__DECC]: Likewise.
3969         * lib/string_.h [__DECC]: Likewise.
3970         * lib/time_.h [__DECC]: Likewise.
3971         * lib/wchar_.h [__DECC]: Likewise.
3972         * lib/wctype_.h [__DECC]: Likewise.
3973         * lib/inttypes_.h [__DECC]: Likewise.
3974         Reported by Albert Chin <china@thewrittenword.com> in
3975         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3976
3977 2007-04-04  Eric Blake  <ebb9@byu.net>
3978
3979         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3980         1.5.x.
3981
3982 2007-04-04  Bruno Haible  <bruno@clisp.org>
3983
3984         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3985         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3986
3987 2007-04-04  Bruno Haible  <bruno@clisp.org>
3988
3989         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3990         results for "%010a" of Infinity and NaN.
3991         * tests/test-vasprintf-posix.c (test_function): Likewise.
3992         * tests/test-snprintf-posix.h (test_function): Likewise.
3993         * tests/test-sprintf-posix.h (test_function): Likewise.
3994         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3995         * tests/test-printf-posix.h (test_function): Likewise.
3996         * tests/test-fprintf-posix.out: Update.
3997         Needed for FreeBSD 6.1.
3998
3999 2007-04-04  Bruno Haible  <bruno@clisp.org>
4000
4001         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
4002         directly used by the gnulib modules nor by gnulib-tool.
4003
4004 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
4005
4006         * DEPENDENCIES: Give overall description of version dependency
4007         desirability.  Use more-typical names for apps.
4008         Add shell, coreutils, diffutils, grep, tar, gzip.
4009
4010 2007-04-04  Simon Josefsson  <simon@josefsson.org>
4011
4012         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
4013
4014 2007-04-04  Karl Berry  <karl@gnu.org>
4015
4016         * MODULES.html.sh (func_module): missing '.
4017
4018 2007-04-03  Bruno Haible  <bruno@clisp.org>
4019
4020         * modules/argmatch-tests (Makefile.am): New variable
4021         test_argmatch_LDADD.
4022         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
4023         * modules/array-list-tests (Makefile.am): New variable
4024         test_array_list_LDADD.
4025         * modules/array-oset-tests (Makefile.am): New variable
4026         test_array_oset_LDADD.
4027         * modules/avltree-list-tests (Makefile.am): New variable
4028         test_avltree_list_LDADD.
4029         * modules/avltree-oset-tests (Makefile.am): New variable
4030         test_avltree_oset_LDADD.
4031         * modules/avltreehash-list-tests (Makefile.am): New variable
4032         test_avltreehash_list_LDADD.
4033         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
4034         test_canonicalize_lgpl_LDADD.
4035         * modules/carray-list-tests (Makefile.am): New variable
4036         test_carray_list_LDADD.
4037         * modules/dirname-tests (Makefile.am): New variable
4038         test_dirname_LDADD.
4039         * modules/linked-list-tests (Makefile.am): New variable
4040         test_linked_list_LDADD.
4041         * modules/linkedhash-list-tests (Makefile.am): New variable
4042         test_linkedhash_list_LDADD.
4043         * modules/rbtree-list-tests (Makefile.am): New variable
4044         test_rbtree_list_LDADD.
4045         * modules/rbtree-oset-tests (Makefile.am): New variable
4046         test_rbtree_oset_LDADD.
4047         * modules/rbtreehash-list-tests (Makefile.am): New variable
4048         test_rbtreehash_list_LDADD.
4049         * modules/xvasprintf-tests (Makefile.am): New variable
4050         test_xvasprintf_LDADD.
4051         Reported by Eric Blake.
4052
4053 2007-04-03  Eric Blake  <ebb9@byu.net>
4054
4055         * DEPENDENCIES: Weaken m4 requirements.
4056
4057 2007-04-03  Bruno Haible  <bruno@clisp.org>
4058
4059         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
4060         * modules/isnanl-tests (configure.ac): Likewise.
4061
4062 2007-04-03  Ben Pfaff  <blp@gnu.org>
4063
4064         * modules/iconv_open: Add $(srcdir)/ to source directory
4065         references in Makefile fragments that call gperf, to fix VPATH
4066         builds.
4067
4068 2007-04-03  Bruno Haible  <bruno@clisp.org>
4069
4070         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
4071         * lib/ldexpl.c: Undo last change.
4072
4073 2007-04-03  Bruno Haible  <bruno@clisp.org>
4074
4075         * modules/printf-frexpl (Depends-on): Undo last change.
4076         (Files): Add m4/ldexpl.m4.
4077
4078 2007-04-03  Bruno Haible  <bruno@clisp.org>
4079
4080         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
4081         * modules/isnanl (Link): New section.
4082
4083         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
4084         * modules/frexp (Link): New section.
4085
4086         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
4087         * modules/frexpl (Link): New section.
4088
4089         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
4090         * modules/ldexpl (Link): New section.
4091
4092 2007-04-03  Bruno Haible  <bruno@clisp.org>
4093
4094         * modules/TEMPLATE-EXTENDED: New file.
4095         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
4096
4097 2007-04-03  Bruno Haible  <bruno@clisp.org>
4098
4099         * DEPENDENCIES: New file.
4100         Suggested by Simon Josefsson.
4101
4102 2007-04-03  Bruno Haible  <bruno@clisp.org>
4103
4104         * doc/gnulib.texi: Escape @.
4105
4106 2007-04-03  James Youngman  <jay@gnu.org>
4107         and Paul Eggert  <eggert@cs.ucla.edu>
4108
4109         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
4110         birthtime on all systems that have birthtime, not just those which
4111         use st_birthtimensec rather than st_birthtim.  Putting zero in
4112         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
4113         that the birth time is not available for files on an NFS mount.
4114
4115 2007-04-03  Simon Josefsson  <simon@josefsson.org>
4116
4117         * modules/memxor: Move back from crypto/, suggested by Bruno.
4118         * modules/crypto/hmac-sha1: Fix memxor dependency.
4119
4120         * modules/crypto/gc: Moved from ../.
4121
4122 2007-04-02  Eric Blake  <ebb9@byu.net>
4123
4124         * lib/ldexpl.c (includes): Avoid libm.
4125
4126         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
4127
4128 2007-04-02  Bruno Haible  <bruno@clisp.org>
4129
4130         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
4131         on IRIX.
4132
4133 2007-04-02  Bruno Haible  <bruno@clisp.org>
4134
4135         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
4136         x86 or x86_64 platforms running MacOS X.
4137         Reported by Ryan Schmidt <@ryandesign.com>.
4138
4139 2007-04-02  Bruno Haible  <bruno@clisp.org>
4140
4141         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
4142         i386.
4143
4144 2007-04-01  Simon Josefsson  <simon@josefsson.org>
4145
4146         * modules/crypto/arcfour: Moved from ../.
4147         * modules/crypto/arcfour-tests: Moved from ../.
4148         * modules/crypto/arctwo: Moved from ../.
4149         * modules/crypto/arctwo-tests: Moved from ../.
4150         * modules/crypto/des: Moved from ../.
4151         * modules/crypto/des-tests: Moved from ../.
4152         * modules/crypto/gc-arcfour: Moved from ../.
4153         * modules/crypto/gc-arcfour-tests: Moved from ../.
4154         * modules/crypto/gc-arctwo: Moved from ../.
4155         * modules/crypto/gc-arctwo-tests: Moved from ../.
4156         * modules/crypto/gc-des: Moved from ../.
4157         * modules/crypto/gc-des-tests: Moved from ../.
4158         * modules/crypto/gc-hmac-md5: Moved from ../.
4159         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
4160         * modules/crypto/gc-hmac-sha1: Moved from ../.
4161         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
4162         * modules/crypto/gc-md2: Moved from ../.
4163         * modules/crypto/gc-md2-tests: Moved from ../.
4164         * modules/crypto/gc-md4: Moved from ../.
4165         * modules/crypto/gc-md4-tests: Moved from ../.
4166         * modules/crypto/gc-md5: Moved from ../.
4167         * modules/crypto/gc-md5-tests: Moved from ../.
4168         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
4169         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
4170         * modules/crypto/gc-random: Moved from ../.
4171         * modules/crypto/gc-rijndael: Moved from ../.
4172         * modules/crypto/gc-rijndael-tests: Moved from ../.
4173         * modules/crypto/gc-sha1: Moved from ../.
4174         * modules/crypto/gc-sha1-tests: Moved from ../.
4175         * modules/crypto/gc-tests: Moved from ../.
4176         * modules/crypto/hmac-md5: Moved from ../.
4177         * modules/crypto/hmac-md5-tests: Moved from ../.
4178         * modules/crypto/hmac-sha1: Moved from ../.
4179         * modules/crypto/hmac-sha1-tests: Moved from ../.
4180         * modules/crypto/md2: Moved from ../.
4181         * modules/crypto/md2-tests: Moved from ../.
4182         * modules/crypto/md4: Moved from ../.
4183         * modules/crypto/md4-tests: Moved from ../.
4184         * modules/crypto/md5: Moved from ../.
4185         * modules/crypto/md5-tests: Moved from ../.
4186         * modules/crypto/memxor: Moved from ../.
4187         * modules/crypto/rijndael: Moved from ../.
4188         * modules/crypto/rijndael-tests: Moved from ../.
4189         * modules/crypto/sha1: Moved from ../.
4190
4191 2007-03-30  James Youngman  <jay@gnu.org>
4192
4193         * tests/test-stat-time.c (prepare_test): use chmod() rather than
4194         rename() to change the ctime of a file (because ctime is unaffected
4195         by rename on jfs2 on AIX 5.1).
4196         (main): Start by doing cleanup, in case a previous run failed leaving
4197         test files behind.
4198
4199 2007-03-31  Bruno Haible  <bruno@clisp.org>
4200
4201         Support old proprietary implementations of iconv.
4202         * modules/iconv_open: New file.
4203         * lib/iconv_.h: New file.
4204         * m4/iconv_h.m4: New file.
4205         * lib/iconv_open.c: New file.
4206         * lib/iconv_open-aix.gperf: New file.
4207         * lib/iconv_open-hpux.gperf: New file.
4208         * lib/iconv_open-irix.gperf: New file.
4209         * lib/iconv_open-osf.gperf: New file.
4210         * m4/iconv_open.m4: New file.
4211         * modules/linebreak (Depends-on): Add iconv_open.
4212         * modules/striconv (Depends-on): Likewise.
4213         * modules/striconveh (Depends-on): Likewise.
4214         * modules/unicodeio (Depends-on): Likewise.
4215         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
4216         (iconv_t)(-1).
4217         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
4218         conversion if cd is (iconv_t)(-1).
4219         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
4220         is not possible.
4221
4222 2007-03-31  Bruno Haible  <bruno@clisp.org>
4223
4224         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4225         work on Solaris either. Protect also second use of "autodetect_jp".
4226
4227 2007-03-31  Bruno Haible  <bruno@clisp.org>
4228
4229         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
4230         the function is not present.
4231
4232 2007-03-31  Bruno Haible  <bruno@clisp.org>
4233
4234         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
4235         the function is not present.
4236
4237 2007-03-31  Bruno Haible  <bruno@clisp.org>
4238
4239         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
4240         a bug in HP-UX iconv_open().
4241
4242 2007-03-31  Bruno Haible  <bruno@clisp.org>
4243
4244         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
4245         (Mathematics <math.h>): New section, add fpieee.
4246         (Input/output <stdio.h>): Add fseterr.
4247         (Mathematics <math.h>): New section, add printf-frexp.
4248         (Container data structures): Add sublist.
4249         (Core language properties): Add fpucw, inline.
4250         (Functions for greatest-width integer types <inttypes.h>): Add
4251         imaxabs, imaxdiv, inttypes.
4252         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
4253         isnanl-nolibm, ldexp.
4254         (Mathematics <math.h>): New section, add printf-frexpl.
4255         (Support for systems lacking POSIX:2001): Add fprintf-posix,
4256         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
4257         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
4258         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
4259         (Unicode string functions): Add unistr/u*-mbtoucr.
4260         (Java): Add javacomp-script, javaexec-script.
4261         (C#): Add csharpcomp-script, csharpexec-script.
4262         (Support for building libraries and executables): Add havelib,
4263         relocatable-*.
4264         (Support for maintaining and releasing projects): Renamed from
4265         'Support for maintaining and release projects'. Add announce-gen.
4266
4267 2007-03-31  Bruno Haible  <bruno@clisp.org>
4268
4269         * README: Talk primarily about git.
4270         (git and CVS): Renamed from CVS.
4271         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
4272         gnulib is available through git.
4273         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
4274
4275 2007-03-30  Bruno Haible  <bruno@clisp.org>
4276
4277         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
4278         * lib/poll_.h: Likewise.
4279         * lib/stat_.h: Likewise.
4280         * lib/sys_time_.h: Likewise.
4281         * lib/sysexit_.h: Likewise.
4282         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
4283         * lib/stdbool_.h: Likewise.
4284         * lib/byteswap_.h: Add double-inclusion guard.
4285
4286 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
4287
4288         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
4289
4290 2007-03-30  Karl Berry  <karl@gnu.org>
4291
4292         * config/srclist-update: double space after USA in the license
4293         substitution, since that's how it's usually (?) written.
4294
4295 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
4296
4297         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
4298         reported by Bruno Haible.
4299
4300 2007-03-29  Bruno Haible  <bruno@clisp.org>
4301
4302         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
4303         a bug in AIX iconv().
4304
4305 2007-03-29  Bruno Haible  <bruno@clisp.org>
4306
4307         * modules/ldexpl-tests: New file.
4308         * tests/test-ldexpl.c: New file.
4309
4310 2007-03-29  Bruno Haible  <bruno@clisp.org>
4311
4312         * lib/ldexpl.c: Include fpucw.h.
4313         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
4314         multiplication.
4315         * modules/ldexpl (Depends-on): Add fpucw.
4316
4317 2007-03-29  Bruno Haible  <bruno@clisp.org>
4318
4319         * modules/ldexpl: New file.
4320         * m4/ldexpl.m4: New file.
4321         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
4322         set.
4323         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
4324         REPLACE_LDEXPL.
4325         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
4326         REPLACE_LDEXPL.
4327         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
4328         gl_FUNC_LDEXPL_WORKS.
4329         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
4330         * modules/mathl (Files): Remove lib/ldexpl.c.
4331         (Depends-on): Add ldexpl.
4332
4333 2007-03-29  Bruno Haible  <bruno@clisp.org>
4334
4335         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
4336
4337 2007-03-29  Bruno Haible  <bruno@clisp.org>
4338
4339         * tests/test-striconveh.c (main): Don't assume that a direct conversion
4340         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
4341         and possibly also HP-UX.
4342         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4343         work on AIX, IRIX, HP-UX, OSF/1.
4344         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4345         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4346         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4347         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4348         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4349         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4350
4351 2007-03-29  Bruno Haible  <bruno@clisp.org>
4352
4353         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4354
4355 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4356
4357         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4358         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
4359
4360 2007-03-29  Eric Blake  <ebb9@byu.net>
4361
4362         * lib/acl-internal.h: Remove redundant include.
4363         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
4364         Cygwin when a file is locked.
4365
4366 2007-03-29  Bruno Haible  <bruno@clisp.org>
4367
4368         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
4369         file.
4370         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
4371
4372 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4373
4374         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
4375         try to remove a parent directory if the child couldn't be removed
4376         (except for the first rmdir, which could fail because the child
4377         doesn't exist).  Problem reported by Jeff Blaine in
4378         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
4379
4380 2007-03-28  Bruno Haible  <bruno@clisp.org>
4381
4382         * lib/striconveh.c (utf8conv_carefully): New function.
4383         (mem_cd_iconveh_internal): Invoke it.
4384
4385 2007-03-28  Bruno Haible  <bruno@clisp.org>
4386
4387         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
4388         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
4389         input.
4390         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
4391         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
4392         unistr/u8-uctomb.
4393
4394 2007-03-28  Bruno Haible  <bruno@clisp.org>
4395
4396         * modules/unistr/u8-mbtoucr: New file.
4397         * lib/unistr/u8-mbtoucr.c: New file.
4398         * modules/unistr/u16-mbtoucr: New file.
4399         * lib/unistr/u16-mbtoucr.c: New file.
4400         * modules/unistr/u16-mbtoucr: New file.
4401         * lib/unistr/u16-mbtoucr.c: New file.
4402         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
4403
4404 2007-03-27  Simon Josefsson  <simon@josefsson.org>
4405             Bruno Haible  <bruno@clisp.org>
4406
4407         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
4408         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
4409         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
4410
4411         * m4/stdio_h.m4: Add stubs for vasprintf too.
4412
4413         * modules/stdio: Support vasprintf in sed command.
4414
4415         * modules/vasprintf: Depend on stdio for prototypes.  Remove
4416         vasprintf.h.  Add stdio module indicator.
4417
4418         * lib/stdio_.h: Declare asprintf and vasprintf, based on
4419         vasprintf.h.
4420
4421         * lib/vasprintf.h: File removed.
4422
4423         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
4424         * lib/vasprintf.c: Ditto.
4425         * lib/xvasprintf.c: Ditto.
4426         * tests/test-vasprintf-posix.c: Ditto.
4427         * tests/test-vasprintf.c: Ditto.
4428
4429 2007-03-27  Bruno Haible  <bruno@clisp.org>
4430
4431         Make vasnprintf multithread-safe.
4432         * lib/vasnprintf.c (decimal_point_char): New function.
4433         (VASNPRINTF): Use it.
4434         Suggested by Simon Josefsson.
4435
4436 2007-03-27  Eric Blake  <ebb9@byu.net>
4437
4438         Support sub-second birthtime on cygwin.
4439         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
4440         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
4441         (get_stat_birthtime): Also work with st_birthtim.
4442
4443 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
4444
4445         * lib/stat-time.h (USE_BIRTHTIME): Remove.
4446         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
4447         (get_stat_birthtime_ns): Do not try to use "spare" fields.
4448         (get_stat_birthtime_ns): Simplify compile-time tests.
4449         (get_stat_birthtime): Change the API to look like
4450         get_stat_mtime etc., except return a negative tv_nsec on error.
4451         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
4452         Don't check for "spare" fields.
4453         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
4454         or for struct stat.st_birthtime, as these tests aren't used.
4455         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
4456
4457 2007-03-27  Bruno Haible  <bruno@clisp.org>
4458
4459         * lib/stat-time.h: Include <sys/stat.h>.
4460
4461 2007-03-27  James Youngman  <jay@gnu.org>
4462
4463         * lib/stat-time.h (get_stat_birthtime): New function for
4464           retrieving st_birthtime as provided by UFS2 (hence *BSD).
4465         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
4466           and its variants.
4467         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
4468         * modules/stat-time-test: New file.
4469         * tests/test-stat-time.c: New test, devised by Bruno Haible.
4470
4471 2007-03-26  Bruno Haible  <bruno@clisp.org>
4472
4473         Better support of signalling NaNs.
4474         * lib/atanl.c: Include isnanl.h.
4475         (atanl): Perform test for NaN at the beginning of the function and
4476         through a call to isnanl.
4477         * lib/cosl.c: Include isnanl.h.
4478         (cosl): Perform test for NaN at the beginning of the function and
4479         through a call to isnanl.
4480         * lib/ldexpl.c: Include isnanl.h.
4481         (ldexpl): Perform test for NaN through a call to isnanl.
4482         * lib/logl.c: Include isnanl.h.
4483         (logl): Perform test for NaN at the beginning of the function and
4484         through a call to isnanl.
4485         * lib/sinl.c: Include isnanl.h.
4486         (sinl): Perform test for NaN at the beginning of the function and
4487         through a call to isnanl.
4488         * lib/sqrtl.c: Include isnanl.h.
4489         (sqrtl): Perform test for NaN at the beginning of the function and
4490         through a call to isnanl.
4491         * lib/tanl.c: Include isnanl.h.
4492         (tanl): Perform test for NaN at the beginning of the function and
4493         through a call to isnanl.
4494         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
4495         * modules/mathl (Depends-on): Add isnanl.
4496
4497 2007-03-26  Eric Blake  <ebb9@byu.net>
4498
4499         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
4500         regression in logic sense of previous patch.
4501
4502 2007-03-26  Bruno Haible  <bruno@clisp.org>
4503
4504         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4505         unportable shell command "if ! ...".
4506         Reported by Ralf Wildenhues.
4507
4508 2007-03-25  Bruno Haible  <bruno@clisp.org>
4509
4510         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
4511         <sysexits.h> file, and only add EX_CONFIG.
4512         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
4513         absolute file name and whether it is sufficient. Substitute also
4514         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
4515         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
4516         ABSOLUTE_SYSEXITS_H into sysexits.h.
4517
4518 2007-03-25  Bruno Haible  <bruno@clisp.org>
4519
4520         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
4521         hints is NULL.
4522
4523 2007-03-25  Bruno Haible  <bruno@clisp.org>
4524
4525         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
4526         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
4527
4528 2007-03-25  Bruno Haible  <bruno@clisp.org>
4529
4530         * lib/vasnprintf.c: Include langinfo.h.
4531         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
4532         multithread-safe.
4533         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
4534         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
4535         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
4536         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4537         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4538         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4539         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
4540         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
4541         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4542         Reported by Simon Josefsson.
4543
4544 2007-03-25  Bruno Haible  <bruno@clisp.org>
4545
4546         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
4547         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
4548         * modules/vasnprintf (Depends-on): Add stdint.
4549
4550 2007-03-25  Bruno Haible  <bruno@clisp.org>
4551
4552         * modules/fpieee: New file.
4553         * m4/fpieee.m4: New file.
4554         * modules/isnan-nolibm (Depends-on): Add fpieee.
4555         * modules/isnanl-nolibm (Depends-on): Add fpieee.
4556         * modules/isnanl (Depends-on): Add fpieee.
4557
4558 2007-03-25  Bruno Haible  <bruno@clisp.org>
4559
4560         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
4561
4562 2007-03-25  Bruno Haible  <bruno@clisp.org>
4563
4564         Avoid test failures on IRIX 6.5.
4565         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
4566         (main): Use it.
4567         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
4568         macros.
4569         (main): Use them.
4570
4571 2007-03-25  Bruno Haible  <bruno@clisp.org>
4572
4573         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
4574         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
4575         exists but doesn't work.
4576         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
4577         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
4578         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
4579         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
4580
4581 2007-03-25  Bruno Haible  <bruno@clisp.org>
4582
4583         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
4584         returns inf. Needed on IRIX 6.5.
4585
4586 2007-03-25  Bruno Haible  <bruno@clisp.org>
4587
4588         * tests/test-frexpl.c: Include isnanl-nolibm.h.
4589         (main): Use isnanl instead of x != x idiom.
4590         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
4591
4592         * tests/test-frexp.c: Include isnan.h.
4593         (main): Use isnan instead of x != x idiom.
4594         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
4595
4596 2007-03-25  Bruno Haible  <bruno@clisp.org>
4597
4598         * tests/test-frexp.c (NaN): New function/macro.
4599         (main): Use it instead of 0.0 / 0.0.
4600         * tests/test-isnan.c (NaN): New function/macro.
4601         (main): Use it instead of 0.0 / 0.0.
4602         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
4603         (test_function): Use it instead of 0.0 / 0.0.
4604         * tests/test-vasprintf-posix.c (NaN): New function/macro.
4605         (test_function): Use it instead of 0.0 / 0.0.
4606         * tests/test-snprintf-posix.h (NaN): New function/macro.
4607         (test_function): Use it instead of 0.0 / 0.0.
4608         * tests/test-sprintf-posix.h (NaN): New function/macro.
4609         (test_function): Use it instead of 0.0 / 0.0.
4610         * tests/test-fprintf-posix.h (NaN): New function/macro.
4611         (test_function): Use it instead of 0.0 / 0.0.
4612         * tests/test-printf-posix.h (NaN): New function/macro.
4613         (test_function): Use it instead of 0.0 / 0.0.
4614
4615         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
4616
4617 2007-03-25  Bruno Haible  <bruno@clisp.org>
4618
4619         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
4620
4621 2007-03-25  Bruno Haible  <bruno@clisp.org>
4622
4623         * lib/regexec.c (merge_state_with_log): Make static.
4624
4625 2007-03-25  Bruno Haible  <bruno@clisp.org>
4626
4627         * lib/trigl.c (kernel_rem_pio2): Make static.
4628
4629 2007-03-25  Bruno Haible  <bruno@clisp.org>
4630
4631         * lib/sincosl.c (sincosl_table): Make static.
4632
4633 2007-03-25  Bruno Haible  <bruno@clisp.org>
4634
4635         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
4636         if the compiler does not support C99.
4637
4638 2007-03-25  Bruno Haible  <bruno@clisp.org>
4639
4640         * modules/time (Makefile.am): Ensure all rule action lines start with a
4641         tab.
4642
4643 2007-03-24  Bruno Haible  <bruno@clisp.org>
4644
4645         * modules/tsearch-tests: New file.
4646         * tests/test-tsearch.sh: New file.
4647         * tests/test-tsearch.c: New file, mostly copied from glibc.
4648
4649         * modules/search-tests: New file.
4650         * tests/test-search.c: New file.
4651
4652         * modules/search: New file.
4653         * lib/search_.h: New file, incorporating lib/tsearch.h.
4654         * m4/search_h.m4: New file.
4655         * lib/tsearch.h: Remove file.
4656         * lib/tsearch.c: Include search.h instead of tsearch.h.
4657         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
4658         HAVE_TSEARCH.
4659         * modules/tsearch (Files): Remove lib/tsearch.h.
4660         (Depends-on): Add search.
4661         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
4662         (Include): Change tsearch.h into search.h.
4663
4664 2007-03-24  Bruno Haible  <bruno@clisp.org>
4665
4666         * modules/fpucw: New file.
4667         * lib/fpucw.h: New file.
4668         * lib/frexp.c: Include fpucw.h.
4669         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4670         (FUNC): Use them.
4671         * lib/printf-frexp.c: Include fpucw.h.
4672         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4673         (FUNC): Use them.
4674         * lib/vasnprintf.c: Include fpucw.h.
4675         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
4676         'long double' calculations.
4677         * tests/test-frexpl.c: Include fpucw.h.
4678         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4679         * tests/test-printf-frexpl.c: Include fpucw.h.
4680         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4681         * modules/frexpl (Depends-on): Add fpucw.
4682         * modules/printf-frexpl (Depends-on): Likewise.
4683         * modules/fprintf-posix (Depends-on): Likewise.
4684         * modules/snprintf-posix (Depends-on): Likewise.
4685         * modules/sprintf-posix (Depends-on): Likewise.
4686         * modules/vasnprintf-posix (Depends-on): Likewise.
4687         * modules/vasprintf-posix (Depends-on): Likewise.
4688         * modules/vfprintf-posix (Depends-on): Likewise.
4689         * modules/vsnprintf-posix (Depends-on): Likewise.
4690         * modules/vsprintf-posix (Depends-on): Likewise.
4691         * modules/frexpl-tests (Depends-on): Likewise.
4692         * modules/printf-frexpl-tests (Depends-on): Likewise.
4693
4694 2007-03-24  Bruno Haible  <bruno@clisp.org>
4695
4696         * lib/float+.h: New file.
4697         * lib/isnan.c: Include float+.h.
4698         (SIZE): New macro.
4699         (FUNC): Compare only SIZE bytes of the value.
4700         * lib/vasnprintf.c: Include float+.h.
4701         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4702         SIZEOF_LDBL or SIZEOF_DBL bytes.
4703         * modules/isnan-nolibm (Files): Add lib/float+.h.
4704         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4705         * modules/isnanl (Files): Add lib/float+.h.
4706         * modules/vasnprintf (Files): Add lib/float+.h.
4707
4708 2007-03-24  Bruno Haible  <bruno@clisp.org>
4709
4710         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4711         include isnanl-nolibm.h.
4712
4713 2007-03-24  Bruno Haible  <bruno@clisp.org>
4714
4715         * tests/test-read-file.c (main): Don't produce spurious output for
4716         expected situations. Make the test fail if it encountered unexpected
4717         results.
4718
4719 2007-03-24  Bruno Haible  <bruno@clisp.org>
4720
4721         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4722         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4723
4724 2007-03-24  Bruno Haible  <bruno@clisp.org>
4725
4726         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4727
4728 2007-03-24  Bruno Haible  <bruno@clisp.org>
4729
4730         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4731         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4732
4733         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4734         * modules/utf8-ucs4: Turn into a symbolic link to module
4735         unistr/u8-mbtouc.
4736
4737         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4738         utf8-ucs4-unsafe.
4739         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4740         unistr/u8-mbtouc-unsafe.
4741
4742         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4743         * modules/utf16-ucs4: Turn into a symbolic link to module
4744         unistr/u16-mbtouc.
4745
4746         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4747         utf16-ucs4-unsafe.
4748         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4749         unistr/u16-mbtouc-unsafe.
4750
4751         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4752         * modules/ucs4-utf8: Turn into a symbolic link to module
4753         unistr/u8-ubtomb.
4754
4755         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4756         * modules/ucs4-utf16: Turn into a symbolic link to module
4757         unistr/u16-ubtomb.
4758
4759 2007-03-24  Bruno Haible  <bruno@clisp.org>
4760
4761         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4762         Enable the function only if HAVE_INLINE.
4763         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4764         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4765         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4766         Enable the function only if HAVE_INLINE.
4767         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4768         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4769         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4770         Enable the function only if HAVE_INLINE.
4771         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4772         Enable the function only if HAVE_INLINE.
4773         * modules/utf8-ucs4: Update.
4774         * modules/utf8-ucs4-unsafe: Update.
4775         * modules/utf16-ucs4: Update.
4776         * modules/utf16-ucs4-unsafe: Update.
4777         * modules/ucs4-utf8: Update.
4778         * modules/ucs4-utf16: Update.
4779
4780 2007-03-24  Bruno Haible  <bruno@clisp.org>
4781
4782         * lib/utf8-ucs4.h: Remove file.
4783         * lib/utf8-ucs4-unsafe.h: Remove file.
4784         * lib/utf16-ucs4.h: Remove file.
4785         * lib/utf16-ucs4-unsafe.h: Remove file.
4786         * lib/ucs4-utf8.h: Remove file.
4787         * lib/ucs4-utf16.h: Remove file.
4788         * lib/unistr.h: Include their previous contents.
4789         * m4/utf-ucs4.m4: Remove file.
4790         * m4/ucs4-utf.m4: Remove file.
4791         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4792         (Depends-on): Add unistr/base.
4793         (configure.ac): Remove gl_UTF_UCS4.
4794         (Makefile.am): Update.
4795         (Include): Change to unistr.h.
4796         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4797         (Depends-on): Add unistr/base.
4798         (configure.ac): Remove gl_UTF_UCS4.
4799         (Makefile.am): Update.
4800         (Include): Change to unistr.h.
4801         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4802         (Depends-on): Add unistr/base.
4803         (configure.ac): Remove gl_UTF_UCS4.
4804         (Makefile.am): Update.
4805         (Include): Change to unistr.h.
4806         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4807         (Depends-on): Add unistr/base.
4808         (configure.ac): Remove gl_UTF_UCS4.
4809         (Makefile.am): Update.
4810         (Include): Change to unistr.h.
4811         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4812         (Depends-on): Add unistr/base.
4813         (configure.ac): Remove gl_UCS4_UTF.
4814         (Makefile.am): Update.
4815         (Include): Change to unistr.h.
4816         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4817         (Depends-on): Add unistr/base.
4818         (configure.ac): Remove gl_UCS4_UTF.
4819         (Makefile.am): Update.
4820         (Include): Change to unistr.h.
4821         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4822         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4823         utf8-ucs4-unsafe.h.
4824         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4825         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4826         utf16-ucs4-unsafe.h.
4827         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4828         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4829         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4830         * lib/unistr/u8-strchr.c: Likewise.
4831         * lib/unistr/u8-strrchr.c: Likewise.
4832         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4833         * lib/unistr/u16-strchr.c: Likewise.
4834         * lib/unistr/u16-strrchr.c: Likewise.
4835         * lib/striconveh.c: Update.
4836         * lib/linebreak.c: Update.
4837
4838 2007-03-24  Bruno Haible  <bruno@clisp.org>
4839
4840         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4841         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4842
4843 2007-03-22  Bruno Haible  <bruno@clisp.org>
4844
4845         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4846
4847 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4848
4849         * MODULES.html.sh (File system functions): New module write-any-file.
4850         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4851         * m4/write-any-file.m4: New files.
4852
4853 2007-03-23  Eric Blake  <ebb9@byu.net>
4854
4855         * gnulib-tool: Rearrange space-tab sequences, since some editors
4856         like to eat them.
4857
4858 2007-03-23  Eric Blake  <ebb9@byu.net>
4859
4860         * lib/version-etc.c (version_etc_va): Update license wording to
4861         be more concise.  Recommended by Richard Stallman.
4862
4863 2007-03-22  Bruno Haible  <bruno@clisp.org>
4864
4865         * lib/poll.c (MSG_PEEK): New fallback definition.
4866
4867 2007-03-22  Bruno Haible  <bruno@clisp.org>
4868
4869         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4870         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4871         (main): Update.
4872         Fixes a compilation error on BeOS.
4873
4874 2007-03-22  Bruno Haible  <bruno@clisp.org>
4875
4876         * modules/frexpl-tests: New file.
4877         * tests/test-frexpl.c: New file.
4878
4879         * modules/frexpl: New file.
4880         * m4/frexpl.m4: New file.
4881         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4882         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4883         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4884         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4885         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4886         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4887
4888 2007-03-22  Bruno Haible  <bruno@clisp.org>
4889
4890         * lib/frexpl.c: Share code with lib/frexp.c.
4891         * modules/mathl (Files): Add lib/frexp.c.
4892         (Depends-on): Add isnanl-nolibm.
4893
4894 2007-03-22  Bruno Haible  <bruno@clisp.org>
4895
4896         * modules/printf-frexp (Files): Add m4/frexp.m4.
4897         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4898         only if the found frexp function actually works.
4899
4900 2007-03-22  Bruno Haible  <bruno@clisp.org>
4901
4902         * lib/frexp.c: Remove older implementation that uses divisions.
4903
4904 2007-03-21  Bruno Haible  <bruno@clisp.org>
4905
4906         * modules/frexp-tests: New file.
4907         * tests/test-frexp.c: New file.
4908
4909         * modules/frexp: New file.
4910         * lib/frexp.c: New file.
4911         * m4/frexp.m4: New file.
4912         * lib/math_.h (frexp): New declaration.
4913         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4914         REPLACE_FREXP.
4915         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4916
4917 2007-03-21  Bruno Haible  <bruno@clisp.org>
4918
4919         * modules/isnanl-tests: New file.
4920         * tests/test-isnanl.c: New file.
4921
4922         * modules/isnanl: New file.
4923         * lib/isnanl.h: New file.
4924         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4925         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4926         gl_FUNC_ISNANL_WORKS.
4927         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4928         New macros.
4929
4930 2007-03-21  Bruno Haible  <bruno@clisp.org>
4931
4932         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4933         lib/isnanl.h.
4934         (Include): Update.
4935         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4936         * lib/vasnprintf.c: Update.
4937         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4938         tests/test-isnanl.h, remove tests/test-isnanl.c.
4939         (Makefile.am): Update.
4940         * tests/test-isnanl-nolibm.c: New file.
4941         * tests/test-isnanl.h: New file.
4942         * tests/test-isnanl.c: Remove file.
4943
4944 2007-03-21  Jim Meyering  <jim@meyering.net>
4945
4946         When trying to open ".", treat ESTALE like EACCES.
4947         * lib/savewd.c (savewd_save): Resort to forking not just upon
4948         failure with EACCES, but also when errno is ESTALE.
4949
4950 2007-03-20  Bruno Haible  <bruno@clisp.org>
4951
4952         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4953         Needed on AIX 5.1. Reported by Matthew Woehlke.
4954
4955 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4956
4957         Suggestions by Bruno Haible:
4958         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4959         our own.
4960         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4961         * modules/acl (Depends-on): Add gettext.
4962
4963 2007-03-19  Bruno Haible  <bruno@clisp.org>
4964
4965         * modules/iconvme: Remove file.
4966         * lib/iconvme.h: Remove file.
4967         * lib/iconvme.c: Remove file.
4968         * m4/iconvme.m4: Remove file.
4969
4970 2007-03-19  Bruno Haible  <bruno@clisp.org>
4971
4972         * doc/relocatable-maint.texi: Break long shell script line.
4973         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4974
4975 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4976
4977         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4978         handle file_has_acl.
4979         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4980         * lib/acl.c: Move header inclusions and related macro defns into
4981         lib/acl-internal.h.
4982         (S_ISLNK): Remove defn, since that's now done for us.
4983         (file_has_acl): Move to lib/file-has-acl.c.
4984         Call acl_trivial if available.  This is the crucial part of the fix.
4985         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4986         shared within the library.  Rewrite a bit, partly to make it compatible
4987         with the GNU coding style.
4988         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4989         Remove unnecessary double-quotes.
4990         Don't test for acl_to_text; the build will catch that.
4991         Replace acl_entries if it doesn't exist and it is needed.
4992         Check for -lsec and acl_trivial (as used on Solaris 10).
4993         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4994         lib/file-has-acl.c.
4995         (Depends-on): Add sys_stat, for S_ISLNK.
4996
4997 2007-03-19  Ben Pfaff  <blp@gnu.org>
4998
4999         * doc/gnulib.texi: Fix typos.
5000         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
5001
5002 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
5003
5004         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
5005         If size is zero here, buf must be zero.
5006
5007 2007-03-19  Simon Josefsson  <simon@josefsson.org>
5008
5009         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
5010         <bruno@clisp.org>.
5011
5012 2007-03-18  Bruno Haible  <bruno@clisp.org>
5013
5014         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
5015         Suggested by Eric Blake.
5016
5017 2007-03-18  Ben Pfaff  <blp@gnu.org>
5018
5019         * doc/relocatable.texi: Recommend using as prefix a directory
5020         that does not exist and will never be created.  Based on
5021         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
5022         and others.
5023
5024 2007-03-17  Bruno Haible  <bruno@clisp.org>
5025
5026         * lib/fchownat.c: Include lchown.h.
5027
5028 2007-03-17  Bruno Haible  <bruno@clisp.org>
5029
5030         Fix endless loop when the given allocated size was > INT_MAX.
5031         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
5032         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
5033         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
5034         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
5035         * lib/sprintf.c (sprintf): Likewise.
5036
5037 2007-03-17  Bruno Haible  <bruno@clisp.org>
5038
5039         * tests/test-argp-2.sh (func_compare): Output a context diff.
5040
5041 2007-03-17  Bruno Haible  <bruno@clisp.org>
5042
5043         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
5044         locale's decimal-point character.
5045
5046 2007-03-17  Bruno Haible  <bruno@clisp.org>
5047
5048         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
5049         before comparing it. Needed because on some platforms (e.g. x86) a
5050         'long double' occupies less bytes than sizeof (long double).
5051
5052 2007-03-17  Bruno Haible  <bruno@clisp.org>
5053
5054         * tests/test-crc.c (main): Make printf statements 64-bit clean.
5055         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
5056         * tests/test-getaddrinfo.c (simple): Likewise.
5057         * tests/test-read-file.c (main): Likewise.
5058
5059 2007-03-17  Bruno Haible  <bruno@clisp.org>
5060
5061         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
5062
5063 2007-03-17  Bruno Haible  <bruno@clisp.org>
5064
5065         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
5066         unused variable.
5067
5068 2007-03-17  Bruno Haible  <bruno@clisp.org>
5069
5070         * tests/test-c-strcasecmp.c: Include c-strcase.h.
5071         * tests/test-c-strncasecmp.c: Likewise.
5072
5073 2007-03-17  Bruno Haible  <bruno@clisp.org>
5074
5075         * modules/stdlib (Depends-on): Add unistd.
5076         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
5077         Needed for MacOS X 10.3.
5078
5079 2007-03-17  Bruno Haible  <bruno@clisp.org>
5080
5081         * lib/unistr/u-strdup.h: Include <stdlib.h>.
5082
5083 2007-03-17  Bruno Haible  <bruno@clisp.org>
5084
5085         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
5086
5087 2007-03-17  Bruno Haible  <bruno@clisp.org>
5088
5089         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
5090         to reflect files copied from gnulib (with or without modifications).
5091         Suggested by Jim Meyering.
5092
5093 2007-03-17  Eric Blake  <ebb9@byu.net>
5094
5095         * NEWS: Document stdlib change from 2007-02-18.
5096
5097 2007-03-17  Jim Meyering  <jim@meyering.net>
5098
5099         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
5100         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
5101         someone uses a name containing shell meta-characters.
5102         Reported by Alfred M. Szmidt.
5103
5104         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
5105
5106 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
5107
5108         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
5109         and copy gettext configuration files only if configure.ac contains
5110         a use of AM_GNU_GETTEXT_VERSION.
5111
5112 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
5113
5114         * build-aux/bootstrap (gnulib_name): New variable.
5115         (gnulib_tool_options): Use it.
5116
5117 2007-03-13  Simon Josefsson  <simon@josefsson.org>
5118
5119         * tests/test-des.c: Use new namespace.
5120
5121 2007-03-15  Bruno Haible  <bruno@clisp.org>
5122
5123         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
5124         Reported by James Youngman <jay@gnu.org>.
5125
5126 2007-03-15  Bruno Haible  <bruno@clisp.org>
5127
5128         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
5129         declared prototype. Needed with cc on OSF/1 5.1.
5130
5131 2007-03-15  Bruno Haible  <bruno@clisp.org>
5132
5133         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
5134         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
5135         (struct gl_list_implementation): Add dispose_fn argument to the
5136         'create_empty', 'create' methods.
5137         (struct gl_list_impl_base): Add field 'dispose_fn'.
5138         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
5139         argument.
5140         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
5141         dispose_fn argument.
5142         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
5143         dispose_fn on the dropped values.
5144         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
5145         dispose_fn argument.
5146         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
5147         dropped values.
5148         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
5149         (gl_tree_remove_node): Call dispose_fn on the dropped value.
5150         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
5151         (gl_tree_remove_node): Call dispose_fn on the dropped value.
5152         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
5153         argument.
5154         (gl_tree_list_free): Call dispose_fn on the dropped values.
5155         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
5156         the dropped values.
5157         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
5158         Add dispose_fn argument.
5159         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
5160         Call dispose_fn on the dropped values.
5161         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
5162         Add dispose_fn argument.
5163         (gl_sublist_create): Initialize the 'dispose_fn' field.
5164         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
5165         * tests/test-array_list.c (main): Update.
5166         * tests/test-carray_list.c (main): Update.
5167         * tests/test-avltree_list.c (main): Update.
5168         * tests/test-rbtree_list.c (main): Update.
5169         * tests/test-avltreehash_list.c (main): Update.
5170         * tests/test-rbtreehash_list.c (main): Update.
5171         * tests/test-linked_list.c (main): Update.
5172         * tests/test-linkedhash_list.c (main): Update.
5173         * tests/test-array_oset.c (main): Update.
5174
5175 2007-03-15  Bruno Haible  <bruno@clisp.org>
5176
5177         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
5178         (gl_oset_create_empty): Add dispose_fn argument.
5179         (struct gl_oset_implementation): Add dispose_fn argument to
5180         'create_empty' method.
5181         (struct gl_oset_impl_base): Add dispose_fn field.
5182         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
5183         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
5184         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
5185         values.
5186         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
5187         (gl_tree_oset_free): Call dispose_fn on the dropped values.
5188         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
5189         dropped value.
5190         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
5191         dropped value.
5192         * tests/test-array_oset.c (main): Update.
5193         * tests/test-avltree_oset.c (main): Update.
5194         * tests/test-rbtree_oset.c (main): Update.
5195         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
5196
5197 2007-03-13  Bruno Haible  <bruno@clisp.org>
5198
5199         * tests/test-stdbool.c (i): Update after last patch.
5200
5201 2007-03-12  Bruno Haible  <bruno@clisp.org>
5202
5203         * lib/quotearg.c: Include <wctype.h> early, before the definition of
5204         the iswprint macro. Needed on Solaris 2.5.1.
5205
5206 2007-03-12  Bruno Haible  <bruno@clisp.org>
5207
5208         * tests/test-printf-frexp.c (main): Declare x as volatile.
5209
5210 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5211
5212         * doc/gnulib.texi (Build robot for gnulib): New section.
5213
5214 2007-03-12  Jim Meyering  <jim@meyering.net>
5215
5216         * build-aux/bootstrap: New file.
5217         * build-aux/bootstrap.conf: New file, from coreutils.
5218
5219 2007-03-11  Bruno Haible  <bruno@clisp.org>
5220
5221         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
5222
5223 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5224
5225         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
5226         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
5227         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
5228
5229 2007-03-11  Bruno Haible  <bruno@clisp.org>
5230
5231         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
5232         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
5233
5234 2007-03-11  Bruno Haible  <bruno@clisp.org>
5235
5236         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
5237         formula. Needed for SunPRO C 5.0.
5238
5239 2007-03-11  Bruno Haible  <bruno@clisp.org>
5240
5241         * modules/long-options (Depends-on): Add getopt.
5242
5243 2007-03-11  Bruno Haible  <bruno@clisp.org>
5244
5245         * modules/modechange (Depends-on): Add stdbool.
5246
5247 2007-03-11  Bruno Haible  <bruno@clisp.org>
5248
5249         * modules/i-ring (Depends-on): Add stdbool.
5250
5251 2007-03-11  Bruno Haible  <bruno@clisp.org>
5252
5253         * modules/gc-des (Depends-on): Add stdbool.
5254
5255 2007-03-11  Bruno Haible  <bruno@clisp.org>
5256
5257         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
5258
5259 2007-03-11  Bruno Haible  <bruno@clisp.org>
5260
5261         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
5262
5263 2007-03-11  Bruno Haible  <bruno@clisp.org>
5264
5265         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
5266
5267 2007-03-11  Bruno Haible  <bruno@clisp.org>
5268
5269         * lib/vasnprintf.c (sprintf): Undefine.
5270
5271 2007-03-11  Bruno Haible  <bruno@clisp.org>
5272
5273         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
5274         initializers in SunPRO C and Compaq C compilers.
5275
5276 2007-03-11  Bruno Haible  <bruno@clisp.org>
5277
5278         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
5279         decrementing code ANSI C compliant.
5280
5281 2007-03-11  Bruno Haible  <bruno@clisp.org>
5282
5283         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
5284         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
5285
5286 2007-03-11  Bruno Haible  <bruno@clisp.org>
5287
5288         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
5289         <stdbool.h> substitute doesn't pass.
5290
5291 2007-03-11  Bruno Haible  <bruno@clisp.org>
5292
5293         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
5294
5295 2007-03-11  Bruno Haible  <bruno@clisp.org>
5296
5297         * gnulib-tool (func_create_megatestdir): Create also an autobuild
5298         script, for submission to autobuild.josefsson.org.
5299
5300 2007-03-10  Bruno Haible  <bruno@clisp.org>
5301
5302         * modules/canonicalize-lgpl-tests: New file.
5303         * tests/test-canonicalize-lgpl.sh: New file.
5304         * tests/test-canonicalize-lgpl.c: New file.
5305
5306         * modules/c-strcase-tests: New file.
5307         * tests/test-c-strcase.sh: New file.
5308         * tests/test-c-strcasecmp.c: New file.
5309         * tests/test-c-strncasecmp.c: New file.
5310
5311         * modules/atexit-tests: New file.
5312         * tests/test-atexit.sh: New file.
5313         * tests/test-atexit.c: New file.
5314
5315 2007-03-10  Bruno Haible  <bruno@clisp.org>
5316
5317         * tests/test-binary-io.sh: Use temporary filenames that are not so
5318         likely to clash with those of other tests (in a parallel make).
5319         * tests/test-binary-io.c: Likewise.
5320
5321 2007-03-10  Bruno Haible  <bruno@clisp.org>
5322
5323         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
5324         fallback; use #error instead.
5325         Suggested by Simon Josefsson.
5326
5327 2007-03-10  Bruno Haible  <bruno@clisp.org>
5328
5329         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
5330         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
5331         first and the last.
5332
5333 2007-03-10  Bruno Haible  <bruno@clisp.org>
5334
5335         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
5336
5337 2007-03-10  Bruno Haible  <bruno@clisp.org>
5338
5339         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
5340         "make distcheck".
5341         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
5342         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
5343         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
5344
5345 2007-03-10  Bruno Haible  <bruno@clisp.org>
5346
5347         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
5348         variable.
5349         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
5350         variable.
5351
5352 2007-03-09  Eric Blake  <ebb9@byu.net>
5353         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
5354
5355         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
5356         types are not being provided by gnulib.
5357         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
5358         types are supported.
5359
5360 2007-03-10  Bruno Haible  <bruno@clisp.org>
5361
5362         * lib/stdio_.h (__attribute__): New macro.
5363         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
5364         vsprintf): Specify __attribute__ __format__ for GCC.
5365         Suggested by Eric Blake.
5366
5367 2007-03-09  Bruno Haible  <bruno@clisp.org>
5368
5369         * modules/printf-posix-tests: New file.
5370         * tests/test-printf-posix.sh: New file.
5371         * tests/test-printf-posix.c: New file.
5372
5373         * modules/printf-posix: New file.
5374         * lib/printf.c: New file.
5375         * m4/printf-posix-rpl.m4: New file.
5376         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
5377         REPLACE_PRINTF.
5378         * lib/stdio_.h (printf): New declaration.
5379         (format, __format__, ____printf____, ____scanf____, ____strftime____,
5380         ____strfmon____): New macros.
5381         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
5382         REPLACE_PRINTF.
5383
5384 2007-03-09  Bruno Haible  <bruno@clisp.org>
5385
5386         * tests/test-vasnprintf-posix2.sh: New file.
5387         * tests/test-vasnprintf-posix2.c: New file.
5388         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
5389         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
5390         (Makefile.am): Activate test-vasnprintf-posix2.sh.
5391
5392         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
5393         a locale dependent decimal point, rather than always '.'.
5394
5395 2007-03-09  Eric Blake  <ebb9@byu.net>
5396
5397         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
5398         spite of platforms like Tandem/NSK that define it to -1.
5399
5400 2007-03-08  Bruno Haible  <bruno@clisp.org>
5401
5402         * modules/vprintf-posix-tests: New file.
5403         * tests/test-vprintf-posix.sh: New file.
5404         * tests/test-vprintf-posix.c: New file.
5405         * tests/test-printf-posix.h: New file.
5406
5407         * modules/vprintf-posix: New file.
5408         * lib/vprintf.c: New file.
5409         * m4/vprintf-posix.m4: New file.
5410         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
5411         REPLACE_VPRINTF.
5412         * lib/stdio_.h (vprintf): New declaration.
5413         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
5414         REPLACE_VPRINTF.
5415
5416 2007-03-08  Bruno Haible  <bruno@clisp.org>
5417
5418         * modules/fprintf-posix-tests: New file.
5419         * tests/test-fprintf-posix.sh: New file.
5420         * tests/test-fprintf-posix.c: New file.
5421
5422         * modules/fprintf-posix: New file.
5423         * lib/fprintf.c: New file.
5424         * m4/fprintf-posix.m4: New file.
5425         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
5426         REPLACE_FPRINTF.
5427         * lib/stdio_.h (fprintf): New declaration.
5428         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
5429         REPLACE_FPRINTF.
5430
5431 2007-03-08  Bruno Haible  <bruno@clisp.org>
5432
5433         * modules/vfprintf-posix-tests: New file.
5434         * tests/test-vfprintf-posix.sh: New file.
5435         * tests/test-vfprintf-posix.c: New file.
5436         * tests/test-fprintf-posix.h: New file.
5437         * tests/test-fprintf-posix.out: New file.
5438
5439         * modules/vfprintf-posix: New file.
5440         * lib/vfprintf.c: New file.
5441         * m4/vfprintf-posix.m4: New file.
5442         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
5443         REPLACE_VFPRINTF.
5444         * lib/stdio_.h (vfprintf): New declaration.
5445         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
5446         REPLACE_VFPRINTF.
5447
5448 2007-03-08  Bruno Haible  <bruno@clisp.org>
5449
5450         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
5451
5452 2007-03-08  Bruno Haible  <bruno@clisp.org>
5453
5454         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
5455         instead of 'expr' invocations.
5456         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
5457         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
5458         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
5459         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
5460         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
5461         Suggested by Paul Eggert.
5462
5463 2007-03-08  Bruno Haible  <bruno@clisp.org>
5464
5465         * modules/fseterr-tests: New file.
5466         * tests/test-fseterr.c: New file.
5467
5468         * modules/fseterr: New file.
5469         * lib/fseterr.h: New file.
5470         * lib/fseterr.c: New file.
5471
5472 2007-03-08  Bruno Haible  <bruno@clisp.org>
5473
5474         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
5475         * lib/getopt_.h: Likewise.
5476         * lib/mbswidth.h: Likewise.
5477         * lib/setenv.h: Likewise.
5478         * lib/vasnprintf.h: Likewise.
5479         * lib/vasprintf.h: Likewise.
5480         * lib/verror.h: Likewise.
5481         * lib/xsetenv.h: Likewise.
5482         * lib/xvasprintf.h: Likewise.
5483
5484 2007-03-08  Jim Meyering  <jim@meyering.net>
5485
5486         * users.txt: Add parted.
5487
5488         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
5489
5490 2007-03-07  Bruno Haible  <bruno@clisp.org>
5491
5492         * m4/printf.m4: Make the shell script snippets copy&pastable.
5493
5494 2007-03-02  Bruno Haible  <bruno@clisp.org>
5495
5496         * lib/netinet_in_.h: New file.
5497         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
5498         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
5499         * modules/netinet_in (Files): Add lib/netinet_in_.h.
5500         (Depends-on): Add absolute-header.
5501         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
5502         into netinet/in.h.
5503
5504 2007-03-03  Bruno Haible  <bruno@clisp.org>
5505
5506         * lib/sys_select_.h: New file.
5507         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
5508         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
5509         * modules/sys_select (Files): Add lib/sys_select_.h.
5510         (Depends-on): Add absolute-header.
5511         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
5512         into sys/select.h.
5513
5514 2007-03-02  Bruno Haible  <bruno@clisp.org>
5515
5516         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
5517         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5518         values.
5519         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
5520         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
5521         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
5522         * modules/sys_socket (Depends-on): Add absolute-header.
5523         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
5524         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
5525         (Include): Remove requirement of inclusion of <sys/types.h>.
5526
5527 2007-03-02  Bruno Haible  <bruno@clisp.org>
5528
5529         * lib/byteswap_.h (bswap_32): Fix formula.
5530
5531 2007-03-06  Bruno Haible  <bruno@clisp.org>
5532
5533         * modules/sprintf-posix-tests: New file.
5534         * tests/test-sprintf-posix.c: New file.
5535
5536         * modules/sprintf-posix: New file.
5537         * lib/sprintf.c: New file.
5538         * m4/sprintf-posix.m4: New file.
5539         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
5540         REPLACE_SPRINTF.
5541         * lib/stdio_.h (sprintf): New declaration.
5542         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
5543         REPLACE_SPRINTF.
5544
5545 2007-03-06  Bruno Haible  <bruno@clisp.org>
5546
5547         * modules/vsprintf-posix-tests: New file.
5548         * tests/test-vsprintf-posix.c: New file.
5549         * tests/test-sprintf-posix.h: New file.
5550
5551         * modules/vsprintf-posix: New file.
5552         * lib/vsprintf.c: New file.
5553         * m4/vsprintf-posix.m4: New file.
5554         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
5555         REPLACE_VSPRINTF.
5556         * lib/stdio_.h (vsprintf): New declaration.
5557         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
5558         REPLACE_VSPRINTF.
5559
5560 2007-03-06  Bruno Haible  <bruno@clisp.org>
5561
5562         * modules/vsnprintf (Depend-on): Remove minmax.
5563
5564 2007-03-06  Bruno Haible  <bruno@clisp.org>
5565
5566         * modules/snprintf-posix-tests: New file.
5567         * tests/test-snprintf-posix.c: New file.
5568
5569         * modules/snprintf-posix: New file.
5570         * m4/snprintf-posix.m4: New file.
5571         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
5572         gl_FUNC_SNPRINTF.
5573         (gl_FUNC_SNPRINTF): Invoke it.
5574         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
5575         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
5576         is set.
5577         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
5578
5579 2007-03-06  Bruno Haible  <bruno@clisp.org>
5580
5581         * modules/vsnprintf-posix-tests: New file.
5582         * tests/test-vsnprintf-posix.c: New file.
5583         * tests/test-snprintf-posix.h: New file.
5584
5585         * modules/vsnprintf-posix: New file.
5586         * m4/vsnprintf-posix.m4: New file.
5587         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
5588         gl_FUNC_VSNPRINTF.
5589         (gl_FUNC_VSNPRINTF): Invoke it.
5590         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
5591         * lib/stdio_.h (vsnprintf): Define as a replacement if
5592         REPLACE_VSNPRINTF is set.
5593         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
5594
5595 2007-03-06  Bruno Haible  <bruno@clisp.org>
5596
5597         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
5598         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
5599
5600 2007-03-06  Bruno Haible  <bruno@clisp.org>
5601
5602         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
5603         (asinl): Declare also if HAVE_DECL_ASINL is set.
5604         (atanl): Declare also if HAVE_DECL_ATANL is set.
5605         (ceill): Declare also if HAVE_DECL_CEILL is set.
5606         (cosl): Declare also if HAVE_DECL_COSL is set.
5607         (expl): Declare also if HAVE_DECL_EXPL is set.
5608         (floorl): Declare also if HAVE_DECL_FLOORL is set.
5609         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
5610         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
5611         (logl): Declare also if HAVE_DECL_LOGL is set.
5612         (sinl): Declare also if HAVE_DECL_SINL is set.
5613         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
5614         (tanl): Declare also if HAVE_DECL_TANL is set.
5615         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
5616         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
5617         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
5618         declaration of frexpl, ldexpl.
5619         * modules/printf-frexpl (Depends-on): Add math.
5620         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
5621
5622 2007-03-05  Bruno Haible  <bruno@clisp.org>
5623
5624         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
5625         frexpl and ldexpl are declared.
5626         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
5627
5628 2007-03-05  Bruno Haible  <bruno@clisp.org>
5629
5630         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
5631         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
5632
5633 2007-03-05  Bruno Haible  <bruno@clisp.org>
5634
5635         * lib/stdio_.h: Include <stddef.h>.
5636
5637 2007-03-05  Bruno Haible  <bruno@clisp.org>
5638
5639         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
5640
5641 2007-03-05  Bruno Haible  <bruno@clisp.org>
5642
5643         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
5644         NetBSD 4, from Ralf Wildenhues.
5645
5646 2007-03-04  Bruno Haible  <bruno@clisp.org>
5647
5648         * lib/vasprintf.h: Update #if logic for the case when the functions
5649         exist but are overridden.
5650
5651 2007-03-04  Bruno Haible  <bruno@clisp.org>
5652
5653         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
5654         implementations: glibc-2.4 and MacOS X 10.3.
5655         * tests/test-vasnprintf-posix.c (test_function): Test also the case
5656         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
5657         * tests/test-vasprintf-posix.c (test_function): Likewise.
5658
5659 2007-03-04  Bruno Haible  <bruno@clisp.org>
5660
5661         * modules/vasprintf-posix-tests: New file.
5662         * tests/test-vasprintf-posix.c: New file.
5663
5664         * modules/vasprintf-posix: New file.
5665         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
5666         defined.
5667         * m4/vasprintf-posix.m4: New file.
5668         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
5669         gl_FUNC_VASPRINTF.
5670         (gl_FUNC_VASPRINTF): Invoke it.
5671         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
5672         here.
5673         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
5674
5675 2007-03-04  Bruno Haible  <bruno@clisp.org>
5676
5677         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
5678         REPLACE_GETTIMEOFDAY.
5679         * modules/sys_time (Makefile.am): Likewise.
5680         * m4/sys_time_h.m4: Likewise.
5681         * m4/gettimeofday.m4: Likewise.
5682
5683 2007-03-04  Bruno Haible  <bruno@clisp.org>
5684
5685         * modules/vasnprintf-posix-tests: New file.
5686         * tests/test-vasnprintf-posix.c: New file.
5687
5688         * modules/vasnprintf-posix: New file.
5689         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
5690         printf-frexpl.h.
5691         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
5692         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
5693         REPLACE_VASNPRINTF is defined.
5694         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
5695         gl_FUNC_VASNPRINTF.
5696         (gl_FUNC_VASNPRINTF): Invoke it.
5697         * m4/vasnprintf-posix.m4: New file.
5698         * m4/printf.m4: New file.
5699
5700 2007-03-04  Bruno Haible  <bruno@clisp.org>
5701
5702         Compile progreloc.c only if --enable-relocatable is specified.
5703         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5704         if --enable-relocatable was specified.
5705         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5706         lib_SOURCES.
5707
5708 2007-03-04  Jim Meyering  <jim@meyering.net>
5709
5710         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5711         Use it consistently, rather than enumerating errno constants.
5712
5713 2007-03-04  Bruno Haible  <bruno@clisp.org>
5714
5715         * modules/xvasprintf-tests: New file.
5716         * tests/test-xvasprintf.c: New file.
5717
5718         * modules/vasprintf-tests: New file.
5719         * tests/test-vasprintf.c: New file.
5720
5721         * modules/vasnprintf-tests: New file.
5722         * tests/test-vasnprintf.c: New file.
5723
5724         * modules/vsnprintf-tests: New file.
5725         * tests/test-vsnprintf.c: New file.
5726
5727         * modules/snprintf-tests: New file.
5728         * tests/test-snprintf.c: New file.
5729
5730 2007-03-04  Bruno Haible  <bruno@clisp.org>
5731
5732         Compile relocatable.c only if --enable-relocatable is specified.
5733         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5734         gl_RELOCATABLE_LIBRARY.
5735         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5736         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5737         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5738         gl_RELOCATABLE_LIBRARY.
5739         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5740         (Makefile.am): Remove lib_SOURCES.
5741         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5742         gl_RELOCATABLE_LIBRARY.
5743         (Makefile.am): Remove lib_SOURCES.
5744         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5745         always.
5746         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5747         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5748
5749 2007-03-04  Bruno Haible  <bruno@clisp.org>
5750
5751         * modules/argmatch-tests: New file.
5752         * tests/test-argmatch.c: New file.
5753
5754         * tests/test-allocsa.c (main): Halve the number of loop runs.
5755
5756         * modules/alloca-opt-tests: New file.
5757         * tests/test-alloca-opt.c: New file.
5758
5759 2007-03-04  Jim Meyering  <jim@meyering.net>
5760
5761         Work around difference between Linux ACLs and Solaris 10 ZFS.
5762         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5763         for EINVAL.
5764
5765 2007-03-03  Bruno Haible  <bruno@clisp.org>
5766
5767         * modules/relocatable-prog (Depends-on): Add back progreloc's
5768         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5769
5770 2007-03-03  Bruno Haible  <bruno@clisp.org>
5771
5772         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5773         * modules/relocatable-lib: New file.
5774
5775 2007-03-03  Bruno Haible  <bruno@clisp.org>
5776
5777         * modules/relocatable-prog: Renamed from modules/relocatable.
5778         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5779
5780 2007-03-03  Bruno Haible  <bruno@clisp.org>
5781
5782         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5783         m4/relocatable-lib.m4.
5784         (Depends-on): Remove 'relocatable'.
5785         (configure.ac): Add gl_RELOCATABLE_NOP.
5786
5787 2007-03-03  Bruno Haible  <bruno@clisp.org>
5788
5789         * modules/relocatable-prog-wrapper: New file.
5790         * modules/relocatable (Depends-on): Add it. Remove all other
5791         dependencies except progname.
5792         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5793
5794         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5795         (gl_FUNC_STRERROR): Nop.
5796         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5797
5798         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5799         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5800
5801         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5802         (gl_FUNC_READLINK): Update.
5803
5804         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5805
5806 2007-03-03  Bruno Haible  <bruno@clisp.org>
5807
5808         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5809         * modules/xreadlink (Depends-on): Add unistd.
5810         * modules/xreadlink-with-size (Depends-on): Likewise.
5811
5812 2007-03-03  Bruno Haible  <bruno@clisp.org>
5813
5814         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5815         extracted from gt_FUNC_SETENV.
5816         (gt_FUNC_SETENV): Remove macro.
5817         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5818         remove gt_FUNC_SETENV.
5819
5820 2007-03-03  Bruno Haible  <bruno@clisp.org>
5821
5822         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5823         ENABLE_RELOCATABLE here.
5824         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5825
5826 2007-03-03  Bruno Haible  <bruno@clisp.org>
5827
5828         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5829         * tests/test-rbtreehash_list.c: Include progname.h.
5830         (main): Call set_program_name.
5831
5832         * modules/rbtree-oset-tests (Depends-on): Add progname.
5833         * tests/test-rbtree_oset.c: Include progname.h.
5834         (main): Call set_program_name.
5835
5836         * modules/rbtree-list-tests (Depends-on): Add progname.
5837         * tests/test-rbtree_list.c: Include progname.h.
5838         (main): Call set_program_name.
5839
5840         * modules/linked-list-tests (Depends-on): Add progname.
5841         * tests/test-linked_list.c: Include progname.h.
5842         (main): Call set_program_name.
5843
5844 2007-03-03  Bruno Haible  <bruno@clisp.org>
5845
5846         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5847         All uses of __restrict changed to _Restrict_.
5848         * lib/glob_.h (__restrict): Remove macro.
5849
5850 2007-03-02  Bruno Haible  <bruno@clisp.org>
5851
5852         * modules/gettext (configure.ac): Require gettext infrastructure
5853         from version 0.16.1.
5854
5855 2007-03-02  Bruno Haible  <bruno@clisp.org>
5856
5857         * modules/linkedhash-list-tests (Depends-on): Add progname.
5858         * tests/test-linkedhash_list.c: Include progname.h.
5859         (main): Call set_program_name.
5860
5861         * modules/carray-list-tests (Depends-on): Add progname.
5862         * tests/test-carray_list.c: Include progname.h.
5863         (main): Call set_program_name.
5864
5865         * modules/avltreehash-list-tests (Depends-on): Add progname.
5866         * tests/test-avltreehash_list.c: Include progname.h.
5867         (main): Call set_program_name.
5868
5869         * modules/avltree-oset-tests (Depends-on): Add progname.
5870         * tests/test-avltree_oset.c: Include progname.h.
5871         (main): Call set_program_name.
5872
5873         * modules/avltree-list-tests (Depends-on): Add progname.
5874         * tests/test-avltree_list.c: Include progname.h.
5875         (main): Call set_program_name.
5876
5877         * modules/array-oset-tests (Depends-on): Add progname.
5878         * tests/test-array_oset.c: Include progname.h.
5879         (main): Call set_program_name.
5880
5881         * modules/array-list-tests (Depends-on): Add progname.
5882         * tests/test-array_list.c: Include progname.h.
5883         (main): Call set_program_name.
5884
5885         * modules/argp-tests (Depends-on): Add progname.
5886         * tests/test-argp.c: Include argp.h first. Include progname.h.
5887         (main): Call set_program_name.
5888
5889 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5890
5891         * doc/gnulib-tool.texi (Initial import): Reword description of
5892         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5893         limited effect even if defined after the first system include.
5894
5895 2007-03-01  Bruno Haible  <bruno@clisp.org>
5896
5897         * build-aux/config.libpath: Update to libtool-1.5.22.
5898         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5899
5900 2007-03-01  Bruno Haible  <bruno@clisp.org>
5901
5902         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5903         foo_CFLAGS.
5904         Reported by Ralf Wildenhues.
5905
5906 2007-03-01  Bruno Haible  <bruno@clisp.org>
5907
5908         * build-aux/install-reloc: Remove object files left over by some
5909         compilers.
5910         Reported by Ralf Wildenhues.
5911
5912 2007-03-01  Bruno Haible  <bruno@clisp.org>
5913
5914         * build-aux/install-reloc: Break long lines.
5915
5916 2007-03-01  Bruno Haible  <bruno@clisp.org>
5917
5918         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5919         Reported by Ralf Wildenhues.
5920
5921 2007-03-01  Bruno Haible  <bruno@clisp.org>
5922
5923         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5924         include ordering constraints.
5925
5926 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5927
5928         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5929         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5930         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5931         as another example.
5932         * lib/time_.h: Fix misspelling.
5933         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5934         Require gl_HEADER_TIME_H_DEFAULTS.
5935         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5936         * m4/time_r.m4 (gl_TIME_R): Likewise.
5937         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5938
5939 2007-03-01  Bruno Haible  <bruno@clisp.org>
5940
5941         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5942         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5943
5944 2007-03-01  Jim Meyering  <jim@meyering.net>
5945
5946         * modules/xreadlink (Maintainer): Add my name.
5947         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5948
5949 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5950             Bruno Haible  <bruno@clisp.org>
5951
5952         * build-aux/install-reloc: Compile also c-ctype.c.
5953         * build-aux/relocatable.sh.in: New file.
5954         * doc/relocatable.texi: New file.
5955         * doc/relocatable-maint.texi: New file.
5956         * doc/gnulib.texi: Include relocatable-maint.texi.
5957         * lib/progreloc.c: Include unistd.h unconditionally.
5958         * lib/relocwrapper.c: Include unistd.h unconditionally.
5959         Include c-ctype.h.
5960         (add_dotbin): Use c_tolower.
5961         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5962         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5963         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5964         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5965         to m4/relocatable-lib.m4.
5966         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5967         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5968         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5969         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5970         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5971         * modules/relocatable: New file.
5972         * modules/relocatable-lib: New file.
5973         * modules/relocatable-script: New file.
5974
5975 2007-02-28  Bruno Haible  <bruno@clisp.org>
5976
5977         Import --enable-relocatable infrastructure.
5978         * build-aux/config.libpath: New file, from GNU gettext.
5979         * build-aux/install-reloc: New file, from GNU gettext.
5980         * build-aux/reloc-ldflags: New file, from GNU gettext.
5981         * lib/relocatable.h: New file, from GNU gettext.
5982         * lib/relocatable.c: New file, from GNU gettext.
5983         * lib/relocwrapper.c: New file, from GNU gettext.
5984         * m4/relocatable.m4: New file, from GNU gettext.
5985
5986 2007-02-28  Bruno Haible  <bruno@clisp.org>
5987
5988         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5989
5990         * modules/xreadlink: New file, from GNU gettext with modifications.
5991         * lib/xreadlink.c: New file, from GNU gettext.
5992         * lib/xreadlink.h: Add comments.
5993         (xreadlink): New declaration.
5994
5995         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5996         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5997         lib/xreadlink-with-size.c.
5998         (configure.ac): Remove gl_XREADLINK invocation.
5999         (Makefile.am): Augment lib_SOURCES.
6000         * m4/xreadlink.m4: Remove file.
6001         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
6002         (xreadlink_with_size): Renamed from xreadink.
6003         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
6004         * modules/canonicalize (Depends-on): Replace xreadlink with
6005         xreadlink-with-size.
6006         * lib/canonicalize.c (canonicalize_filename_mode): Update.
6007
6008 2007-02-25  Jim Meyering  <jim@meyering.net>
6009
6010         * build-aux/announce-gen: When complaining about excess arguments,
6011         list them.
6012
6013 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
6014
6015         * README: Document signed integer overflow situation more
6016         accurately.
6017
6018 2007-02-25  Bruno Haible  <bruno@clisp.org>
6019
6020         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
6021         'a' or 'A' conversion.
6022
6023 2007-02-25  Bruno Haible  <bruno@clisp.org>
6024
6025         * modules/filename: Renamed from modules/pathname.
6026         (Files): Replace lib/pathname.h with lib/filename.h. Replace
6027         lib/concatpath.c with lib/concat-filename.c.
6028         (Makefile.am): Update.
6029         (Include): Replace pathname.h with filename.h.
6030         * lib/filename.h: Renamed from lib/pathname.h.
6031         (concatenated_filename): Renamed from concatenated_pathname.
6032         * lib/concat-filename.c: Renamed from lib/concatpath.c.
6033         (concatenated_filename): Renamed from concatenated_pathname.
6034         * lib/findprog.c: Include filename.h instead of pathname.h.
6035         (find_in_path): Update.
6036         * lib/javacomp.c: Include filename.h instead of pathname.h.
6037         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
6038         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
6039         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
6040         is_oldgcj_14_13_usable, is_javac_usable): Update.
6041         * lib/javaexec.c: Include filename.h instead of pathname.h.
6042         (execute_java_class): Update.
6043         * modules/findprog: Update.
6044         * modules/javacomp: Update.
6045         * modules/javaexec: Update.
6046         * MODULES.html.sh (File system functions): Add 'filename', remove
6047         'pathname'.
6048
6049 2007-02-25  Bruno Haible  <bruno@clisp.org>
6050
6051         * modules/printf-frexpl-tests: New file.
6052         * tests/test-printf-frexpl.c: New file.
6053
6054         * modules/printf-frexpl: New file.
6055         * lib/printf-frexpl.h: New file.
6056         * lib/printf-frexpl.c: New file.
6057         * m4/printf-frexpl.m4: New file.
6058
6059 2007-02-25  Bruno Haible  <bruno@clisp.org>
6060
6061         * modules/printf-frexp-tests: New file.
6062         * tests/test-printf-frexp.c: New file.
6063
6064         * modules/printf-frexp: New file.
6065         * lib/printf-frexp.h: New file.
6066         * lib/printf-frexp.c: New file.
6067         * m4/printf-frexp.m4: New file.
6068
6069 2007-02-25  Bruno Haible  <bruno@clisp.org>
6070
6071         Assume automake >= 1.10 for the tests.
6072         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
6073         * modules/arctwo-tests: Likewise.
6074         * modules/argp-tests: Likewise.
6075         * modules/avltree-list-tests: Likewise.
6076         * modules/avltree-oset-tests: Likewise.
6077         * modules/avltreehash-list-tests: Likewise.
6078         * modules/carray-list-tests: Likewise.
6079         * modules/crc-tests: Likewise.
6080         * modules/des-tests: Likewise.
6081         * modules/gc-arcfour-tests: Likewise.
6082         * modules/gc-arctwo-tests: Likewise.
6083         * modules/gc-des-tests: Likewise.
6084         * modules/gc-hmac-md5-tests: Likewise.
6085         * modules/gc-hmac-sha1-tests: Likewise.
6086         * modules/gc-md2-tests: Likewise.
6087         * modules/gc-md4-tests: Likewise.
6088         * modules/gc-md5-tests: Likewise.
6089         * modules/gc-pbkdf2-sha1-tests: Likewise.
6090         * modules/gc-rijndael-tests: Likewise.
6091         * modules/gc-sha1-tests: Likewise.
6092         * modules/gc-tests: Likewise.
6093         * modules/getaddrinfo-tests: Likewise.
6094         * modules/hmac-md5-tests: Likewise.
6095         * modules/hmac-sha1-tests: Likewise.
6096         * modules/linked-list-tests: Likewise.
6097         * modules/linkedhash-list-tests: Likewise.
6098         * modules/lock-tests: Likewise.
6099         * modules/md2-tests: Likewise.
6100         * modules/md4-tests: Likewise.
6101         * modules/md5-tests: Likewise.
6102         * modules/rbtree-list-tests: Likewise.
6103         * modules/rbtree-oset-tests: Likewise.
6104         * modules/rbtreehash-list-tests: Likewise.
6105         * modules/read-file-tests: Likewise.
6106         * modules/rijndael-tests: Likewise.
6107         * modules/stdint-tests: Likewise.
6108         * modules/tls-tests: Likewise.
6109
6110 2007-02-24  Bruno Haible  <bruno@clisp.org>
6111
6112         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
6113         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
6114         function; instead check whether isnan with a double argument links.
6115         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
6116         function; instead check whether isnan with a 'long double' argument
6117         links.
6118         Reported by Eric Blake <ebb9@byu.net>.
6119
6120 2007-02-24  Bruno Haible  <bruno@clisp.org>
6121
6122         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
6123         defined.
6124         * lib/isnanl.c: Remove all code. Just include isnan.c.
6125         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
6126
6127 2007-02-25  Jim Meyering  <jim@meyering.net>
6128
6129         Avoid conflicting types for 'unsetenv' on FreeBSD.
6130         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
6131         conflicting with FreeBSD's (5.0 and 6.1) function declaration
6132         in stdlib.h.
6133
6134 2007-02-24  Bruno Haible  <bruno@clisp.org>
6135
6136         * modules/isnanl-nolibm-tests: New file.
6137         * tests/test-isnanl.c: New file.
6138
6139         * modules/isnanl-nolibm: New file.
6140         * lib/isnanl.h: New file.
6141         * lib/isnanl.c: New file.
6142         * m4/isnanl.m4: New file.
6143
6144 2007-02-24  Bruno Haible  <bruno@clisp.org>
6145
6146         * modules/isnan-nolibm-tests: New file.
6147         * tests/test-isnan.c: New file.
6148
6149         * modules/isnan-nolibm: New file.
6150         * lib/isnan.h: New file.
6151         * lib/isnan.c: New file.
6152         * m4/isnan.m4: New file.
6153
6154 2007-02-24  Bruno Haible  <bruno@clisp.org>
6155
6156         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
6157         assume that an exponent fits in 20 bits.
6158
6159 2007-02-24  Jim Meyering  <jim@meyering.net>
6160
6161         * m4/regex.m4: Update the description of the configure-time option,
6162         --without-included-regex, to state accurately what the defaults are,
6163         and perhaps to give people an idea why using this option is risky.
6164
6165 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
6166
6167         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
6168         loops on small arguments.  This attempts to avoid the problem
6169         Bruno Haible reported for AIX 4.3.2 in
6170         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
6171
6172 2007-02-23  Bruno Haible  <bruno@clisp.org>
6173
6174         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
6175         Needed for help2man.
6176
6177 2007-02-23  Karl Berry  <karl@gnu.org>
6178
6179         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
6180         exists, foo.h should be cvs-ignored, not committed.
6181
6182 2007-02-23  Eric Blake  <ebb9@byu.net>
6183
6184         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
6185         * lib/stat-time.h (includes): Likewise.
6186         * lib/utimecmp.c (includes): Likewise.
6187         * lib/utimens.h (includes): Likewise.
6188         * lib/getdate.y (includes): Also include "timespec.h" for use
6189         internal to the module.
6190         * modules/utimens (Depends-on): Revert yesterday's patch.
6191         * modules/nanosleep (Depends-on): Add missing dependency.
6192
6193 2007-02-22  Bruno Haible  <bruno@clisp.org>
6194
6195         * lib/glob.c: Don't include getlogin_r.h.
6196
6197 2007-02-22  Jim Meyering  <jim@meyering.net>
6198
6199         * modules/utimens (Depends-on): Add timespec, required for
6200         utimens.h's inclusion of timespec.h.
6201
6202 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
6203
6204         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
6205         long unreadable paths in GNU/Linux.  Problem reported by Andreas
6206         Schwab in
6207         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
6208         I'll try to think of a better way to fix the Solaris problem.
6209
6210         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
6211         like glibc; on Solaris 10, it fails with errno == EINVAL.
6212         POSIX says the behavior is unspecified if the first argument is NULL,
6213         so play it safe and never pass NULL to the system getcwd.
6214
6215 2007-02-21  Jim Meyering  <jim@meyering.net>
6216
6217         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
6218         of gettimeofday.  It would conflict with the one now always
6219         provided via sys_time_.h.  Reported by Matthew Woehlke, as
6220         an IRIX 6.5 build failure.
6221
6222 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6223
6224         Minor fixups to port to Solaris 10 with Sun C 5.8.
6225         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
6226         * modules/getcwd (Depends-on): Add dirfd.
6227         * lib/putenv.c (putenv): #undef it.
6228         (rpl_putenv): New decl.
6229         (malloc, free): Include <stdlib.h> rather than prototyping separately.
6230
6231 2007-02-20  Bruno Haible  <bruno@clisp.org>
6232
6233         * modules/stdio-tests: New file.
6234         * tests/test-stdio.c: New file.
6235
6236         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
6237         (Depends-on): Add stdio.
6238         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6239         (Include): Use <stdio.h> instead of vsnprintf.h.
6240         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6241         HAVE_DECL_VSNPRINTF.
6242         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
6243
6244         * modules/snprintf (Files): Remove lib/snprintf.h.
6245         (Depends-on): Add stdio.
6246         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6247         (Include): Use <stdio.h> instead of snprintf.h.
6248         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6249         HAVE_DECL_SNPRINTF.
6250         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
6251         * lib/getaddrinfo.c: Likewise.
6252
6253         * modules/stdio: New file.
6254         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
6255         * lib/snprintf.h: Remove file.
6256         * lib/vsnprintf.h: Remove file.
6257         * lib/.cppi-disable: Remove snprintf.h.
6258         * m4/stdio_h.m4: New file.
6259         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
6260
6261 2007-02-20  Jim Meyering  <jim@meyering.net>
6262
6263         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
6264         used by e.g., mingw.  From Bruno Haible.
6265
6266 2007-02-19  Bruno Haible  <bruno@clisp.org>
6267
6268         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
6269         warnings.
6270         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6271
6272 2007-02-19  Bruno Haible  <bruno@clisp.org>
6273
6274         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
6275         from mingw users.
6276
6277 2007-02-19  Bruno Haible  <bruno@clisp.org>
6278
6279         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
6280         warnings.
6281         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
6282
6283 2007-02-19  Jim Meyering  <jim@meyering.net>
6284
6285         Don't use FD after a successful "fdopendir (fd)".
6286         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
6287         Reset it by calling dirfd on the just-obtained DIR*.
6288
6289         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
6290         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
6291
6292 2007-02-18  Bruno Haible  <bruno@clisp.org>
6293
6294         * lib/readlink.c: Include <unistd.h>.
6295         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
6296         HAVE_READLINK.
6297         * modules/readlink (Depends-on): Add unistd.
6298         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6299         (Include): Add <unistd.h>.
6300
6301         * lib/getlogin_r.h: Remove file.
6302         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
6303         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
6304         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
6305         HAVE_DECL_GETLOGIN_R.
6306         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
6307         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6308         (Include): Use <unistd.h> instead of getlogin_r.h.
6309
6310         * lib/getcwd.h: Remove file.
6311         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
6312         * lib/xgetcwd.c: Likewise.
6313         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
6314         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
6315         * modules/getcwd (Files): Remove lib/getcwd.h.
6316         (Depends-on): Add unistd.
6317         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6318         (Include): Use <unistd.h> instad of getcwd.h.
6319
6320         * lib/ftruncate.c: Include <unistd.h> first.
6321         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
6322         Set HAVE_FTRUNCATE.
6323         * modules/ftruncate (Depends-on): Add unistd.
6324         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6325
6326         * lib/fchdir.c: Include <unistd.h> first.
6327         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
6328         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
6329         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
6330         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6331         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
6332
6333         * lib/dup2.c: Include <unistd.h> first.
6334         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
6335         HAVE_DUP2.
6336         * modules/dup2 (Depends-on): Add unistd.
6337         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6338
6339         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
6340         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
6341         REPLACE_CHOWN. Don't define chown as a macro here.
6342         * modules/chown (Depends-on): Add unistd.
6343         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6344
6345         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
6346         Add definition for GL_LINK_WARNING.
6347         (chown, dup2): New declarations.
6348         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
6349         link warning.
6350         (ftruncate): New declaration.
6351         (getcwd): New declaration, taken from old getcwd.h.
6352         (getlogin_r): New declaration, taken from old getlogin_r.h.
6353         (readlink): New declaration.
6354         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
6355         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
6356         (gl_PREREQ_UNISTD): Remove macro.
6357         (gl_UNISTD_MODULE_INDICATOR): New macro.
6358         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
6359         many new variables. Don't set UNISTD_H.
6360         * modules/unistd (Description): Change.
6361         (Depends-on): Add link-warning.
6362         (configure.ac): Update.
6363         (Makefile.am): Create unistd.h always. Substitute many new variables
6364         into it.
6365
6366 2007-02-18  Bruno Haible  <bruno@clisp.org>
6367
6368         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
6369         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
6370         HAVE_GETSUBOPT.
6371         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
6372         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
6373         * lib/getsubopt.h: Remove file.
6374         * modules/getsubopt (Files): Remove lib/getsubopt.h.
6375         (Depends-on): Add stdlib.
6376         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6377         (Includes): Use <stdlib.h> instead of getsubopt.h.
6378         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
6379         Set HAVE_GETSUBOPT.
6380         * lib/getsubopt.c: Don't include getsubopt.h.
6381
6382 2007-02-18  Bruno Haible  <bruno@clisp.org>
6383
6384         * modules/fchdir (Depends-on): Add dup2.
6385
6386 2007-02-18  Bruno Haible  <bruno@clisp.org>
6387
6388         * lib/stdlib_.h: Handle glibc's special invocation convention
6389         specially.
6390
6391 2007-02-18  Bruno Haible  <bruno@clisp.org>
6392
6393         * modules/stdlib-tests: New file.
6394         * tests/test-stdlib.c: New file.
6395
6396         * modules/mkstemp (Files): Remove lib/mkstemp.h.
6397         (Depends-on): Add stdlib.
6398         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6399         (Includes): Use <stdlib.h> instead of mkstemp.h.
6400         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6401         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
6402         * lib/mkstemp.c: Don't include mkstemp.h.
6403         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
6404         * lib/stdlib--.h: Don't include mkstemp.h.
6405
6406         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
6407         (Depends-on): Add stdlib.
6408         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6409         (Includes): Use <stdlib.h> instead of mkdtemp.h.
6410         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6411         HAVE_MKDTEMP.
6412         * lib/mkdtemp.c: Don't include mkdtemp.h.
6413         * lib/clean-temp.c: Don't include mkdtemp.h.
6414
6415         * modules/exit (Files): Remove lib/exit.h.
6416         (Depends-on): Add stdlib.
6417         (Makefile.am): Remove lib_SOURCES.
6418         (Include): Use <stdlib.h> instead of exit.h.
6419         * lib/argmatch.c: Don't include exit.h.
6420         * lib/execute.c: Likewise.
6421         * lib/pagealign_alloc.c: Likewise.
6422         * lib/pipe.c: Likewise.
6423         * lib/wait-process.c: Likewise.
6424         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
6425         * lib/exitfail.c: Likewise.
6426         * lib/savewd.c: Likewise.
6427         * lib/xsetenv.c: Likewise.
6428
6429         * modules/stdlib: New file.
6430         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
6431         and extra comments about mkstemp().
6432         * lib/exit.h: Remove file.
6433         * lib/mkdtemp.h: Remove file.
6434         * lib/mkstemp.h: Remove file.
6435         * m4/stdlib_h.m4: New file.
6436         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
6437
6438 2007-02-18  Bruno Haible  <bruno@clisp.org>
6439
6440         * modules/math-tests: New file.
6441         * tests/test-math.c: New file.
6442
6443         * modules/math: New file.
6444         * modules/mathl (Files): Remove lib/mathl.h.
6445         (Depends-on): Add math.
6446         (Makefile.am): Don't mention mathl.h.
6447         (Include): Use <math.h> instead of mathl.h.
6448         * lib/math_.h: New file.
6449         * lib/mathl.h: Remove file.
6450         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
6451         mathl.h.
6452         * lib/asinl.c: Likewise.
6453         * lib/atanl.c: Likewise.
6454         * lib/ceill.c: Likewise.
6455         * lib/cosl.c: Likewise.
6456         * lib/expl.c: Likewise.
6457         * lib/floorl.c: Likewise.
6458         * lib/frexpl.c: Likewise.
6459         * lib/ldexpl.c: Likewise.
6460         * lib/logl.c: Likewise.
6461         * lib/sincosl.c: Likewise.
6462         * lib/sinl.c: Likewise.
6463         * lib/sqrtl.c: Likewise.
6464         * lib/tanl.c: Likewise.
6465         * lib/trigl.c: Likewise.
6466         * m4/math_h.m4: New file.
6467         * MODULES.html.sh (Mathematics): Add math.
6468
6469 2007-02-17  Bruno Haible  <bruno@clisp.org>
6470
6471         * modules/wctype-tests: New file.
6472         * tests/test-wctype.c: New file.
6473
6474         * modules/wchar-tests: New file.
6475         * tests/test-wchar.c: New file.
6476
6477         * modules/unistd-tests: New file.
6478         * tests/test-unistd.c: New file.
6479
6480         * modules/time-tests: New file.
6481         * tests/test-time.c: New file.
6482
6483         * modules/sysexits-tests: New file.
6484         * tests/test-sysexits.c: New file.
6485
6486         * modules/sys_time-tests: New file.
6487         * tests/test-sys_time.c: New file.
6488
6489         * modules/sys_stat-tests: New file.
6490         * tests/test-sys_stat.c: New file.
6491
6492         * modules/sys_socket-tests: New file.
6493         * tests/test-sys_socket.c: New file.
6494
6495         * modules/sys_select-tests: New file.
6496         * tests/test-sys_select.c: New file.
6497
6498         * modules/string-tests: New file.
6499         * tests/test-string.c: New file.
6500
6501         * modules/stdbool-tests: New file.
6502         * tests/test-stdbool.c: New file.
6503
6504         * modules/netinet_in-tests: New file.
6505         * tests/test-netinet_in.c: New file.
6506
6507         * modules/inttypes-tests: New file.
6508         * tests/test-inttypes.c: New file.
6509
6510         * modules/fcntl-tests: New file.
6511         * tests/test-fcntl.c: New file.
6512
6513         * modules/byteswap-tests: New file.
6514         * tests/test-byteswap.c: New file.
6515
6516         * modules/arpa_inet-tests: New file.
6517         * tests/test-arpa_inet.c: New file.
6518
6519 2007-02-17  Bruno Haible  <bruno@clisp.org>
6520
6521         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
6522         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
6523         if the corresponding module is not enabled. Emit link warnings if
6524         the function is used nevertheless.
6525         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
6526         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
6527         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
6528         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
6529         * modules/inttypes (Depends-on): Add link-warning.
6530         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6531         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
6532         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
6533         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
6534         * modules/imaxdiv (configure.ac): Likewise.
6535         * modules/strtoimax (configure.ac): Likewise.
6536         * modules/strtoumax (configure.ac): Likewise.
6537
6538 2007-02-17  Bruno Haible  <bruno@clisp.org>
6539
6540         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
6541         gl_STRING_MODULE_INDICATOR_DEFAULTS.
6542         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
6543         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
6544
6545 2007-02-17  Bruno Haible  <bruno@clisp.org>
6546
6547         * modules/link-warning: New file.
6548         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
6549         * lib/string_.h (GL_LINK_WARNING): Remove definition.
6550         * modules/string (Depends-on): Add link-warning.
6551         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6552         string.h.
6553         * MODULES.html.sh (Support for building libraries and executables): Add
6554         link-warning.
6555
6556 2007-02-17  Bruno Haible  <bruno@clisp.org>
6557
6558         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
6559         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
6560         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
6561         long lines.
6562
6563 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
6564             Bruno Haible  <bruno@clisp.org>
6565
6566         * modules/tmpfile: New file.
6567         * lib/tmpfile.c: New file.
6568         * m4/tmpfile.m4: New file.
6569         * MODULES.html.sh (func_all_modules): New section "Input/output".
6570
6571 2007-02-15  Bruno Haible  <bruno@clisp.org>
6572
6573         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
6574         (supports_delete_on_close): New function.
6575         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
6576
6577 2007-02-14  Bruno Haible  <bruno@clisp.org>
6578
6579         * modules/mbspcasecmp-tests: New file.
6580         * tests/test-mbspcasecmp.sh: New file.
6581         * tests/test-mbspcasecmp.c: New file.
6582
6583         New module mbspcasecmp.
6584         * modules/mbspcasecmp: New file.
6585         * lib/mbspcasecmp.c: New file.
6586         * lib/string_.h (strncasecmp): Change warning message.
6587         (mbspcasecmp): New declaration.
6588         * m4/mbspcasecmp.m4: New file.
6589         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6590         GNULIB_MBSPCASECMP.
6591         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
6592         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
6593
6594 2007-02-14  Bruno Haible  <bruno@clisp.org>
6595
6596         * modules/mbsncasecmp-tests: New file.
6597         * tests/test-mbsncasecmp.sh: New file.
6598         * tests/test-mbsncasecmp.c: New file.
6599
6600         New module mbsncasecmp.
6601         * modules/mbsncasecmp: New file.
6602         * lib/mbsncasecmp.c: New file.
6603         * lib/string_.h (mbsncasecmp): New declaration.
6604         * m4/mbsncasecmp.m4: New file.
6605         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6606         GNULIB_MBSNCASECMP.
6607         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
6608         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
6609
6610 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6611
6612         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
6613         Verify that it doesn't overlap with our flags.
6614         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
6615         do not have the desired effect in multibyte locales; instead, use
6616         mbscasecmp.
6617         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
6618         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
6619         we don't require GNU fnmatch ourselves (if our users require it, they
6620         should do so explicitly).
6621
6622         Fix regex code so it doesn't rely on strcasecmp.
6623         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
6624         Otherwise, include gnulib's langinfo.h.
6625         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
6626         undesirable behavior in non-C locales.  Instead, rely on localecharset.
6627         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
6628         * modules/regex (FILES): Remove m4/codeset.m4.
6629         (Depends-on): Add localcharset.  Remove strcase.
6630
6631 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6632
6633         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
6634         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6635
6636 2007-02-13  Bruno Haible  <bruno@clisp.org>
6637
6638         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
6639         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6640
6641 2007-02-12  Bruno Haible  <bruno@clisp.org>
6642
6643         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6644         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
6645         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
6646         time warning rather than a link error.
6647
6648 2007-02-12  Bruno Haible  <bruno@clisp.org>
6649
6650         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
6651         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
6652         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6653
6654 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6655
6656         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
6657         args, not 2.
6658
6659 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6660
6661         New module 'time', so that apps can include <time.h> as per
6662         POSIX and GNU instead of separate include files like time_r.h
6663         and timegm.h.  This implementation tries out a simpler approach
6664         for replacing decls in standard include files (as compared to
6665         the string module), somewhat as an experiment.
6666
6667         * config/srclist.txt: Comment out mktime.c for now.
6668         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
6669         since it doesn't apply any more.  Use generic wording instead.
6670         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
6671         'time'.
6672         * lib/time_.h, m4/time_h.m4, modules/time: New files.
6673         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
6674         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
6675         Don't include <sys/types.h>; no longer needed since we assume C89.
6676         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
6677         * lib/strftime.c: Likewise.
6678         * lib/time_r.c: Likewise.
6679         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
6680         * lib/nanosleep.c: Include <time.h> first, to check interface.
6681         * lib/strptime.c: Likewise.
6682         * lib/time_r.c: Likewise.
6683         * lib/timegm.c: Likewise.
6684         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
6685         needed.
6686         * lib/timegm.c: Don't include timegm.h; no longer needed.
6687         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
6688         time.h now handles any problems in that area.
6689         (struct timespec, nanosleep): Remove; time.h now arranges for these.
6690         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
6691         that time.h defines struct timespec.
6692         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
6693         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
6694         handles that.
6695         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
6696         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
6697         needed.  Set REPLACE_LOCALTIME.
6698         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
6699         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6700         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6701         nanosleep; time_h.m4 now does that.  Don't require
6702         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6703         module handles this now.
6704         * modules/getdate (Depends-on): Remove timespec.  Add time.
6705         * modules/nanosleep (Depends-on): Likewise.
6706         * modules/stat-time (Depends-on): Likewise.
6707         * modules/nanosleep (Include): Include time.h, not timespec.h.
6708         * modules/strptime (Files): Remove lib/strptime.h.
6709         (Depends-on): Add extensions, time.
6710         (Include): Include time.h, not strptime.h.
6711         * modules/time_r (Files): Remove lib/time_r.h.
6712         (Depends-on): Add time.
6713         (Include): Include time.h, not time_r.h.
6714         * modules/timegm: Likewise.
6715         * modules/timespec (Description): Now does timespec-related decls
6716         of our own, instead of struct timespec itself.
6717         (Depends-on): Add time; remove extensions.
6718         (Maintainer): Add self.
6719         * modules/utimecmp (Depends-on): Add time; remove timespec.
6720         * modules/utimens (Depends-on): Likewise.
6721         * modules/xnanosleep (Depends-on): Likewise.
6722
6723 2007-02-11  Bruno Haible  <bruno@clisp.org>
6724
6725         * lib/c-strstr.c: Include allocsa.h.
6726         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6727         * lib/c-strcasestr.c: Include allocsa.h.
6728         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6729         * lib/strcasestr.c: Include allocsa.h.
6730         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6731         * lib/mbsstr.c: Include allocsa.h.
6732         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6733         allocsa/freesa instead of malloc/free.
6734         * lib/mbscasestr.c: Include allocsa.h.
6735         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6736         allocsa/freesa instead of malloc/free.
6737         * modules/c-strstr (Depends-on): Add allocsa.
6738         * modules/c-strcasestr (Depends-on): Likewise.
6739         * modules/strcasestr (Depends-on): Likewise.
6740         * modules/mbsstr (Depends-on): Likewise.
6741         * modules/mbscasestr (Depends-on): Likewise.
6742
6743 2007-02-11  Bruno Haible  <bruno@clisp.org>
6744
6745         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6746
6747         * modules/mbsspn-tests: New file.
6748         * tests/test-mbsspn.sh: New file.
6749         * tests/test-mbsspn.c: New file.
6750
6751 2007-02-11  Bruno Haible  <bruno@clisp.org>
6752
6753         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6754
6755         * modules/mbspbrk-tests: New file.
6756         * tests/test-mbspbrk.sh: New file.
6757         * tests/test-mbspbrk.c: New file.
6758
6759 2007-02-11  Bruno Haible  <bruno@clisp.org>
6760
6761         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6762         unneeded cast.
6763
6764         * modules/mbscspn-tests: New file.
6765         * tests/test-mbscspn.sh: New file.
6766         * tests/test-mbscspn.c: New file.
6767
6768 2007-02-11  Bruno Haible  <bruno@clisp.org>
6769
6770         * modules/mbscasecmp-tests: New file.
6771         * tests/test-mbscasecmp.sh: New file.
6772         * tests/test-mbscasecmp.c: New file.
6773
6774 2007-02-11  Bruno Haible  <bruno@clisp.org>
6775
6776         Ensure O(n) worst-case complexity of mbscasestr.
6777         * lib/mbscasestr.c: Include stdbool.h.
6778         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6779         functions.
6780         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6781         the bookkeeping indicates that it's worth it.
6782         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6783
6784         * modules/mbscasestr-tests: New file.
6785         * tests/test-mbscasestr1.c: New file.
6786         * tests/test-mbscasestr2.sh: New file.
6787         * tests/test-mbscasestr2.c: New file.
6788         * tests/test-mbscasestr3.sh: New file.
6789         * tests/test-mbscasestr3.c: New file.
6790         * tests/test-mbscasestr4.sh: New file.
6791         * tests/test-mbscasestr4.c: New file.
6792         * m4/locale-tr.m4: New file.
6793
6794 2007-02-11  Bruno Haible  <bruno@clisp.org>
6795
6796         Ensure O(n) worst-case complexity of mbsstr.
6797         * lib/mbsstr.c: Include stdbool.h.
6798         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6799         functions.
6800         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6801         bookkeeping indicates that it's worth it.
6802         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6803
6804         * modules/mbsstr-tests: New file.
6805         * tests/test-mbsstr1.c: New file.
6806         * tests/test-mbsstr2.sh: New file.
6807         * tests/test-mbsstr2.c: New file.
6808         * tests/test-mbsstr3.sh: New file.
6809         * tests/test-mbsstr3.c: New file.
6810         * m4/locale-fr.m4: New file.
6811
6812 2007-02-11  Bruno Haible  <bruno@clisp.org>
6813
6814         * lib/mbsrchr.c (mbsrchr): Fix bug.
6815
6816         * modules/mbsrchr-tests: New file.
6817         * tests/test-mbsrchr.sh: New file.
6818         * tests/test-mbsrchr.c: New file.
6819
6820 2007-02-11  Bruno Haible  <bruno@clisp.org>
6821
6822         * lib/mbschr.c (mbschr): Fix bug.
6823
6824         * modules/mbschr-tests: New file.
6825         * tests/test-mbschr.sh: New file.
6826         * tests/test-mbschr.c: New file.
6827         * m4/locale-zh.m4: New file.
6828
6829 2007-02-11  Bruno Haible  <bruno@clisp.org>
6830
6831         Support for copying multibyte string iterators.
6832         * lib/mbiter.h: Include <string.h>.
6833         (mbiter_multi_copy): New function.
6834         (mbi_copy): New macro.
6835         * lib/mbuiter.h: Include <string.h>.
6836         (mbuiter_multi_copy): New function.
6837         (mbui_copy): New macro.
6838
6839 2007-02-11  Bruno Haible  <bruno@clisp.org>
6840
6841         New module mbslen.
6842         * modules/mbslen: New file.
6843         * lib/mbslen.c: New file.
6844         * lib/string_.h (mbslen): New declaration.
6845         * m4/mbslen.m4: New file.
6846         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6847         GNULIB_MBSLEN.
6848         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6849         * MODULES.html.sh (Internationalization functions): Add mbslen.
6850
6851 2007-02-11  Bruno Haible  <bruno@clisp.org>
6852
6853         Ensure O(n) worst-case complexity of strcasestr substitute.
6854         * lib/strcasestr.c: Include stdbool.h.
6855         (knuth_morris_pratt): New function.
6856         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6857         bookkeeping indicates that it's worth it.
6858         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6859
6860         * modules/strcasestr-tests: New file.
6861         * tests/test-strcasestr.c: New file.
6862
6863 2007-02-11  Bruno Haible  <bruno@clisp.org>
6864
6865         Ensure O(n) worst-case complexity of c_strcasestr.
6866         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6867         (knuth_morris_pratt): New function.
6868         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6869         the bookkeeping indicates that it's worth it.
6870         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6871
6872         * modules/c-strcasestr-tests: New file.
6873         * tests/test-c-strcasestr.c: New file.
6874
6875 2007-02-11  Bruno Haible  <bruno@clisp.org>
6876
6877         Ensure O(n) worst-case complexity of c_strstr.
6878         * lib/c-strstr.c: Include stdbool.h, string.h.
6879         (knuth_morris_pratt): New function.
6880         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6881         bookkeeping indicates that it's worth it.
6882         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6883
6884         * lib/c-strstr.c: Complete rewrite for maintainability.
6885
6886         * modules/c-strstr-tests: New file.
6887         * tests/test-c-strstr.c: New file.
6888
6889 2007-02-11  Bruno Haible  <bruno@clisp.org>
6890
6891         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6892         5.2.1 and earlier, whereby \055 was treated just like the range
6893         delimiter '-'.
6894         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6895
6896 2007-02-08  Bruno Haible  <bruno@clisp.org>
6897
6898         * modules/regex (Depends-on): Add stdbool.
6899         Reported by Dalibor Topic <robilad@kaffe.org>.
6900
6901 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6902
6903         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6904         Prefer returning from main to exiting from it.
6905         Remove unnecessary parens after sizeof.
6906
6907 2007-02-05  Bruno Haible  <bruno@clisp.org>
6908
6909         New module mbssep.
6910         * modules/mbssep: New file.
6911         * lib/mbssep.c: New file.
6912         * lib/string_.h (strsep): Add a conditional link warning.
6913         (mbssep): New declaration.
6914         * m4/mbssep.m4: New file.
6915         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6916         GNULIB_MBSSEP.
6917         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6918         * MODULES.html.sh (Internationalization functions): Add mbssep.
6919
6920 2007-02-05  Bruno Haible  <bruno@clisp.org>
6921
6922         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6923         Optimize search in case of 1 delimiter.
6924
6925 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6926
6927         * lib/acl.h: Include sys/types.h before sys/acl.h.
6928
6929 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6930
6931         Merge upstream fix for glibc bugzilla #3957:
6932
6933         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6934
6935         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6936         bit for RE_HAT_LISTS_NOT_NEWLINE.
6937         (build_charclass_op): Remove bogus comment.
6938
6939 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6940
6941         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6942
6943 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6944
6945         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6946         * lib/memmem.c [!defined _LIBC]: Include config.h.
6947
6948 2007-02-04  Bruno Haible  <bruno@clisp.org>
6949
6950         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6951         warning message.
6952
6953 2007-02-04  Bruno Haible  <bruno@clisp.org>
6954
6955         New module mbstok_r.
6956         * modules/mbstok_r: New file.
6957         * lib/mbstok_r.c: New file.
6958         * lib/string_.h (strtok_r): Change argument names to match the
6959         comments. Add a conditional link warning.
6960         (mbstok_r): New declaration.
6961         * m4/mbstok_r.m4: New file.
6962         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6963         GNULIB_MBSTOK_R.
6964         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6965         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6966
6967 2007-02-04  Bruno Haible  <bruno@clisp.org>
6968
6969         New module mbsspn.
6970         * modules/mbsspn: New file.
6971         * lib/mbsspn.c: New file.
6972         * lib/string_.h (strspn): Add a conditional link warning.
6973         (mbsspn): New declaration.
6974         * m4/mbsspn.m4: New file.
6975         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6976         GNULIB_MBSSPN.
6977         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6978         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6979
6980 2007-02-04  Bruno Haible  <bruno@clisp.org>
6981
6982         New module mbspbrk.
6983         * modules/mbspbrk: New file.
6984         * lib/mbspbrk.c: New file.
6985         * lib/string_.h (strpbrk): Add a conditional link warning.
6986         (mbspbrk): New declaration.
6987         * m4/mbspbrk.m4: New file.
6988         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6989         GNULIB_MBSPBRK.
6990         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6991         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6992
6993 2007-02-04  Bruno Haible  <bruno@clisp.org>
6994
6995         New module mbscspn.
6996         * modules/mbscspn: New file.
6997         * lib/mbscspn.c: New file.
6998         * lib/string_.h (strcspn): Add a conditional link warning.
6999         (mbscspn): New declaration.
7000         * m4/mbscspn.m4: New file.
7001         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
7002         GNULIB_MBSCSPN.
7003         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
7004         * MODULES.html.sh (Internationalization functions): Add mbscspn.
7005
7006 2007-02-04  Bruno Haible  <bruno@clisp.org>
7007
7008         New module mbscasestr, reduced goal of strcasestr.
7009         * modules/mbscasestr: New file.
7010         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
7011         (mbscasestr): Renamed from strcasestr.
7012         * lib/strcasestr.c: Don't include mbuiter.h.
7013         (strcasestr): Remove support for multibyte locales.
7014         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
7015         Change the conditional link warning.
7016         (mbscasestr): New declaration.
7017         * m4/mbscasestr.m4: New file.
7018         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
7019         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
7020         REPLACE_STRCASESTR.
7021         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
7022         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
7023         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
7024         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
7025         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
7026         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
7027         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
7028         (Depends-on): Remove mbuiter.
7029         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
7030
7031 2007-02-04  Bruno Haible  <bruno@clisp.org>
7032
7033         Simplify handling of strncasecmp.
7034         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
7035         the conditional link warning.
7036         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
7037         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
7038         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
7039         * modules/strcase (configure.ac): Don't invoke
7040         gl_STRING_MODULE_INDICATOR.
7041         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
7042
7043 2007-02-04  Bruno Haible  <bruno@clisp.org>
7044
7045         New module mbscasecmp, reduced goal of strcasecmp.
7046         * modules/mbscasecmp: New file.
7047         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
7048         (mbscasecmp): Renamed from strcasecmp.
7049         * lib/strcasecmp.c: Don't include mbuiter.h.
7050         (strcasecmp): Remove support for multibyte locales.
7051         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
7052         Change the conditional link warning.
7053         (mbscasecmp): New declaration.
7054         * m4/mbscasecmp.m4: New file.
7055         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
7056         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
7057         REPLACE_STRCASECMP.
7058         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
7059         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
7060         GNULIB_MBSCASECMP.
7061         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
7062         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
7063         * modules/strcase (Files): Remove m4/mbrtowc.m4.
7064         (Depends-on): Remove mbuiter.
7065         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
7066
7067 2007-02-04  Bruno Haible  <bruno@clisp.org>
7068
7069         New module mbsstr. Remove module strstr.
7070         * modules/mbsstr: New file.
7071         * modules/strstr: Remove file.
7072         * lib/mbsstr.c: Renamed from lib/strstr.c.
7073         (mbsstr): Renamed from strstr.
7074         * lib/string_.h (strstr): Remove declaration. Change the conditional
7075         link warning.
7076         (mbsstr): New declaration.
7077         * m4/mbsstr.m4: New file.
7078         * m4/strstr.m4: Remove file.
7079         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
7080         REPLACE_STRSTR.
7081         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
7082         Don't initialize GNULIB_STRSTR.
7083         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
7084         substitute GNULIB_STRSTR and REPLACE_STRSTR.
7085         * MODULES.html.sh (Internationalization functions): Add mbsstr.
7086         (Support for systems lacking ANSI C 89): Remove strstr.
7087
7088 2007-02-04  Bruno Haible  <bruno@clisp.org>
7089
7090         New module mbsrchr.
7091         * modules/mbsrchr: New file.
7092         * lib/mbsrchr.c: New file.
7093         * lib/string_.h (strrchr): Add a conditional link warning.
7094         (mbsrchr): New declaration.
7095         * m4/mbsrchr.m4: New file.
7096         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
7097         GNULIB_MBSRCHR.
7098         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
7099         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
7100
7101 2007-02-04  Bruno Haible  <bruno@clisp.org>
7102
7103         New module mbschr.
7104         * modules/mbschr: New file.
7105         * lib/mbschr.c: New file.
7106         * lib/string_.h (strchr): Add a conditional link warning.
7107         (mbschr): New declaration.
7108         * m4/mbschr.m4: New file.
7109         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
7110         GNULIB_MBSCHR.
7111         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
7112         * MODULES.html.sh (Internationalization functions): Add mbschr.
7113
7114 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
7115
7116         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
7117
7118         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
7119
7120 2007-02-04  Bruno Haible  <bruno@clisp.org>
7121
7122         New module description section 'configure.ac-early'.
7123         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
7124         (func_get_autoconf_early_snippet): New function.
7125         (func_import, func_create_testdir): Use it. Remove special cases for
7126         modules 'extensions' and 'lock'.
7127         * modules/extensions (configure.ac-early): Require
7128         gl_USE_SYSTEM_EXTENSIONS.
7129         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
7130
7131 2007-02-04  Bruno Haible  <bruno@clisp.org>
7132
7133         Make use of gcj-4.3's -fsource and -ftarget option.
7134         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
7135         and if so try the options -fsource and -ftarget.
7136         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
7137         source_version, ftarget_option, target_version arguments.
7138         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
7139         (is_envjavac_oldgcj_14_14_usable): Renamed from
7140         is_envjavac_gcj_14_14_usable.
7141         (is_envjavac_oldgcj_14_13_usable): Renamed from
7142         is_envjavac_gcj_14_13_usable.
7143         (is_gcj_present): Update.
7144         (is_gcj_43, is_gcj43_usable): New functions.
7145         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
7146         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
7147         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
7148         try the options -fsource and -ftarget.
7149
7150 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
7151
7152         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
7153         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
7154         larger value.
7155
7156 2007-02-03  Jim Meyering  <jim@meyering.net>
7157
7158         Give tools a better chance to allocate space for very large buffers.
7159         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
7160
7161         Make pwd and readlink work also when run with an unreadable parent dir
7162         on systems with openat support.
7163         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
7164         provided getcwd function, even when we have openat support.
7165         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
7166
7167 2007-02-02  Bruno Haible  <bruno@clisp.org>
7168
7169         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
7170         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
7171         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
7172         portability problems if one of these functions is only used on specific
7173         platforms.
7174         Reported by Paul Eggert.
7175
7176 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
7177
7178         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
7179         is causing more trouble than it's curing.
7180         * lib/regex_internal.h (__mempcpy): Remove.
7181         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
7182         (and make the code a tad smaller to boot).
7183         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
7184
7185 2007-02-02  Jim Meyering  <jim@meyering.net>
7186
7187         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
7188         section, not in the Makefile.am: one.
7189
7190 2007-02-02  Eric Blake  <ebb9@byu.net>
7191
7192         * lib/strchrnul.c: Always include config.h first.
7193
7194         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
7195         gnulib strstr is not necessary here.
7196
7197 2007-02-02  Simon Josefsson  <simon@josefsson.org>
7198
7199         * m4/socklen.m4: Fix typo.
7200
7201 2007-02-02  Eric Blake  <ebb9@byu.net>
7202
7203         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
7204         * modules/netinet_in (Makefile.am): Likewise.
7205
7206 2007-02-01  Bruno Haible  <bruno@clisp.org>
7207
7208         * lib/string_.h (GL_LINK_WARNING): New macro.
7209         (strcasecmp, strstr, strcasestr): If provided by the system,
7210         conditionally define as a macro that leads to a warning instead of to
7211         an error.
7212         (strncasecmp): Conditionally define as a macro that leads to a warning.
7213
7214 2007-02-01  Karl Berry  <karl@gnu.org>
7215
7216         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
7217
7218 2007-02-01  Bruno Haible  <bruno@clisp.org>
7219
7220         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
7221         renamings.
7222
7223 2007-02-01  Eric Blake  <ebb9@byu.net>
7224
7225         * modules/regex (Depends-on): Revert dependence on mempcpy.
7226         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
7227         module's definition of mempcpy.
7228         Reported by Paul Eggert.
7229
7230 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
7231
7232         * lib/string_.h: If the gnulib module XYZ is not present, undefine
7233         the symbol XYZ before redefining it.  This fixes a problem with
7234         programs that don't use XYZ, when compiled on systems that define
7235         XYZ to something else.
7236
7237 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
7238
7239         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
7240         occurs when "mkdir -m foo" creates a setgid directory that is (1)
7241         writeable to group or other and (2) is intended to have a special
7242         mode bit that is set or cleared.  In such a case, the directory
7243         should be neither group- nor other-writeable until the special
7244         mode bits are right.
7245
7246 2007-01-31  Eric Blake  <ebb9@byu.net>
7247
7248         * modules/mountlist (Depends-on): Add strstr.
7249
7250         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
7251         bug.
7252         * modules/string (Makefile.am): Remove redundant replacement.
7253         * modules/regex (Depends-on): Add mempcpy.
7254
7255 2007-01-31  Bruno Haible  <bruno@clisp.org>
7256
7257         New module description field 'Link'.
7258         * gnulib-tool (func_usage): Document --extract-link-directive.
7259         (sed_extract_prog): Recognize 'Link' directive.
7260         (func_get_link_directive): New function.
7261         (func_import): Show summary of link directives.
7262         Handle --extract-link-directive option.
7263         * modules/acl (Link): New section.
7264         * modules/clock-time (Link): New section.
7265         * modules/euidaccess (Link): New section.
7266         * modules/gettext (Link): New section.
7267         * modules/iconv (Link): New section.
7268         * modules/lock (Link): New section.
7269         * modules/nanosleep (Link): New section.
7270         * modules/readline (Link): New section.
7271
7272 2007-01-27  Bruno Haible  <bruno@clisp.org>
7273
7274         Enforce the use of gnulib modules for unportable <string.h> functions.
7275         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
7276         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
7277         (gl_HEADER_STRING_H_BODY): Require it.
7278         * lib/string_.h: If the gnulib module XYZ is not present, redefine
7279         the symbol XYZ to one that gives a link error.
7280         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
7281         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
7282         * modules/mempcpy (configure.ac): Likewise.
7283         * modules/memrchr (configure.ac): Likewise.
7284         * modules/stpcpy (configure.ac): Likewise.
7285         * modules/stpncpy (configure.ac): Likewise.
7286         * modules/strcase (configure.ac): Likewise.
7287         * modules/strcasestr (configure.ac): Likewise.
7288         * modules/strchrnul (configure.ac): Likewise.
7289         * modules/strdup (configure.ac): Likewise.
7290         * modules/strndup (configure.ac): Likewise.
7291         * modules/strnlen (configure.ac): Likewise.
7292         * modules/strpbrk (configure.ac): Likewise.
7293         * modules/strsep (configure.ac): Likewise.
7294         * modules/strstr (configure.ac): Likewise.
7295         * modules/strtok_r (configure.ac): Likewise.
7296
7297 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
7298
7299         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
7300
7301 2007-01-30  Jim Meyering  <jim@meyering.net>
7302
7303         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
7304
7305 2007-01-29  Bruno Haible  <bruno@clisp.org>
7306
7307         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
7308         * lib/execute.c: Likewise.
7309         * lib/pipe.c: Likewise.
7310         * lib/printf-args.h: Likewise.
7311         * lib/printf-args.c: Likewise.
7312         * lib/printf-parse.c: Likewise.
7313         * lib/vasnprintf.c: Likewise.
7314
7315 2007-01-29  Eric Blake  <ebb9@byu.net>
7316
7317         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
7318         declaration.
7319
7320 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7321
7322         * lib/strptime.h (strptime): Use 'restrict' for args where
7323         POSIX requires this.
7324         * lib/strptime.c (strptime): Likewise.
7325         Change license notice from LGPL to GPL, since gnulib-tool will
7326         change this as needed.
7327         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
7328         defined.
7329         Include "strptime.h" first, to check interface.
7330         Do not #undef _LIBC and _NL_CURRENT.
7331         Do not include <stdlib.h>; no longer needed.
7332         Include "time_r.h" and declare ptime_locale_status
7333         only if _LIBC is not defined.
7334         (__P): Remove unused macro.
7335         (match_string): Bring back glibc version, but use it only if _LIBC
7336         is defined.
7337         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
7338         Remove unnecessary assertion and abort() call.
7339         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
7340         * m4/strptime.m4: Fix serial number comment.
7341         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
7342         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
7343         (Depends-on): Add time_r.
7344
7345 2007-01-29  Bruno Haible  <bruno@clisp.org>
7346
7347         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7348         strptime.
7349         * modules/strptime (Depends-on): Add stdbool.
7350         * lib/strptime.h: Include <time.h> always. Add comments.
7351
7352 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
7353
7354         * modules/strptime: New file.
7355         * lib/strptime.h: New file.
7356         * lib/strptime.c: New file.
7357         * m4/strptime.m4: New file.
7358
7359 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
7360
7361         * MODULES.html.sh: New module mpsort.
7362         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
7363
7364         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
7365         a circularity problem with HP-UX ia64 reported by Bob Proulx in
7366         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
7367         All uses changed.
7368         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
7369         All uses changed.
7370         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
7371         to _Restrict_.
7372         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
7373         the parameter matches the prototype.
7374
7375 2007-01-28  Jim Meyering  <jim@meyering.net>
7376
7377         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
7378         sys/time.h here, reverting that part of the previous patch:
7379         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
7380
7381 2007-01-28  Bruno Haible  <bruno@clisp.org>
7382
7383         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
7384         value of $(SYS_TIME_H).
7385         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
7386         remove it conditionally, too. [added by Jim Meyering]
7387         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
7388         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7389         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
7390         GETTIMEOFDAY_REPLACEMENT to 1.
7391
7392 2007-01-28  Bruno Haible  <bruno@clisp.org>
7393
7394         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
7395         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
7396         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
7397         Set UNISTD_H instead of UNISTD_H2.
7398         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
7399
7400 2007-01-28  Bruno Haible  <bruno@clisp.org>
7401
7402         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
7403         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
7404
7405 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7406
7407         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
7408         (func_create_testdir): Ensure C locale for `grep' and `tr'
7409         character ranges.
7410         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
7411         ACLOCAL_AMFLAGS parsing state machine.
7412
7413 2007-01-27  Bruno Haible  <bruno@clisp.org>
7414
7415         * modules/unistr/base: Update.
7416
7417 2007-01-27  Bruno Haible  <bruno@clisp.org>
7418
7419         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
7420         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
7421         * modules/unistr/u32-mbtouc-unsafe: Renamed from
7422         modules/unistr/u32-mbtouc.
7423         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
7424         * lib/unistr.h: Update.
7425         * lib/linebreak.c: Update.
7426         * modules/unistr/u32-mbtouc: Renamed from
7427         modules/unistr/u32-mbtouc-safe.
7428         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
7429         * lib/unistr.h: Update.
7430         * lib/unistr/u32-to-u8.c: Update.
7431         * lib/unistr/u32-to-u16.c: Update.
7432
7433 2007-01-27  Bruno Haible  <bruno@clisp.org>
7434
7435         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
7436         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
7437         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
7438         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
7439         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
7440         * modules/unistr/u16-mbtouc-unsafe: Renamed from
7441         modules/unistr/u16-mbtouc.
7442         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
7443         * lib/unistr.h: Update.
7444         * lib/linebreak.c: Update.
7445         * modules/linebreak: Update.
7446         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
7447         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
7448         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
7449         * modules/unistr/u16-mbtouc: Renamed from
7450         modules/unistr/u16-mbtouc-safe.
7451         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
7452         * lib/unistr.h: Update.
7453         * lib/unistr/u16-to-u8.c: Update.
7454         * modules/unistr/u16-to-u8: Update.
7455         * lib/unistr/u16-to-u32.c: Update.
7456         * modules/unistr/u16-to-u32: Update.
7457
7458 2007-01-27  Bruno Haible  <bruno@clisp.org>
7459
7460         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
7461         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
7462         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
7463         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7464         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
7465         * modules/unistr/u8-mbtouc-unsafe: Renamed from
7466         modules/unistr/u8-mbtouc.
7467         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
7468         * lib/unistr.h: Update.
7469         * lib/striconveh.c: Update.
7470         * modules/striconveh: Update.
7471         * lib/linebreak.c: Update.
7472         * modules/linebreak: Update.
7473         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
7474         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
7475         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
7476         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
7477         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
7478         * lib/unistr.h: Update.
7479         * lib/striconveh.c: Update.
7480         * modules/striconveh: Update.
7481         * lib/unistr/u8-to-u16.c: Update.
7482         * modules/unistr/u8-to-u16: Update.
7483         * lib/unistr/u8-to-u32.c: Update.
7484         * modules/unistr/u8-to-u32: Update.
7485
7486 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7487
7488         Sync from Libtool.
7489         * lib/argz.c: Do not include strings.h nor memory.h, include
7490         string.h unconditionally.  Patch by Simon Josefsson.
7491
7492 2007-01-27  Bruno Haible  <bruno@clisp.org>
7493
7494         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
7495         from gl_HEADER_STRING_H_BODY.
7496         (gl_HEADER_STRING_H_BODY): Require it.
7497         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
7498         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
7499         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
7500         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
7501         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
7502         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
7503         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
7504         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
7505         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
7506         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
7507         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
7508         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
7509         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
7510         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
7511         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7512
7513 2007-01-27  Bruno Haible  <bruno@clisp.org>
7514
7515         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
7516         check_PROGRAMS into noinst_PROGRAMS.
7517         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
7518         check_PROGRAMS in this case.
7519         (func_import): Set for_test to false.
7520         (func_create_testdir): Set for_test to true.
7521
7522 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7523             Bruno Haible  <bruno@clisp.org>
7524
7525         * modules/strcasestr (Files): Remove lib/strcasestr.h.
7526         (Depends-on): Add string.
7527         (Includes): Use <string.h> instead of strcasestr.h.
7528         * modules/string (Makefile.am): Also substitute the value of
7529         REPLACE_STRCASESTR.
7530         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
7531         assume strcasestr is declared in <string.h> not <strings.h>. Also
7532         set REPLACE_STRCASESTR.
7533         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
7534         REPLACE_STRCASESTR.
7535         * lib/strcasestr.h: Remove file.
7536         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
7537         * lib/string_.h (strcasestr): New declaration.
7538
7539 2007-01-27  Bruno Haible  <bruno@clisp.org>
7540
7541         * lib/string_.h: Use 'extern'.
7542
7543 2007-01-27  Jim Meyering  <jim@meyering.net>
7544
7545         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
7546         of set-but-not-used local, "q".
7547
7548         * lib/mempcpy.c: Include <config.h> before <string.h>.
7549         This fixes a compilation error on HP-UX, due to the system's
7550         "restrict"-using mempcpy prototype.
7551
7552 2007-01-26  Bruno Haible  <bruno@clisp.org>
7553
7554         Small optimization.
7555         * lib/javacomp.c: Include c-strstr.h.
7556          (is_envjavac_gcj): Use c_strstr instead of strstr.
7557         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
7558
7559 2007-01-26  Bruno Haible  <bruno@clisp.org>
7560
7561         * MODULES.html.sh (Unicode string functions): Add the new modules.
7562
7563         * modules/uniconv/u32-strconv-to-locale: New file.
7564         * lib/uniconv/u32-strconv-to-locale.c: New file.
7565
7566         * modules/uniconv/u16-strconv-to-locale: New file.
7567         * lib/uniconv/u16-strconv-to-locale.c: New file.
7568
7569         * modules/uniconv/u8-strconv-to-locale: New file.
7570         * lib/uniconv/u8-strconv-to-locale.c: New file.
7571
7572         * modules/uniconv/u32-strconv-from-locale: New file.
7573         * lib/uniconv/u32-strconv-from-locale.c: New file.
7574
7575         * modules/uniconv/u16-strconv-from-locale: New file.
7576         * lib/uniconv/u16-strconv-from-locale.c: New file.
7577
7578         * modules/uniconv/u8-strconv-from-locale: New file.
7579         * lib/uniconv/u8-strconv-from-locale.c: New file.
7580
7581         * modules/uniconv/u32-strconv-to-enc: New file.
7582         * lib/uniconv/u32-strconv-to-enc.c: New file.
7583         * modules/uniconv/u32-strconv-to-enc-tests: New file.
7584         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
7585
7586         * modules/uniconv/u16-strconv-to-enc: New file.
7587         * lib/uniconv/u16-strconv-to-enc.c: New file.
7588         * lib/uniconv/u-strconv-to-enc.h: New file.
7589         * modules/uniconv/u16-strconv-to-enc-tests: New file.
7590         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
7591
7592         * modules/uniconv/u8-strconv-to-enc: New file.
7593         * lib/uniconv/u8-strconv-to-enc.c: New file.
7594         * modules/uniconv/u8-strconv-to-enc-tests: New file.
7595         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
7596
7597         * modules/uniconv/u32-strconv-from-enc: New file.
7598         * lib/uniconv/u32-strconv-from-enc.c: New file.
7599         * modules/uniconv/u32-strconv-from-enc-tests: New file.
7600         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
7601
7602         * modules/uniconv/u16-strconv-from-enc: New file.
7603         * lib/uniconv/u16-strconv-from-enc.c: New file.
7604         * modules/uniconv/u16-strconv-from-enc-tests: New file.
7605         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
7606
7607         * modules/uniconv/u8-strconv-from-enc: New file.
7608         * lib/uniconv/u8-strconv-from-enc.c: New file.
7609         * lib/uniconv/u-strconv-from-enc.h: New file.
7610         * modules/uniconv/u8-strconv-from-enc-tests: New file.
7611         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
7612
7613         * modules/uniconv/u32-conv-from-enc: New file.
7614         * lib/uniconv/u32-conv-from-enc.c: New file.
7615         * modules/uniconv/u32-conv-from-enc-tests: New file.
7616         * tests/uniconv/test-u32-conv-from-enc.c: New file.
7617
7618         * modules/uniconv/u16-conv-from-enc: New file.
7619         * lib/uniconv/u16-conv-from-enc.c: New file.
7620         * lib/uniconv/u-conv-from-enc.h: New file.
7621         * modules/uniconv/u16-conv-from-enc-tests: New file.
7622         * tests/uniconv/test-u16-conv-from-enc.c: New file.
7623
7624         * modules/uniconv/u8-conv-from-enc: New file.
7625         * lib/uniconv/u8-conv-from-enc.c: New file.
7626         * modules/uniconv/u8-conv-from-enc-tests: New file.
7627         * tests/uniconv/test-u8-conv-from-enc.c: New file.
7628
7629         * modules/uniconv/base: New file.
7630         * lib/uniconv.h: New file.
7631
7632 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7633
7634         * doc/gnulib-tool.texi (Initial import): Update to match current
7635         behavior with strdup module.
7636         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
7637         * lib/memmem.h: Remove; all uses removed.  This is now done
7638         by <string.h>.
7639         * lib/mempcpy.h: Likewise.
7640         * lib/memrchr.h: Likewise.
7641         * lib/stpcpy.h: Likewise.
7642         * lib/stpncpy.h: Likewise.
7643         * lib/strcase.h: Likewise.
7644         * lib/strchrnul.h: Likewise.
7645         * lib/strdup.h: Likewise.
7646         * lib/strndup.h: Likewise.
7647         * lib/strnlen.h: Likewise.
7648         * lib/strpbrk.h: Likewise.
7649         * lib/strsep.h: Likewise.
7650         * lib/strstr.h: Likewise.
7651         * lib/strtok_r.h: Likewise.
7652         * lib/string_.h: New file.
7653         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
7654         Rely on <string.h> instead.
7655         * lib/canon-host.c: Likewise.
7656         * lib/chdir-long.c: Likewise.
7657         * lib/concatpath.c: Likewise.
7658         * lib/exclude.c: Likewise.
7659         * lib/fchdir.c: Likewise.
7660         * lib/getaddrinfo.c: Likewise.
7661         * lib/getcwd.c: Likewise.
7662         * lib/getsubopt.c: Likewise.
7663         * lib/glob.c: Likewise.
7664         * lib/hard-locale.c: Likewise.
7665         * lib/iconvme.c: Likewise.
7666         * lib/javacomp.c: Likewise.
7667         * lib/mempcpy.c: Likewise.
7668         * lib/memrchr.c: Likewise.
7669         * lib/regex_internal.h: Likewise.
7670         * lib/stpncpy.c: Likewise.
7671         * lib/strcasecmp.c: Likewise.
7672         * lib/strchrnul.c: Likewise.
7673         * lib/strdup.c: Likewise.
7674         * lib/striconv.c: Likewise.
7675         * lib/striconveh.c: Likewise.
7676         * lib/striconveha.c: Likewise.
7677         * lib/strncasecmp.c: Likewise.
7678         * lib/strndup.c: Likewise.
7679         * lib/strnlen.c: Likewise.
7680         * lib/strsep.c: Likewise.
7681         * lib/strstr.c: Likewise.
7682         * lib/strtok_r.c: Likewise.
7683         * lib/userspec.c: Likewise.
7684         * lib/w32spawn.h: Likewise.
7685         * lib/xstrndup.c: Likewise.
7686         * lib/mountlist.c (strstr): Remove decl.
7687         * m4/string_h.m4: New file.
7688         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
7689         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
7690         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
7691         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
7692         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
7693         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
7694         Set REPLACE_STRCASECMP if necessary.
7695         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
7696         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
7697         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
7698         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
7699         HAVE_DECL_STRDUP if necessary.
7700         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7701         since gl_FUNC_STRNDUP does that now.
7702         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7703         Check for decl here...
7704         (gl_PREREQ_STRNLEN): ... not here.
7705         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7706         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7707         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7708         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7709         necessary.
7710         * modules/string: New file.
7711         * modules/memmem (Files): Remove special-purpose include file.
7712         (Depends-on): Add string.
7713         (Include): Include <string.h>, not the removed file.
7714         * modules/mempcpy: Likewise.
7715         * modules/memrchr: Likewise.
7716         * modules/stpcpy: Likewise.
7717         * modules/stpncpy: Likewise.
7718         * modules/strcase: Likewise.
7719         * modules/strchrnul: Likewise.
7720         * modules/strdup: Likewise.
7721         * modules/strndup: Likewise.
7722         * modules/strnlen: Likewise.
7723         * modules/strpbrk: Likewise.
7724         * modules/strsep: Likewise.
7725         * modules/strstr: Likewise.
7726         * modules/strtok_r: Likewise.
7727         * tests/test-dirname.c: Don't include "strdup.h", since
7728         <string.h> now suffices.
7729         * tests/test-memmem.c: Don't include "memmem.h", since
7730         <string.h> now suffices.
7731
7732 2007-01-25  Bruno Haible  <bruno@clisp.org>
7733
7734         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7735         *resultp is 0.
7736
7737         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7738         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7739         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7740         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7741
7742         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7743         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7744         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7745         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7746         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7747         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7748
7749 2007-01-24  Bruno Haible  <bruno@clisp.org>
7750
7751         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7752         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7753         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7754         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7755         gl_FUNC_FTS_CORE.
7756         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7757         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7758         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7759         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7760         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7761         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7762         gl_FUNC_FCHOWNAT.
7763         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7764         gl_FUNC_STRFTIME.
7765         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7766         Reported by Ralf Wildenhues.
7767
7768 2007-01-24  Bruno Haible  <bruno@clisp.org>
7769
7770         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7771         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7772         gl_GETADDRINFO.
7773         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7774         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7775         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7776
7777 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7778
7779         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7780         Don't use 'exit'; just return from 'main'.
7781         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7782
7783         * lib/fnmatch_.h: Readjust white space and comments to match
7784         glibc, to avoid spurious diffs.
7785
7786 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7787
7788         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7789         2004-12-01 change by Jakub Jelinek, since this code won't compile
7790         if !LIBC.  Problem reported by Bob Proulx.
7791
7792 2007-01-23  Bruno Haible  <bruno@clisp.org>
7793
7794         * lib/striconveh.c: Include c-strcaseeq.h.
7795         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7796         * modules/striconveh (Depends-on): Add c-strcaseeq.
7797
7798 2007-01-23  Bruno Haible  <bruno@clisp.org>
7799
7800         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7801
7802         * modules/c-strcaseeq: New file.
7803         * lib/c-strcaseeq.h: New file.
7804
7805         * modules/streq: New file.
7806         * lib/streq.h: New file.
7807
7808 2007-01-23  Bruno Haible  <bruno@clisp.org>
7809
7810         * modules/striconveha-tests: New file.
7811         * tests/test-striconveha.c: New file.
7812
7813         * lib/striconveha.h: Include <stdbool.h>.
7814         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7815         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7816         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7817         (mem_iconveha): New function.
7818         (str_iconveha_notranslit): Renamed from str_iconveha.
7819         (str_iconveha): New function.
7820         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7821         c-strcase.
7822
7823 2007-01-23  Bruno Haible  <bruno@clisp.org>
7824
7825         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7826         encodings without forgiving before trying any encoding with handler.
7827         (str_iconveha): Try all encodings without forgiving before trying any
7828         encoding with handler.
7829
7830 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7831
7832         Import the following changes from libc.
7833
7834         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7835
7836         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7837
7838         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7839
7840         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7841         normal_bracket label.
7842
7843         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7844
7845         [BZ #361]
7846         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7847         to normal_bracket after fetching the next character.
7848
7849 2007-01-22  Bruno Haible  <bruno@clisp.org>
7850
7851         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7852         argument.
7853         * lib/striconveh.c (iconv_carefully_1): New function.
7854         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7855         argument.
7856         (str_cd_iconveh): Update.
7857         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7858         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7859         * tests/test-striconveh.c (MAGIC): New macro.
7860         (new_offsets): New function.
7861         (main): Test call with and without offsets.
7862
7863 2007-01-22  Bruno Haible  <bruno@clisp.org>
7864
7865         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7866         * modules/sys_select (Makefile.am): Likewise.
7867         * modules/sys_socket (Makefile.am): Likewise.
7868         * modules/sys_time (Makefile.am): Likewise.
7869
7870 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7871
7872         * modules/gettimeofday (License): Change from GPL to LGPL, since
7873         gettimeofday is a library function.
7874
7875 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7876
7877         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7878
7879 2007-01-21  Bruno Haible  <bruno@clisp.org>
7880
7881         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7882
7883 2007-01-21  Bruno Haible  <bruno@clisp.org>
7884
7885         * modules/striconveha: New file.
7886         * lib/striconveha.h: New file.
7887         * lib/striconveha.c: New file.
7888         * MODULES.html.sh (Internationalization functions): Add striconveha.
7889         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7890         string.
7891         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7892
7893 2007-01-21  Bruno Haible  <bruno@clisp.org>
7894
7895         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7896         * lib/striconveh.c (str_iconveh): Likewise.
7897
7898 2007-01-21  Bruno Haible  <bruno@clisp.org>
7899
7900         * lib/striconveh.h (mem_iconveh): New declaration.
7901         * lib/striconveh.c (mem_iconveh): New function.
7902         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7903
7904 2007-01-21  Bruno Haible  <bruno@clisp.org>
7905
7906         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7907
7908         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7909         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7910         original result buffer.
7911         (str_cd_iconveh): Update.
7912         * tests/test-striconveh.c (main): Update.
7913
7914         * lib/striconv.h (mem_cd_iconv): Change specification.
7915         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7916         result buffer.
7917         (str_cd_iconv): Update.
7918         * tests/test-striconv.c (main): Update.
7919
7920 2007-01-21  Bruno Haible  <bruno@clisp.org>
7921
7922         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7923
7924 2007-01-20  Jim Meyering  <jim@meyering.net>
7925
7926         * lib/userspec.c (parse_with_separator): If a user or group string
7927         starts with "+", skip the corresponding name-to-ID look-up, since
7928         such a look-up must fail: user and group names may not include "+".
7929
7930 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7931
7932         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7933         since we now assume the sys_time module.
7934         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7935         check for sys/time.h; no longer needed.
7936         * modules/poll (Depends-on): Depend on sys_time.
7937
7938 2007-01-18  Bruno Haible  <bruno@clisp.org>
7939
7940         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7941         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7942
7943         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7944         gettimeofday.
7945
7946         * tests/test-gettimeofday.c: Include <time.h>.
7947         (dummy): Remove variable.
7948
7949         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7950         gl_HEADER_SYS_TIME_H.
7951         (gl_HEADER_SYS_TIME_H): New macro.
7952
7953         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7954         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7955         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7956         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7957         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7958         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7959         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7960         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7961         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7962         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7963         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7964
7965         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7966         last change; it caused a compilation error when cross-compiling to
7967         Cygwin.
7968
7969 2007-01-18  Jim Meyering  <jim@meyering.net>
7970
7971         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7972         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7973         than the race-prone "test -d sys || mkdir sys".
7974         (configure.ac): Use AC_PROG_MKDIR_P.
7975         * modules/sys_select: Likewise.
7976         * modules/sys_socket: Likewise.
7977         * modules/sys_time: Likewise.
7978
7979 2007-01-18  Eric Blake  <ebb9@byu.net>
7980
7981         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7982         replace gettimeofday.
7983         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7984         name, to avoid infinite recursion.
7985
7986 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7987
7988         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7989         module sys_time.
7990         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7991         assume timespec.h defines struct timeval.
7992         * lib/settime.c: Likewise.
7993         * lib/utimens.c: Likewise.
7994         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7995         since we now assume the gettimeofday module.
7996         * lib/tempname.c (__gen_tempname): Likewise.
7997         * lib/gettimeofday.h: Remove.
7998         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7999         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
8000         Include <time.h>, for 'time()'.
8001         (localtime_buffer_addr): Also use this workaround if
8002         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
8003         to simplify the uses.  All uses changed.
8004         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
8005         that #undef is inside {}, and 'const' follows type name consistently.
8006         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
8007         (gettimeofday): Do not use the maximum possible value for
8008         tv->tv_usec, since that might break usages other than ls.c.
8009         Instead, we'll leave ls.c alone.  This undoes today's patch
8010         by Bruno.  Add a compile-time warning for 1s-clock resolution;
8011         we've never observed the problem but might as well keep the
8012         canary.
8013         * lib/nanosleep.c: Include timespec.h first, for interface check.
8014         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
8015         now assume the sys_time module.
8016         * lib/tempname.c: Likewise.
8017         * lib/timespec.h: Likewise.
8018         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
8019         needed.
8020         * lib/strftime.c: Likewise.
8021         * lib/timespec.h: Likewise.
8022         * lib/posixtm.c: Include posixtm.h first, for interface check.
8023         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
8024         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
8025         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
8026         * lib/sys_time_.h: New file.
8027         * lib/timespec.h (struct timespec): Use long int, not long.
8028         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
8029         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
8030         Remove obsolescent call to AC_HEADER_TIME.
8031         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
8032         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8033         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
8034         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
8035         Likewise.
8036         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
8037         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
8038         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
8039         into the sys_time module.  Check for gettimeofday just once.
8040         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
8041         for gettimeofday signature to just check the signature.  Merely
8042         compile it, since linking doesn't test signature.  Improve test for
8043         whether gettimeofday.o is actually needed.
8044         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
8045         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
8046         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
8047         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
8048         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
8049         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
8050         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
8051         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
8052         than worrying about sys/time.h.
8053         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
8054         Don't bother worrying about TIME_WITH_SYS_TIME.
8055         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
8056         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
8057         * m4/sys_time_h.m4: New file.
8058         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
8059         Don't include sys/time.h.  Return from main rather than exiting.
8060         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
8061         all uses changed.
8062         * modules/gethrxtime (Depends-on): Add sys_time.
8063         * modules/gettime (Depends-on): Likewise.
8064         * modules/gettimeofday (Depends-on): Likewise.
8065         * modules/nanosleep (Depends-on): Likewise.
8066         * modules/settime (Depends-on): Likewise.
8067         * modules/tempname (Depends-on): Likewise.
8068         * modules/utimens (Depends-on): Likewise.
8069         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
8070         (Include:) Change back to <sys/time.h>.
8071         (Maintainer:) Add self.
8072         * modules/sys_time: New file.
8073         * modules/tempname (Depends-on): Add gettimeofday.
8074         * tests/test-gettimeofday.c: Include <sys/time.h>
8075         rather than gettimeofday.h.
8076
8077 2007-01-17  Bruno Haible  <bruno@clisp.org>
8078
8079         * gnulib-tool (func_get_license): Revert last patch. Instead, let
8080         the license default to GPL.
8081         (func_create_testdir): Don't complain if a module is LGPL and its
8082         tests module depends on GPLed modules.
8083
8084 2007-01-17  Bruno Haible  <bruno@clisp.org>
8085
8086         * lib/gettimeofday.c (gettimeofday): Add code for the case
8087         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
8088         maximum possible value for tv->tv_usec, rather than the minimum one.
8089
8090 2005-10-08  Martin Lambers  <marlam@marlam.de>
8091 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
8092 2007-01-16  Bruno Haible  <bruno@clisp.org>
8093
8094         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
8095         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
8096         gl_FUNC_GETTIMEOFDAY.
8097         (Include): Add gettimeofday.h.
8098         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
8099         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
8100         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
8101         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
8102         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
8103         * lib/gettimeofday.h: New file.
8104         * lib/gettimeofday.c: Include <sys/timeb.h>.
8105         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
8106         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
8107         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
8108         fall back on time().
8109
8110         * tests/test-gettimeofday.c: New file.
8111         * modules/gettimeofday-tests: New file.
8112
8113 2007-01-16  Eric Blake  <ebb9@byu.net>
8114
8115         * modules/fnmatch (Depends-on): Depend on wchar.
8116         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
8117         * m4/fnmatch.m4: Likewise.
8118         * modules/mbchar (Makefile.am): Assume <wchar.h>.
8119         * m4/mbchar.m4: Likewise.
8120         * modules/mbswidth (Depends-on): Depend on wchar.
8121         * lib/mbswidth.c: Assume <wchar.h>.
8122         * m4/mbswidth.m4: Likewise.
8123         * modules/quotearg (Depends-on): Depend on wchar.
8124         * lib/quotearg.c: Assume <wchar.h>.
8125         * m4/quotearg.m4: Likewise.
8126         * modules/regex (Depends-on): Depend on wchar.
8127         * lib/regex_internal.h: Assume <wchar.h>.
8128         * m4/regex.m4: Likewise.
8129         * modules/stdint (Depends-on): Depend on wchar.
8130         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
8131         * m4/stdint.m4: Likewise.
8132         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
8133         * modules/strftime (Depends-on): Depend on wchar.
8134         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
8135         * modules/strtol (Depends-on): Depend on wchar.
8136         * lib/strtol.c: Assume <wchar.h>.
8137         * modules/wcwidth (Depends-on): Depend on wchar.
8138         * lib/wcwidth.h: Assume <wchar.h>.
8139         * m4/wcwidth.m4: Likewise.
8140
8141 2007-01-16  Bruno Haible  <bruno@clisp.org>
8142
8143         * modules/csharpexec-script: New, created from...
8144         * modules/csharpexec: ... this.
8145
8146 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
8147
8148         * modules/javaexec-script: New, created from...
8149         * modules/javaexec: ... this.
8150
8151 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8152
8153         * modules/poll (Dependencies): Add sys_select.
8154
8155 2007-01-15  Jim Meyering  <jim@meyering.net>
8156
8157         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
8158         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
8159         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
8160         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
8161
8162 2007-01-15  Bruno Haible  <bruno@clisp.org>
8163
8164         * modules/striconveh: New file.
8165         * lib/striconveh.h: New file.
8166         * lib/striconveh.c: New file.
8167         * MODULES.html.sh (Internationalization functions): Add striconveh.
8168
8169         * modules/striconveh-tests: New file.
8170         * tests/test-striconveh.c: New file.
8171
8172 2007-01-15  Bruno Haible  <bruno@clisp.org>
8173
8174         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
8175         not from GNU libiconv or GNU libc.
8176
8177 2007-01-15  Bruno Haible  <bruno@clisp.org>
8178
8179         * doc/gnulib-intro.texi (Copyright): Explain the different license
8180         terms for module descriptions, autoconf macros, tests, documentation.
8181
8182 2007-01-14  Bruno Haible  <bruno@clisp.org>
8183
8184         * modules/striconv-tests: New file.
8185         * tests/test-striconv.c: New file.
8186
8187 2007-01-14  Bruno Haible  <bruno@clisp.org>
8188
8189         * modules/iconv-tests: New file.
8190         * tests/test-iconv.c: New file.
8191
8192 2007-01-14  Bruno Haible  <bruno@clisp.org>
8193
8194         * gnulib-tool (func_get_license): For test modules, use the license of
8195         the main module.
8196
8197 2007-01-14  Bruno Haible  <bruno@clisp.org>
8198
8199         * modules/iconv (Include): Clarify that <iconv.h> can only be included
8200         if iconv is found to exist.
8201
8202 2007-01-14  Bruno Haible  <bruno@clisp.org>
8203
8204         * modules/c-ctype-tests: New file.
8205         * tests/test-c-ctype.c: New file.
8206
8207 2007-01-14  Bruno Haible  <bruno@clisp.org>
8208
8209         * modules/binary-io-tests: New file.
8210         * tests/test-binary-io.sh: New file.
8211         * tests/test-binary-io.c: New file.
8212
8213 2007-01-14  Bruno Haible  <bruno@clisp.org>
8214
8215         * modules/array-oset-tests: New file.
8216         * tests/test-array_oset.c: New file.
8217
8218 2007-01-14  Bruno Haible  <bruno@clisp.org>
8219
8220         * modules/array-list-tests: New file.
8221         * tests/test-array_list.c: New file.
8222
8223 2007-01-14  Bruno Haible  <bruno@clisp.org>
8224
8225         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
8226         and make.
8227         Reported by Simon Josefsson in
8228         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
8229
8230 2007-01-14  Bruno Haible  <bruno@clisp.org>
8231
8232         * modules/allocsa-tests: New file.
8233         * tests/test-allocsa.c: New file.
8234
8235 2007-01-14  Bruno Haible  <bruno@clisp.org>
8236
8237         * modules/fchdir (Depends-on): Add absolute-header.
8238         * modules/unistd (Depends-on): Likewise.
8239
8240 2006-12-30  Bruno Haible  <bruno@clisp.org>
8241
8242         * modules/fchdir: New file.
8243         * modules/unistd (Files): Add lib/unistd_.h.
8244         (Makefile.am): Generate unistd.h from unistd_.h.
8245         * lib/fchdir.c: New file.
8246         * lib/dirent_.h: New file.
8247         * lib/unistd_.h: New file.
8248         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
8249         * m4/fchdir.m4: New file.
8250         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
8251         (gl_HEADER_UNISTD): Invoke it.
8252         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
8253         function.
8254         * lib/backupfile.c (opendir, closedir): Undefine.
8255         * lib/chown.c (open, close): Undefine.
8256         * lib/clean-temp.c (open, close): Undefine.
8257         * lib/copy-file.c (open, close): Undefine.
8258         * lib/execute.c (open, close): Undefine.
8259         * lib/fsusage.c (open, close): Undefine.
8260         * lib/gc-gnulib.c (open, close): Undefine.
8261         * lib/getcwd.c (opendir, closedir): Undefine.
8262         * lib/glob.c (opendir, closedir): Undefine.
8263         * lib/javacomp.c (open, close): Undefine.
8264         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
8265         * lib/openat-proc.c (open, close): Undefine.
8266         * lib/pagealign_alloc.c (open, close): Undefine.
8267         * lib/pipe.c (open, close): Undefine.
8268         * lib/progreloc.c (open, close): Undefine.
8269         * lib/savedir.c (opendir, closedir): Undefine.
8270         * lib/utime.c (open, close): Undefine.
8271         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
8272
8273 2007-01-10  Bruno Haible  <bruno@clisp.org>
8274
8275         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
8276
8277 2007-01-12  Eric Blake  <ebb9@byu.net>
8278
8279         Provide a robust <wchar.h>.  Further simplifications are now
8280         possible in other modules, but not included here.
8281         * modules/wchar: New module.
8282         * m4/wchar.m4: New file.
8283         * lib/wchar_.h: Likewise.
8284         * modules/mbchar (Depends-on): Depend on wchar, as the first use
8285         of the new module.
8286         * MODULES.html.sh (Extended multibyte and wide character utilities):
8287         New section.
8288
8289 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
8290
8291         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
8292         to a reasonable default for memory allocation.
8293         (xreadlink): Don't allocate a huge buffer, to work around a buggy
8294         file system that reports garbage st_size values for symlinks.
8295         Problem reported by Liyang Hu.
8296
8297 2007-01-11  Simon Josefsson  <simon@josefsson.org>
8298
8299         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
8300         Emacs .#* auto-save files).
8301
8302 2007-01-11  Bruno Haible  <bruno@clisp.org>
8303
8304         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
8305         directory.
8306
8307 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8308
8309         Use @...@ consistently in lib/wctype_.h.
8310         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
8311         on it being set to 1 or 0.
8312         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
8313         go back to AC_SUBSTing it.
8314         * modules/wctype (Makefile.am): Undo previous change.
8315
8316 2007-01-10  Eric Blake  <ebb9@byu.net>
8317
8318         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
8319         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
8320         * modules/wctype (Makefile.am): Likewise.
8321         Reported by Chris McGuire.
8322
8323 2007-01-10  Jim Meyering  <jim@meyering.net>
8324
8325         fts.c: a small readability/maintainability improvement
8326         * lib/fts.c (fts_read): Make this code slightly more readable and
8327         maintainable by hoisting the "sp->fts_cur = p" assignments to
8328         immediately follow the statements that set P.  Derived from
8329         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
8330
8331 2007-01-10  Eric Blake  <ebb9@byu.net>
8332
8333         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
8334         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
8335         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8336         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
8337         Reported by Chris McGuire.
8338
8339 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8340
8341         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
8342         in sed script.
8343
8344 2007-01-09  Bruno Haible  <bruno@clisp.org>
8345
8346         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
8347         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
8348         variables.
8349         (func_module): Use them.
8350
8351 2007-01-09  Bruno Haible  <bruno@clisp.org>
8352
8353         * modules/unistr/base: New file.
8354         * lib/unistr.h: New file.
8355
8356         * modules/unistr/u8-to-u16: New file.
8357         * lib/unistr/u8-to-u16.c: New file.
8358
8359         * modules/unistr/u8-to-u32: New file.
8360         * lib/unistr/u8-to-u32.c: New file.
8361
8362         * modules/unistr/u16-to-u8: New file.
8363         * lib/unistr/u16-to-u8.c: New file.
8364
8365         * modules/unistr/u16-to-u32: New file.
8366         * lib/unistr/u16-to-u32.c: New file.
8367
8368         * modules/unistr/u32-to-u8: New file.
8369         * lib/unistr/u32-to-u8.c: New file.
8370
8371         * modules/unistr/u32-to-u16: New file.
8372         * lib/unistr/u32-to-u16.c: New file.
8373
8374         * modules/unistr/u8-check: New file.
8375         * modules/unistr/u16-check: New file.
8376         * modules/unistr/u32-check: New file.
8377         * lib/unistr/u8-check.c: New file.
8378         * lib/unistr/u16-check.c: New file.
8379         * lib/unistr/u32-check.c: New file.
8380
8381         * modules/unistr/u8-chr: New file.
8382         * modules/unistr/u16-chr: New file.
8383         * modules/unistr/u32-chr: New file.
8384         * lib/unistr/u8-chr.c: New file.
8385         * lib/unistr/u16-chr.c: New file.
8386         * lib/unistr/u32-chr.c: New file.
8387
8388         * modules/unistr/u8-cmp: New file.
8389         * modules/unistr/u16-cmp: New file.
8390         * modules/unistr/u32-cmp: New file.
8391         * lib/unistr/u8-cmp.c: New file.
8392         * lib/unistr/u16-cmp.c: New file.
8393         * lib/unistr/u32-cmp.c: New file.
8394
8395         * modules/unistr/u8-cpy: New file.
8396         * modules/unistr/u16-cpy: New file.
8397         * modules/unistr/u32-cpy: New file.
8398         * lib/unistr/u8-cpy.c: New file.
8399         * lib/unistr/u16-cpy.c: New file.
8400         * lib/unistr/u32-cpy.c: New file.
8401         * lib/unistr/u-cpy.h: New file.
8402
8403         * modules/unistr/u8-cpy-alloc: New file.
8404         * modules/unistr/u16-cpy-alloc: New file.
8405         * modules/unistr/u32-cpy-alloc: New file.
8406         * lib/unistr/u8-cpy-alloc.c: New file.
8407         * lib/unistr/u16-cpy-alloc.c: New file.
8408         * lib/unistr/u32-cpy-alloc.c: New file.
8409         * lib/unistr/u-cpy-alloc.h: New file.
8410
8411         * modules/unistr/u8-endswith: New file.
8412         * modules/unistr/u16-endswith: New file.
8413         * modules/unistr/u32-endswith: New file.
8414         * lib/unistr/u8-endswith.c: New file.
8415         * lib/unistr/u16-endswith.c: New file.
8416         * lib/unistr/u32-endswith.c: New file.
8417         * lib/unistr/u-endswith.h: New file.
8418
8419         * modules/unistr/u8-mblen: New file.
8420         * modules/unistr/u16-mblen: New file.
8421         * modules/unistr/u32-mblen: New file.
8422         * lib/unistr/u8-mblen.c: New file.
8423         * lib/unistr/u16-mblen.c: New file.
8424         * lib/unistr/u32-mblen.c: New file.
8425
8426         * modules/unistr/u8-mbtouc: New file.
8427         * modules/unistr/u16-mbtouc: New file.
8428         * modules/unistr/u32-mbtouc: New file.
8429         * lib/unistr/u8-mbtouc.c: New file.
8430         * lib/unistr/u16-mbtouc.c: New file.
8431         * lib/unistr/u32-mbtouc.c: New file.
8432
8433         * modules/unistr/u8-mbtouc-safe: New file.
8434         * modules/unistr/u16-mbtouc-safe: New file.
8435         * modules/unistr/u32-mbtouc-safe: New file.
8436         * lib/unistr/u8-mbtouc-safe.c: New file.
8437         * lib/unistr/u16-mbtouc-safe.c: New file.
8438         * lib/unistr/u32-mbtouc-safe.c: New file.
8439
8440         * modules/unistr/u8-move: New file.
8441         * modules/unistr/u16-move: New file.
8442         * modules/unistr/u32-move: New file.
8443         * lib/unistr/u8-move.c: New file.
8444         * lib/unistr/u16-move.c: New file.
8445         * lib/unistr/u32-move.c: New file.
8446         * lib/unistr/u-move.h: New file.
8447
8448         * modules/unistr/u8-next: New file.
8449         * modules/unistr/u16-next: New file.
8450         * modules/unistr/u32-next: New file.
8451         * lib/unistr/u8-next.c: New file.
8452         * lib/unistr/u16-next.c: New file.
8453         * lib/unistr/u32-next.c: New file.
8454
8455         * modules/unistr/u8-prev: New file.
8456         * modules/unistr/u16-prev: New file.
8457         * modules/unistr/u32-prev: New file.
8458         * lib/unistr/u8-prev.c: New file.
8459         * lib/unistr/u16-prev.c: New file.
8460         * lib/unistr/u32-prev.c: New file.
8461
8462         * modules/unistr/u8-set: New file.
8463         * modules/unistr/u16-set: New file.
8464         * modules/unistr/u32-set: New file.
8465         * lib/unistr/u8-set.c: New file.
8466         * lib/unistr/u16-set.c: New file.
8467         * lib/unistr/u32-set.c: New file.
8468         * lib/unistr/u-set.h: New file.
8469
8470         * modules/unistr/u8-startswith: New file.
8471         * modules/unistr/u16-startswith: New file.
8472         * modules/unistr/u32-startswith: New file.
8473         * lib/unistr/u8-startswith.c: New file.
8474         * lib/unistr/u16-startswith.c: New file.
8475         * lib/unistr/u32-startswith.c: New file.
8476         * lib/unistr/u-startswith.h: New file.
8477
8478         * modules/unistr/u8-stpcpy: New file.
8479         * modules/unistr/u16-stpcpy: New file.
8480         * modules/unistr/u32-stpcpy: New file.
8481         * lib/unistr/u8-stpcpy.c: New file.
8482         * lib/unistr/u16-stpcpy.c: New file.
8483         * lib/unistr/u32-stpcpy.c: New file.
8484         * lib/unistr/u-stpcpy.h: New file.
8485
8486         * modules/unistr/u8-stpncpy: New file.
8487         * modules/unistr/u16-stpncpy: New file.
8488         * modules/unistr/u32-stpncpy: New file.
8489         * lib/unistr/u8-stpncpy.c: New file.
8490         * lib/unistr/u16-stpncpy.c: New file.
8491         * lib/unistr/u32-stpncpy.c: New file.
8492         * lib/unistr/u-stpncpy.h: New file.
8493
8494         * modules/unistr/u8-strcat: New file.
8495         * modules/unistr/u16-strcat: New file.
8496         * modules/unistr/u32-strcat: New file.
8497         * lib/unistr/u8-strcat.c: New file.
8498         * lib/unistr/u16-strcat.c: New file.
8499         * lib/unistr/u32-strcat.c: New file.
8500         * lib/unistr/u-strcat.h: New file.
8501
8502         * modules/unistr/u8-strchr: New file.
8503         * modules/unistr/u16-strchr: New file.
8504         * modules/unistr/u32-strchr: New file.
8505         * lib/unistr/u8-strchr.c: New file.
8506         * lib/unistr/u16-strchr.c: New file.
8507         * lib/unistr/u32-strchr.c: New file.
8508
8509         * modules/unistr/u8-strcmp: New file.
8510         * modules/unistr/u16-strcmp: New file.
8511         * modules/unistr/u32-strcmp: New file.
8512         * lib/unistr/u8-strcmp.c: New file.
8513         * lib/unistr/u16-strcmp.c: New file.
8514         * lib/unistr/u32-strcmp.c: New file.
8515
8516         * modules/unistr/u8-strcpy: New file.
8517         * modules/unistr/u16-strcpy: New file.
8518         * modules/unistr/u32-strcpy: New file.
8519         * lib/unistr/u8-strcpy.c: New file.
8520         * lib/unistr/u16-strcpy.c: New file.
8521         * lib/unistr/u32-strcpy.c: New file.
8522         * lib/unistr/u-strcpy.h: New file.
8523
8524         * modules/unistr/u8-strcspn: New file.
8525         * modules/unistr/u16-strcspn: New file.
8526         * modules/unistr/u32-strcspn: New file.
8527         * lib/unistr/u8-strcspn.c: New file.
8528         * lib/unistr/u16-strcspn.c: New file.
8529         * lib/unistr/u32-strcspn.c: New file.
8530         * lib/unistr/u-strcspn.h: New file.
8531
8532         * modules/unistr/u8-strdup: New file.
8533         * modules/unistr/u16-strdup: New file.
8534         * modules/unistr/u32-strdup: New file.
8535         * lib/unistr/u8-strdup.c: New file.
8536         * lib/unistr/u16-strdup.c: New file.
8537         * lib/unistr/u32-strdup.c: New file.
8538         * lib/unistr/u-strdup.h: New file.
8539
8540         * modules/unistr/u8-strlen: New file.
8541         * modules/unistr/u16-strlen: New file.
8542         * modules/unistr/u32-strlen: New file.
8543         * lib/unistr/u8-strlen.c: New file.
8544         * lib/unistr/u16-strlen.c: New file.
8545         * lib/unistr/u32-strlen.c: New file.
8546         * lib/unistr/u-strlen.h: New file.
8547
8548         * modules/unistr/u8-strmblen: New file.
8549         * modules/unistr/u16-strmblen: New file.
8550         * modules/unistr/u32-strmblen: New file.
8551         * lib/unistr/u8-strmblen.c: New file.
8552         * lib/unistr/u16-strmblen.c: New file.
8553         * lib/unistr/u32-strmblen.c: New file.
8554
8555         * modules/unistr/u8-strmbtouc: New file.
8556         * modules/unistr/u16-strmbtouc: New file.
8557         * modules/unistr/u32-strmbtouc: New file.
8558         * lib/unistr/u8-strmbtouc.c: New file.
8559         * lib/unistr/u16-strmbtouc.c: New file.
8560         * lib/unistr/u32-strmbtouc.c: New file.
8561
8562         * modules/unistr/u8-strncat: New file.
8563         * modules/unistr/u16-strncat: New file.
8564         * modules/unistr/u32-strncat: New file.
8565         * lib/unistr/u8-strncat.c: New file.
8566         * lib/unistr/u16-strncat.c: New file.
8567         * lib/unistr/u32-strncat.c: New file.
8568         * lib/unistr/u-strncat.h: New file.
8569
8570         * modules/unistr/u8-strncmp: New file.
8571         * modules/unistr/u16-strncmp: New file.
8572         * modules/unistr/u32-strncmp: New file.
8573         * lib/unistr/u8-strncmp.c: New file.
8574         * lib/unistr/u16-strncmp.c: New file.
8575         * lib/unistr/u32-strncmp.c: New file.
8576
8577         * modules/unistr/u8-strncpy: New file.
8578         * modules/unistr/u16-strncpy: New file.
8579         * modules/unistr/u32-strncpy: New file.
8580         * lib/unistr/u8-strncpy.c: New file.
8581         * lib/unistr/u16-strncpy.c: New file.
8582         * lib/unistr/u32-strncpy.c: New file.
8583         * lib/unistr/u-strncpy.h: New file.
8584
8585         * modules/unistr/u8-strnlen: New file.
8586         * modules/unistr/u16-strnlen: New file.
8587         * modules/unistr/u32-strnlen: New file.
8588         * lib/unistr/u8-strnlen.c: New file.
8589         * lib/unistr/u16-strnlen.c: New file.
8590         * lib/unistr/u32-strnlen.c: New file.
8591         * lib/unistr/u-strnlen.h: New file.
8592
8593         * modules/unistr/u8-strpbrk: New file.
8594         * modules/unistr/u16-strpbrk: New file.
8595         * modules/unistr/u32-strpbrk: New file.
8596         * lib/unistr/u8-strpbrk.c: New file.
8597         * lib/unistr/u16-strpbrk.c: New file.
8598         * lib/unistr/u32-strpbrk.c: New file.
8599         * lib/unistr/u-strpbrk.h: New file.
8600
8601         * modules/unistr/u8-strrchr: New file.
8602         * modules/unistr/u16-strrchr: New file.
8603         * modules/unistr/u32-strrchr: New file.
8604         * lib/unistr/u8-strrchr.c: New file.
8605         * lib/unistr/u16-strrchr.c: New file.
8606         * lib/unistr/u32-strrchr.c: New file.
8607
8608         * modules/unistr/u8-strspn: New file.
8609         * modules/unistr/u16-strspn: New file.
8610         * modules/unistr/u32-strspn: New file.
8611         * lib/unistr/u8-strspn.c: New file.
8612         * lib/unistr/u16-strspn.c: New file.
8613         * lib/unistr/u32-strspn.c: New file.
8614         * lib/unistr/u-strspn.h: New file.
8615
8616         * modules/unistr/u8-strstr: New file.
8617         * modules/unistr/u16-strstr: New file.
8618         * modules/unistr/u32-strstr: New file.
8619         * lib/unistr/u8-strstr.c: New file.
8620         * lib/unistr/u16-strstr.c: New file.
8621         * lib/unistr/u32-strstr.c: New file.
8622         * lib/unistr/u-strstr.h: New file.
8623
8624         * modules/unistr/u8-strtok: New file.
8625         * modules/unistr/u16-strtok: New file.
8626         * modules/unistr/u32-strtok: New file.
8627         * lib/unistr/u8-strtok.c: New file.
8628         * lib/unistr/u16-strtok.c: New file.
8629         * lib/unistr/u32-strtok.c: New file.
8630         * lib/unistr/u-strtok.h: New file.
8631
8632         * modules/unistr/u8-uctomb: New file.
8633         * modules/unistr/u16-uctomb: New file.
8634         * modules/unistr/u32-uctomb: New file.
8635         * lib/unistr/u8-uctomb.c: New file.
8636         * lib/unistr/u16-uctomb.c: New file.
8637         * lib/unistr/u32-uctomb.c: New file.
8638
8639         * MODULES.html.sh (Unicode string functions): Add the new modules.
8640
8641 2007-01-08  Bruno Haible  <bruno@clisp.org>
8642
8643         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
8644         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
8645         subdirectories.
8646
8647 2007-01-08  Karl Berry  <karl@gnu.org>
8648
8649         * doc/error.texi: mention that main() fns must set program_name
8650         when progname is used.
8651
8652 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
8653
8654         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
8655         WCTYPE_H is empty, for the benefit of builds from non-distclean
8656         directories.  Problem reported by Eric Blake in
8657         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
8658
8659 2007-01-08  Bruno Haible  <bruno@clisp.org>
8660
8661         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
8662         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
8663         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
8664         PROVIDE_CANONICALIZE_FILENAME_MODE.
8665         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
8666
8667 2007-01-08  Bruno Haible  <bruno@clisp.org>
8668
8669         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
8670         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
8671         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
8672         * lib/fts.c: Likewise.
8673         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
8674
8675 2006-12-25  Bruno Haible  <bruno@clisp.org>
8676
8677         * modules/utf8-ucs4-safe: New file.
8678         * lib/utf8-ucs4-safe.h: New file.
8679         * lib/unistr/utf8-ucs4-safe.c: New file.
8680
8681         * modules/utf16-ucs4-safe: New file.
8682         * lib/utf16-ucs4-safe.h: New file.
8683         * lib/unistr/utf16-ucs4-safe.c: New file.
8684
8685         * MODULES.html.sh (Unicode string functions): Add the new modules.
8686
8687 2007-01-08  Bruno Haible  <bruno@clisp.org>
8688
8689         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
8690         (Depends-on): Add unitypes.
8691         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8692         (u8_mbtouc_aux): Move out to separate file.
8693         (u8_mbtouc): Use ucs4_t, uint8_t types.
8694         * lib/unistr/utf8-ucs4.c: New file.
8695
8696         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
8697         (Depends-on): Add unitypes.
8698         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8699         (u16_mbtouc_aux): Move out to separate file.
8700         (u16_mbtouc): Use ucs4_t, uint16_t types.
8701         * lib/unistr/utf16-ucs4.c: New file.
8702
8703         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8704         (Depends-on): Add unitypes.
8705         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8706         (u8_uctomb_aux): Move out to separate file.
8707         (u8_uctomb): Use ucs4_t, uint8_t types.
8708         * lib/unistr/ucs4-utf8.c: New file.
8709
8710         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8711         (Depends-on): Add unitypes.
8712         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8713         (u16_uctomb_aux): Move out to separate file.
8714         (u16_uctomb): Use ucs4_t, uint16_t types.
8715         * lib/unistr/ucs4-utf16.c: New file.
8716
8717 2006-12-25  Bruno Haible  <bruno@clisp.org>
8718
8719         * modules/unitypes: New file.
8720         * lib/unitypes.h: New file.
8721         * MODULES.html.sh (func_all_modules): New section "Unicode string
8722         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8723         this section. Add unitypes.
8724
8725 2007-01-08  Bruno Haible  <bruno@clisp.org>
8726
8727         Avoid variable names that conflict with those from libtool.
8728         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8729         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8730         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8731         library_names_spec to acl_library_names_spec, hardcode_* to
8732         acl_hardcode_*.
8733         Reported by Ralf Wildenhues.
8734
8735 2007-01-08  Bruno Haible  <bruno@clisp.org>
8736
8737         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8738         definition.
8739         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8740         definition.
8741         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8742         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8743         definition.
8744         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8745         definition.
8746         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8747         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8748         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8749         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8750         definition.
8751         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8752         definition.
8753         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8754         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8755         GC_USE_<algorithm>.
8756         * lib/gc-libgcrypt.c: Likewise.
8757         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8758         * modules/gc-arctwo (configure.ac): Likewise.
8759         * modules/gc-des (configure.ac): Likewise.
8760         * modules/gc-hmac-md5 (configure.ac): Likewise.
8761         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8762         * modules/gc-md2 (configure.ac): Likewise.
8763         * modules/gc-md4 (configure.ac): Likewise.
8764         * modules/gc-md5 (configure.ac): Likewise.
8765         * modules/gc-random (configure.ac): Likewise.
8766         * modules/gc-rijndael (configure.ac): Likewise.
8767         * modules/gc-sha1 (configure.ac): Likewise.
8768
8769 2007-01-08  Bruno Haible  <bruno@clisp.org>
8770
8771         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8772         macro definition.
8773         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8774         definition.
8775         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8776         definition.
8777         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8778         * modules/fcntl-safer (configure.ac): Likewise.
8779         * modules/fopen-safer (configure.ac): Likewise.
8780         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8781         GNULIB_FWRITEERROR macro definition.
8782
8783 2007-01-08  Bruno Haible  <bruno@clisp.org>
8784
8785         * m4/gnulib-common.m4: New file.
8786         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8787         (func_get_filelist): Add m4/gnulib-common.m4.
8788
8789 2007-01-08  Bruno Haible  <bruno@clisp.org>
8790
8791         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8792         command.
8793
8794 2007-01-08  Jim Meyering  <jim@meyering.net>
8795
8796         Use a more robust test for a "can't happen" condition.
8797         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8798         narrowed the st_size value.  Presuming the "can't happen" condition
8799         is true, that narrowing could conceivably convert an invalid st_size
8800         value into a valid one.  Instead, use a change based on Matthew
8801         Woehlke's original patch.
8802
8803         Slight readability improvement: use an assert-like macro
8804         in place of literal "abort ()" uses.
8805         * lib/fts.c (fts_assert): Define.
8806         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8807         Use this macro instead of a bare 'abort'.
8808
8809 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8810
8811         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8812         simply work around them.
8813         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8814         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8815         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8816         declaring.
8817         Don't bother to define as macros, since the standard doesn't require it.
8818         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8819         longer worry about IRIX 5.3.
8820         (HAVE_WCTYPE_CTMP_BUG): Remove.
8821
8822 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8823
8824         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8825         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8826         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8827         Problems reported by Georg Schwarz for IRIX 5.3.
8828
8829         * gnulib-tool (autoconf_minversion): Take the maximum version number
8830         found, not the minimum.  Problem reported by James Youngman.
8831
8832 2007-01-03  Karl Berry  <karl@gnu.org>
8833
8834         * doc/error.texi: new file, explaining interaction with progname.
8835         * doc/gnulib.texi: include it.  Update copyright.
8836
8837 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8838
8839         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8840         AC_CANONICAL_HOST, to improve autobuild outputs.
8841
8842 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8843             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8844
8845         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8846         sockets, server sockets, and other file descriptors.  Count errors
8847         to compute the return value.  Reorder the code a bit to be easier
8848         to follow.  Don't set event bits that were not requested (except
8849         POLLERR and POLLHUP).
8850
8851 2007-01-01  Bruno Haible  <bruno@clisp.org>
8852
8853         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8854
8855 2007-01-03  Jim Meyering  <jim@meyering.net>
8856
8857         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8858
8859 2007-01-02  Bruno Haible  <bruno@clisp.org>
8860
8861         * modules/settime (Include): Require timespec.h.
8862         * modules/nanosleep (Include): Likewise.
8863
8864 2007-01-01  Bruno Haible  <bruno@clisp.org>
8865
8866         * gnulib-tool (func_emit_copyright_notice): Bump year.
8867         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8868
8869 2007-01-01  Bruno Haible  <bruno@clisp.org>
8870
8871         Improve support for OpenBSD.
8872         * build-aux/config.rpath (libname_spec): Export.
8873         (library_names_spec): New variable. Export.
8874         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8875         library_names_spec from the config.rpath output. Locate shared library
8876         through the name pattern in library_names_spec.
8877
8878 2007-01-01  Eric Blake  <ebb9@byu.net>
8879
8880         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8881
8882 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8883
8884         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8885         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8886         assume the C locale, and avoid an "eval" that could cause trouble.
8887         Problem with SORT reported by Bob Proulx.
8888
8889         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8890         Define.  Trivial patch from Henning Nielsen Lund, originally
8891         sent to bug-grep@gnu.org today.
8892
8893 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8894
8895         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8896         struct stat.  Problem reported by Henning Nielsen Lund.
8897         * lib/acl.c: Include acl.h first, to check interface.  Don't
8898         bother to include sys/types.h and sys/stat.h again.
8899
8900 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8901
8902         Import the following change from libc; problem reported by
8903         Sven Verdoolaege.
8904
8905         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8906
8907         [BZ #1373]
8908         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8909
8910 2006-12-28  Jim Meyering  <jim@meyering.net>
8911
8912         * build-aux/announce-gen: Do not assume that the package
8913         builds any of tar.gz, tar.bz2, and .xdelta files.
8914         Suggestion from Simon Josefsson.
8915
8916 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8917
8918         * modules/announce-gen: New file.
8919
8920 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8921
8922         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8923         handles its gotchas now.
8924         * lib/mbswidth.c: Likewise.
8925         * lib/wcwidth.h: Likewise.
8926         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8927         and iswcntrl; the wctype module does this stuff now.
8928         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8929         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8930         * modules/mbchar (Depends-on): Add wctype.
8931         * modules/mbswidth (Depends-on): Likewise.
8932         * modules/wcwidth (Depends-on): Likewise.
8933
8934 2006-12-27  Eric Blake  <ebb9@byu.net>
8935
8936         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8937         module uses more than what <wctype.h> is required to provide.
8938
8939 2006-12-26  Eric Blake  <ebb9@byu.net>
8940
8941         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8942
8943 2006-12-26  Eric Blake  <ebb9@byu.net>
8944
8945         * modules/absolute-header: New module.
8946         * modules/fcntl (Depends-on): Depend on it.
8947         * modules/inttypes (Depends-on): Likewise.
8948         * modules/stdint (Depends-on): Likewise.
8949         * modules/sys_stat (Depends-on): Likewise.
8950         * modules/wctype (Depends-on): Likewise.
8951         * MODULES.html.sh (Support for building libraries and
8952         executables): Document it.
8953
8954 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8955
8956         * gnulib-tool (SED): Remove, undoing previous change.
8957         The problem was that it broke coreutils on Solaris, because
8958         "sed --posix" leaked into a makefile.
8959         (sed): New alias, if 'alias' and GNU sed.
8960
8961 2006-12-24  Jim Meyering  <jim@meyering.net>
8962
8963         Work around an fchownat bug in glibc-2.4:
8964         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8965         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8966         in spite of the -P option.
8967         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8968         New macros.
8969         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8970         * modules/openat (Files): Add lib/fchownat.c.
8971         * lib/openat.c (fchownat): Don't define here.  Move to...
8972         * lib/fchownat.c: ...this new file.
8973
8974 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8975
8976         Fix bug reported by Bruno Haible in
8977         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8978         where quotearg.c didn't compile on Mac OS X 10.2 because it
8979         lacks <wchar.h> and wint_t.
8980         * lib/wctype_.h (__wctype_wint_t): New type.
8981         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8982         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8983         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8984         Arg is now of type __wctype_wint_t, not wint_t.
8985         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8986         substitute HAVE_WINT_T.
8987         * modules/wctype (Files): Add m4/wint_t.m4.
8988         (wctype.h): Substitute HAVE_WINT_T.
8989
8990 2006-12-23  Bruno Haible  <bruno@clisp.org>
8991
8992         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8993
8994 2006-12-23  Bruno Haible  <bruno@clisp.org>
8995
8996         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8997         S_ISLNK.
8998         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8999         mingw.
9000
9001 2006-12-22  Bruno Haible  <bruno@clisp.org>
9002
9003         * lib/copy-file.c: Include acl.h.
9004         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
9005         Close the file descriptors only after being done with copy_acl.
9006         * modules/copy-file (Depends-on): Add acl.
9007
9008 2006-12-22  Bruno Haible  <bruno@clisp.org>
9009
9010         * gnulib-tool (SED): New variable.
9011         Use $SED instead of sed everywhere.
9012
9013 2006-12-22  Bruno Haible  <bruno@clisp.org>
9014
9015         * modules/no-c++: New file.
9016         * m4/no-c++.m4: New file.
9017         * MODULES.html.sh (Support for building libraries and executables):
9018         Add no-c++.
9019
9020 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
9021
9022         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
9023         Include <limits.h>, and use its INT_MAX to rewrite the
9024         j loop so that it does not overflow 'int'.  Problem reported by
9025         Ralf Wildenhues in
9026         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
9027         Play it safe by shifting left by 1 rather than multiplying by 2,
9028         as GCC is less likely to optimize this away when the value
9029         is signed (when it assumes overflow leads to undefined behavior).
9030         Also, don't assume time_t uses two's complement.
9031
9032 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
9033
9034         * MODULES.html.sh: New module wctype.
9035         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
9036         * lib/fnmatch.c: Don't bother to include <wchar.h> before
9037         <wctype.h>, since the new wctype module should fix this.
9038         * lib/quotearg.c: Include <wctype.h> unconditionally, since
9039         the wctype module should arrange for it.
9040         * lib/regex_internal.h: Likewise.
9041         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
9042         since the wctype module should handle this now.
9043         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
9044         * modules/fnmatch (Depends-on): Add wctype.
9045         * modules/quotearg (Depends-on): Likewise.
9046         * modules/regex (Depends-on): Likewise.
9047
9048 2006-12-19  Bruno Haible  <bruno@clisp.org>
9049
9050         * lib/strdup.h [C++]: Wrap definitions in extern "C".
9051         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
9052
9053 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9054
9055         * modules/savewd (Depends-on): Fix dependency on fcntl.
9056
9057 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
9058
9059         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
9060         conforms to C99, rather than relying on the user's environment
9061         setting of STDINT_H.
9062
9063 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
9064         and Eric Blake  <ebb9@byu.net>
9065
9066         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
9067         This is more consistent with the other defines here.
9068         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
9069         Port to z/OS.  Problem reported by Paul Gilmartin.
9070         Change local vars to use gl_ prefix rather than ac_.
9071         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
9072         with other defines.
9073         * modules/double-slash-root: New module.
9074         * modules/dirname (Files): Remove m4/double-slash-root.m4.
9075         (Depends-on): Add double-slash-root.
9076         * MODULES.html.sh (File system functions): Mention new module.
9077
9078 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
9079
9080         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
9081         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
9082         This is for the benefit of gzip, which doesn't do i18n.
9083
9084 2006-12-12  Jim Meyering  <jim@meyering.net>
9085
9086         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
9087         Reported by Andreas Schwab <schwab@suse.de>.
9088
9089 2006-12-12  Bruno Haible  <bruno@clisp.org>
9090
9091         Merge these changes.
9092         2006-09-05  Bruno Haible  <bruno@clisp.org>
9093         * lib/iconvme.c (iconv_string): No need to save and restore errno when
9094         iconv_alloc succeeded.
9095         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
9096         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
9097         test for " && dest " at the end - dest is always != NULL there. Call
9098         iconv with 4xNULL arguments initially, to reset the state. Call iconv
9099         with 2xNULL arguments, also to flush the state storage. Handle the
9100         IRIX iconv behaviour. Realloc the final result, to throw away unused
9101         memory.
9102
9103 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
9104
9105         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
9106         and fchmodat unconditionally, since glibc 2.4 has them.
9107         Problem reported by Arkadiusz Miskiewicz.
9108
9109 2006-12-10  Bruno Haible  <bruno@clisp.org>
9110
9111         * gnulib-tool (func_import): Show the include files only for those
9112         modules that are copied and specified.
9113         Reported by Karl Berry.
9114
9115 2006-12-08  Jim Meyering  <jim@meyering.net>
9116
9117         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
9118         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
9119
9120         * build-aux/announce-gen: Add two new options, both optional:
9121         --bootstrap-tools=TOOL_LIST
9122               a comma-separated list of tools, e.g.,
9123               autoconf,automake,bison,gnulib
9124         --gnulib-snapshot-date=DATE
9125               if gnulib is in the bootstrap tool list,
9126               then report this as the snapshot date.
9127               If not specified, use the current date/time.
9128               If you specify a date here, be sure it's UTC.
9129
9130 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9131
9132         * tests/test-argp-2.sh: Fix test to match actual output.
9133         (func_compare): Fix sed script to be portable.
9134
9135 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
9136
9137         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
9138         workaround for this case.  It is not autoconfigured now; offhand
9139         it's hard to see how to autoconfigure it.
9140
9141 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
9142
9143         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
9144         a directory that is about to be chowned.  Such a directory's
9145         initial file permissions should permit the owner only and this
9146         should not be changed until after the chown, since the group and
9147         other bits would be incorrect if they granted permission before
9148         the chown.
9149
9150         Fix porting problem for iswctype reported by Georg Schwarz in:
9151         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
9152         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
9153         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
9154         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
9155         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
9156
9157 2006-12-03  Jim Meyering  <jim@meyering.net>
9158
9159         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
9160         p->fts_statp may not yet be defined.
9161         (fts_read): Instead, set it in the caller, once p->fts_statp is
9162         sure to be defined, and corresponds to a top-level directory.
9163         This bug made du -x fail.  Here's the coreutils test case:
9164         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
9165         Reported by Mike Frysinger.
9166
9167 2006-12-01  Jim Meyering  <jim@meyering.net>
9168
9169         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
9170         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
9171         Reported by Simon Josefsson.
9172
9173 2006-11-30  Jim Meyering  <jim@meyering.net>
9174
9175         * m4/warning.m4: Use the all-permissive copyright notice
9176         recommended by RMS (rather than LGPL).
9177         * m4/vararrays.m4: Likewise.
9178         * m4/flexmember.m4: Likewise.
9179
9180 2006-11-29  Bruno Haible  <bruno@clisp.org>
9181
9182         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9183         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
9184         using +=.
9185         Reported by Simon Josefsson <simon@josefsson.org>.
9186
9187 2006-11-28  James Youngman <jay@gnu.org>
9188
9189         * README: Advise users that they might find the bug-gnulib@gnu.org
9190         and autotools-announce@gnu.org mailing lists useful.
9191
9192 2006-11-28  Bruno Haible  <bruno@clisp.org>
9193
9194         * m4/ptrdiff_max.m4: Remove file.
9195
9196 2006-11-21  Bruno Haible  <bruno@clisp.org>
9197
9198         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
9199         _AC_COMPUTE_INT.
9200         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9201         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
9202         _AC_COMPUTE_INT.
9203         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9204         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
9205         _AC_COMPUTE_INT.
9206         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9207
9208 2006-11-28  Jim Meyering  <jim@meyering.net>
9209
9210         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
9211         warning from "gcc -Wshadow" about shadowing the builtin.
9212
9213 2006-11-27  Bruno Haible  <bruno@clisp.org>
9214
9215         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
9216         _AC_COMPUTE_INT.
9217         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9218
9219 2006-11-27  Bruno Haible  <bruno@clisp.org>
9220             Paul Eggert  <eggert@cs.ucla.edu>
9221
9222         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
9223
9224 2006-11-26  Bruno Haible  <bruno@clisp.org>
9225
9226         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9227         noinst_LTLIBRARIES.
9228
9229 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
9230             Bruno Haible  <bruno@clisp.org>
9231
9232         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
9233         if compiling with "gcc -ansi".
9234
9235 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
9236
9237         Fix some incompatibilities with gcc -ansi -pedantic.
9238         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
9239         if compiling pedantically with GCC, unless it's C99 or later.
9240         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
9241         it mishandles gcc -ansi -pedantic as well.
9242         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
9243         if gcc -pedantic.
9244         * lib/regexec.c (check_node_accept_bytes): Don't use auto
9245         initializers for struct if -pedantic, unless it's C99 or later.
9246
9247 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
9248
9249         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
9250         Don't close an fd more than once. Identical atimes indicate
9251         success, not failure.
9252
9253 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
9254
9255         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
9256
9257 2006-11-23  Jim Meyering  <jim@meyering.net>
9258
9259         * build-aux/announce-gen: New file.  From coreutils.
9260
9261 2006-11-22  Jim Meyering  <jim@meyering.net>
9262
9263         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
9264         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
9265         (fts_read): Use a temporary to narrow the overused st_size member
9266         before using it in a switch statement.  Reported by Matthew Woehlke.
9267
9268         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
9269         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
9270
9271 2006-11-20  Bruno Haible  <bruno@clisp.org>
9272
9273         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
9274         changequote instead of pairs of brackets.
9275         Reported by Andreas Schwab <schwab@suse.de>.
9276
9277 2006-11-21  Jim Meyering  <jim@meyering.net>
9278
9279         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
9280         so as to remain compatible with older compilers.
9281         Patch from Michael Deutschmann.
9282
9283 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9284
9285         * MODULES.html.sh (File system functions): Add openat.
9286
9287         * lib/openat.h (rpl_fstatat): New macro, if
9288         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
9289         (fstatat): Define to rpl_fstatat under the same conditions,
9290         unless COMPILING_FSTATAT.
9291         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
9292         seems to have the bug.
9293         * lib/fstatat.c: New file.
9294         * modules/openat (Files): Add it.
9295
9296 2006-11-20  Bruno Haible  <bruno@clisp.org>
9297
9298         * Makefile: New file.
9299
9300 2006-11-20  Jim Meyering  <jim@meyering.net>
9301
9302         The beginnings of syntax-related checks for gnulib.
9303         * lib/Makefile: New file.
9304         * lib/t-idcache: New script.  Ensure that the two halves of
9305         idcache.c stay in sync.
9306
9307         * lib/idcache.c: Adjust comments in user- and group- portions to
9308         be more accurate, and to be consistent with one another.
9309
9310 2006-11-20  Jim Meyering  <jim@meyering.net>
9311
9312         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
9313         continue using the flexible array member (thus, this module performs
9314         half as many malloc calls), with the addition that...
9315         (getgroup, getuser): Consistently record a non-match via an empty
9316         "name" string, and map an empty string match to a NULL return value.
9317         * modules/idcache (Depends-on): Re-add flexmember.
9318
9319         * lib/idcache.c (getuser): Remove all uses of the register keyword.
9320         (getuidbyname, getgroup, getgidbyname): Likewise.
9321
9322         Use cleaner syntax: NULL rather than 0.
9323         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
9324
9325 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9326
9327         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
9328         It mishandled the case where the group was missing.
9329         Problem reported by Greg Schafer.
9330         * modules/idcache: Likewise.
9331
9332 2006-11-18  Jim Meyering  <jim@meyering.net>
9333
9334         * check-module (%exempt_header): Add exception for some
9335         conditionally-included headers.
9336
9337         * modules/i-ring (Depends-on): Add verify.
9338         (License): Change to LGPL.
9339
9340 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
9341
9342         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
9343         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
9344         and inttostr.h.  Use snprintf rather than uinttostr, so that
9345         LGPLed code doesn't depend on GPLed.
9346
9347 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
9348
9349         * modules/inline (License): Change from GPL to LGPL.
9350
9351 2006-11-17  Jim Meyering  <jim@meyering.net>
9352
9353         * modules/d-type (License): Switch to LGPL.
9354
9355 2006-11-15  Bruno Haible  <bruno@clisp.org>
9356
9357         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
9358
9359 2006-11-15  Eric Blake  <ebb9@byu.net>
9360
9361         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
9362         the module dependency.
9363
9364 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9365             Bruno Haible  <bruno@clisp.org>
9366
9367         * gnulib-tool (func_create_testdir): Add license consistency check.
9368
9369 2006-11-15  Eric Blake  <ebb9@byu.net>
9370
9371         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
9372         random "(cached)" in configure output.
9373
9374 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9375
9376         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
9377         test for conforming inttypes.h is both announced and cached.
9378
9379         * MODULES.html.sh (seen_modules, seen_files): New variables.
9380         (func_module): Rewrite to use a few less gnulib-tool and sed
9381         invocations.  Avoid a couple of quadratic algorithms for ...
9382         (missed_modules, missed_files): ... these, with ...
9383         (func_append, func_tmpdir): ... these new functions, from
9384         gnulib-tool.  Analogously, install traps for cleanup.
9385
9386         * tests/test-gc.c (main): Remove unused variables.
9387         * tests/test-read-file.c: Include stdlib.h, for 'free'.
9388
9389 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
9390
9391         * modules/inttostr (License): Change to LGPL.
9392
9393 2006-11-14  Eric Blake  <ebb9@byu.net>
9394
9395         * modules/tempname (License): Change to LGPL.
9396
9397 2006-11-14  Eric Blake  <ebb9@byu.net>
9398
9399         * doc/functions.texi (Function Portability): *printf functions on
9400         Cygwin now understand all POSIX size specifiers.
9401
9402 2006-11-14  Bruno Haible  <bruno@clisp.org>
9403
9404         * modules/c-ctype (License): Change to LGPL.
9405
9406 2006-11-12  Bruno Haible  <bruno@clisp.org>
9407
9408         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
9409         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
9410         for GNOME libraries, for which the include files are installed in
9411         subdirectories of $prefix/include.
9412
9413 2006-11-12  Bruno Haible  <bruno@clisp.org>
9414
9415         * m4/lib-link.m4: Require at least autoconf-2.54.
9416         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
9417         name to underscores for the --with option.
9418
9419 2006-11-13  Bruno Haible  <bruno@clisp.org>
9420
9421         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
9422         the tests directory.
9423         Reported by Ralf Wildenhues.
9424
9425 2006-11-13  Bruno Haible  <bruno@clisp.org>
9426
9427         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
9428         (func_emit_initmacro_end): Undo the override here.
9429         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
9430         Works around the famous automake error in coreutils.
9431
9432 2006-11-13  Eric Blake  <ebb9@byu.net>
9433
9434         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
9435         element, not its node.
9436
9437 2006-11-12  Bruno Haible  <bruno@clisp.org>
9438
9439         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
9440         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
9441
9442 2006-11-12  Bruno Haible  <bruno@clisp.org>
9443
9444         * gnulib-tool: New option --local-symlink.
9445         (func_usage): Document it.
9446         (lsymbolic): New variable.
9447         (func_import, func_create_testdir): If --symlink was not specified,
9448         test whether --local-symlink was specified and the file comes from
9449         the local_gnulib_dir.
9450
9451 2006-11-12  Bruno Haible  <bruno@clisp.org>
9452
9453         * gnulib-tool (func_ln): New function.
9454         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
9455
9456 2006-11-12  Bruno Haible  <bruno@clisp.org>
9457
9458         Finish support for source files in subdirectories.
9459         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
9460         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
9461         AUTOMAKE_OPTIONS.
9462         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
9463
9464 2006-11-12  Bruno Haible  <bruno@clisp.org>
9465
9466         * gnulib-tool (func_get_automake_snippet): Synthesize also an
9467         EXTRA_lib_SOURCES augmentation.
9468         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
9469
9470 2006-11-12  Jim Meyering  <jim@meyering.net>
9471
9472         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
9473         file descriptors.  This also averts a failure on systems with
9474         native openat support when a traversed directory lacks "x" access.
9475         * lib/fts_.h: Include "i-ring.h"
9476         (struct FTS) [fts_fd_ring]: New member.
9477         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
9478         (FCHDIR): Add parentheses.
9479         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
9480         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
9481         When descending, rather than simply closing the previous
9482         fts_cwd_fd value, push that file descriptor onto the ring.
9483         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
9484         (fts_open): Initialize the new fd_ring member.
9485         (fts_close): Clear the ring.
9486         (fts_safe_changedir): When possible, use our new fd_ring to skip
9487         the diropen and fstat and dev/ino comparison that would normally
9488         accompany a virtual `chdir ("..")'.
9489
9490         * modules/fts (Depends-on): Add i-ring.
9491         * modules/i-ring: New module.
9492         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
9493         * m4/i-ring.m4: New file.
9494
9495 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9496
9497         * gnulib-tool (func_create_testdir): Fix replacement of
9498         `build-aux' in configure.ac.  Run autotools in gltests
9499         subdirectory.
9500         (func_create_testdir, func_create_megatestdir, test): There is
9501         no need for '--force' in most autotool invocations in a new
9502         tree.  Actually fail the whole test if any of the tools, or the
9503         configure or make stages fail.
9504
9505         Sync from Automake.
9506         * build-aux/gnupload: Revert last change.  Add pointer to upload
9507         instructions of the GNU Maintenance Instructions.
9508         Suggestion by Karl Berry.
9509
9510 2006-11-10  Jim Meyering  <jim@meyering.net>
9511
9512         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
9513
9514 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9515
9516         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
9517         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
9518         (bind_textdomain_codeset) [! ENABLE_NLS]:
9519         Evaluate all the arguments.  That way, callers get compatible behavior
9520         if the arguments have side effects.  Also, it avoids some GCC
9521         diagnostics in some cases; Joel E. Denny reported problems when Bison
9522         was configured with --enable-gcc-warnigs.
9523
9524 2006-11-10  Jim Meyering  <jim@meyering.net>
9525
9526         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
9527         relevant options in CFLAGS (like -O, -fno-inline) are taken into
9528         account.
9529
9530 2006-11-10  Jim Meyering  <jim@meyering.net>
9531
9532         * modules/inline: New file/module.
9533         * modules/xalloc (Files): Remove m4/inline.m4.
9534         (Depends-on): Add inline, instead.
9535         * modules/oset: Likewise.
9536         * modules/list: Likewise.
9537
9538 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9539
9540         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
9541         Problem reported by Matthew Woehlke.
9542
9543 2006-11-09  Bruno Haible  <bruno@clisp.org>
9544
9545         * lib/tempname.c (gen_tempname): Remove variant that invokes
9546         __gen_tempname.
9547         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
9548         __gen_tempname.
9549
9550 2006-11-08  Bruno Haible  <bruno@clisp.org>
9551
9552         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
9553         to 'yes' instead of 'cross-compiling'.
9554
9555 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
9556
9557         * lib/quotearg.h (quotearg_free): New decl.
9558         * lib/quotearg.c (quotearg_free): New function.
9559         (slot0, nslots, slotvec0, slotvec):
9560         Now file-scope so that quotearg_free can get at them.
9561
9562 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9563
9564         Sync from Automake.
9565         * build-aux/gnupload: Add missing 'gnu' to example URL.
9566         Report by Karl Berry.
9567
9568 2006-11-08  Bruno Haible  <bruno@clisp.org>
9569
9570         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
9571         Suggested by Paul Eggert.
9572
9573 2006-11-08  Jim Meyering  <jim@meyering.net>
9574
9575         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
9576         It's already included if !_LIBC.
9577         (fts_safe_changedir): Add a comment.
9578
9579 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9580
9581         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
9582         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
9583         Matthew Woehlke.
9584
9585         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
9586         definitions up, to avoid colliding with change below.
9587         (static_inline) [HAVE_INLINE]: New macro.
9588         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
9589         Provide extern decls when !HAVE_INLINE.  Do not define unless
9590         static_inline is defined, either by us or by xmalloc.c.  Use
9591         static_inline rather than static inline.
9592         (XCALLOC): Optimize sizeof(T) = 1 case.
9593         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
9594
9595 2006-11-07  Bruno Haible  <bruno@clisp.org>
9596
9597         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
9598         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
9599         AC_C_INLINE.
9600         * modules/xalloc (Files): Add m4/inline.m4.
9601
9602 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9603
9604         * README: Fix typo.
9605         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
9606         (Miscellanous Notes): ...from this.
9607
9608 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9609
9610         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
9611         Mention that offsetof should be used instead of sizeof.
9612         From Bruno Haible.
9613
9614 2006-11-07  Bruno Haible  <bruno@clisp.org>
9615
9616         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
9617
9618 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9619
9620         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9621         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
9622         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9623         (gl_tree_add_before, gl_tree_add_after):
9624         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
9625         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
9626         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
9627         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
9628         (gl_linked_add_after, gl_linked_add_at): Likewise.
9629         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
9630         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9631         (gl_tree_add_before, gl_tree_add_after): Likewise.
9632         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
9633         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
9634         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
9635
9636 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9637
9638         * lib/gl_oset.h: Use C comment style, not C++ comment style.
9639
9640 2006-11-06  Bruno Haible  <bruno@clisp.org>
9641
9642         * m4/inline.m4: New file.
9643         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
9644         * modules/list (Files): Add m4/inline.m4.
9645         * modules/oset (Files): Likewise.
9646
9647 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9648
9649         * lib/idcache.c: Include <stddef.h>, for offsetof.
9650         (struct userid.name): Change from char * to a flexible array member.
9651         All uses changed.
9652         * modules/idcache (Depends-on): Add flexmember.
9653
9654         * MODULES.html.sh (Core language properties): New module flexmember.
9655         * modules/flexmember, m4/flexmember.m4: New files.
9656
9657         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
9658         inline functions that are identical with the old xnmalloc_inline,
9659         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
9660         that we can avoid some unnecessary integer multiplications and
9661         divisions in the common case where the element size is known at
9662         compile time.
9663         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
9664         needed.
9665         (xnboundedmalloc): Remove.
9666         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
9667         arguments, for consistency with rest of this header.
9668         (xcharalloc): Rewrite using XNMALLOC.
9669         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
9670         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
9671         versions have been moved to lib/xalloc.h and renamed to be the
9672         non-*_inline versions.
9673         (xmalloc, xrealloc): Implement without reference to the xnmalloc
9674         and xnrealloc functions, since those functions are now inline and
9675         now call us.
9676         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
9677         renaming described above.
9678         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
9679         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
9680         captures the dependency in AC_C_INLINE.
9681
9682         New module canonicalize-lgpl, proposed by Charles Wilson in
9683         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
9684         with a few small changes afterwards.
9685         * MODULES.html.sh (File system functions): New module
9686         canonicalize-lgpl.
9687         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
9688         and canonicalize_file_name.
9689         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
9690         * modules/canonicalize-lgpl: New files.
9691
9692 2006-11-05  Bruno Haible  <bruno@clisp.org>
9693
9694         * gnulib-tool (func_import, func_create_testdir): Create directories
9695         also for files in subdirectories of lib/.
9696
9697 2006-11-05  Bruno Haible  <bruno@clisp.org>
9698
9699         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9700         ANSI C compliant.
9701
9702 2006-11-03  Bruno Haible  <bruno@clisp.org>
9703
9704         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9705         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9706         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9707         (xnboundedmalloc): New inline function.
9708         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9709         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9710         xmalloc.
9711         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9712         xmalloc.
9713         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9714         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9715         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9716         xmalloc.
9717         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9718         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9719         xmalloc.
9720         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9721         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9722         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9723         xmalloc.
9724         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9725         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9726         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9727         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9728         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9729         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9730         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9731
9732 2006-11-03  Bruno Haible  <bruno@clisp.org>
9733
9734         * lib/c-ctype.h [C++]: Define functions without name mangling.
9735         * lib/fwriteerror.h [C++]: Likewise.
9736         * lib/gcd.h [C++]: Likewise.
9737         * lib/linebreak.h [C++]: Likewise.
9738
9739 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9740
9741         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9742         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9743         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9744         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9745         Check for functions and headers just once.
9746         Check for declaration of canonicalize_file_name.
9747         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9748
9749 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9750
9751         * gnulib-tool (func_import): Fix typo in actioncmd.
9752
9753 2006-11-02  Bruno Haible  <bruno@clisp.org>
9754
9755         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9756         newline sequence in the Makefile.am snippet as a space, like "make"
9757         does.
9758         Reported by Roger Persson <perrog@gmail.com>.
9759
9760 2006-11-01  Bruno Haible  <bruno@clisp.org>
9761
9762         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9763         already declared in <string.h>.
9764         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9765
9766 2006-11-01  Bruno Haible  <bruno@clisp.org>
9767
9768         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9769         * lib/strcase.h: Include <string.h>.
9770         (strcasecmp): Define to rpl_strcasecmp here.
9771
9772 2006-11-01  Bruno Haible  <bruno@clisp.org>
9773
9774         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9775
9776 2006-11-01  Eric Blake  <ebb9@byu.net>
9777
9778         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9779
9780         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9781
9782 2006-10-29  Bruno Haible  <bruno@clisp.org>
9783
9784         Make it compile in C++ mode.
9785         * lib/full-write.c (full_rw): Add a cast.
9786
9787 2006-11-01  Bruno Haible  <bruno@clisp.org>
9788
9789         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9790         be POSIX compliant.
9791         Reported by Roger Persson <perrog@gmail.com>.
9792
9793 2006-11-01  Eric Blake  <ebb9@byu.net>
9794
9795         * lib/getopt_.h: Fix comments.
9796
9797 2006-10-31  Eric Blake  <ebb9@byu.net>
9798
9799         * modules/tmpdir (Depends-on): Add sys_stat.
9800         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9801         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9802         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9803         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9804         tempname.
9805
9806 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9807
9808         Avoid some C++ diagnostics reported by Bruno Haible.
9809         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9810         xmalloc.
9811         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9812         (struct slotvec): Move to top level.
9813         (quotearg_n_options): Rewrite to avoid xmalloc.
9814         * lib/xalloc.h (xcharalloc): New function.
9815         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9816         [defined __cplusplus]: Add function template that provides result
9817         type propagation.  This part of the change is from Bruno Haible.
9818
9819 2006-10-29  Bruno Haible  <bruno@clisp.org>
9820
9821         Make it compile in C++ mode.
9822         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9823         * lib/strnlen1.c (strnlen1): Cast memchr result.
9824         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9825         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9826         (create_temp_dir): Rename local variable 'template'.
9827         (compile_csharp_using_sscli): Add cast.
9828         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9829         * lib/findprog.c (find_in_path): Likewise.
9830         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9831         * lib/wait-process.c (register_slave_subprocess): Likewise.
9832
9833 2006-10-22  Bruno Haible  <bruno@clisp.org>
9834
9835         * modules/tsearch: New file.
9836         * lib/tsearch.h: New file.
9837         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9838         * m4/tsearch.m4: New file.
9839         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9840
9841 2006-10-29  Eric Blake  <ebb9@byu.net>
9842
9843         * lib/arcfour.c: Assume config.h.
9844         * lib/arctwo.c: Likewise.
9845         * lib/base64.c: Likewise.
9846         * lib/check-version.c: Likewise.
9847         * lib/crc.c: Likewise.
9848         * lib/des.c: Likewise.
9849         * lib/gc-gnulib.c: Likewise.
9850         * lib/gc-libgcrypt.c: Likewise.
9851         * lib/gc-pbkdf2-sha1.c: Likewise.
9852         * lib/getaddrinfo.c: Likewise.
9853         * lib/getdelim.c: Likewise.
9854         * lib/getline.c: Likewise.
9855         * lib/hmac-md5.c: Likewise.
9856         * lib/hmac-sha1.c: Likewise.
9857         * lib/iconvme.c: Likewise.
9858         * lib/md2.c: Likewise.
9859         * lib/md4.c: Likewise.
9860         * lib/memxor.c: Likewise.
9861         * lib/read-file.c: Likewise.
9862         * lib/readline.c: Likewise.
9863         * lib/rijndael-alg-fst.c: Likewise.
9864         * lib/rijndael-api-fst.c: Likewise.
9865         * lib/xgetdomainname.c: Likewise.
9866
9867 2006-10-28  Eric Blake  <ebb9@byu.net>
9868
9869         * lib/xstrndup.c: Assume config.h.
9870
9871 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9872
9873         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9874         stat-macros.h is now for our own macros, whereas stat_h is for
9875         macros in the <sys/stat.h> name space.
9876         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9877         (STAT_MACROS_H): Remove.
9878         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9879         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9880         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9881         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9882         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9883         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9884         Move these macros to ...
9885         * lib/stat_.h: here.  Don't include stat-macros.h.
9886         * lib/canonicalize.c: Don't include stat-macros.h.
9887         * lib/chown.c: Likewise.
9888         * lib/euidaccess.c: Likewise.
9889         * lib/file-type.c: Likewise.
9890         * lib/filemode.c: Likewise.
9891         * lib/glob.c: Likewise.
9892         * lib/isapipe.c: Likewise.
9893         * lib/lchown.c: Likewise.
9894         * lib/lstat.c: Likewise.
9895         * lib/mkdir-p.c: Likewise.
9896         * lib/rmdir.c: Likewise.
9897         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9898         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9899         unless mkdir isn't declared, to speed up 'configure'.
9900         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9901         would define all the S_* symbols.
9902         * modules/canonicalize (Depends-on):
9903         Depend on sys_stat, not stat-macros.
9904         * modules/chown: Likewise.
9905         * modules/euidaccess: Likewise.
9906         * modules/filemode: Likewise.
9907         * modules/file-type: Likewise.
9908         * modules/glob: Likewise.
9909         * modules/isapipe: Likewise.
9910         * modules/lchown: Likewise.
9911         * modules/lstat: Likewise.
9912         * modules/mkancesdirs: Likewise.
9913         * modules/rmdir: Likewise.
9914         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9915         * modules/modechange: Likewise.
9916         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9917         (configure.ac): Remove gl_STAT_MACROS.
9918         * modules/sys_stat (Depends-on): Remove stat-macros.
9919
9920 2006-10-27  Bruno Haible  <bruno@clisp.org>
9921
9922         * m4/signed.m4: Remove file.
9923         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9924         invocation.
9925         * modules/vasnprintf (Files): Remove m4/signed.m4.
9926
9927 2006-10-27  Bruno Haible  <bruno@clisp.org>
9928
9929         Update to GNU gettext 0.16.
9930         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9931         m4/inttypes-h.m4, m4/signed.m4.
9932         * m4/gettext.m4: Update to GNU gettext 0.16.
9933         * m4/intl.m4: New file, from GNU gettext.
9934         * m4/intldir.m4: New file, from GNU gettext.
9935         * config/srclist.txt: Update
9936
9937 2006-10-27  Eric Blake  <ebb9@byu.net>
9938
9939         * MODULES.html.sh: Document tempname.
9940         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9941         dependencies.
9942         (Files): Move lib/tempname.c...
9943         * modules/tempname: ...to this new module.
9944         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9945         (gl_PREREQ_TEMPNAME): Move...
9946         * m4/tempname.m4: ...to this new file.
9947         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9948         * modules/sys_stat (Depends-on): Add stat-macros.
9949         * lib/stat_.h (includes): Pick up stat macros.
9950         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9951         if stat macros are broken.
9952         * lib/tempname.c (includes): No need to include "stat-macros.h".
9953         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9954         (direxists, __path_search) [!_LIBC]: Don't compile these in
9955         gnulib; the tmpdir module covers that.
9956         * lib/tempname.h: New file.
9957
9958 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9959
9960         * COPYING: Explain how gnulib-tool converts licence headers.
9961         Almost all wording by Eric Blake.
9962
9963 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9964
9965         * lib/mbchar.h (is_basic_table): Make read-only.
9966         * lib/mbchar.c (is_basic_table): Likewise.
9967         Reported by John Darrington.
9968
9969 2006-10-25  Bruno Haible  <bruno@clisp.org>
9970
9971         * lib/progname.h (set_program_name): Undefine before defining.
9972
9973 2006-10-25  Bruno Haible  <bruno@clisp.org>
9974
9975         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9976         false for non-gcc C++ compilers.
9977         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9978
9979 2006-10-24  Bruno Haible  <bruno@clisp.org>
9980
9981         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9982         iconv implementations like Irix iconv.
9983
9984 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9985
9986         * modules/vararrays: New file.
9987         * m4/vararrays.m4: New file, taken from diffutils.
9988         * MODULES.html.sh: New module vararrays.
9989
9990 2006-10-24  Karl Berry  <karl@gnu.org>
9991
9992         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9993         Don't call GNU Unix.
9994
9995 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9996
9997         * users.txt: Add Libtool.
9998
9999         Sync from Libtool:
10000
10001         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
10002
10003         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
10004         to gnulib's policy of including config.h unconditionally.
10005
10006 2006-10-24  Bruno Haible  <bruno@clisp.org>
10007
10008         * modules/wcwidth (Files): Add m4/wint_t.m4.
10009         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
10010         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
10011
10012 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
10013
10014         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
10015         to pacify GCC with some -W flags enabled.  Problem reported by
10016         Bruno Haible.
10017
10018 2006-10-24  Jim Meyering  <jim@meyering.net>
10019
10020         * MODULES.html.sh: Remove uinttostr.  It's not a module.
10021         Reported by Karl Berry.
10022
10023 2006-10-23  Bruno Haible  <bruno@clisp.org>
10024
10025         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
10026
10027 2006-10-24  Bruno Haible  <bruno@clisp.org>
10028
10029         * lib/gl_list.h: Use C comment style, not C++ comment style.
10030
10031 2006-10-23  Eric Blake  <ebb9@byu.net>
10032
10033         * lib/getaddrinfo.c (includes): Add missing include.
10034
10035 2006-10-23  Bruno Haible  <bruno@clisp.org>
10036             Paul Eggert  <eggert@cs.ucla.edu>
10037
10038         Ability to rename obstack_free.
10039         * lib/obstack.h (__obstack_free): New macro. Declare instead of
10040         obstack_free.
10041         (obstack_free): Invoke the __obstack_free macro.
10042         * lib/obstack.c (obstack_free): Use __obstack_free macro.
10043
10044 2006-10-23  Bruno Haible  <bruno@clisp.org>
10045             Paul Eggert  <eggert@cs.ucla.edu>
10046
10047         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
10048         __argc, __argv from the declaration. (They are defined as macros on
10049         mingw.)
10050
10051 2006-10-22  Bruno Haible  <bruno@clisp.org>
10052
10053         * doc/gnulib-intro.texi: New file.
10054         * doc/gnulib.texi: Include it.
10055
10056 2006-10-21  Bruno Haible  <bruno@clisp.org>
10057
10058         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
10059         "Introduction", "Miscellanous Notes", "Particular Modules".
10060
10061 2006-10-21  Bruno Haible  <bruno@clisp.org>
10062
10063         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10064         Change mostlyclean-local rule to avoid sh syntax error from bash
10065         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
10066
10067 2006-10-23  Jim Meyering  <jim@meyering.net>
10068
10069         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
10070         in place of snprintf.
10071
10072         * modules/inttostr (Files): Add lib/uinttostr.c.
10073         * lib/uinttostr.c (inttostr): New file/function.
10074         * lib/inttostr.h (uinttostr): Declare.
10075         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
10076         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10077         Add uinttostr.
10078         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
10079
10080 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
10081
10082         * lib/canonicalize.c (ELOOP): Define if not already defined.
10083         Problem reported by Bruno Haible in
10084         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
10085
10086 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
10087
10088         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
10089         Problem reported by Perry Smith and Ville Laurikari.
10090
10091         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
10092         uses.
10093
10094 2006-10-19  Bruno Haible  <bruno@clisp.org>
10095
10096         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
10097         for mingw.
10098
10099 2006-10-19  Bruno Haible  <bruno@clisp.org>
10100
10101         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
10102         Needed for mingw.
10103
10104 2006-10-19  Bruno Haible  <bruno@clisp.org>
10105
10106         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
10107
10108 2006-10-19  Bruno Haible  <bruno@clisp.org>
10109
10110         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
10111         it.
10112
10113 2006-10-19  Bruno Haible  <bruno@clisp.org>
10114
10115         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
10116         invocation.
10117
10118 2006-10-19  Bruno Haible  <bruno@clisp.org>
10119
10120         * gnulib-tool (func_create_testdir): Don't include ftruncate and
10121         mountlist by default.
10122
10123 2006-10-16  Bruno Haible  <bruno@clisp.org>
10124
10125         * lib/c-strstr.c: Include c-strstr.h.
10126
10127 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
10128
10129         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
10130         in a slash.
10131
10132 2006-10-18  Bruno Haible  <bruno@clisp.org>
10133
10134         * lib/lock.h [C++]: Wrap definitions in extern "C".
10135
10136 2006-10-18  Bruno Haible  <bruno@clisp.org>
10137
10138         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
10139         gl_LIBOBJS list.
10140
10141 2006-10-18  Bruno Haible  <bruno@clisp.org>
10142
10143         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
10144
10145 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
10146
10147         * lib/xstrtol.h: Include gettext.h.
10148         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
10149         Problem reported by Eric Blake.
10150         * modules/xstrtol (Depends-on): Add gettext-h.
10151
10152 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
10153
10154         * lib/strftime.c (advance): New macro.
10155         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
10156         incomplete type, so you can't add 0 to it.  Problem and patch
10157         reported by Eelco Dolstra for dietlibc.
10158
10159 2006-10-18  Jim Meyering  <jim@meyering.net>
10160
10161         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
10162         type for a local, and rename it: s/up/user_proc/.
10163
10164 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
10165
10166         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
10167         READ_UTMP_USER_PROCESS.
10168         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
10169
10170 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
10171
10172         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
10173         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
10174
10175 2006-10-17  Eric Blake  <ebb9@byu.net>
10176
10177         * lib/sigprocmask.c (sigprocmask): Fix typo.
10178
10179         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
10180
10181         * modules/clean-temp (Makefile.am): Don't add to make output...
10182         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
10183         config.h.
10184
10185 2006-10-17  Bruno Haible  <bruno@clisp.org>
10186
10187         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
10188         differently if DEFAULT_TEXT_DOMAIN is set.
10189
10190 2006-10-16  Bruno Haible  <bruno@clisp.org>
10191
10192         * lib/clean-temp.c: Include fwriteerror.h.
10193
10194 2006-10-16  Bruno Haible  <bruno@clisp.org>
10195
10196         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
10197
10198 2006-10-16  Bruno Haible  <bruno@clisp.org>
10199
10200         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
10201         * lib/sigprocmask.h: Include <sys/types.h>.
10202         (sigset_t): Use the system's definition if present.
10203
10204 2006-10-17  Eric Blake  <ebb9@byu.net>
10205
10206         * lib/xvasprintf.c (includes): Assume config.h.
10207         * lib/xasprintf.c (includes): Likewise.
10208
10209 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
10210
10211         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
10212         at least as wide as intmax_t.
10213
10214 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
10215
10216         (Imported from Automake.)
10217         * build-aux/gnupload: Update to version 1.1 of directive file.
10218
10219 2006-10-16  Eric Blake  <ebb9@byu.net>
10220
10221         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
10222         match Automake 1.10a.
10223
10224 2006-10-14  Bruno Haible  <bruno@clisp.org>
10225
10226         * modules/sigprocmask: New file.
10227         * lib/sigprocmask.h: New file.
10228         * lib/sigprocmask.c: New file.
10229         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
10230         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
10231         request sigprocmask.o.
10232         (gl_PREREQ_SIGPROCMASK): New macro.
10233         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
10234         (Depends-on): Add sigprocmask.
10235         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
10236         gt_SIGNALBLOCKING. Test for 'raise' only once.
10237         * lib/fatal-signal.c: Include sigprocmask.h.
10238         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
10239         unblock_fatal_signals): Define always.
10240         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10241         sigprocmask.
10242
10243 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10244
10245         Sync from Automake.
10246         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
10247         which incorrectly sets the mode of an existing destination
10248         directory.  In some cases the unpatched install-sh could do the
10249         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
10250         system.  We hope this is rare in practice, but it's clearly worth
10251         fixing.  Problem reported by Alex Unleashed in
10252         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
10253         Also, don't bother to check for -m bugs unless we're using -m;
10254         suggested by Stepan Kasal.
10255
10256 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10257
10258         Sync from Automake.
10259         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
10260         `-c' flag, so they appear at the same position as in %FASTDEP%
10261         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
10262         which ignores unknown options only after the first non-option.
10263         Bug report against M4 by Nelson H. F. Beebe.
10264
10265 2006-10-13  Jim Meyering  <jim@meyering.net>
10266
10267         Fix a bug in yesterday's change.
10268         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
10269         p->fts_statp->st_dev would be used uninitialized.
10270         Ensures that we always call fts_stat on the very first entry.
10271         Miklos Szeredi reported that find -xdev stopped working.
10272
10273 2006-10-12  Bruno Haible  <bruno@clisp.org>
10274
10275         * gnulib-tool (func_get_automake_snippet): Append an automatically
10276         computed EXTRA_DIST augmentation.
10277         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
10278         * modules/alloca-opt (Makefile.am): Likewise.
10279         * modules/allocsa (Makefile.am): Likewise.
10280         * modules/arcfour (Makefile.am): Likewise.
10281         * modules/arctwo (Makefile.am): Likewise.
10282         * modules/argmatch (Makefile.am): Likewise.
10283         * modules/argz (Makefile.am): Likewise.
10284         * modules/atexit (Makefile.am): Likewise.
10285         * modules/backupfile (Makefile.am): Likewise.
10286         * modules/byteswap (Makefile.am): Likewise.
10287         * modules/c-strtod (Makefile.am): Likewise.
10288         * modules/c-strtold (Makefile.am): Likewise.
10289         * modules/calloc (Makefile.am): Likewise.
10290         * modules/canon-host (Makefile.am): Likewise.
10291         * modules/canonicalize (Makefile.am): Likewise.
10292         * modules/chdir-long (Makefile.am): Likewise.
10293         * modules/chdir-safer (Makefile.am): Likewise.
10294         * modules/check-version (Makefile.am): Likewise.
10295         * modules/chown (Makefile.am): Likewise.
10296         * modules/cloexec (Makefile.am): Likewise.
10297         * modules/close-stream (Makefile.am): Likewise.
10298         * modules/closeout (Makefile.am): Likewise.
10299         * modules/crc (Makefile.am): Likewise.
10300         * modules/csharpexec (Makefile.am): Likewise.
10301         * modules/cycle-check (Makefile.am): Likewise.
10302         * modules/des (Makefile.am): Likewise.
10303         * modules/dev-ino (Makefile.am): Likewise.
10304         * modules/dirfd (Makefile.am): Likewise.
10305         * modules/dirname (Makefile.am): Likewise.
10306         * modules/dup2 (Makefile.am): Likewise.
10307         * modules/eealloc (Makefile.am): Likewise.
10308         * modules/error (Makefile.am): Likewise.
10309         * modules/euidaccess (Makefile.am): Likewise.
10310         * modules/exclude (Makefile.am): Likewise.
10311         * modules/exitfail (Makefile.am): Likewise.
10312         * modules/fcntl-safer (Makefile.am): Likewise.
10313         * modules/fcntl (Makefile.am): Likewise.
10314         * modules/file-type (Makefile.am): Likewise.
10315         * modules/fileblocks (Makefile.am): Likewise.
10316         * modules/filemode (Makefile.am): Likewise.
10317         * modules/filenamecat (Makefile.am): Likewise.
10318         * modules/fnmatch (Makefile.am): Likewise.
10319         * modules/fopen-safer (Makefile.am): Likewise.
10320         * modules/fpending (Makefile.am): Likewise.
10321         * modules/fprintftime (Makefile.am): Likewise.
10322         * modules/free (Makefile.am): Likewise.
10323         * modules/fsusage (Makefile.am): Likewise.
10324         * modules/ftruncate (Makefile.am): Likewise.
10325         * modules/fts (Makefile.am): Likewise.
10326         * modules/gc-arcfour (Makefile.am): Likewise.
10327         * modules/gc-des (Makefile.am): Likewise.
10328         * modules/gc-hmac-md5 (Makefile.am): Likewise.
10329         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
10330         * modules/gc-md4 (Makefile.am): Likewise.
10331         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10332         * modules/gc-sha1 (Makefile.am): Likewise.
10333         * modules/gc (Makefile.am): Likewise.
10334         * modules/getaddrinfo (Makefile.am): Likewise.
10335         * modules/getcwd (Makefile.am): Likewise.
10336         * modules/getdelim (Makefile.am): Likewise.
10337         * modules/getdomainname (Makefile.am): Likewise.
10338         * modules/getgroups (Makefile.am): Likewise.
10339         * modules/gethostname (Makefile.am): Likewise.
10340         * modules/gethrxtime (Makefile.am): Likewise.
10341         * modules/getline (Makefile.am): Likewise.
10342         * modules/getloadavg (Makefile.am): Likewise.
10343         * modules/getlogin_r (Makefile.am): Likewise.
10344         * modules/getndelim2 (Makefile.am): Likewise.
10345         * modules/getopt (Makefile.am): Likewise.
10346         * modules/getpagesize (Makefile.am): Likewise.
10347         * modules/getpass-gnu (Makefile.am): Likewise.
10348         * modules/getpass (Makefile.am): Likewise.
10349         * modules/getsubopt (Makefile.am): Likewise.
10350         * modules/gettime (Makefile.am): Likewise.
10351         * modules/gettimeofday (Makefile.am): Likewise.
10352         * modules/getugroups (Makefile.am): Likewise.
10353         * modules/getusershell (Makefile.am): Likewise.
10354         * modules/glob (Makefile.am): Likewise.
10355         * modules/group-member (Makefile.am): Likewise.
10356         * modules/hard-locale (Makefile.am): Likewise.
10357         * modules/hash (Makefile.am): Likewise.
10358         * modules/hmac-md5 (Makefile.am): Likewise.
10359         * modules/hmac-sha1 (Makefile.am): Likewise.
10360         * modules/human (Makefile.am): Likewise.
10361         * modules/idcache (Makefile.am): Likewise.
10362         * modules/imaxabs (Makefile.am): Likewise.
10363         * modules/imaxdiv (Makefile.am): Likewise.
10364         * modules/inet_ntop (Makefile.am): Likewise.
10365         * modules/inet_pton (Makefile.am): Likewise.
10366         * modules/intprops (Makefile.am): Likewise.
10367         * modules/inttostr (Makefile.am): Likewise.
10368         * modules/inttypes (Makefile.am): Likewise.
10369         * modules/isapipe (Makefile.am): Likewise.
10370         * modules/javaversion (Makefile.am): Likewise.
10371         * modules/lchmod (Makefile.am): Likewise.
10372         * modules/lchown (Makefile.am): Likewise.
10373         * modules/localcharset (Makefile.am): Likewise.
10374         * modules/long-options (Makefile.am): Likewise.
10375         * modules/lstat (Makefile.am): Likewise.
10376         * modules/malloc (Makefile.am): Likewise.
10377         * modules/mathl (Makefile.am): Likewise.
10378         * modules/mbchar (Makefile.am): Likewise.
10379         * modules/md2 (Makefile.am): Likewise.
10380         * modules/md4 (Makefile.am): Likewise.
10381         * modules/md5 (Makefile.am): Likewise.
10382         * modules/memcasecmp (Makefile.am): Likewise.
10383         * modules/memchr (Makefile.am): Likewise.
10384         * modules/memcmp (Makefile.am): Likewise.
10385         * modules/memcoll (Makefile.am): Likewise.
10386         * modules/memcpy (Makefile.am): Likewise.
10387         * modules/memmem (Makefile.am): Likewise.
10388         * modules/memmove (Makefile.am): Likewise.
10389         * modules/mempcpy (Makefile.am): Likewise.
10390         * modules/memrchr (Makefile.am): Likewise.
10391         * modules/memset (Makefile.am): Likewise.
10392         * modules/memxor (Makefile.am): Likewise.
10393         * modules/mkancesdirs (Makefile.am): Likewise.
10394         * modules/mkdir-p (Makefile.am): Likewise.
10395         * modules/mkdir (Makefile.am): Likewise.
10396         * modules/mkdtemp (Makefile.am): Likewise.
10397         * modules/mkstemp (Makefile.am): Likewise.
10398         * modules/mktime (Makefile.am): Likewise.
10399         * modules/modechange (Makefile.am): Likewise.
10400         * modules/mountlist (Makefile.am): Likewise.
10401         * modules/nanosleep (Makefile.am): Likewise.
10402         * modules/obstack (Makefile.am): Likewise.
10403         * modules/openat (Makefile.am): Likewise.
10404         * modules/pagealign_alloc (Makefile.am): Likewise.
10405         * modules/pathmax (Makefile.am): Likewise.
10406         * modules/physmem (Makefile.am): Likewise.
10407         * modules/poll (Makefile.am): Likewise.
10408         * modules/posixtm (Makefile.am): Likewise.
10409         * modules/posixver (Makefile.am): Likewise.
10410         * modules/putenv (Makefile.am): Likewise.
10411         * modules/quote (Makefile.am): Likewise.
10412         * modules/quotearg (Makefile.am): Likewise.
10413         * modules/raise (Makefile.am): Likewise.
10414         * modules/read-file (Makefile.am): Likewise.
10415         * modules/readline (Makefile.am): Likewise.
10416         * modules/readlink (Makefile.am): Likewise.
10417         * modules/readtokens (Makefile.am): Likewise.
10418         * modules/readutmp (Makefile.am): Likewise.
10419         * modules/realloc (Makefile.am): Likewise.
10420         * modules/regex (Makefile.am): Likewise.
10421         * modules/rename-dest-slash (Makefile.am): Likewise.
10422         * modules/rename (Makefile.am): Likewise.
10423         * modules/rijndael (Makefile.am): Likewise.
10424         * modules/rmdir (Makefile.am): Likewise.
10425         * modules/rpmatch (Makefile.am): Likewise.
10426         * modules/safe-read (Makefile.am): Likewise.
10427         * modules/safe-write (Makefile.am): Likewise.
10428         * modules/same-inode (Makefile.am): Likewise.
10429         * modules/same (Makefile.am): Likewise.
10430         * modules/save-cwd (Makefile.am): Likewise.
10431         * modules/savedir (Makefile.am): Likewise.
10432         * modules/setenv (Makefile.am): Likewise.
10433         * modules/settime (Makefile.am): Likewise.
10434         * modules/sha1 (Makefile.am): Likewise.
10435         * modules/sig2str (Makefile.am): Likewise.
10436         * modules/snprintf (Makefile.am): Likewise.
10437         * modules/stat-macros (Makefile.am): Likewise.
10438         * modules/stat-time (Makefile.am): Likewise.
10439         * modules/stdbool (Makefile.am): Likewise.
10440         * modules/stdint (Makefile.am): Likewise.
10441         * modules/stdlib-safer (Makefile.am): Likewise.
10442         * modules/stpcpy (Makefile.am): Likewise.
10443         * modules/stpncpy (Makefile.am): Likewise.
10444         * modules/strcase (Makefile.am): Likewise.
10445         * modules/strcasestr (Makefile.am): Likewise.
10446         * modules/strchrnul (Makefile.am): Likewise.
10447         * modules/strcspn (Makefile.am): Likewise.
10448         * modules/strdup (Makefile.am): Likewise.
10449         * modules/strerror (Makefile.am): Likewise.
10450         * modules/strftime (Makefile.am): Likewise.
10451         * modules/strndup (Makefile.am): Likewise.
10452         * modules/strnlen (Makefile.am): Likewise.
10453         * modules/strpbrk (Makefile.am): Likewise.
10454         * modules/strsep (Makefile.am): Likewise.
10455         * modules/strstr (Makefile.am): Likewise.
10456         * modules/strtod (Makefile.am): Likewise.
10457         * modules/strtoimax (Makefile.am): Likewise.
10458         * modules/strtok_r (Makefile.am): Likewise.
10459         * modules/strtol (Makefile.am): Likewise.
10460         * modules/strtoll (Makefile.am): Likewise.
10461         * modules/strtoul (Makefile.am): Likewise.
10462         * modules/strtoull (Makefile.am): Likewise.
10463         * modules/strtoumax (Makefile.am): Likewise.
10464         * modules/strverscmp (Makefile.am): Likewise.
10465         * modules/sys_socket (Makefile.am): Likewise.
10466         * modules/sys_stat (Makefile.am): Likewise.
10467         * modules/sysexits (Makefile.am): Likewise.
10468         * modules/time_r (Makefile.am): Likewise.
10469         * modules/timegm (Makefile.am): Likewise.
10470         * modules/timespec (Makefile.am): Likewise.
10471         * modules/tmpfile-safer (Makefile.am): Likewise.
10472         * modules/trim (Makefile.am): Likewise.
10473         * modules/unistd-safer (Makefile.am): Likewise.
10474         * modules/unlinkdir (Makefile.am): Likewise.
10475         * modules/unlocked-io (Makefile.am): Likewise.
10476         * modules/userspec (Makefile.am): Likewise.
10477         * modules/utime (Makefile.am): Likewise.
10478         * modules/utimecmp (Makefile.am): Likewise.
10479         * modules/utimens (Makefile.am): Likewise.
10480         * modules/vasnprintf (Makefile.am): Likewise.
10481         * modules/vasprintf (Makefile.am): Likewise.
10482         * modules/vsnprintf (Makefile.am): Likewise.
10483         * modules/xalloc (Makefile.am): Likewise.
10484         * modules/xgetcwd (Makefile.am): Likewise.
10485         * modules/xnanosleep (Makefile.am): Likewise.
10486         * modules/xreadlink (Makefile.am): Likewise.
10487         * modules/xstrtod (Makefile.am): Likewise.
10488         * modules/xstrtol (Makefile.am): Likewise.
10489         * modules/xstrtold (Makefile.am): Likewise.
10490         * modules/yesno (Makefile.am): Likewise.
10491         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
10492
10493 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10494
10495         * modules/error (Makefile.am): Distribute files through
10496         EXTRA_DIST, not lib_SOURCES.
10497
10498 2006-10-12  Eric Blake  <ebb9@byu.net>
10499
10500         * modules/error (Makefile.am): Distribute files in /lib.
10501         * modules/obstack (Makefile.am): Likewise.
10502
10503 2006-10-12  Bruno Haible  <bruno@clisp.org>
10504
10505         * modules/acl (Makefile.am): Distribute all files in lib/ through
10506         EXTRA_DIST.
10507         * modules/arcfour (Makefile.am): Likewise.
10508         * modules/arctwo (Makefile.am): Likewise.
10509         * modules/argmatch (Makefile.am): Likewise.
10510         * modules/argz (Makefile.am): Likewise.
10511         * modules/atexit (Makefile.am): Likewise.
10512         * modules/backupfile (Makefile.am): Likewise.
10513         * modules/c-strtod (Makefile.am): Likewise.
10514         * modules/c-strtold (Makefile.am): Likewise.
10515         * modules/calloc (Makefile.am): Likewise.
10516         * modules/canon-host (Makefile.am): Likewise.
10517         * modules/canonicalize (Makefile.am): Likewise.
10518         * modules/chdir-long (Makefile.am): Likewise.
10519         * modules/chdir-safer (Makefile.am): Likewise.
10520         * modules/check-version (Makefile.am): Likewise.
10521         * modules/chown (Makefile.am): Likewise.
10522         * modules/cloexec (Makefile.am): Likewise.
10523         * modules/close-stream (Makefile.am): Likewise.
10524         * modules/closeout (Makefile.am): Likewise.
10525         * modules/crc (Makefile.am): Likewise.
10526         * modules/cycle-check (Makefile.am): Likewise.
10527         * modules/des (Makefile.am): Likewise.
10528         * modules/dirfd (Makefile.am): Likewise.
10529         * modules/dirname (Makefile.am): Likewise.
10530         * modules/dup2 (Makefile.am): Likewise.
10531         * modules/euidaccess (Makefile.am): Likewise.
10532         * modules/exclude (Makefile.am): Likewise.
10533         * modules/exitfail (Makefile.am): Likewise.
10534         * modules/fcntl-safer (Makefile.am): Likewise.
10535         * modules/file-type (Makefile.am): Likewise.
10536         * modules/fileblocks (Makefile.am): Likewise.
10537         * modules/filemode (Makefile.am): Likewise.
10538         * modules/filenamecat (Makefile.am): Likewise.
10539         * modules/fnmatch (Makefile.am): Likewise.
10540         * modules/fopen-safer (Makefile.am): Likewise.
10541         * modules/fpending (Makefile.am): Likewise.
10542         * modules/fprintftime (Makefile.am): Likewise.
10543         * modules/free (Makefile.am): Likewise.
10544         * modules/fsusage (Makefile.am): Likewise.
10545         * modules/ftruncate (Makefile.am): Likewise.
10546         * modules/fts (Makefile.am): Likewise.
10547         * modules/gc (Makefile.am): Likewise.
10548         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10549         * modules/getaddrinfo (Makefile.am): Likewise.
10550         * modules/getcwd (Makefile.am): Likewise.
10551         * modules/getdelim (Makefile.am): Likewise.
10552         * modules/getdomainname (Makefile.am): Likewise.
10553         * modules/getgroups (Makefile.am): Likewise.
10554         * modules/gethostname (Makefile.am): Likewise.
10555         * modules/gethrxtime (Makefile.am): Likewise.
10556         * modules/getline (Makefile.am): Likewise.
10557         * modules/getloadavg (Makefile.am): Likewise.
10558         * modules/getlogin_r (Makefile.am): Likewise.
10559         * modules/getopt (Makefile.am): Likewise.
10560         * modules/getpass (Makefile.am): Likewise.
10561         * modules/getpass-gnu (Makefile.am): Likewise.
10562         * modules/getsubopt (Makefile.am): Likewise.
10563         * modules/gettime (Makefile.am): Likewise.
10564         * modules/gettimeofday (Makefile.am): Likewise.
10565         * modules/getugroups (Makefile.am): Likewise.
10566         * modules/getusershell (Makefile.am): Likewise.
10567         * modules/glob (Makefile.am): Likewise.
10568         * modules/group-member (Makefile.am): Likewise.
10569         * modules/hard-locale (Makefile.am): Likewise.
10570         * modules/hash (Makefile.am): Likewise.
10571         * modules/hmac-md5 (Makefile.am): Likewise.
10572         * modules/hmac-sha1 (Makefile.am): Likewise.
10573         * modules/human (Makefile.am): Likewise.
10574         * modules/idcache (Makefile.am): Likewise.
10575         * modules/imaxabs (Makefile.am): Likewise.
10576         * modules/imaxdiv (Makefile.am): Likewise.
10577         * modules/inet_ntop (Makefile.am): Likewise.
10578         * modules/inet_pton (Makefile.am): Likewise.
10579         * modules/inttostr (Makefile.am): Likewise.
10580         * modules/isapipe (Makefile.am): Likewise.
10581         * modules/lchown (Makefile.am): Likewise.
10582         * modules/long-options (Makefile.am): Likewise.
10583         * modules/lstat (Makefile.am): Likewise.
10584         * modules/malloc (Makefile.am): Likewise.
10585         * modules/mathl (Makefile.am): Likewise.
10586         * modules/mbchar (Makefile.am): Likewise.
10587         * modules/md2 (Makefile.am): Likewise.
10588         * modules/md4 (Makefile.am): Likewise.
10589         * modules/md5 (Makefile.am): Likewise.
10590         * modules/memcasecmp (Makefile.am): Likewise.
10591         * modules/memchr (Makefile.am): Likewise.
10592         * modules/memcmp (Makefile.am): Likewise.
10593         * modules/memcoll (Makefile.am): Likewise.
10594         * modules/memcpy (Makefile.am): Likewise.
10595         * modules/memmem (Makefile.am): Likewise.
10596         * modules/memmove (Makefile.am): Likewise.
10597         * modules/mempcpy (Makefile.am): Likewise.
10598         * modules/memrchr (Makefile.am): Likewise.
10599         * modules/memset (Makefile.am): Likewise.
10600         * modules/memxor (Makefile.am): Likewise.
10601         * modules/mkancesdirs (Makefile.am): Likewise.
10602         * modules/mkdir (Makefile.am): Likewise.
10603         * modules/mkdir-p (Makefile.am): Likewise.
10604         * modules/mkdtemp (Makefile.am): Likewise.
10605         * modules/mkstemp (Makefile.am): Likewise.
10606         * modules/mktime (Makefile.am): Likewise.
10607         * modules/modechange (Makefile.am): Likewise.
10608         * modules/mountlist (Makefile.am): Likewise.
10609         * modules/nanosleep (Makefile.am): Likewise.
10610         * modules/openat (Makefile.am): Likewise.
10611         * modules/pagealign_alloc (Makefile.am): Likewise.
10612         * modules/physmem (Makefile.am): Likewise.
10613         * modules/poll (Makefile.am): Likewise.
10614         * modules/posixtm (Makefile.am): Likewise.
10615         * modules/posixver (Makefile.am): Likewise.
10616         * modules/putenv (Makefile.am): Likewise.
10617         * modules/quote (Makefile.am): Likewise.
10618         * modules/quotearg (Makefile.am): Likewise.
10619         * modules/raise (Makefile.am): Likewise.
10620         * modules/read-file (Makefile.am): Likewise.
10621         * modules/readline (Makefile.am): Likewise.
10622         * modules/readlink (Makefile.am): Likewise.
10623         * modules/readtokens (Makefile.am): Likewise.
10624         * modules/readutmp (Makefile.am): Likewise.
10625         * modules/realloc (Makefile.am): Likewise.
10626         * modules/regex (Makefile.am): Likewise.
10627         * modules/rename (Makefile.am): Likewise.
10628         * modules/rename-dest-slash (Makefile.am): Likewise.
10629         * modules/rijndael (Makefile.am): Likewise.
10630         * modules/rmdir (Makefile.am): Likewise.
10631         * modules/rpmatch (Makefile.am): Likewise.
10632         * modules/safe-read (Makefile.am): Likewise.
10633         * modules/safe-write (Makefile.am): Likewise.
10634         * modules/same (Makefile.am): Likewise.
10635         * modules/save-cwd (Makefile.am): Likewise.
10636         * modules/savedir (Makefile.am): Likewise.
10637         * modules/setenv (Makefile.am): Likewise.
10638         * modules/settime (Makefile.am): Likewise.
10639         * modules/sha1 (Makefile.am): Likewise.
10640         * modules/sig2str (Makefile.am): Likewise.
10641         * modules/snprintf (Makefile.am): Likewise.
10642         * modules/stdlib-safer (Makefile.am): Likewise.
10643         * modules/stpcpy (Makefile.am): Likewise.
10644         * modules/stpncpy (Makefile.am): Likewise.
10645         * modules/strcase (Makefile.am): Likewise.
10646         * modules/strcasestr (Makefile.am): Likewise.
10647         * modules/strchrnul (Makefile.am): Likewise.
10648         * modules/strcspn (Makefile.am): Likewise.
10649         * modules/strdup (Makefile.am): Likewise.
10650         * modules/strerror (Makefile.am): Likewise.
10651         * modules/strftime (Makefile.am): Likewise.
10652         * modules/strndup (Makefile.am): Likewise.
10653         * modules/strnlen (Makefile.am): Likewise.
10654         * modules/strpbrk (Makefile.am): Likewise.
10655         * modules/strsep (Makefile.am): Likewise.
10656         * modules/strstr (Makefile.am): Likewise.
10657         * modules/strtod (Makefile.am): Likewise.
10658         * modules/strtoimax (Makefile.am): Likewise.
10659         * modules/strtok_r (Makefile.am): Likewise.
10660         * modules/strtol (Makefile.am): Likewise.
10661         * modules/strtoll (Makefile.am): Likewise.
10662         * modules/strtoul (Makefile.am): Likewise.
10663         * modules/strtoull (Makefile.am): Likewise.
10664         * modules/strtoumax (Makefile.am): Likewise.
10665         * modules/strverscmp (Makefile.am): Likewise.
10666         * modules/time_r (Makefile.am): Likewise.
10667         * modules/timegm (Makefile.am): Likewise.
10668         * modules/tmpfile-safer (Makefile.am): Likewise.
10669         * modules/unistd-safer (Makefile.am): Likewise.
10670         * modules/unlinkdir (Makefile.am): Likewise.
10671         * modules/userspec (Makefile.am): Likewise.
10672         * modules/utime (Makefile.am): Likewise.
10673         * modules/utimecmp (Makefile.am): Likewise.
10674         * modules/utimens (Makefile.am): Likewise.
10675         * modules/vasnprintf (Makefile.am): Likewise.
10676         * modules/vasprintf (Makefile.am): Likewise.
10677         * modules/vsnprintf (Makefile.am): Likewise.
10678         * modules/xalloc (Makefile.am): Likewise.
10679         * modules/xgetcwd (Makefile.am): Likewise.
10680         * modules/xnanosleep (Makefile.am): Likewise.
10681         * modules/xreadlink (Makefile.am): Likewise.
10682         * modules/xstrtod (Makefile.am): Likewise.
10683         * modules/xstrtol (Makefile.am): Likewise.
10684         * modules/xstrtold (Makefile.am): Likewise.
10685         * modules/yesno (Makefile.am): Likewise.
10686
10687 2006-10-12  Jim Meyering  <jim@meyering.net>
10688
10689         * m4/getloadavg.m4: Revert the change below.
10690
10691         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
10692         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
10693         fail with a symlink, which is what coreutils' ./bootstrap now
10694         creates by default.
10695
10696 2006-10-12  Bruno Haible  <bruno@clisp.org>
10697
10698         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
10699         mingw.
10700         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10701         MSVC and mingw explicitly.
10702
10703 2006-10-11  Simon Josefsson  <jas@extundo.com>
10704             Bruno Haible  <bruno@clisp.org>
10705
10706         Add support for multiple gnulib-tool invocations in the scope of a
10707         single configure.ac file.
10708         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10709         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10710         with the same contents as the _LIBADD variable.
10711         (func_emit_initmacro_start, func_emit_initmacro_end,
10712         func_emit_initmacro_done): New functions.
10713         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10714         gl_LIBOBJS and gl_LTLIBOBJS.
10715
10716 2006-10-11  Bruno Haible  <bruno@clisp.org>
10717
10718         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10719         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10720         autoreconf. Instead, invoke autopoint explicitly but move back the
10721         *.m4 files from gnulib.
10722
10723 2006-10-11  Bruno Haible  <bruno@clisp.org>
10724
10725         * gnulib-tool (func_usage): Make module names after --create-testdir
10726         optional.
10727         (func_create_testdir): If no module was specified, use nearly all
10728         modules.
10729
10730 2006-10-12  Jim Meyering  <jim@meyering.net>
10731
10732         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10733         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10734         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10735         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10736         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10737         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10738         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10739         (fts_set_stat_required): New function.
10740         (fts_open): Defer the calls to fts_stat, if possible or requested.
10741         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10742         into fts_stat itself.
10743         (fts_read): Perform any required (deferred) fts_stat call.
10744         (fts_build): Likewise, for the directory we're about to open and read.
10745         In the readdir loop, carefully decide whether each entry will require
10746         an eventual call to fts_stat, using dirent.d_type info if available.
10747         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10748         a command line argument into this function.  Update all callers.
10749         Map a return value of FTS_DOT to FTS_D for a command line argument.
10750         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10751         Thanks to Miklos Szeredi for his tenacity and for the initial
10752         bug report about "find" failing on a FUSE-based file system.
10753
10754         * lib/fts.c (fts_open): Use consistent indentation.
10755
10756 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10757
10758         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10759         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10760         reported by Jim Meyering.  All uses of cache variables renamed
10761         to match Autoconf's.
10762         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10763         the other one.
10764
10765         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10766         Fix misspelling in diagnostic.
10767
10768 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10769
10770         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10771         defined.  Problem reported by Matthew Woehlke.
10772
10773         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10774         Add support for Tandem NonStop R series.
10775         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10776         Use new macro.
10777
10778         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10779         (has_trailing_slash): Omit size arg; all callers changed.
10780         Omit 'inline', since it doesn't help performance and we'd
10781         need to configure it.
10782         Don't count //, ///, etc. as having a trailing slash.
10783         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10784         (rpl_rename_dest_slash): On failure, use rename's errno rather
10785         than (in some cases) an incorrect or junk errno.
10786         Simplify code by removing need to compute length; this does
10787         cause it to make two passes instead of one over the file name,
10788         but it's worth it.
10789
10790         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10791         change, since Autoconf's version may no longer be appropriate now
10792         that we are using CVS Autoconf's version.  Add support for Tandem.
10793
10794 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10795             Bruno Haible  <bruno@clisp.org>
10796
10797         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10798         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10799         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10800         gl_AC_TYPE_LONG_LONG.
10801
10802         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10803         instead of HAVE_LONG_LONG.
10804         * lib/printf-args.c (printf_fetchargs): Likewise.
10805         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10806         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10807         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10808         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10809         gl_AC_TYPE_LONG_LONG.
10810
10811 2006-10-11  Bruno Haible  <bruno@clisp.org>
10812
10813         * m4/longlong.m4: Add comments.
10814         * m4/ulonglong.m4: Likewise.
10815
10816 2006-10-10  Bruno Haible  <bruno@clisp.org>
10817
10818         Make it possible to #define stpcpy, strdup to aliases.
10819         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10820         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10821
10822 2006-10-10  Bruno Haible  <bruno@clisp.org>
10823
10824         Make it possible to #define gcd to an alias.
10825         * lib/gcd.c: Include config.h.
10826
10827 2006-10-10  Bruno Haible  <bruno@clisp.org>
10828
10829         Make it possible to #define c_isascii to an alias.
10830         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10831         defined. Undefine the macros before defining them, to avoid gcc
10832         warnings.
10833         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10834         define NO_C_CTYPE_MACROS early.
10835
10836 2006-10-10  Bruno Haible  <bruno@clisp.org>
10837
10838         Make it possible to #define set_program_name to an alias.
10839         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10840         ENABLE_RELOCATABLE early.
10841
10842 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10843
10844         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10845         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10846         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10847         More generally, don't assume that 64-bit signed int is available
10848         if unsigned int is, and vice versa.
10849         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10850         unsigned symbols, not on their signed counterparts.
10851         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10852         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10853         (UINT64_C, UINTMAX_C):
10854         Likewise.
10855         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10856         unsigned counterparts.
10857         (Have_long_long, Unsigned): New macros.
10858         (Int): Renamed from INT.
10859         (strtoimax): Use the new macros.
10860         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10861         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10862         * modules/inttypes (inttypes.h): Substitute
10863         HAVE_UNSIGNED_LONG_LONG_INT.
10864         * modules/stdint (stdint.h): Likewise.
10865         (Files): Add m4/ulonglong.m4.
10866
10867 2006-10-10  Bruno Haible  <bruno@clisp.org>
10868
10869         Fix a gcc -Wshadow warning.
10870         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10871         to 'bucket'.
10872         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10873         gl_linked_indexof_from_to): Likewise.
10874         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10875         Likewise.
10876         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10877         Likewise.
10878         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10879         Reported by Eric Blake.
10880
10881 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10882
10883         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10884         for NetBSD.  Problem reported by Bruno Haible.
10885
10886 2006-10-09  Jim Meyering  <jim@meyering.net>
10887
10888         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10889         Patch from Bruno Haible.
10890
10891 2006-10-09  Jim Meyering  <jim@meyering.net>
10892
10893         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10894         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10895         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10896
10897 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10898
10899         Don't include <config.h> twice; this doesn't work in some cases,
10900         e.g., when config.h has "#define intmax_t long long int" and
10901         we include <config.h>, <inttypes.h>, <config.h> in that order.
10902         Problem reported by Matthew Woehlke in:
10903         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10904         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10905         * lib/fts-cycle.c: Don't include config.h.
10906         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10907         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10908         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10909         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10910         inttypes.h.
10911         * lib/xstrtoumax.c: Likewise.
10912         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10913         __strtol and the like, so that this module is more like its siblings.
10914         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10915         Remove; no longer needed now that we assume gnulib inttypes.h.
10916
10917 2006-10-08  Bruno Haible  <bruno@clisp.org>
10918
10919         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10920         option.
10921
10922 2006-10-07  Jim Meyering  <jim@meyering.net>
10923
10924         * modules/inttypes (inttypes.h): Revert what seems to have been
10925         an inadvertent part of today's change: use "|", not "/" in the
10926         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10927
10928 2006-10-07  Bruno Haible  <bruno@clisp.org>
10929
10930         * modules/sublist: New file.
10931
10932 2006-10-07  Bruno Haible  <bruno@clisp.org>
10933
10934         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10935         * modules/argz (argz.h): Likewise.
10936         * modules/arpa_inet (arpa/inet.h): Likewise.
10937         * modules/byteswap (byteswap.h): Likewise.
10938         * modules/configmake (configmake.h): Likewise.
10939         * modules/fcntl (fcntl.h): Likewise.
10940         * modules/fnmatch (fnmatch.h): Likewise.
10941         * modules/getopt (getopt.h): Likewise.
10942         * modules/glob (glob.h): Likewise.
10943         * modules/inttypes (inttypes.h): Likewise.
10944         * modules/netinet_in (netinet/in.h): Likewise.
10945         * modules/poll (poll.h): Likewise.
10946         * modules/stdbool (stdbool.h): Likewise.
10947         * modules/stdint (stdint.h): Likewise.
10948         * modules/sys_select (sys/select.h): Likewise.
10949         * modules/sys_socket (sys/socket.h): Likewise.
10950         * modules/sys_stat (sys/stat.h): Likewise.
10951         * modules/sysexits (sysexits.h): Likewise.
10952         * modules/unistd (unistd.h): Likewise.
10953         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10954         Add a "DO NOT EDIT" comment to the generated file.
10955         (func_import): Likewise for gnulib-comp.m4.
10956
10957 2006-10-07  Bruno Haible  <bruno@clisp.org>
10958
10959         * lib/gl_sublist.h: New file.
10960         * lib/gl_sublist.c: New file.
10961
10962 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10963
10964         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10965         name (relative to the original working directory) and the file
10966         name component (relative to the temporary working directory).  All
10967         callers changed.
10968         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10969         * lib/mkdir-p.c (make_dir_parents): Likewise.
10970         * lib/mkdir-p.h (make_dir_parents): Likewise.
10971
10972 2006-10-06  Eric Blake  <ebb9@byu.net>
10973
10974         Define several macros for use by the clean-temp module.
10975         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10976         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10977         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10978
10979         * lib/clean-temp.h (close_stream_temp): New declaration.
10980         * lib/clean-temp.c (includes): Pull in headers according to what
10981         other modules are in use.
10982         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10983
10984 2006-10-06  Bruno Haible  <bruno@clisp.org>
10985
10986         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10987         instead of fopen, fwriteerror.
10988
10989 2006-10-06  Bruno Haible  <bruno@clisp.org>
10990
10991         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10992         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10993         int.
10994         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10995         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10996         Return an error indicator.
10997         Suggested by Eric Blake.
10998
10999 2006-10-06  Bruno Haible  <bruno@clisp.org>
11000
11001         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
11002         Reported by Eric Blake.
11003
11004 2006-10-06  Bruno Haible  <bruno@clisp.org>
11005
11006         * modules/closeout (Description): Mention stderr too.
11007
11008 2006-10-06  Bruno Haible  <bruno@clisp.org>
11009         and Paul Eggert  <eggert@cs.ucla.edu>
11010
11011         * lib/closeout.c (close_stdout): Also close stderr.
11012         * lib/closeout.h: Update comment.
11013
11014 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11015
11016         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
11017         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
11018         * lib/dirchownmod.c: Include lchown.h.
11019         * lib/lchown.c: Don't include files that lchown.h now includes.
11020         Don't declare chown, since lchown.h now does that.
11021         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
11022         (lchown): Define to rpl_chown if lchown is declared but
11023         does not exist.  Declare using a prototype if lchown is not
11024         declared.  Add a copyright notice.
11025         * lib/mkstemp.h: Include <unistd.h>.
11026         * lib/openat.c: Include lchown.h.
11027
11028         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
11029         we now test for that separately.
11030         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
11031         rather than O_NOFOLLOW, when testing whether it's possible to
11032         avoid a race condition reliably.
11033         * lib/savewd.c (savewd_chdir): Likewise.
11034
11035         Remove macros that are no longer needed now that stdint.h is
11036         reliable.
11037         * lib/fsusage.c (UINTMAX_MAX): Remove.
11038         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
11039         * lib/utimecmp.c (SIZE_MAX): Remove.
11040
11041         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
11042
11043         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
11044         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
11045         O_NOATIME works.
11046
11047 2006-10-05  Bruno Haible  <bruno@clisp.org>
11048
11049         * lib/gl_list.h (gl_sortedlist_search_from_to,
11050         gl_sortedlist_indexof_from_to): New declarations.
11051         (gl_list_implementation): New fields sortedlist_search_from_to,
11052         sortedlist_indexof_from_to.
11053         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
11054         inline functions.
11055         * lib/gl_list.c (gl_sortedlist_search_from_to,
11056         gl_sortedlist_indexof_from_to): New functions.
11057         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
11058         function.
11059         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
11060         (gl_array_sortedlist_search_from_to): New function.
11061         (gl_array_list_implementation): Update.
11062         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
11063         function.
11064         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
11065         (gl_carray_sortedlist_search_from_to): New function.
11066         (gl_carray_list_implementation): Update.
11067         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
11068         gl_linked_sortedlist_indexof_from_to): New functions.
11069         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
11070         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
11071         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
11072         gl_tree_sortedlist_indexof_from_to): New functions.
11073         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
11074         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
11075         Update.
11076         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
11077         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
11078         Update.
11079
11080 2006-10-05  Bruno Haible  <bruno@clisp.org>
11081
11082         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
11083         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
11084         (struct gl_list_implementation): Add fields search_from_to,
11085         indexof_from_to. Remove fields search, indexof.
11086         (gl_list_search): Use the search_from_to method.
11087         (gl_list_search_from, gl_list_search_from_to): New functions.
11088         (gl_list_indexof): Use the indexof_from_to method.
11089         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
11090         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
11091         (gl_list_search_from, gl_list_search_from_to): New functions.
11092         (gl_list_indexof): Use the indexof_from_to method.
11093         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
11094         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
11095         gl_array_indexof. Add start_index, end_index arguments.
11096         (gl_array_search_from_to): Renamed from gl_array_search. Add
11097         start_index, end_index arguments.
11098         (gl_array_remove, gl_array_list_implementation): Update.
11099         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
11100         gl_carray_indexof. Add start_index, end_index arguments.
11101         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
11102         start_index, end_index arguments.
11103         (gl_carray_remove, gl_carray_list_implementation): Update.
11104         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
11105         gl_linked_search. Add start_index, end_index arguments.
11106         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
11107         start_index, end_index arguments.
11108         (gl_linked_remove): Update.
11109         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
11110         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
11111         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
11112         field to 'size_t'.
11113         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
11114         gl_tree_search. Add start_index, end_index arguments.
11115         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
11116         start_index, end_index arguments.
11117         (gl_tree_remove): Update.
11118         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
11119         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
11120         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
11121         function.
11122         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
11123         gl_tree_search. Add start_index, end_index arguments.
11124         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
11125         start_index, end_index arguments.
11126         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
11127         Update.
11128         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
11129
11130 2006-10-05  Bruno Haible  <bruno@clisp.org>
11131
11132         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
11133
11134         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
11135         fwriteerror_temp): New declarations.
11136         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
11137         (descriptors): New variable.
11138         (cleanup): First, close the descriptors.
11139         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
11140         fclose_temp, fwriteerror_temp): New functions.
11141
11142 2006-10-04  Jim Meyering  <jim@meyering.net>
11143
11144         * lib/fts.c (fts_open): Tiny comment change.
11145
11146 2006-10-04  Bruno Haible  <bruno@clisp.org>
11147
11148         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
11149         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
11150         gl_LOCK_BODY.
11151         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
11152         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
11153         gl_LOCK_EARLY_BODY.
11154         (gl_LOCK): Require gl_LOCK_BODY.
11155
11156 2006-10-04  Bruno Haible  <bruno@clisp.org>
11157
11158         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
11159         (gl_oset_search_atleast): New declaration.
11160         (struct gl_oset_implementation): Add field 'search_atleast'.
11161         (gl_oset_search_atleast): New inline function.
11162         * lib/gl_oset.c (gl_oset_search_atleast): New function.
11163         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
11164         (gl_array_oset_implementation): Update.
11165         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
11166         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
11167         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
11168
11169 2006-10-04  Bruno Haible  <bruno@clisp.org>
11170
11171         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
11172
11173 2006-10-03  Bruno Haible  <bruno@clisp.org>
11174
11175         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
11176         from gl_avltreehash_list_implementation.
11177
11178 2006-10-03  Bruno Haible  <bruno@clisp.org>
11179
11180         * lib/gl_oset.c (gl_oset_add): Fix return type.
11181
11182 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
11183
11184         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
11185
11186 2006-10-02  Eric Blake  <ebb9@byu.net>
11187
11188         * modules/strnlen (Depends-on): Add extensions.
11189
11190 2006-10-02  Eric Blake  <ebb9@byu.net>
11191
11192         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
11193         definition in 2.60+.
11194
11195 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
11196
11197         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
11198         checks.
11199
11200 2006-10-02  Bruno Haible  <bruno@clisp.org>
11201
11202         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
11203         to the AUTOMAKE_OPTIONS.
11204         Reported by Jim Meyering.
11205
11206 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11207
11208         Work around bug in Solaris 10 /proc file system:
11209         /proc/self/fd/NNN/.. isn't the parent directory of
11210         the directory whose file descriptor is NNN.  This needs to
11211         be worked around at run time, not compile time, since a
11212         program might be built on Solaris 8, where things work, and
11213         run on Solaris 10.
11214         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
11215         to use the following interface instead:
11216         (OPENAT_BUFFER_SIZE): New macro.
11217         (openat_proc_name): New function.
11218         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
11219         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
11220         Likewise.
11221         * lib/openat-proc.c: New file.
11222         * modules/openat (Files): Add lib/openat-proc.c.
11223         (Depends-on): Add same-inode, stdbool.
11224         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
11225
11226 2006-09-29  Bruno Haible  <bruno@clisp.org>
11227
11228         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
11229         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
11230         argument. Set stdout_closed before testing for ferror, not after.
11231         (fwriteerror, fwriteerror_no_ebadf): New functions.
11232
11233 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11234
11235         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
11236
11237 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
11238
11239         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
11240         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
11241
11242 2006-09-28  Jim Meyering  <jim@meyering.net>
11243
11244         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
11245         Include <unistd.h>.
11246
11247 2006-09-28  Bruno Haible  <bruno@clisp.org>
11248
11249         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
11250         * modules/linkedhash-list (Depends-on): Likewise.
11251         * modules/rbtreehash-list (Depends-on): Likewise.
11252
11253 2006-09-28  Bruno Haible  <bruno@clisp.org>
11254
11255         * lib/strndup.h: Simplify the redefinition of strndup.
11256         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
11257         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
11258
11259 2006-09-28  Bruno Haible  <bruno@clisp.org>
11260
11261         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
11262         * lib/gl_linkedhash_list.c: Likewise.
11263         * lib/gl_rbtreehash_list.c: Likewise.
11264
11265 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11266
11267         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
11268         getaddrinfo.
11269
11270         * lib/__fpending.h: Don't include <stdio_ext.h> unless
11271         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
11272         it causes <stdio_ext.h> to cause a compile-time error.
11273         Problem reported by Nelson H. F. Beebe.
11274         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
11275         of HAVE_DECL___PENDING.
11276
11277         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
11278         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
11279         declaration.
11280
11281 2006-09-27  Jim Meyering  <jim@meyering.net>
11282
11283         This file could end up with a definition for a function
11284         named __strndup, rather than rpl_strndup on a system with
11285         incomplete weak_alias support.
11286         * lib/strndup.c (strndup): Rename from __strndup.
11287         Remove #defines that used to map __strndup to strndup.
11288         Don't use K&R prototypes.
11289         Remove LIBC-related code, since this file is not sync'd with glibc.
11290         * lib/strndup.h: Revamp, accordingly.
11291         * m4/strndup.m4: Modernize.
11292
11293 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11294
11295         * modules/savewd (Depends-on): Add 'raise'.
11296         * lib/savewd.c: Include <signal.h>, for 'raise'.
11297
11298 2006-09-26  Jim Meyering  <jim@meyering.net>
11299
11300         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
11301         when we detect Darwin 8.7.0's acl_get_file bug.
11302         Rearrange to perform the new (below) run-test while $LIBS
11303         contains any acl-related library.  Set USE_ACL at the end.
11304         (gl_ACL_GET_FILE): New function.
11305
11306 2006-09-26  Eric Blake  <ebb9@byu.net>
11307
11308         * lib/verror.c: Include <config.h> unconditionally.
11309
11310 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
11311
11312         * modules/clock-time (Maintainer): Add self.
11313         * modules/getlogin_r (Depends-on): Add extensions.
11314
11315 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11316
11317         * modules/clock-time: New module.
11318         * modules/nanosleep (Depends-on): Add clock-time.
11319         * modules/gethrxtime (Depends-on): Likewise.
11320         * modules/gettime (Depends-on): Likewise.
11321         * modules/settime (Depends-on): Likewise.
11322
11323         * modules/fts-lgpl: Depend on openat.
11324         * modules/mkancesdirs: Depend on savewd.
11325         * modules/mkdir-p: Likewise.
11326
11327 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11328
11329         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
11330
11331         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
11332         `gl_have_arbitrary_file_name_length_limit' to
11333         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
11334         actually works between configure runs.
11335
11336 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11337             Bruno Haible  <bruno@clisp.org>
11338
11339         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
11340
11341 2006-09-25  Jim Meyering  <jim@meyering.net>
11342
11343         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
11344         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
11345
11346 2006-09-25  Eric Blake  <ebb9@byu.net>
11347
11348         * gnulib-tool (func_import, func_create_testdir): Fix typos in
11349         exec's in 2006-09-18 patch when shuffling fds.
11350
11351 2006-09-25  Bruno Haible  <bruno@clisp.org>
11352
11353         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
11354         Reported by Jim Meyering.
11355
11356 2006-09-24  Jim Meyering  <jim@meyering.net>
11357
11358         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
11359         compare a pointer against a literal "0".  That caused failures with
11360         at least HP-UX's hpcc.
11361
11362 2006-09-22  Simon Josefsson  <jas@extundo.com>
11363
11364         * modules/gc-sha1:
11365         * modules/gc-md4:
11366         * modules/gc-hmac-sha1:
11367         * modules/gc-hmac-md5:
11368         * modules/gc-des:
11369         * modules/gc-arcfour: Distribute more files.
11370
11371 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11372
11373         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
11374         (gl_linked_iterator_from_to): Initialize struct completely.
11375         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
11376         (gl_tree_iterator_from_to): Likewise
11377         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
11378         * lib/gl_array_list.c [lint] (gl_array_iterator)
11379         (gl_array_iterator_from_to): Likewise.
11380         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
11381         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
11382         (gl_carray_iterator_from_to): Likewise.
11383
11384         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
11385         * lib/md4.c (md4_process_block): Remove unused variable.
11386         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
11387         parentheses for clarity.
11388
11389 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11390
11391         * modules/bison-i18n (Depends-on): Add gettext.
11392
11393 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11394
11395         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
11396         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
11397         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
11398         also add missing comma that caused broken test.
11399         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
11400         stdlib.h, for `abort'.
11401         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
11402         variables.
11403         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
11404         include unistd.h if present, for `rmdir'.
11405         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
11406         variables.
11407         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
11408         in the process include standard headers for prototypes.
11409         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
11410         gets declared on GNU/Linux.
11411         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
11412         unistd.h, for `rmdir'.
11413         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
11414
11415         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
11416         always true.
11417         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
11418
11419         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
11420
11421 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11422
11423         * gnulib-tool (func_version): Create output all at once.  This
11424         may help avoid triggering unnecessary SIGPIPEs, and at any
11425         rate it doesn't hurt.
11426
11427 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11428             Bruno Haible  <bruno@clisp.org>
11429
11430         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
11431         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
11432         * m4/signed.m4 (bh_C_SIGNED): Likewise.
11433
11434         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
11435         (gl_FUNC_VASPRINTF): Invoke it.
11436
11437 2006-09-22  Bruno Haible  <bruno@clisp.org>
11438
11439         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
11440         getloadavg.c as first argument.
11441
11442 2006-09-22  Bruno Haible  <bruno@clisp.org>
11443
11444         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
11445         at the beginning of the gl_INIT macro.
11446         * modules/getloadavg (configure.ac): Pass $gl_source_base to
11447         gl_GETLOADAVG.
11448
11449 2006-09-22  Bruno Haible  <bruno@clisp.org>
11450
11451         * gnulib-tool (func_create_megatestdir): Don't include the config-h
11452         module.
11453         Suggested by Ralf Wildenhues.
11454
11455 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
11456
11457         Import this patch from libc:
11458
11459         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
11460
11461         * lib/regex_internal.c (re_string_reconstruct): Handle
11462         offset < pstr->valid_raw_len && pstr->offsets_needed case.
11463         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
11464         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
11465         re_string_context_at.
11466
11467         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
11468         now requires it.
11469         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
11470         gl_REGEX now does it for us.
11471         (gl_REGEX): Add test taken from
11472         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
11473
11474         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
11475         Check that large offsets work.  Modernize Autoconf usages.
11476         Prefer "yes" to mean a good thing rather than a bad.
11477         Don't put "#define mkstemp" in config.h, as this might interfere
11478         with standard system headers that "#define mkstemp mkstemp64".
11479
11480         * modules/mkstemp (Depends-on): Add extensions, so that
11481         mkstemp is visible on some platforms.
11482         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
11483         (Include): Change to "mkstemp.h" from <stdlib.h>.
11484         (Files): Add mkstemp.h.
11485
11486         * lib/mkstemp.h: New file, since some standard headers
11487         #define mkstemp.
11488         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
11489         Include "mkstemp.h".
11490         Make the _LIBC code resemble glibc original more,
11491         e.g., use K&R style.
11492         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
11493         (mkstemp): Remove, since mkstemp.h does this for us.
11494         * lib/stdlib--.h: Include mkstemp.h.
11495
11496         Import this patch from libc:
11497
11498         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11499
11500         * lib/tempname.c (__gen_tempname): Change attempts_min
11501         into a macro.  Use preprocessor to decide how to initialize
11502         attempts [Coverity CID 67].
11503
11504 2006-09-20  Bruno Haible  <bruno@clisp.org>
11505
11506         * lib/mkdtemp.c: Import from libc.
11507         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11508                 * sysdeps/posix/tempname.c (__gen_tempname): Change
11509                 attempts_min into a macro.  Use preprocessor to decide how to
11510                 initialize attempts [Coverity CID 67].
11511         2001-11-27  Paul Eggert  <eggert@twinsun.com>
11512                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
11513                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
11514
11515 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11516
11517         * gnulib-tool (func_exit): New function, to allow to pass the
11518         exit status portably through the trap.  Use everywhere.
11519         (--help, --version): Signal a write error.
11520         (trap): catch SIGPIPE, for write errors.
11521         Exit at the end of the trap, with the correct exit status.
11522
11523 2006-09-19  Karl Berry  <karl@gnu.org>
11524
11525         * doc/gnulib.texi: note about the license texinfo files.
11526
11527 2006-09-19  Eric Blake  <ebb9@byu.net>
11528
11529         * gnulib-tool: Avoid space-tab.
11530
11531 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11532
11533         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
11534         that prevented coreutils 6.1 from building.  Problem reported
11535         by Petter Reinholdtsen.
11536
11537 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11538
11539         * gnulib-tool (avoidlist): Fix typo that broke options like
11540         --avoid=lock that are used by coreutils bootstrap.
11541
11542 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
11543
11544         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
11545         more systematically.
11546
11547 2006-09-18  Jim Meyering  <jim@meyering.net>
11548
11549         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
11550
11551 2006-09-18  Bruno Haible  <bruno@clisp.org>
11552
11553         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
11554
11555 2006-09-18  Bruno Haible  <bruno@clisp.org>
11556
11557         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
11558         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
11559         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
11560         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
11561         * m4/gettext.m4: Require autoconf >= 2.52.
11562         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
11563         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
11564         of gl_cv_header_inttypes_h.
11565
11566 2006-09-18  Bruno Haible  <bruno@clisp.org>
11567
11568         * lib/javaversion.c: Include configmake.h.
11569
11570 2006-09-18  Bruno Haible  <bruno@clisp.org>
11571
11572         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
11573         avoid that the while loops be executed in a subshell.
11574
11575 2006-09-18  Bruno Haible  <bruno@clisp.org>
11576
11577         * MODULES.html.sh (func_module): Break long lines.
11578         Suggested by Bruce Korb <bkorb@gnu.org>.
11579
11580 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11581
11582         Speed up by a factor of 1.12.
11583         * gnulib-tool (nl): New variable.
11584         (func_import): Rewrite include directive extraction to only read each
11585         directive once.
11586
11587 2006-09-17  Bruno Haible  <bruno@clisp.org>
11588
11589         * modules/javaversion (Makefile.am): Remove DEFS setting.
11590         (Depends-on): Add configmake, for PKGDATADIR definition.
11591
11592 2006-09-17  Bruno Haible  <bruno@clisp.org>
11593
11594         * gnulib-tool (func_create_testdir): Rewrite all files at once.
11595
11596 2006-09-17  Bruno Haible  <bruno@clisp.org>
11597
11598         * gnulib-tool (func_append): New function, stolen from libtool.m4.
11599         (func_modules_transitive_closure, func_modules_add_dummy,
11600         func_modules_to_filelist, func_import, func_create_testdir,
11601         func_create_megatestdir, ...): Use it wherever possible.
11602         Suggested by Ralf Wildenhues.
11603
11604 2006-09-16  Karl Berry  <karl@gnu.org>
11605
11606         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
11607         to avoid sectioning errors.
11608         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
11609         [ifinfo]: blank line after @center-ed titles.
11610         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
11611         Spell FSF address consistently with others.
11612         (These changes approved by rms.)
11613
11614 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11615
11616         Speed up by a factor of 1.61.
11617         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
11618         already checked module names again.
11619
11620 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11621
11622         Speed up by a factor of 1.13.
11623         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
11624         for new_files, and the input to func_add_or_update.
11625
11626 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11627
11628         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
11629         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
11630
11631 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11632
11633         * modules/mkancesdirs (Depends-on): Add fcntl.
11634         * modules/savewd: New file.
11635         * MODULES.html.sh (File system functions): Add savewd.
11636
11637         * modules/configmake (Makefile.am): Add support for the
11638         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
11639
11640 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11641
11642         * m4/savewd.m4: New file.
11643
11644 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11645
11646         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
11647         (dirchownmod): New arg FD.  All callers changed.
11648         Use FD rather than opening the directory ourself, as opening is
11649         now the caller's responsibility.
11650         * lib/dirchownmod.h: Likewise.
11651         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
11652         hosts that require <sys/types.h> before <sys/stat.h>.  Include
11653         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
11654         (test_dir): Remove.
11655         (mkancesdirs): Return length of prefix of FILE that has already
11656         been made, or -2 if there is a child doing the work.  Redo
11657         algorithm so that it is O(N) rather than O(N**2).  Optimize away
11658         ".", and treat ".." specially since it might stray back into
11659         already-created areas.  Use a subprocess if necessary.  New arg
11660         WD; all users changed.  MAKE_DIR function should now return 1
11661         if it creates a directory that is not readable.  Return -2 if
11662         a child process is spun off.
11663         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
11664         Adjust signature to match code.
11665         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
11666         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
11667         all users changed.
11668         * lib/savewd.c, lib/savewd.h: New files.
11669
11670 2006-09-15  Jim Meyering  <jim@meyering.net>
11671
11672         * modules/rename-dest-slash: New module.
11673         * MODULES.html.sh (posix_compat): Add it here.
11674
11675         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
11676
11677 2006-09-15  Jim Meyering  <jim@meyering.net>
11678
11679         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
11680         file.
11681
11682         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
11683
11684 2006-09-15  Jim Meyering  <jim@meyering.net>
11685
11686         * lib/rename-dest-slash.c (has_trailing_slash): Use
11687         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
11688         (rpl_rename_dest_slash): Perform the cheaper trailing slash
11689         test before testing whether SRC is a directory.
11690         Suggestions from Bruno Haible.
11691
11692         Avoid a warning about an unused variable.
11693         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
11694         into the #ifdef block where it's used.
11695
11696         * lib/rename-dest-slash.c: New file.
11697
11698 2006-09-14  Bruno Haible  <bruno@clisp.org>
11699
11700         * lib/allocsa.c: Include <config.h> unconditionally.
11701         * lib/asnprintf.c: Likewise.
11702         * lib/asprintf.c: Likewise.
11703         * lib/c-strcasecmp.c: Likewise.
11704         * lib/c-strcasestr.c: Likewise.
11705         * lib/c-strncasecmp.c: Likewise.
11706         * lib/c-strstr.c: Likewise.
11707         * lib/classpath.c: Likewise.
11708         * lib/clean-temp.c: Likewise.
11709         * lib/concatpath.c: Likewise.
11710         * lib/copy-file.c: Likewise.
11711         * lib/csharpcomp.c: Likewise.
11712         * lib/csharpexec.c: Likewise.
11713         * lib/execute.c: Likewise.
11714         * lib/fatal-signal.c: Likewise.
11715         * lib/findprog.c: Likewise.
11716         * lib/fwriteerror.c: Likewise.
11717         * lib/gl_array_list.c: Likewise.
11718         * lib/gl_array_oset.c: Likewise.
11719         * lib/gl_avltree_list.c: Likewise.
11720         * lib/gl_avltree_oset.c: Likewise.
11721         * lib/gl_avltreehash_list.c: Likewise.
11722         * lib/gl_carray_list.c: Likewise.
11723         * lib/gl_linked_list.c: Likewise.
11724         * lib/gl_linkedhash_list.c: Likewise.
11725         * lib/gl_list.c: Likewise.
11726         * lib/gl_oset.c: Likewise.
11727         * lib/gl_rbtree_list.c: Likewise.
11728         * lib/gl_rbtree_oset.c: Likewise.
11729         * lib/gl_rbtreehash_list.c: Likewise.
11730         * lib/imaxabs.c: Likewise.
11731         * lib/imaxdiv.c: Likewise.
11732         * lib/javacomp.c: Likewise.
11733         * lib/javaexec.c: Likewise.
11734         * lib/javaversion.c: Likewise.
11735         * lib/linebreak.c: Likewise.
11736         * lib/localcharset.c: Likewise.
11737         * lib/lock.c: Likewise.
11738         * lib/mbchar.c: Likewise.
11739         * lib/mbswidth.c: Likewise.
11740         * lib/mkdtemp.c: Likewise.
11741         * lib/pipe.c: Likewise.
11742         * lib/printf-args.c: Likewise.
11743         * lib/printf-parse.c: Likewise.
11744         * lib/progname.c: Likewise.
11745         * lib/progreloc.c: Likewise.
11746         * lib/readlink.c: Likewise.
11747         * lib/sh-quote.c: Likewise.
11748         * lib/stpcpy.c: Likewise.
11749         * lib/stpncpy.c: Likewise.
11750         * lib/strcasecmp.c: Likewise.
11751         * lib/strcasestr.c: Likewise.
11752         * lib/strcspn.c: Likewise.
11753         * lib/striconv.c: Likewise.
11754         * lib/strncasecmp.c: Likewise.
11755         * lib/strnlen1.c: Likewise.
11756         * lib/strstr.c: Likewise.
11757         * lib/strtok_r.c: Likewise.
11758         * lib/tls.c: Likewise.
11759         * lib/tmpdir.c: Likewise.
11760         * lib/unicodeio.c: Likewise.
11761         * lib/unsetenv.c: Likewise.
11762         * lib/vasnprintf.c: Likewise.
11763         * lib/vasprintf.c: Likewise.
11764         * lib/wait-process.c: Likewise.
11765         * lib/xallocsa.c: Likewise.
11766         * lib/xsetenv.c: Likewise.
11767         * lib/xstriconv.c: Likewise.
11768
11769 2006-09-13  Simon Josefsson  <jas@extundo.com>
11770
11771         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11772         that internally, suggested by Ralf Wildenhues
11773         <Ralf.Wildenhues@gmx.de>.
11774
11775 2006-09-13  Simon Josefsson  <jas@extundo.com>
11776
11777         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11778         @LIBOBJS@.
11779         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11780
11781 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11782
11783         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11784         longer worry about uses that don't define HAVE_CONFIG_H.
11785         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11786         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11787         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11788         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11789         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11790         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11791         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11792         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11793         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11794         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11795         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11796         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11797         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11798         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11799         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11800         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11801         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11802         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11803         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11804         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11805         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11806         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11807         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11808         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11809         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11810         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11811         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11812         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11813         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11814         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11815         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11816         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11817         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11818         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11819         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11820         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11821         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11822         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11823         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11824         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11825         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11826         Likewise.
11827
11828 2006-09-13  Eric Blake  <ebb9@byu.net>
11829
11830         * lib/getopt.c: Fix typo in last commit.
11831
11832 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11833
11834         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11835         dgettext.
11836
11837 2006-09-12  Jim Meyering  <jim@meyering.net>
11838
11839         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11840         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11841         Reported by Nelson H. F. Beebe.
11842
11843 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11844
11845         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11846         program_invocation_name and program_invocation_short_name are
11847         initialized.
11848         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11849         and program_invocation_short_name to argp.h, so they are visible
11850         to user programs.
11851         * lib/argp.h: Likewise
11852
11853 2006-09-10  Bruno Haible  <bruno@clisp.org>
11854
11855         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11856         m4/inttypes_h.m4, m4/uintmax_t.m4.
11857
11858 2006-09-10  Bruno Haible  <bruno@clisp.org>
11859
11860         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11861         gl_AC_TYPE_UINTMAX_T.
11862
11863 2006-09-10  Bruno Haible  <bruno@clisp.org>
11864
11865         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11866
11867 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11868
11869         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11870         convention.  Text proposed by Bruno Haible.
11871         (struct argp_option): Document the use of N_() wrappers.
11872
11873         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11874         '\v', and translate the two parts separately, instead of feeding
11875         the whole string to gettext.  This allows to exclude
11876         '\v' from the strings visible to the translator by writing doc
11877         strings as N_("..") "\v" N_("..").
11878
11879 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11880
11881         * config/srclist.txt: Undo latest change; the bug was fixed.
11882
11883 2006-09-09  Bruno Haible  <bruno@clisp.org>
11884
11885         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11886         assignments if building a library without libtool.
11887         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11888         in func_emit_lib_Makefile_am.
11889         (func_import): When building a static library libfoo.a, arrange to
11890         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11891         (func_create_testdir): Likewise.
11892         * modules/gc (configure.ac, Makefile.am): If building statically,
11893         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11894         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11895         * modules/striconv (configure.ac, Makefile.am): Likewise.
11896         Based on a suggestion by Ralf Wildenhues.
11897
11898 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11899
11900         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11901         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11902         Also:
11903
11904         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11905         Add year_2050_test to catch glibc bug 2821
11906         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11907
11908         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11909         Prefer #ifdef to #if.
11910
11911         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11912         Return from 'main' instead of calling 'exit'.
11913
11914 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11915
11916         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11917         returned the maximum time_t value rather than (time_t) -1.
11918         Problem originally reported by William Bardwell
11919         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11920
11921         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11922         Moved to here ...
11923         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11924         ... from here.
11925
11926 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11927
11928         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11929         2821 is fixed.
11930
11931 2006-09-08  Jim Meyering  <jim@meyering.net>
11932
11933         Don't make generated files read-only.  That would bother too many
11934         people.  However, do retain the ability to work when targets are
11935         read-only: remove the destination and temporary files before writing
11936         them (when generated via sed or echo), or by using the -f option for
11937         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11938         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11939         * modules/byteswap, modules/configmake, modules/fcntl:
11940         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11941         * modules/localcharset, modules/netinet_in, modules/poll:
11942         * modules/stdbool, modules/stdint, modules/sys_select:
11943         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11944
11945 2006-09-08  Jim Meyering  <jim@meyering.net>
11946
11947         Avoid new build failure on FreeBSD 6.0.
11948         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11949         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11950         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11951
11952 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11953
11954         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11955
11956 2006-09-07  Jim Meyering  <jim@meyering.net>
11957
11958         Fix global typo in last change: use chmod u-w, not chmod u-x.
11959         Spotted by Paul Eggert and Bruce Korb.
11960         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11961         * modules/byteswap, modules/configmake, modules/fcntl:
11962         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11963         * modules/localcharset, modules/netinet_in, modules/poll:
11964         * modules/stdbool, modules/stdint, modules/sys_select:
11965         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11966
11967 2006-09-06  Jim Meyering  <jim@meyering.net>
11968
11969         Make generated files be read-only.
11970         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11971         Ensure that each generated file is now read-only.
11972         * modules/argz: Likewise.
11973         * modules/arpa_inet: Likewise.
11974         * modules/byteswap: Likewise.
11975         * modules/configmake: Likewise.
11976         * modules/fcntl: Likewise.
11977         * modules/fnmatch: Likewise.
11978         * modules/getopt: Likewise.
11979         * modules/glob: Likewise.
11980         * modules/inttypes: Likewise.
11981         * modules/netinet_in: Likewise.
11982         * modules/poll: Likewise.
11983         * modules/stdbool: Likewise.
11984         * modules/stdint: Likewise.
11985         * modules/sys_select: Likewise.
11986         * modules/sys_socket: Likewise.
11987         * modules/sys_stat: Likewise.
11988         * modules/sysexits: Likewise.
11989         * modules/localcharset: Same as above, but continue using temporary
11990         file named "t-$@" (why different?) rather than the "$@-t" used
11991         everywhere else.
11992
11993         * modules/sysexits (Makefile.am): Replace literal occurrences
11994         of "sysexit.h" more readable, and more consistent, "$@".
11995
11996 2006-09-06  Bruno Haible  <bruno@clisp.org>
11997
11998         * modules/striconv: New file.
11999         * modules/xstriconv: New file.
12000         * MODULES.html.sh (Internationalization functions): Add striconv,
12001         xstriconv.
12002
12003 2006-09-06  Bruno Haible  <bruno@clisp.org>
12004
12005         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
12006         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
12007         not using libtool correctly.
12008
12009 2006-09-06  Bruno Haible  <bruno@clisp.org>
12010
12011         * lib/striconv.h: New file.
12012         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
12013         iconvstring.c.
12014         * lib/xstriconv.h: New file.
12015         * lib/xstriconv.c: New file.
12016
12017 2006-09-06  Bruno Haible  <bruno@clisp.org>
12018
12019         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
12020         lib_..._LDFLAGS.
12021
12022 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12023
12024         * lib/argz_.h: Sync from Libtool.
12025
12026         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
12027                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12028
12029         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
12030
12031 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
12032
12033         * modules/trim: New file.
12034
12035 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
12036
12037         * lib/trim.h: New file.
12038         * lib/trim.c: New file.
12039
12040 2006-09-05  Bruno Haible  <bruno@clisp.org>
12041
12042         * MODULES.html.sh (String handling): Add trim.
12043
12044 2006-09-04  Karl Berry  <karl@gnu.org>
12045
12046         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
12047         until next release.
12048
12049 2006-09-03  Bruno Haible  <bruno@clisp.org>
12050
12051         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
12052         correctly.
12053
12054 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12055
12056         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
12057         not gl_GETLOADAVG.  Omit unneeded semicolons.
12058         Problems reported by Ralf Wildenhues in
12059         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
12060         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
12061         at the end, which is the usual gnulib style.
12062
12063         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
12064         of doing all the work ourselves.
12065         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
12066         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
12067
12068 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12069
12070         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
12071         Problem reported by Ralf Wildenhues in
12072         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
12073
12074         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
12075         HAVE_STRUCT_STATFS_F_FSTYPENAME.
12076
12077 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12078
12079         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
12080         yesterday's patch by changing test -n to test -z.
12081
12082 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12083
12084         * modules/getloadavg (Files): Add m4/getloadavg.m4.
12085         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
12086         the former is now obsolescent.
12087
12088         * modules/chdir-long (Depends-on): Add fcntl.
12089
12090 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12091
12092         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
12093         obsolescent, and programs should use gnulib instead.
12094         * m4/getloadavg.m4: New file, with contents taken from Autoconf
12095         but with prefixes changed.
12096
12097 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12098
12099         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
12100         or stdbool.h, because they might not exist while configuring.
12101
12102         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
12103         Don't include unistd.h or limits.h; not needed, since chdir-long.h
12104         does that for us.
12105         (O_DIRECTORY): Remove.
12106
12107 2006-08-31  Eric Blake  <ebb9@byu.net>
12108
12109         * gnulib-tool: Don't let emacs change spaces to TAB.
12110
12111 2006-08-31  Bruno Haible  <bruno@clisp.org>
12112
12113         * gnulib-tool: When calling func_import more than once, do it in a
12114         subshell.
12115         Reported by Eric Blake <ebb9@byu.net>.
12116
12117 2006-08-31  Bruno Haible  <bruno@clisp.org>
12118
12119         * gnulib-tool (nl): Remove variable.
12120         (sed_transform_lib_file): Use more robust test for config-h module.
12121         (func_import): Fix typo in 2006-08-25 patch.
12122
12123 2006-08-31  Bruno Haible  <bruno@clisp.org>
12124
12125         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
12126         specified, augment Makefile.am variables instead of assigning them.
12127
12128 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
12129
12130         Work around a bug in both the Linux and SunOS 64-bit kernels:
12131         nanosleep mishandles sleeps for longer than 2**31 seconds.
12132         Problem reported by Frank v Waveren in
12133         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
12134         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
12135         Check for nanosleep bug.
12136         (LIB_NANOSLEEP): Append clock_gettime library if needed.
12137
12138 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
12139
12140         Work around a bug in both the Linux and SunOS 64-bit kernels:
12141         nanosleep mishandles sleeps for longer than 2**31 seconds.
12142         Problem reported by Frank v Waveren in
12143         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
12144         * lib/nanosleep.c (BILLION): New constant.
12145         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
12146         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
12147         implementation.
12148
12149 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * modules/nanosleep (Depends-on): Add gettime.
12152
12153 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
12154         and Simon Josefsson  <jas@extundo.com>
12155         and Oskar Liljeblad  <oskar@osk.mine.nu>
12156
12157         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
12158         * gnulib-tool (func_import): New license type 'unmodifiable license
12159         text'.
12160         * modules/fdl: Use it.  Longer description.
12161         * module/gpl, module/lgpl: New files.
12162
12163 2006-08-30  Jim Meyering  <jim@meyering.net>
12164
12165         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
12166         shadowing the parameter.
12167
12168 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12169
12170         Sync from Libtool:
12171
12172         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12173
12174         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
12175         sharing with gnulib.  Report by Eric Blake.
12176
12177 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12178
12179         * modules/isapipe: New file.
12180         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
12181
12182 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12183
12184         * modules/configmake (Makefile.am): Add a comment, and omit
12185         the CONFIGMAKE_ prefix from generated macro names.  Suggested
12186         by Bruno Haible.
12187
12188 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12189
12190         * m4/isapipe.m4: New file.
12191
12192 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12193
12194         * lib/isapipe.c, lib/isapipe.h: New files.
12195
12196 2006-08-29  Jim Meyering  <jim@meyering.net>
12197
12198         * modules/configmake (Makefile.am): Make configmake.h depend on
12199         Makefile.  Otherwise, a stale configmake.h could hang around.
12200
12201 2006-08-29  Eric Blake  <ebb9@byu.net>
12202
12203         * lib/error.c (error_at_line, print_errno_message): Match libc, after
12204         resolution of upstream bug 3044.
12205
12206 2006-08-29  Bruno Haible  <bruno@clisp.org>
12207
12208         * modules/localcharset (Depends-on): Add configmake.
12209         (Makefile.am): Remove setting of LIBDIR through DEFS.
12210
12211 2006-08-29  Bruno Haible  <bruno@clisp.org>
12212
12213         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
12214         defined.
12215
12216 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12217
12218         * modules/fcntl: New file.
12219         * modules/chdir-safer (Depends-on): Add fcntl.
12220         * modules/fts: Likewise.
12221         * modules/mkdir-p: Likewise.
12222
12223         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
12224         This undoes the most recent change, since we're now addressing the
12225         problem in a different way.
12226
12227         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
12228         into output, since the output might be called Makefile.am even
12229         if $makefile_name is something different.
12230         (func_import): Use $makefile_am rather than
12231         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
12232         empty.
12233
12234         * modules/inttypes (Files): Add m4/inttypes-h.m4.
12235
12236 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12237
12238         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
12239         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
12240         recent change to stdint.m4, since we're now addressing the problem in a
12241         different way.
12242
12243 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12244
12245         * m4/fcntl_h.m4: New file.
12246
12247 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12248
12249         * lib/fcntl_.h: New file.
12250         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
12251         the fcntl module.
12252         * lib/dirchownmod.c: Likewise.
12253         * lib/fts.c: Likewise.
12254
12255         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
12256         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
12257         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
12258         just before including <inttypes.h>, to avoid circular inclusion.
12259
12260 2006-08-28  Jim Meyering  <jim@meyering.net>
12261
12262         * doc/visibility.texi: Actually read and correct the grammar of the
12263         sentence affected by yesterday's change.
12264
12265 2006-08-28  Eric Blake  <ebb9@byu.net>
12266
12267         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
12268         needs wrapper.
12269
12270 2006-08-28  Eric Blake  <ebb9@byu.net>
12271
12272         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
12273
12274 2006-08-28  Eric Blake  <ebb9@byu.net>
12275
12276         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
12277
12278 2006-08-28  Bruno Haible  <bruno@clisp.org>
12279
12280         * modules/c-strstr: New file, from GNU gettext.
12281         * MODULES.html.sh (String handling): Add c-strstr.
12282
12283 2006-08-28  Bruno Haible  <bruno@clisp.org>
12284
12285         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
12286         macros.
12287         Reported by Eric Blake.
12288
12289 2006-08-28  Bruno Haible  <bruno@clisp.org>
12290
12291         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
12292         (VASNPRINTF): Return a string of length > INT_MAX without failing.
12293         * lib/vasprintf.c: Include errno.h, limits.h.
12294         (EOVERFLOW): New fallback definition.
12295         (vasprintf): Test here whether the string length is > INT_MAX.
12296         * lib/vsnprintf.c: Include errno.h, limits.h.
12297         (EOVERFLOW): New fallback definition.
12298         (vsnprintf): Fix bug when generated string was too long for the buffer.
12299         Test here whether the string length is > INT_MAX.
12300
12301 2006-08-28  Bruno Haible  <bruno@clisp.org>
12302
12303         * lib/inttypes_.h (SCNX*): Remove definitions.
12304         Reported by Eric Blake.
12305
12306 2006-08-28  Bruno Haible  <bruno@clisp.org>
12307
12308         * lib/c-strstr.h: New file, from GNU gettext.
12309         * lib/c-strstr.c: New file, from GNU gettext.
12310
12311 2006-08-28  Bruno Haible  <bruno@clisp.org>
12312
12313         * gnulib-tool: Reorder some statements.
12314
12315 2006-08-28  Bruno Haible  <bruno@clisp.org>
12316
12317         * gnulib-tool: New option --makefile-name.
12318         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
12319         $makefile_name.
12320         (func_import): Write $makefile_name to the cache file, and read it from
12321         there unless explicitly specified. Use $makefile_name as file name
12322         instead of Makefile.am. Adjust the recommendations accordingly.
12323
12324 2006-08-28  Bruno Haible  <bruno@clisp.org>
12325
12326         * gnulib-tool (func_verify_module): Check against misapplying patch.
12327
12328 2006-08-28  Bruno Haible  <bruno@clisp.org>
12329
12330         * gnulib-tool (func_relativize, func_relconcat): New functions.
12331         Give an error if --local-dir is given with --update.
12332         Remove trailing slashes from $local_gnulib_dir.
12333         (func_import): Store the relativized $local_gnulib_dir in
12334         gnulib-cache.m4, and read it from there if not specified explicitly.
12335
12336 2006-08-28  Bruno Haible  <bruno@clisp.org>
12337
12338         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
12339         is the current directory. Respect also $local_gnulib_dir.
12340
12341 2006-08-28  Bruno Haible  <bruno@clisp.org>
12342             Simon Josefsson  <jas@extundo.com>
12343
12344         BeOS portability.
12345         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
12346
12347 2006-08-27  Jim Meyering  <jim@meyering.net>
12348
12349         * doc/visibility.texi: Remove duplicate word: "pointer".
12350
12351 2006-08-26  Bruno Haible  <bruno@clisp.org>
12352
12353         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
12354         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
12355         (Makefile.am): Create inttypes.h from inttypes_.h.
12356         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
12357
12358         * modules/imaxabs: New file.
12359
12360         * modules/imaxdiv: New file.
12361
12362 2006-08-26  Bruno Haible  <bruno@clisp.org>
12363
12364         * m4/inttypes.m4: New file.
12365         * m4/_inttypes_h.m4: Remove file.
12366         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
12367         PRI_MACROS_BROKEN.
12368         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
12369
12370         * m4/imaxabs.m4: New file.
12371
12372         * m4/imaxdiv.m4: New file.
12373
12374 2006-08-26  Bruno Haible  <bruno@clisp.org>
12375
12376         * lib/inttypes_.h: New file.
12377         * lib/inttypes.h: Remove file.
12378         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
12379
12380         * lib/imaxabs.c: New file.
12381
12382         * lib/imaxdiv.c: New file.
12383
12384 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12385
12386         New config-h module, so that "make" output needn't be cluttered
12387         by -DHAVE_CONFIG_H.
12388         * MODULES.html.sh (Support for building libraries and executables):
12389         Add config-h.
12390         * modules/config-h: New file.
12391         * gnulib-tool (nl, sed_transform_lib_file): New vars.
12392         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
12393         the config-h module is used.
12394
12395         New configmake module, so that "make" output needn't be cluttered
12396         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
12397         * MODULES.html.sh (Support for building libraries and executables):
12398         Add configmake.
12399         * modules/configmake: New file.
12400
12401 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12402
12403         * m4/config-h.m4: New file.
12404
12405 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12406
12407         * config/srclist.txt: Add elisp-comp.
12408
12409 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12410
12411         * MODULES.html.sh (Support for building libraries and executables):
12412         Add elisp-comp.
12413         * build-aux/elisp-comp: New file.
12414         * modules/elisp-comp: New file.
12415
12416 2006-08-24  Bruno Haible  <bruno@clisp.org>
12417
12418         * gnulib-tool (func_create_testdir): Use non-default values of
12419         sourcebase and m4base.
12420
12421 2006-08-24  Bruno Haible  <bruno@clisp.org>
12422
12423         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
12424         HTML structure.
12425
12426 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12427
12428         * modules/openat (Depends-on): Add lchown.
12429
12430 2006-08-23  Bruno Haible  <bruno@clisp.org>
12431
12432         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
12433         of gl_LOCK_EARLY instead of gl_LOCK.
12434
12435 2006-08-23  Bruno Haible  <bruno@clisp.org>
12436
12437         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
12438         on OSF/1 to no.
12439         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
12440
12441 2006-08-23  Bruno Haible  <bruno@clisp.org>
12442
12443         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
12444         as unusable.
12445
12446         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
12447         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
12448         (gl_LOCK): New macro.
12449
12450 2006-08-22  Simon Josefsson  <jas@extundo.com>
12451
12452         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
12453         to md5 module.
12454
12455 2006-08-22  Simon Josefsson  <jas@extundo.com>
12456
12457         * MODULES.html.sh: Add "Support for maintaining and release
12458         projects".
12459
12460         * build-aux/gnupload: New file, from coreutils.
12461
12462 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12463
12464         Avoid the need for AC_LIBSOURCES in m4 macros.
12465         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
12466         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
12467         * modules/check-version (EXTRA_DIST): Add check-version.h.
12468         * modules/crc (EXTRA_DIST): Add crc.h.
12469         * modules/des (EXTRA_DIST): Add des.h.
12470         * modules/gc (EXTRA_DIST): Add gc.h.
12471         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
12472         * modules/getline (EXTRA_DIST): Add getline.h.
12473         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
12474         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
12475         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
12476         * modules/md2 (EXTRA_DIST): Add md2.h.
12477         * modules/md4 (EXTRA_DIST): Add md4.h.
12478         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
12479         * modules/read-file (EXTRA_DIST): Add read-file.h.
12480         * modules/readline (EXTRA_DIST): Add readline.h.
12481         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
12482         rijndael-api-fst.h.
12483
12484 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12485
12486         * m4/rijndael.m4 (gl_ARCFOUR):
12487         * m4/arctwo.m4 (gl_ARCTWO):
12488         * m4/check-version.m4 (gl_CHECK_VERSION):
12489         * m4/crc.m4 (gl_CRC):
12490         * m4/des.m4 (gl_DES):
12491         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
12492         * m4/gc.m4 (gl_GC):
12493         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
12494         * m4/getline.m4 (gl_FUNC_GETLINE):
12495         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
12496         * m4/hmac-md5.m4 (gl_HMAC_MD5):
12497         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
12498         * m4/md2.m4 (gl_MD2):
12499         * m4/md4.m4 (gl_MD4):
12500         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
12501         * m4/read-file.m4 (gl_FUNC_READ_FILE):
12502         * m4/readline.m4 (gl_FUNC_READLINE):
12503         * m4/rijndael.m4 (gl_RIJNDAEL):
12504         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12505         to get the necessary .h files and whatnot.
12506
12507 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12508
12509         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
12510         gnulib rather than the other way around.
12511         * config/srclistvars.sh (COREUTILS): Remove.
12512
12513 2006-08-22  Jim Meyering  <jim@meyering.net>
12514
12515         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
12516
12517         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
12518
12519 2006-08-22  Eric Blake  <ebb9@byu.net>
12520
12521         * modules/regexprops-generic: New file.
12522         * MODULES.html.sh (Support for building documentation): List it.
12523
12524 2006-08-22  Eric Blake  <ebb9@byu.net>
12525
12526         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
12527         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
12528         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
12529         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
12530
12531 2006-08-22  Bruno Haible  <bruno@clisp.org>
12532
12533         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
12534         and lib_LTLIBRARIES like the other lib_* variables.
12535
12536 2006-08-22  Bruno Haible  <bruno@clisp.org>
12537
12538         * build-aux/x-to-1.in: New file, from GNU gettext.
12539
12540 2006-08-22  Bruno Haible  <bruno@clisp.org>
12541
12542         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
12543         <utmpx.h> exists.
12544
12545 2006-08-22  Bruno Haible  <bruno@clisp.org>
12546
12547         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
12548         <utmpx.h> exists.
12549
12550 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12551
12552         BeOS portability.
12553         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
12554         exist.
12555         Problem reported by Bruno Haible.
12556
12557 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12558
12559         Avoid the need for AC_LIBSOURCES in m4 macros.
12560         * modules/acl (EXTRA_DIST): Add acl.h.
12561         * modules/argmatch (Files): Add m4/argmatch.m4.
12562         (configure.ac): Add gl_ARGMATCH.
12563         (EXTRA_DIST): Renamed from lib_SOURCES, for
12564         consistency with the other modules.  Remove argmatch.c.
12565         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
12566         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
12567         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
12568         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
12569         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
12570         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
12571         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
12572         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
12573         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
12574         * modules/closeout (EXTRA_DIST): Add closeout.h.
12575         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
12576         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
12577         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
12578         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
12579         dirname.h; remove basename.c and stripslash.c.
12580         * modules/exclude (EXTRA_DIST): Add exclude.h.
12581         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
12582         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
12583         * modules/file-type (EXTRA_DIST): Add file-type.h.
12584         * modules/filemode (EXTRA_DIST): Add filemode.h.
12585         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
12586         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12587         * modules/fpending (EXTRA_DIST): Add __fpending.h.
12588         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
12589         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
12590         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
12591         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
12592         * modules/getdate (EXTRA_DIST): Add getdate.c.
12593         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
12594         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
12595         * modules/getpass (EXTRA_DIST): Add getpass.h.
12596         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
12597         * modules/group-member (EXTRA_DIST): Add group-member.h.
12598         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
12599         * modules/hash (EXTRA_DIST): Add hash.h.
12600         * modules/human (EXTRA_DIST): Add human.h.
12601         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
12602         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
12603         * modules/lchown (EXTRA_DIST): Add lchown.h.
12604         * modules/long-options (EXTRA_DIST): Add long-options.h.
12605         * modules/lstat (EXTRA_DIST): Add lstat.h.
12606         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
12607         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
12608         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
12609         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
12610         * modules/memxor (EXTRA_DIST): Add memxor.h.
12611         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
12612         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
12613         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
12614         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
12615         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
12616         * modules/physmem (EXTRA_DIST): Add physmem.h.
12617         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
12618         * modules/posixver (EXTRA_DIST): Add posixver.h.
12619         * modules/quote (EXTRA_DIST): Add quote.h.
12620         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
12621         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
12622         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
12623         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
12624         regex_internal.h regexec.c.
12625         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
12626         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
12627         * modules/same (EXTRA_DIST): Add same.h.
12628         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
12629         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
12630         * modules/savedir (EXTRA_DIST): Add savedir.h.
12631         * modules/sha1 (EXTRA_DIST): Add sha1.h.
12632         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
12633         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
12634         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
12635         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
12636         * modules/strdup (EXTRA_DIST): Add strdup.h.
12637         * modules/strftime (EXTRA_DIST): Add strftime.h.
12638         * modules/strndup (EXTRA_DIST): Add strndup.h.
12639         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
12640         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
12641         * modules/time_r (EXTRA_DIST): Add time_r.h.
12642         * modules/timespec (EXTRA_DIST): Add timespec.h.
12643         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12644         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
12645         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
12646         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
12647         * modules/userspec (EXTRA_DIST): Add userspec.h.
12648         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
12649         * modules/utimens (EXTRA_DIST): Add utimens.h.
12650         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
12651         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
12652         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
12653         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
12654         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
12655         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
12656         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
12657         * modules/yesno (EXTRA_DIST): Add yesno.h.
12658
12659 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12660
12661         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
12662
12663         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
12664         * m4/dev-ino.m4, same-inode.m4: Remove.
12665
12666         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
12667         * m4/acl.m4 (AC_FUNC_ACL):
12668         * m4/backupfile.m4 (gl_BACKUPFILE):
12669         * m4/c-strtod.m4 (gl_C99_STRTOLD):
12670         * m4/canon-host.m4 (gl_CANON_HOST):
12671         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
12672         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
12673         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
12674         * m4/cloexec.m4 (gl_CLOEXEC):
12675         * m4/close-stream.m4 (gl_CLOSE_STREAM):
12676         * m4/closeout.m4 (gl_CLOSEOUT):
12677         * m4/dirfd.m4 (gl_FUNC_DIRFD):
12678         * m4/dirname.m4 (gl_DIRNAME):
12679         * m4/exclude.m4 (gl_EXCLUDE):
12680         * m4/exitfail.m4 (gl_EXITFAIL):
12681         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
12682         * m4/file-type.m4 (gl_FILE_TYPE):
12683         * m4/filemode.m4 (gl_FILEMODE):
12684         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
12685         * m4/fpending.m4 (gl_FUNC_FPENDING):
12686         * m4/fprintftime.m4 (gl_FPRINTFTIME):
12687         * m4/fts.m4 (gl_FUNC_FTS):
12688         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
12689         * m4/getdate.m4 (gl_GETDATE):
12690         * m4/gethrxtime.m4 (gl_GETHRXTIME):
12691         * m4/getpagesize.m4 (gl_GETPAGESIZE):
12692         * m4/getpass.m4 (gl_FUNC_GETPASS):
12693         * m4/gettime.m4 (gl_GETTIME):
12694         * m4/getugroups.m4 (gl_GETUGROUPS):
12695         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
12696         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
12697         * m4/hard-locale.m4 (gl_HARD_LOCALE):
12698         * m4/hash.m4 (gl_HASH):
12699         * m4/idcache.m4 (gl_IDCACHE):
12700         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12701         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12702         * m4/long-options.m4 (gl_LONG_OPTIONS):
12703         * m4/lstat.m4 (gl_FUNC_LSTAT):
12704         * m4/md5.m4 (gl_MD5):
12705         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12706         * m4/memcoll.m4 (gl_MEMCOLL):
12707         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12708         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12709         * m4/memxor.m4 (gl_MEMXOR):
12710         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12711         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12712         * m4/modechange.m4 (gl_MODECHANGE):
12713         * m4/mountlist.m4 (gl_MOUNTLIST):
12714         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12715         * m4/openat.m4 (gl_FUNC_OPENAT):
12716         * m4/pathmax.m4 (gl_PATHMAX):
12717         * m4/physmem.m4 (gl_PHYSMEM):
12718         * m4/posixtm.m4 (gl_POSIXTM):
12719         * m4/posixver.m4 (gl_POSIXVER):
12720         * m4/quote.m4 (gl_QUOTE):
12721         * m4/quotearg.m4 (gl_QUOTEARG):
12722         * m4/readtokens.m4 (gl_READTOKENS):
12723         * m4/readutmp.m4 (gl_READUTMP):
12724         * m4/regex.m4 (gl_REGEX):
12725         * m4/safe-read.m4 (gl_SAFE_READ):
12726         * m4/safe-write.m4 (gl_SAFE_WRITE):
12727         * m4/same.m4 (gl_SAME):
12728         * m4/save-cwd.m4 (gl_SAVE_CWD):
12729         * m4/savedir.m4 (gl_SAVEDIR):
12730         * m4/settime.m4 (gl_SETTIME):
12731         * m4/sha1.m4 (gl_SHA1):
12732         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12733         * m4/stat-macros.m4 (gl_STAT_MACROS):
12734         * m4/stat-time.m4 (gl_STAT_TIME):
12735         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12736         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12737         * m4/strdup.m4 (gl_FUNC_STRDUP):
12738         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12739         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12740         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12741         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12742         * m4/time_r.m4 (gl_TIME_R):
12743         * m4/timespec.m4 (gl_TIMESPEC):
12744         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12745         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12746         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12747         * m4/userspec.m4 (gl_USERSPEC):
12748         * m4/utimecmp.m4 (gl_UTIMECMP):
12749         * m4/utimens.m4 (gl_UTIMENS):
12750         * m4/xalloc.m4 (gl_XALLOC):
12751         * m4/xgetcwd.m4 (gl_XGETCWD):
12752         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12753         * m4/xreadlink.m4 (gl_XREADLINK):
12754         * m4/xstrtod.m4 (gl_XSTRTOD):
12755         * m4/yesno.m4 (gl_YESNO):
12756         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12757         to get the necessary .h files and whatnot.
12758
12759 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12760             Bruno Haible  <bruno@clisp.org>
12761
12762         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12763         /bin/sh understanding of '!' conditional negation.
12764
12765 2006-08-21  Jim Meyering  <jim@meyering.net>
12766
12767         * modules/openat (Depends-on): Really alphabetize.
12768
12769         * modules/acl (Depends-on): Add error and quote.
12770
12771         * check-module (find_included_lib_files): Add at-func.c to the
12772         ok-to-include-more-than-once white list.
12773
12774         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12775
12776 2006-08-21  Bruno Haible  <bruno@clisp.org>
12777
12778         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12779         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12780         Reported by Martin Lambers <marlam@marlam.de>.
12781
12782 2006-08-21  Bruno Haible  <bruno@clisp.org>
12783
12784         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12785         specify an installation location, don't emit a noinst_LIBRARIES or
12786         noinst_LTLIBRARIES assignment.
12787
12788 2006-08-21  Bruno Haible  <bruno@clisp.org>
12789
12790         BeOS portability.
12791         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12792         BeOS has mbrtowc() but no <wctype.h>.
12793
12794 2006-08-21  Bruno Haible  <bruno@clisp.org>
12795
12796         BeOS portability.
12797         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12798         exist.
12799
12800 2006-08-21  Bruno Haible  <bruno@clisp.org>
12801
12802         BeOS portability.
12803         * lib/mbchar.h: Include <wctype.h> only if it exists.
12804
12805 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12806
12807         Remove files that are no longer needed by their respective modules.
12808         * m4/obstack.m4: Remove.
12809         * m4/strerror_r.m4: Remove.
12810         * m4/uint32_t.m4: Remove.
12811         * m4/uintptr_t.m4: Remove.
12812         * m4/ullong_max.m4: Remove.
12813         * m4/xstrtoimax.m4: Remove.
12814         * m4/xstrtoumax.m4: Remove.
12815
12816         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12817         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12818         dependencies now capture this.
12819
12820         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12821         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12822         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12823         * m4/human.m4 (gl_HUMAN): Likewise.
12824         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12825         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12826
12827         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12828
12829         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12830         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12831         stdint.
12832         * m4/human.m4 (gl_HUMAN): Likewise.
12833         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12834         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12835         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12836         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12837         * m4/xstrtol (gl_XSTRTOL): Likewise.
12838
12839         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12840         AC_TYPE_LONG_LONG_INT.
12841         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12842         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12843         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12844         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12845
12846         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12847         on stdbool.
12848
12849         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12850         (gl_PREREQ_XSTRTOUL): Remove.
12851
12852         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12853
12854         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12855         mode.
12856
12857 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12858
12859         Add and change modules to make it easier for coreutils to use
12860         gnulib-tool.
12861         * modules/backupfile (Files): Remove m4/d-ino.m4.
12862         (Depends-on): Add d-ino.
12863         * modules/cycle-check (Depends-on): Add stdint.
12864         (lib_SOURCES): Add cycle-check.h.
12865         * modules/d-ino: New module.
12866         * modules/d-type: New module.
12867         * modules/error (Files): Remove m4/strerror_r.m4.
12868         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12869         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12870         m4/inttypes_h.m4, m4/uintmax_t.m4.
12871         (Depends-on): Add stdint.
12872         (lib_SOURCES): Add fsusage.h.
12873         * modules/getcwd (Files): Remove d-ino.m4.
12874         (Depends-on): Add d-ino.
12875         * modules/getndelim2 (Depends-on): Add stdint.
12876         * modules/glob (Files): Remove m4/d-type.m4.
12877         (Depends-on): Add d-type.
12878         * modules/host-os: New module.
12879         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12880         m4/inttypes_h.m4, m4/uintmax_t.m4.
12881         * Depends-on: Add stdint.
12882         (lib_SOURCES): Add human.h.
12883         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12884         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12885         m4/uintmax_t.m4, m4/ulonglong.m4.
12886         (Depends-on): Add stdint.
12887         (EXTRA_DIST): Add inttostr.h.
12888         * modules/lchmod: New module.
12889         * modules/link-follow: New module.
12890         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12891         (Depends-on): Add lchmod.
12892         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12893         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12894         (Depends-on): Add stdint.
12895         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12896         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12897         (Depends-on): Add stdint.
12898         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12899         * modules/perl: New module.
12900         * modules/regex (Depends-on): Add stdint.
12901         * modules/rmdir-errno: New module.
12902         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12903         m4/intmax_t.m4.
12904         (Depends-on): Add stdint.
12905         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12906         m4/uintmax_t.m4.
12907         (Depends-on): Add stdint.
12908         * modules/unlink-busy: New module.
12909         * modules/utimecmp (Depends-on): Add stdint.
12910         * modules/uptime: New module.
12911         * modules/winsz-ioctl: New module.
12912         * modules/winsz-termios: New module.
12913         * modules/xnanosleep (Depends-on): Add nanosleep.
12914         * modules/ullong_max: Remove.
12915         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12916         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12917         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12918         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12919         (Depends-on): Add inttypes.
12920         (lib_SOURCES): Add xstrtol.h.
12921         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12922         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12923         * MODULES.html.sh: Move 'assert' into the assert section.
12924         Move 'dummy' into the linking section.
12925         Remove ullong_max.
12926         Add section for compatibility checks for POSIX:2001 functions,
12927         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12928         winsz-ioctl, and winsz-termios into it.
12929         Add lchmod.
12930         Add top-level Misc section and put host-os, perl, and uptime
12931         into it.
12932
12933 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12934
12935         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12936         now assume the stdint module.  Do not include inttypes.h.
12937         * lib/fsusage.h: Likewise.
12938         * lib/getndelim2.c: Likewise.
12939         * lib/human.h: Likewise.
12940         * lib/inttostr.h: Likewise.
12941         * lib/obstack.c: Likewise.
12942         * lib/regex_internal.h: Likewise.
12943         * lib/tempname.c: Likewise.
12944         * lib/utimecmp.c: Likewise.
12945         * lib/xstrtol.h: Likewise.
12946
12947         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12948
12949         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12950         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12951         * lib/xtime.h: Likewise.
12952
12953 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12954
12955         * modules/openat (Files): Add lib/fchmodat.c.
12956         Fixes problem reported by Jay Youngman.
12957
12958 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12959
12960         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12961         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12962
12963 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12964             Bruno Haible  <bruno@clisp.org>
12965
12966         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12967         and is a script that invokes bison. Tighten the code. Add comments.
12968
12969 2006-08-18  Jim Meyering  <jim@meyering.net>
12970
12971         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12972         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12973         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12974         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12975
12976 2006-08-18  Bruno Haible  <bruno@clisp.org>
12977
12978         * modules/bison-i18n: New file.
12979         * MODULES.html.sh (Internationalization functions): Add it.
12980
12981 2006-08-18  Bruno Haible  <bruno@clisp.org>
12982
12983         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12984         sys/statvfs.h. When getmntinfo was found, check its declaration and
12985         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12986
12987 2006-08-18  Bruno Haible  <bruno@clisp.org>
12988
12989         * m4/bison-i18n.m4: New file, from bison.
12990
12991 2006-08-18  Bruno Haible  <bruno@clisp.org>
12992
12993         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12994         (ME_DUMMY): Treat "kernfs" as a dummy.
12995         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12996
12997 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12998
12999         Update from coreutils.
13000
13001         2006-08-15  Jim Meyering  <jim@meyering.net>
13002
13003         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
13004
13005         2006-01-17  Jim Meyering  <jim@meyering.net>
13006
13007         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
13008
13009         2006-01-11  Jim Meyering  <jim@meyering.net>
13010
13011         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
13012         Check for the lchmod function.
13013
13014 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13015
13016         Update from coreutils.
13017
13018         * lib/__fpending.h: Add copyright notice.
13019         * lib/fprintftime.h: Likewise.
13020         * lib/savedir.c: Use (C) in copyright notice.
13021         * lib/savedir.h: Likewise.
13022
13023         2006-08-15  Jim Meyering  <jim@meyering.net>
13024
13025         * lib/at-func.c: New file, with the logic of all emulated at-functions.
13026         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
13027         in support of the EXPECTED_ERRNO macro.
13028         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
13029         definitions.  Instead, define the appropriate symbols and include
13030         "at-func.c".
13031         * lib/mkdirat.c (mkdirat): Likewise.
13032         * lib/fchmodat.c (fchmodat): Likewise.
13033         (ENOSYS): Remove definition.
13034         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
13035         it.  Don't include "unistd--.h" -- it wasn't ever used.
13036
13037         2006-01-17  Jim Meyering  <jim@meyering.net>
13038
13039         Rewrite fts.c not to change the current working directory,
13040         by using openat, fstatat, fdopendir, etc..
13041
13042         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
13043         (HAVE_OPENAT_SUPPORT): Define.
13044         [_LIBC] (fchdir): Don't undef or define; no longer used.
13045         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
13046         Now, this `function' always succeeds, and consumes its file descriptor
13047         parameter -- so callers must not close such FDs.  Update callers.
13048         (diropen_fd, opendirat, cwd_advance_fd): New functions.
13049         (diropen): Add parameter, SP.  Adjust all callers.
13050         Implement using diropen_fd, rather than open.
13051         (fts_open): Initialize new member, fts_cwd_fd.
13052         Remove fts_rft-setting code.
13053         (fts_close): Close fts_cwd_fd, if necessary.
13054         (__opendir2): Define in terms of opendir or opendirat,
13055         depending on whether the FST_NOCHDIR flag is set.
13056         (fts_build): Since fts_safe_changedir consumes its FD, and since
13057         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
13058         and close the dup'd file descriptor upon failure.
13059         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
13060         (fts_safe_changedir): Tweak semantics to reflect that this function
13061         now calls cwd_advance_fd and hence consumes its FD argument.
13062         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
13063         [struct FTS] (fts_rft): Remove now-unused member.
13064         [struct FTS] (fts_cycle.state): Improve comment.
13065
13066         * lib/openat.c (openat_needs_fchdir): New function.
13067         * lib/openat.h (openat_needs_fchdir): Declare it.
13068
13069 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13070
13071         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
13072         Problem and fix reported by Pádraig Brady in
13073         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
13074
13075 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13076
13077         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
13078
13079 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13080
13081         * lib/memcoll.c (memcoll): Optimize for the common case where the
13082         arguments are bytewise equal.
13083
13084 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13085
13086         * doc/regexprops-generic.texi: Add a copyright notice.
13087
13088 2006-08-15  Bruno Haible  <bruno@clisp.org>
13089
13090         * modules/tmpdir (License): Change to LGPL.
13091
13092 2006-08-15  Bruno Haible  <bruno@clisp.org>
13093
13094         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
13095         module.
13096
13097 2006-08-14  Simon Josefsson  <jas@extundo.com>
13098
13099         * config/srclist.txt: Add gnupload.
13100
13101 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
13102
13103         Change copyright notice from LGPL 2 to GPL 2, since that's the
13104         standard form used in the gnulib repository.
13105         * tests/test-lock.c: Likewise.
13106         * tests/test-stdint.c: Likewise.
13107         * tests/test-tls.c: Likewise.
13108
13109         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
13110         prelude-manager.  User shorter URLs for GNU projects, without '?'.
13111         Add copyright notice.
13112
13113         * check-module: Add copyright notice.  Output a copyright
13114         notice if "--version" is specified.
13115         * modules/COPYING: New file.
13116         * tests/test-getaddrinfo.c: Add copyright notice.
13117         * tests/test-verify.c: Likewise.
13118
13119 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
13120
13121         Change copyright notice from LGPL 2 to GPL 2, since that's the
13122         standard form used in the gnulib repository.
13123         * lib/lock.c: LGPL -> GPL.
13124         * lib/lock.h: Likewise.
13125         * lib/strnlen1.c: Likewise.
13126         * lib/strnlen1.h: Likewise.
13127         * lib/tls.c: Likewise.
13128         * lib/tls.h: Likewise.
13129         * lib/tmpdir.c: Likewise.
13130
13131         * lib/TODO: Remove; this belongs only in coreutils.
13132
13133 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
13134
13135         Add copyright notices to long-enough files that lack them, since
13136         otherwise the files aren't clearly free.  Use the same notice that
13137         getdate.texi already uses.
13138         * doc/alloca-opt.texi: Add copyright notice.
13139         * doc/alloca.texi: Likewise.
13140         * doc/ctime.texi: Likewise.
13141         * doc/functions.texi: Likewise.
13142         * doc/gcd.texi: Likewise.
13143         * doc/gnulib-tool.texi: Likewise.
13144         * doc/inet_ntoa.texi: Likewise.
13145         * doc/visibility.texi: Likewise.
13146
13147         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
13148         * doc/quote.texi: Add copyright notice.
13149
13150         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
13151         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
13152         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
13153         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
13154         is now obsolete, and give a pointer to the Sun list.
13155         Add copyright notice.
13156
13157 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
13158
13159         * config/srclistvars.sh: Add copyright notice.
13160
13161 2006-08-14  Eric Blake  <ebb9@byu.net>
13162
13163         Import the following change from libc:
13164
13165         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
13166
13167         Upstream bug 2997.
13168         * lib/misc/error.c: Add space between program name and message if file
13169         name is missing.
13170
13171 2006-08-12  Karl Berry  <karl@gnu.org>
13172
13173         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
13174         remove, these originate in gnulib now.
13175
13176 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13177
13178         * doc/Makefile (standards.info standards.html standards.dvi):
13179         Also depend on make-stds.texi.
13180
13181 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13182
13183         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
13184         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
13185
13186         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
13187         in wchar_t.  Problem reported by Eric Blake.
13188
13189         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
13190         LEN is smaller than SIZE.  Suggested by Bruno Haible.
13191         Also, help the compiler to keep LEN in a register.
13192
13193 2006-08-11  Eric Blake  <ebb9@byu.net>
13194
13195         * users.txt: Sort.  Add tar.
13196
13197 2006-08-11  Bruno Haible  <bruno@clisp.org>
13198
13199         * users.txt: New file.
13200
13201 2006-08-11  Bruno Haible  <bruno@clisp.org>
13202
13203         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
13204         before <wchar.h>. Needed for OSF/1 and BSD/OS.
13205
13206 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13207
13208         * modules/snprintf (Depends-on): Remove minmax.
13209         (Maintainer): Add self and Bruno.
13210
13211 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13212
13213         * lib/.cppi-disable: Add snprintf.h, socket_.h.
13214         * lib/snprintf.c: Include <errno.h> and <limits.h>.
13215         (EOVERFLOW): Define if the system does not.
13216         Do not include "minmax.h"; it wasn't used.
13217         (snprintf): Don't assume size_t promotes to an unsigned type.
13218         Fix bug when generated string was too long for the buffer: the
13219         buffer's contents are supposed to be the initial prefix of the
13220         output.  Don't assume vasnprintf returns EOVERFLOW if the size
13221         exceeds INT_MAX; do the check ourselves.
13222
13223         Import the following changes from libc:
13224
13225         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
13226
13227         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
13228         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
13229         set wc to the byte which couldn't be converted.
13230         (re_string_reconstruct): Don't clear valid_raw_len before calling
13231         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
13232         tip_context using re_string_context_at.
13233
13234         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
13235
13236         * lib/posix/regex.h: g++ still cannot handled [restrict].
13237
13238         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
13239
13240         * lib/posix/regex.h: Remove special handling for VMS.
13241
13242 2006-08-10  Jim Meyering  <jim@meyering.net>
13243
13244         * modules/same-inode: New module.
13245         * modules/dev-ino: New module.
13246         * modules/cycle-check: Depend on these modules, rather than simply
13247         including their .h files.
13248         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
13249         required via m4/cycle-check.m4.
13250         * modules/same: Depend on new same-inode module, rather than
13251         including same-inode.h.
13252         * modules/chdir-safer: New file.
13253
13254         * modules/chown (Depends-on): Add stat-macros.
13255
13256 2006-08-10  Jim Meyering  <jim@meyering.net>
13257
13258         * m4/cycle-check.m4: New file.
13259         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
13260         * m4/dev-ino.m4, m4/same-inode.m4: New files.
13261
13262 2006-08-10  Eric Blake  <ebb9@byu.net>
13263
13264         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
13265         in from original proposal.
13266
13267 2006-08-10  Eric Blake  <ebb9@byu.net>
13268         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13269
13270         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
13271         namespace.
13272
13273 2006-08-10  Bruno Haible  <bruno@clisp.org>
13274
13275         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
13276         as well.
13277
13278 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13279
13280         Sync from coreutils.
13281
13282         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
13283
13284         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
13285         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
13286
13287 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13288
13289         * modules/restrict: Remove; no longer needed now that we assume
13290         Autoconf 2.59 or later.
13291         * MODULES.html.sh: Remove 'restrict'.
13292         * modules/argp (Depends-on): Remove 'restrict'.
13293         * modules/base64 (Depends-on): Likewise.
13294         * modules/gc (Depends-on): Likewise.
13295         * modules/getaddrinfo (Depends-on): Likewise.
13296         * modules/glob (Depends-on): Likewise.
13297         * modules/inet_ntop (Depends-on): Likewise.
13298         * modules/inet_pton (Depends-on): Likewise.
13299         * modules/memxor (Depends-on): Likewise.
13300         * modules/regex (Depends-on): Likewise.
13301         * modules/strtok_r (Depends-on): Likewise.
13302         * modules/time_r (Depends-on): Likewise.
13303
13304 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13305
13306         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
13307         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
13308         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13309         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
13310         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
13311         * m4/memxor.m4 (gl_MEMXOR): Likewise.
13312         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
13313         gl_C_RESTRICT replaced by AC_C_RESTRICT.
13314
13315         Merge from coreutils.
13316         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
13317         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
13318         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
13319         * m4/time_r.m4 (gl_TIME_R): Likewise.
13320
13321 2006-08-09  Karl Berry  <karl@gnu.org>
13322
13323         * config/srclist.txt: no more gettext-tools, per Bruno.
13324
13325 2006-08-08  Eric Blake  <ebb9@byu.net>
13326
13327         * modules/verror: New module.
13328         * MODULES.html.sh: Document it.
13329
13330 2006-08-08  Eric Blake  <ebb9@byu.net>
13331
13332         * lib/verror.h, lib/verror.c: New files.
13333
13334 2006-08-08  Eric Blake  <ebb9@byu.net>
13335
13336         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
13337         verror_at_line output complies with GNU Coding Standards even when
13338         file is NULL.
13339
13340 2006-08-07  Bruno Haible  <bruno@clisp.org>
13341
13342         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
13343         versions of AIX.
13344         Reported by Ralf Wildenhues.
13345
13346 2006-08-07  Bruno Haible  <bruno@clisp.org>
13347
13348         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
13349         in an AC_DEFUN. Needed so that the autoconf snippets can use
13350         AC_REQUIRE.
13351
13352 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13353
13354         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13355         Initialize pkgdata_DATA.
13356         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
13357         overriding it.
13358
13359 2006-08-06  Eric Blake  <ebb9@byu.net>
13360
13361         * lib/error.h: Fold in some upstream changes from glibc.
13362         * lib/error.c: Likewise.
13363
13364 2006-08-04  Bruno Haible  <bruno@clisp.org>
13365
13366         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13367         Make the mostlyclean-local rule depend on mostlyclean-generic.
13368         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
13369
13370 2006-07-31  Bruno Haible  <bruno@clisp.org>
13371
13372         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
13373         <stdlib.h>, <string.h>.
13374
13375 2006-07-30  Bruno Haible  <bruno@clisp.org>
13376
13377         * modules/readlink (License): Change to LGPL.
13378
13379 2006-07-30  Bruno Haible  <bruno@clisp.org>
13380
13381         * modules/javaversion (Makefile.am): Distribute javaversion.java and
13382         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
13383         set PKGDATADIR to point to it.
13384
13385 2006-07-30  Bruno Haible  <bruno@clisp.org>
13386
13387         * modules/csharpexec (configure.ac): Comment out macro invocation.
13388         * modules/javaexec (configure.ac): Likewise.
13389         * modules/javacomp-script (configure.ac): Likewise.
13390
13391         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
13392
13393 2006-07-30  Bruno Haible  <bruno@clisp.org>
13394
13395         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
13396         linked-list.
13397
13398 2006-07-30  Bruno Haible  <bruno@clisp.org>
13399
13400         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
13401
13402 2006-07-30  Bruno Haible  <bruno@clisp.org>
13403
13404         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13405         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
13406         get removed.
13407
13408 2006-07-29  Bruno Haible  <bruno@clisp.org>
13409
13410         Make it possible for gnulib-tool to work with locally modified or
13411         augmented gnulib repositories.
13412         * gnulib-tool (func_usage): Document --local-dir option.
13413         (local_gnulib_dir): New variable.
13414         Handle --local-dir option.
13415         (func_lookup_file): New function.
13416         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
13417         (func_get_description, func_get_filelist, func_get_description,
13418         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
13419         func_get_automake_snippet, func_get_include_directive,
13420         func_get_license, func_get_maintainer): Use func_lookup_file.
13421         (func_import, func_create_testdir): Use func_lookup_file.
13422
13423 2006-07-29  Bruno Haible  <bruno@clisp.org>
13424
13425         * modules/setenv (Depends-on): Add unistd.
13426
13427 2006-07-29  Bruno Haible  <bruno@clisp.org>
13428
13429         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
13430
13431 2006-07-29  Bruno Haible  <bruno@clisp.org>
13432
13433         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
13434
13435 2006-07-29  Bruno Haible  <bruno@clisp.org>
13436
13437         * gnulib-tool (import, update): If there is no Makefile.am, look at
13438         aclocal.m4, instead of bailing out.
13439
13440 2006-07-29  Bruno Haible  <bruno@clisp.org>
13441
13442         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
13443         Categorize the options by when they are useful.
13444
13445 2006-07-29  Bruno Haible  <bruno@clisp.org>
13446
13447         * gnulib-tool (func_usage): Document option --no-libtool.
13448         Handle option --no-libtool.
13449         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
13450         for changed semantics of $libtool variable.
13451         (func_import): Likewise. If libtool is not used, show this through
13452         an option --no-libtool.
13453         (func_create_testdir): Update.
13454
13455 2006-07-29  Bruno Haible  <bruno@clisp.org>
13456
13457         * gnulib-tool (func_import): Extend error message about missing
13458         --doc-base.
13459
13460 2006-07-29  Bruno Haible  <bruno@clisp.org>
13461
13462         * gnulib-tool (func_import): Don't create the $docbase directory if
13463         there is no file to store there.
13464
13465 2006-07-29  Bruno Haible  <bruno@clisp.org>
13466
13467         * gnulib-tool (autoconf_minversion): If a --dir option is given and
13468         relevant, look for configure.ac there, not in the current directory.
13469         Also use a simple search for AC_PREREQ, not "autoconf --trace".
13470
13471 2006-07-29  Bruno Haible  <bruno@clisp.org>
13472
13473         * gnulib-tool (SORT): New variable.
13474         (func_usage): Undocument --assume-autoconf option.
13475         Remove --assume-autoconf option handling.
13476         (autoconf_minversion): Determine from the contents of configure.ac.
13477         (func_import): Remove autoconf_minversion handling.
13478         Suggested by Eric Blake.
13479
13480 2006-07-29  Bruno Haible  <bruno@clisp.org>
13481
13482         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
13483
13484 2006-07-29  Bruno Haible  <bruno@clisp.org>
13485
13486         * config/srclist.txt (*setenv.[ch]): Remove rules.
13487
13488 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13489
13490         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
13491
13492 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13493
13494         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
13495         arpa/inet.h.
13496
13497 2006-07-28  Simon Josefsson  <jas@extundo.com>
13498
13499         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
13500         * modules/inet_pton (Depends-on): Likewise.
13501
13502 2006-07-28  Simon Josefsson  <jas@extundo.com>
13503
13504         * m4/netinet_in_h.m4: New file.
13505
13506 2006-07-28  Simon Josefsson  <jas@extundo.com>
13507
13508         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
13509         #include's.
13510
13511 2006-07-28  Simon Josefsson  <jas@extundo.com>
13512
13513         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
13514         #include's.
13515
13516 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
13517
13518         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
13519         setgid on directories only if they set these bits.
13520         * lib/modechange.h: Remove obsolete comment about masks.
13521
13522 2006-07-28  Eric Blake  <ebb9@byu.net>
13523
13524         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
13525         macro expansion.
13526
13527 2006-07-28  Bruno Haible  <bruno@clisp.org>
13528
13529         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
13530
13531 2006-07-28  Bruno Haible  <bruno@clisp.org>
13532
13533         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
13534
13535 2006-07-28  Bruno Haible  <bruno@clisp.org>
13536
13537         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
13538         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
13539         Define fallbacks.
13540         Avoids link error on FreeBSD 4.x.
13541         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13542
13543         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
13544         encoding.
13545         * lib/mbswidth.c (iswcntrl): Likewise.
13546
13547 2006-07-27  Bruno Haible  <bruno@clisp.org>
13548
13549         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
13550         test.
13551
13552 2006-07-27  Bruno Haible  <bruno@clisp.org>
13553
13554         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
13555         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
13556         defined.
13557
13558 2006-07-26  Eric Blake  <ebb9@byu.net>
13559
13560         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
13561
13562 2006-07-26  Eric Blake  <ebb9@byu.net>
13563
13564         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
13565         like mingw that lack mkstemp.
13566         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
13567         avoid compilation warning on mingw.
13568
13569 2006-07-26  Bruno Haible  <bruno@clisp.org>
13570
13571         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
13572         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
13573         INT_FAST*_MIN, INTPTR_MIN.
13574
13575 2006-07-25  Bruno Haible  <bruno@clisp.org>
13576
13577         * modules/version-etc (Depends-on): Add stdarg.
13578
13579 2006-07-25  Bruno Haible  <bruno@clisp.org>
13580
13581         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
13582         complex commands.
13583
13584 2006-07-25  Bruno Haible  <bruno@clisp.org>
13585
13586         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
13587         defined in <stdarg.h> or config.h.
13588
13589 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13590
13591         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
13592         (gl_STDIO_SAFER): Remove.
13593
13594 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13595
13596         * MODULES.html.sh (File stream based Input/Output):
13597         Add fopen-safer, tmpfile-safer; remove stdio-safer.
13598         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
13599         * modules/fopen-safer, modules/tmpfile-safer: New files.
13600         * modules/stdio-safer: Remove.
13601
13602 2006-07-24  Bruno Haible  <bruno@clisp.org>
13603
13604         * modules/tmpdir: New file.
13605         * MODULES.html.sh (File system functions): Add it.
13606
13607 2006-07-24  Bruno Haible  <bruno@clisp.org>
13608
13609         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
13610         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
13611
13612 2006-07-24  Bruno Haible  <bruno@clisp.org>
13613
13614         * modules/clean-temp: New file.
13615
13616 2006-07-24  Bruno Haible  <bruno@clisp.org>
13617
13618         * m4/tmpdir.m4: New file, from GNU gettext.
13619
13620 2006-07-24  Bruno Haible  <bruno@clisp.org>
13621
13622         * lib/tmpdir.h: New file, from GNU gettext.
13623         * lib/tmpdir.c: New file, from GNU gettext.
13624
13625 2006-07-24  Bruno Haible  <bruno@clisp.org>
13626
13627         * lib/clean-temp.h: New file, from GNU gettext.
13628         * lib/clean-temp.c: New file, from GNU gettext.
13629
13630 2006-07-23  Eric Blake  <ebb9@byu.net>
13631
13632         * modules/stdio-safer (Files): Add tmpfile-safer.c.
13633         (Depends-on): Add binary-io.
13634
13635 2006-07-23  Eric Blake  <ebb9@byu.net>
13636
13637         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
13638
13639 2006-07-23  Eric Blake  <ebb9@byu.net>
13640
13641         * lib/tmpfile-safer.c: New file.
13642         * lib/stdio-safer.h (fopen_safer): Add prototype.
13643         * lib/stdio--.h (tmpfile): Make safer.
13644
13645 2006-07-23  Bruno Haible  <bruno@clisp.org>
13646
13647         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
13648         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
13649         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
13650         gl_linked_remove_at): Use it.
13651
13652 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13653         and Simon Josefsson <jas@extundo.com>
13654
13655         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
13656
13657         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
13658
13659 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13660
13661         * modules/close-stream: New file.
13662         * modules/closeout (Description): Make it clear that it exits
13663         with a diagnostic on error.
13664         (Depends-on): Add close-stream.  Remove fpending, stdbool.
13665         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
13666
13667 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13668
13669         * m4/close-stream.m4: New file.
13670
13671 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13672
13673         * lib/close-stream.c, lib/close-stream.h: New files.
13674
13675 2006-07-22  Bruno Haible  <bruno@clisp.org>
13676
13677         Merge from GNU gettext 0.15.
13678
13679         2006-05-01  Bruno Haible  <bruno@clisp.org>
13680
13681                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
13682
13683         2006-07-22  Bruno Haible  <bruno@clisp.org>
13684
13685                 * modules/javaversion: New file.
13686                 * MODULES.html.sh (Java): Add javaversion.
13687
13688         2006-03-12  Bruno Haible  <bruno@clisp.org>
13689
13690                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
13691
13692         2005-12-04  Bruno Haible  <bruno@clisp.org>
13693
13694                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
13695                 (untested).
13696
13697         2006-06-21  Bruno Haible  <bruno@clisp.org>
13698
13699                 Avoid warnings from recent versions of mcs.
13700                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13701                 -o, -L, -r any more. Use options documented since mcs-1.0
13702                 instead. Similarly for -g.
13703
13704         2005-12-04  Bruno Haible  <bruno@clisp.org>
13705
13706                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13707                 .resources, not .resource.
13708
13709         2005-07-09  Bruno Haible  <bruno@clisp.org>
13710
13711                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13712                 add a .dll suffix.
13713                 Reported by Mark Junker <mjscod@gmx.de>.
13714
13715         2006-07-22  Bruno Haible  <bruno@clisp.org>
13716
13717                 * modules/gettext: Upgrade to gettext-0.15.
13718                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13719                 m4/visibility.m4.
13720                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13721
13722 2006-07-22  Bruno Haible  <bruno@clisp.org>
13723
13724         Merge from GNU gettext 0.15.
13725
13726         2006-03-25  Bruno Haible  <bruno@clisp.org>
13727
13728                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13729
13730         2006-07-21  Bruno Haible  <bruno@clisp.org>
13731
13732                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13733                 "1.1".
13734
13735         2006-05-09  Bruno Haible  <bruno@clisp.org>
13736
13737                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13738                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13739                 for the conftestver execution.
13740
13741         2006-05-01  Bruno Haible  <bruno@clisp.org>
13742
13743                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13744                 optional target-version argument. Verify that the compiler
13745                 groks source of the specified source-version, or add -source
13746                 option as necessary. Verify that the compiler produces
13747                 bytecode in the specified target-version, or add -target and
13748                 -source options as necessary. Make the result of the test
13749                 available as variable CONF_JAVAC. Also log error output in
13750                 config.log.
13751
13752         2006-03-11  Bruno Haible  <bruno@clisp.org>
13753
13754                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13755
13756         2006-05-09  Bruno Haible  <bruno@clisp.org>
13757
13758                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13759                 CLASSPATH_SEPARATOR to a semicolon.
13760
13761         2006-03-12  Bruno Haible  <bruno@clisp.org>
13762
13763                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13764                 available as variable CONF_JAVA, for subsequent autoconf
13765                 tests. Also log error output in config.log.
13766
13767         2006-07-19  Bruno Haible  <bruno@clisp.org>
13768
13769                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13770                 that getline works on glibc2 systems. Needed to avoid trouble
13771                 in relocatable.c.
13772                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13773
13774         2005-12-04  Bruno Haible  <bruno@clisp.org>
13775
13776                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13777                 launcher (untested).
13778
13779         2005-12-04  Bruno Haible  <bruno@clisp.org>
13780
13781                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13782
13783         2006-07-22  Bruno Haible  <bruno@clisp.org>
13784
13785                 * gettext.m4: Update from GNU gettext-0.15.
13786                 * nls.m4: Likewise.
13787                 * po.m4: Likewise.
13788                 * inttypes-pri.m4: Likewise.
13789                 * inttypes-h.m4: Renamed from inttypes.m4.
13790                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13791
13792 2006-07-22  Bruno Haible  <bruno@clisp.org>
13793
13794         Merge from GNU gettext 0.15.
13795
13796         2005-07-05  Bruno Haible  <bruno@clisp.org>
13797
13798                 * printf-args.c (printf_fetchargs): Work around broken
13799                 definition of wint_t on mingw.
13800
13801         2005-02-12  Bruno Haible  <bruno@clisp.org>
13802
13803                 * xallocsa.h: Add extern "C" for C++.
13804
13805         2006-05-17  Bruno Haible  <bruno@clisp.org>
13806
13807                 Cygwin portability.
13808                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13809
13810         2006-04-30  Bruno Haible  <bruno@clisp.org>
13811
13812                 * progreloc.c: Include <mach-o/dyld.h> if available.
13813                 (find_executable): Use _NSGetExecutablePath when possible.
13814
13815         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13816
13817                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13818                 function.
13819
13820         2005-12-29  Bruno Haible  <bruno@clisp.org>
13821
13822                 * progreloc.c (set_program_name_and_installdir): Fix
13823                 compilation error.
13824
13825         2005-12-04  Bruno Haible  <bruno@clisp.org>
13826
13827                 Cygwin portability.
13828                 * progreloc.c: Include <windows.h> also on Cygwin.
13829                 (find_executable): Add support for Cygwin.
13830                 (set_program_name_and_installdir): Handle also platforms with
13831                 nonempty EXEEXT.
13832
13833         2006-07-11  Bruno Haible  <bruno@clisp.org>
13834
13835                 * javacomp.c: Fix a comment.
13836                 Reported by Jim Meyering.
13837
13838         2006-04-30  Bruno Haible  <bruno@clisp.org>
13839
13840                 * javacomp.h (compile_java_class): Add source_version,
13841                 target_version arguments.
13842                 * javacomp.c: Rewritten to choose only a compiler that
13843                 respects the specified source_version and target_version.
13844
13845         2006-06-27  Bruno Haible  <bruno@clisp.org>
13846
13847                 Assume correct S_ISDIR macro.
13848                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13849
13850         2006-07-22  Bruno Haible  <bruno@clisp.org>
13851
13852                 * javaversion.h: New file, from GNU gettext.
13853                 * javaversion.c: New file, from GNU gettext.
13854                 * javaversion.java: New file, from GNU gettext.
13855                 * javaversion.class: New file, from GNU gettext.
13856
13857         2006-05-17  Bruno Haible  <bruno@clisp.org>
13858
13859                 Cygwin portability.
13860                 * javaexec.c (execute_java_class): Test for jview program
13861                 also on Cygwin.
13862
13863         2006-04-09  Bruno Haible  <bruno@clisp.org>
13864
13865                 * fatal-signal.c: Don't include string.h.
13866                 (at_fatal_signal): Use a copying loop instead of memcpy.
13867
13868         2005-12-04  Bruno Haible  <bruno@clisp.org>
13869
13870                 * csharpexec.c: Add support for 'clix' launcher (untested).
13871                 (execute_csharp_using_sscli): New function.
13872                 (execute_csharp_program): Call it.
13873
13874         2006-06-21  Bruno Haible  <bruno@clisp.org>
13875
13876                 Avoid warnings from recent versions of mcs.
13877                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13878                 -o, -L, -r any more. Use options documented since mcs-1.0
13879                 instead. Similarly for -g.
13880
13881         2005-07-09  Bruno Haible  <bruno@clisp.org>
13882
13883                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13884                 add a .dll suffix.
13885                 Reported by Mark Junker <mjscod@gmx.de>.
13886
13887         2006-06-17  Bruno Haible  <bruno@clisp.org>
13888
13889                 * config.charset: Update for NetBSD 3.0.
13890
13891         2006-05-17  Bruno Haible  <bruno@clisp.org>
13892
13893                 Cygwin portability.
13894                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13895
13896         2006-05-16  Bruno Haible  <bruno@clisp.org>
13897
13898                 * localcharset.c [CYGWIN]: Include <windows.h>.
13899                 (get_charset_aliases): For Cygwin, return the same CPxxx
13900                 aliases list as under WIN32.
13901                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13902                 the environment variables. Fall back to GetACP().
13903
13904         2006-04-05  Bruno Haible  <bruno@clisp.org>
13905
13906                 * config.charset: Update Juan Manuel Guerrero's address.
13907
13908         2005-02-12  Bruno Haible  <bruno@clisp.org>
13909
13910                 * allocsa.h: Add extern "C" for C++.
13911
13912         2005-02-10  Bruno Haible  <bruno@clisp.org>
13913
13914                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13915                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13916
13917         2006-07-22  Bruno Haible  <bruno@clisp.org>
13918
13919                 * gettext.h: Update to GNU gettext-0.15.
13920
13921 2006-07-22  Bruno Haible  <bruno@clisp.org>
13922
13923         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13924         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13925         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13926
13927 2006-07-21  Eric Blake  <ebb9@byu.net>
13928
13929         * modules/stdlib-safer: New file.
13930         * MODULES.html.sh (File stream based Input/Output): Add
13931         stdlib-safer.
13932
13933 2006-07-21  Eric Blake  <ebb9@byu.net>
13934
13935         * lib/stdlib-safer.h: New file from coreutils, required by
13936         stdlib--.h.
13937
13938 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13939
13940         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13941
13942 2006-07-20  Bruno Haible  <bruno@clisp.org>
13943
13944         * gnulib-tool: Recognize new option --assume-autoconf.
13945         (autoconf_minversion): New variable.
13946         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13947
13948 2006-07-20  Bruno Haible  <bruno@clisp.org>
13949
13950         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13951
13952 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13953
13954         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13955         Reindent and repaginate.
13956
13957 2006-07-19  Derek Price  <derek@ximbiot.com>
13958
13959         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13960         Correct grammar.
13961
13962 2006-07-17  Bruno Haible  <bruno@clisp.org>
13963
13964         * modules/list: New file.
13965         * modules/array-list: New file.
13966         * modules/carray-list, modules/carray-list-tests: New files.
13967         * modules/linked-list, modules/linked-list-tests: New files.
13968         * modules/avltree-list, modules/avltree-list-tests: New files.
13969         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13970         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13971         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13972         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13973         * modules/oset: New file.
13974         * modules/array-oset: New file.
13975         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13976         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13977         * tests/test-carray_list.c: New file.
13978         * tests/test-linked_list.c: New file.
13979         * tests/test-avltree_list.c: New file.
13980         * tests/test-rbtree_list.c: New file.
13981         * tests/test-linkedhash_list.c: New file.
13982         * tests/test-avltreehash_list.c: New file.
13983         * tests/test-rbtreehash_list.c: New file.
13984         * tests/test-avltree_oset.c: New file.
13985         * tests/test-rbtree_oset.c: New file.
13986         * MODULES.html.sh (Container data structures): New section.
13987
13988 2006-07-17  Bruno Haible  <bruno@clisp.org>
13989
13990         * m4/gl_list.m4: New file.
13991
13992 2006-07-17  Bruno Haible  <bruno@clisp.org>
13993
13994         * lib/gl_list.h: New file.
13995         * lib/gl_list.c: New file.
13996         * lib/gl_array_list.h: New file.
13997         * lib/gl_array_list.c: New file.
13998         * lib/gl_carray_list.h: New file.
13999         * lib/gl_carray_list.c: New file.
14000         * lib/gl_linked_list.h: New file.
14001         * lib/gl_linked_list.c: New file.
14002         * lib/gl_anylinked_list1.h: New file.
14003         * lib/gl_anylinked_list2.h: New file.
14004         * lib/gl_avltree_list.h: New file.
14005         * lib/gl_avltree_list.c: New file.
14006         * lib/gl_anyavltree_list1.h: New file.
14007         * lib/gl_anyavltree_list2.h: New file.
14008         * lib/gl_rbtree_list.h: New file.
14009         * lib/gl_rbtree_list.c: New file.
14010         * lib/gl_anyrbtree_list1.h: New file.
14011         * lib/gl_anyrbtree_list2.h: New file.
14012         * lib/gl_anytree_list1.h: New file.
14013         * lib/gl_anytree_list2.h: New file.
14014         * lib/gl_linkedhash_list.h: New file.
14015         * lib/gl_linkedhash_list.c: New file.
14016         * lib/gl_anyhash_list1.h: New file.
14017         * lib/gl_anyhash_list2.h: New file.
14018         * lib/gl_avltreehash_list.h: New file.
14019         * lib/gl_avltreehash_list.c: New file.
14020         * lib/gl_rbtreehash_list.h: New file.
14021         * lib/gl_rbtreehash_list.c: New file.
14022         * lib/gl_anytreehash_list1.h: New file.
14023         * lib/gl_anytreehash_list2.h: New file.
14024
14025         * lib/gl_oset.h: New file.
14026         * lib/gl_oset.c: New file.
14027         * lib/gl_array_oset.h: New file.
14028         * lib/gl_array_oset.c: New file.
14029         * lib/gl_avltree_oset.h: New file.
14030         * lib/gl_avltree_oset.c: New file.
14031         * lib/gl_rbtree_oset.h: New file.
14032         * lib/gl_rbtree_oset.c: New file.
14033         * lib/gl_anytree_oset.h: New file.
14034
14035 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
14036
14037         * m4/mkancesdirs.m4: New file.
14038         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
14039         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
14040         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
14041         it.
14042
14043 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
14044
14045         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
14046         * lib/mkancesdirs.h: New files.
14047         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
14048         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
14049         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
14050         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
14051         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
14052         callers changed.  Revamp internals significantly, by not
14053         attempting to create directories that are temporarily more
14054         permissive than the final results.  Do not attempt to use
14055         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
14056         This removes some race conditions, fixes some bugs, and simplifies
14057         things.  Use new dirchownmod function to do owner and mode changes.
14058         * lib/mkdir-p.h: Likewise.
14059         * lib/modechange.c (octal_to_mode): New function.
14060         (struct mode_change): New member mentioned.
14061         (make_node_op_equals): New arg mentioned.  All callers changed.
14062         (mode_compile): Keep track of which mode bits the user has explicitly
14063         mentioned.
14064         (mode_adjust): New arg DIR, so that we implement the X op correctly.
14065         New arg PMODE_BITS, to keep track of which mode bits the user
14066         mentioned; it treats S_ISUID and S_ISGID speciall.
14067         All callers changed.
14068         * lib/modechange.h: Likewise.
14069
14070 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
14071
14072         * MODULES.html.sh: Add mkancestors.
14073         * modules/mkancesdirs: New module.
14074         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
14075         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
14076         The chdir-safer and afs files are now orphans; I'll remove them
14077         unless someone speaks up.
14078         Add lib/dirchownmod.c, lib/dirchownmod.h.
14079         (Depends-on): Remove alloca, chown, save-cwd, dirname.
14080         Add lchown, mkancesdirs.
14081         (Maintainer): Add self.
14082
14083 2006-07-15  Karl Berry  <karl@gnu.org>
14084
14085         * gnulib-tool: help message wording/arrangement.
14086
14087 2006-07-14  Simon Josefsson  <jas@extundo.com>
14088
14089         * doc/gnulib.texi (Libtool and Windows): New section.
14090
14091 2006-07-12  Simon Josefsson  <jas@extundo.com>
14092
14093         * modules/gendocs (License): Fix license, approved by Karl.
14094
14095 2006-07-12  Eric Blake  <ebb9@byu.net>
14096
14097         * MODULES.html.sh: Add gendocs.
14098
14099 2006-07-11  Eric Blake  <ebb9@byu.net>
14100
14101         * modules/fdl: New module, to install doc/fdl.texi.
14102         * MODULES.html.sh: Add new section for documentation modules.
14103         * gnulib-tool: Avoid space-tab.
14104         (--doc-base): New option, to manage files from doc.
14105
14106 2006-07-11  Eric Blake  <ebb9@byu.net>
14107
14108         * m4/absolute-header.m4: Fix comments to match recent change.
14109
14110 2006-07-11  Eric Blake  <ebb9@byu.net>
14111
14112         * gnulib-tool: List --doc-base before --tests-base.
14113
14114 2006-07-11  Derek R. Price  <derek@ximbiot.com>
14115
14116         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
14117
14118 2006-07-11  Bruno Haible  <bruno@clisp.org>
14119
14120         * README: Mention where to put documentation.
14121
14122 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14123
14124         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
14125
14126 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
14127
14128         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
14129         to stdint.m4.
14130
14131 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
14132
14133         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
14134         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
14135         "no/such/file/stdint.h" when there is no such file, so that
14136         the resulting C code can be parsed by dodgy compilers.
14137         Problems reported by Bob Proulx.
14138
14139 2006-07-10  Derek R. Price  <derek@ximbiot.com>
14140
14141         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
14142         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
14143         macros into the GNU _D_EXACT_NAMLEN.
14144         * lib/savedir.c:  Likewise.
14145         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
14146
14147 2006-07-10  Derek R. Price  <derek@ximbiot.com>
14148         and Paul Eggert  <eggert@cs.ucla.edu>
14149
14150         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
14151         * m4/savedir.m4:
14152         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
14153         macros into the GNU _D_EXACT_NAMLEN.
14154
14155 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14156
14157         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
14158         around the absolute name, to work around a problem with the HP-UX
14159         11.23 native C compiler, reported by Bob Proulx.
14160
14161 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14162
14163         * doc/maintain.texi, make-stds.texi: Sync from
14164         <http://savannah.gnu.org/projects/gnustandards>.
14165
14166 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14167
14168         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
14169
14170 2006-07-09  Jim Meyering  <jim@meyering.net>
14171
14172         * m4/glob.m4: Remove a doubled word in a comment.
14173
14174 2006-07-09  Jim Meyering  <jim@meyering.net>
14175
14176         * lib/argp-pv.c: Remove a doubled word in a comment.
14177         * lib/check-version.c (check_version): Likewise.
14178         * lib/javacomp.c (compile_java_class): Likewise.
14179
14180 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14181
14182         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
14183         for the benefit of people using Autoconf 2.60.  If you want to
14184         support older Autoconf versions you can copy m4/onceonly_2_57.m4
14185         (or m4/onceonly.m4, if pre-2.57) manually.
14186
14187 2006-07-08  Jim Meyering  <jim@meyering.net>
14188
14189         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
14190         comment.
14191         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
14192         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
14193         comment.
14194
14195 2006-07-08  Jim Meyering  <jim@meyering.net>
14196
14197         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
14198
14199 2006-07-07  Simon Josefsson  <jas@extundo.com>
14200
14201         * tests/test-crc.c: Change expected crc value, the test vector
14202         were probably computed using the old broken crc.c?
14203
14204 2006-07-06  Simon Josefsson  <jas@extundo.com>
14205
14206         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
14207         now the canonical place for the M4 file).
14208
14209         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
14210         from the sys_socket dependency now.
14211
14212         * modules/inet_pton (Files): Ditto.
14213
14214         * modules/inet_ntop (Files): Ditto.
14215
14216 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14217
14218         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
14219         not gl_PREREQ_GETUSERSHELL.
14220
14221 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14222
14223         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
14224         with only one argument, for Autoconf 2.60.
14225         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
14226         expand to nothing, so add a shell command to avoid syntax error.
14227         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14228
14229 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14230
14231         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
14232
14233 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14234
14235         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
14236         no longer needed.  Check for isblank decl.
14237         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
14238         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
14239         of existence.
14240
14241 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14242
14243         * lib/getloadavg.c: Use __VMS, not VMS.
14244         * lib/getopt.c: Likewise.
14245         * lib/getpagesize.h: Likewise.
14246         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
14247         and probably does not work.
14248
14249 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14250
14251         * lib/.cppi-disable: Add wcwidth.
14252         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
14253         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
14254         (ISGRAPH): Remove.  All uses changed to isgraph.
14255         (FOLD) [!defined _LIBC]: Remove special case.
14256         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
14257         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
14258         HAVE_ISBLANK.
14259         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
14260         case.
14261
14262 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14263
14264         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
14265         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
14266         brackets.  Other minor changes to suppress some compiler
14267         warnings.
14268
14269 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14270         and Paul Eggert  <eggert@cs.ucla.edu>
14271
14272         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
14273         of invoking obsolescent AC_HEADER_DIRENT macro.
14274         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
14275         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
14276         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
14277         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
14278         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
14279         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
14280         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
14281         * m4/readdir.m4: Remove; no longer needed.
14282
14283 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14284         and Paul Eggert  <eggert@cs.ucla.edu>
14285
14286         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
14287         Don't worry about this obsolete case any more.
14288         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
14289         directories.
14290         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
14291         worry about this obsolete case any more.
14292         * lib/fts.c: Likewise.
14293         * lib/getcwd.c: Likewise.
14294         * lib/glob.h: Likewise.
14295         * lib/savedir.c: Likewise.
14296
14297 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14298
14299         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
14300         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
14301         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
14302         needed.
14303         All uses removed.
14304         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14305         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14306         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
14307         needed.
14308         * m4/getdate.m4 (gl_GETDATE): Likewise.
14309         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14310         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14311         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14312         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14313         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14314         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14315         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
14316         needed.
14317
14318 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14319
14320         * lib/memcasecmp.c: Include <limits.h>.
14321         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
14322         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
14323         Don't assume isdigit succeeds only on '0' through '9'.
14324
14325 2006-07-05  Eric Blake  <ebb9@byu.net>
14326
14327         * modules/getaddrinfo (Depends-on): Add snprintf.
14328
14329 2006-07-05  Eric Blake  <ebb9@byu.net>
14330
14331         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
14332         to avoid 'header present but could not be compiled' on cygwin.
14333
14334 2006-07-05  Eric Blake  <ebb9@byu.net>
14335
14336         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
14337         missing from netdb.h.
14338         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
14339
14340 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14341
14342         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
14343         no longer needed.
14344         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
14345         * m4/getdate.m4 (gl_GETDATE): Likewise.
14346         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14347         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14348         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14349         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14350         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14351
14352 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14353
14354         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
14355         All uses of is_space replaced by isspace.
14356         * lib/exit.h: Don't talk about STDC_HEADERS.
14357         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
14358         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
14359         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
14360         replaced by isprint etc.
14361         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
14362         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14363         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
14364         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
14365         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
14366         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14367
14368 2006-07-05  Bruno Haible  <bruno@clisp.org>
14369
14370         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
14371         the function exists, before testing against AIX.
14372         Reported by Martin Lambers <marlam@marlam.de>.
14373
14374 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14375
14376         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
14377         From Mark D. Baushke.
14378
14379 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14380
14381         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
14382         to the absolute name, not just one, to bypass Sun C 5.8's
14383         "warning: #include of /usr/include/... may be non-portable".
14384
14385 2006-07-04  Eric Blake  <ebb9@byu.net>
14386
14387         * modules/dirname-tests: New test module.
14388         * tests/test-dirname.c: New file, replacing dirname.c
14389         TEST_DIRNAME section that was recently deleted.
14390
14391 2006-07-04  Bruno Haible  <bruno@clisp.org>
14392
14393         Assume ANSI C header files and <ctype.h> functions.
14394         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
14395         (mbsnwidth): Use isprint, iscntrl instead.
14396
14397 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14398
14399         Merge from coreutils.
14400         * MODULES.html.sh: Add xstrtold.
14401         * modules/xstrtold: New file.
14402         * modules/cycle-check (Files): Add lib/same-inode.h.
14403         * modules/dirname (Files): Add m4/double-slash-root.m4.
14404         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
14405         * modules/mkdir-p (Files): Add lib/same-inode.h.
14406         * modules/same (Files): Add lib/same-inode.h.
14407
14408 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14409
14410         * m4/absolute-header.m4: Renamed from full-header-path.m4.
14411         This is to keep the terminology clean; POSIX talks about
14412         "absolute pathnames", not "full pathnames", but the GNU
14413         Coding Standards say to use "path" for something else;
14414         so use "absolute" to keep both sides happy.
14415         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
14416         Set gl_absolute_header, not gl_full_header_path.
14417         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
14418         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
14419         All uses changed.
14420
14421         Merge from coreutils.
14422
14423         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14424
14425         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
14426         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
14427         want to require the building of c-strtod.o.
14428         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
14429         needs -lm directly.
14430         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
14431
14432         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14433
14434         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
14435         --as-needed option if available.  Problem reported by Albert Chin in
14436         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
14437         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
14438         cc merely issues a bunch of annoying warnings for --as-needed
14439         (this problem was reported by Bob Proulx).  Also, try linking with
14440         -lm to detect a bug in binutils 2.16 (this problem was reported
14441         by Ralf Wildenhues).
14442
14443         2006-06-18  Jim Meyering  <jim@meyering.net>
14444
14445         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
14446         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
14447         macro.
14448         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
14449         also check for glibc-2.4's abort-inducing bug.
14450
14451         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
14452         Low-probability clean-up should be to use rmdir to get rid of
14453         the just-created directory, not unlink.
14454
14455         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
14456         configure fail, and request a bug report to inform us about it.
14457         Add a comment that, barring reports to the contrary, in 2007 we'll
14458         assume ftruncate is universally available.
14459
14460         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14461
14462         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
14463
14464         2006-03-12  Jim Meyering  <jim@meyering.net>
14465
14466         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
14467         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
14468         * m4/same.m4 (gl_SAME): Likewise.
14469         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
14470
14471         2006-03-11  Eric Blake  <ebb9@byu.net>
14472
14473         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
14474         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
14475         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
14476         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
14477
14478 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14479
14480         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
14481         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
14482         reported by Mark D. Baushke, one in
14483         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
14484
14485         Merge from coreutils.
14486
14487         * lib/.cppi-disable: Add stdint_.h.
14488         * lib/.cvsignore: Add stdint.h.
14489
14490         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14491
14492         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
14493         both double and long double versions.
14494         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
14495         * lib/xstrtold.c: New file.
14496         * lib/xstrtod.h (xstrtold): New decl.
14497
14498         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14499
14500         * lib/filemode.c (setst): Remove.
14501         (strmode): Rewrite to avoid setst.  This makes the code shorter,
14502         (arguably) clearer, and the generated code is a bit smaller on my
14503         Debian GNU/Linux stable x86 host.
14504
14505         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14506
14507         * lib/filemode.c: Include "filemode.h" first, to test the interface.
14508         Assume that filemode.h includes sys/types.h and sys/stat.h.
14509         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
14510         (ftypelet): Reorder to put common cases first, for efficiency.
14511         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
14512         to do 'M'.
14513         (strmode): Renamed from mode_string, and now stores 12 bytes instead
14514         of 10, for compatibility with FreeBSD.  All callers changed.
14515         (filemodestring): Now stores 12 bytes instead of 10, and sets file
14516         types that can't be deduced solely from st_mode.  First arg is now a
14517         const pointer.
14518         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
14519         (strmode): Renamed from mode_string.
14520         (filemodestring): New decl.
14521         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
14522         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
14523         needed.
14524         (S_ISPORT, S_ISWHT): New macros, if not already defined.
14525
14526         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14527
14528         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
14529         fsusage.h now does that.  Include fsusage.h first, to test interface.
14530         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
14531         at most one method (the old code could have generated decls that
14532         didn't conform to C89, not that this was ever exercised).
14533         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
14534
14535         2006-03-19  Jim Meyering  <jim@meyering.net>
14536
14537         Work even in a chroot where d_ino values for entries in "/"
14538         don't match the stat.st_ino values for the same names.
14539         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
14540         number, iterate through all entries again, using lstat instead.
14541         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
14542         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
14543
14544         * lib/getcwd.c (__getcwd): Clarify a comment.
14545         Use memcpy in place of a call to strcpy.
14546
14547         2006-03-12  Jim Meyering  <jim@meyering.net>
14548
14549         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
14550         matches that of the current directory (which we're about to chdir ".."
14551         out of), then save the dev-ino of the parent, instead.
14552
14553         * lib/same-inode.h (SAME_INODE): New file/macro.
14554         * lib/chdir-safer.c (SAME_INODE): Remove definition.
14555         Include "same-inode.h", instead.
14556         * lib/same.c: Likewise.
14557         * lib/cycle-check.h: Include "same-inode.h".
14558         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
14559         * lib/cycle-check.c (SAME_INODE): Remove definition.
14560         * lib/root-dev-ino.h: Include "same-inode.h".
14561
14562         2006-03-11  Eric Blake  <ebb9@byu.net>
14563
14564         * lib/same.c (same_name): s/base_name/last_component/
14565         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
14566         * lib/filenamecat.c (file_name_concat): Likewise.
14567
14568         2006-03-11  Eric Blake  <ebb9@byu.net>,
14569                     Paul Eggert  <eggert@cs.ucla.edu>
14570
14571         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
14572         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
14573         drive prefix.
14574         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
14575         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
14576         (last_component): New method.
14577         * lib/dirname.c (dir_len): Determine when drive letters need a
14578         subsequent slash.  Preserve // when it is special.
14579         (dir_name): Don't append dot when drive letter is absolute.
14580         [TEST_DIRNAME]: Move into a full-blown gnulib test.
14581         * lib/basename.c (base_name): New semantics - malloc the result.
14582         Preserve // when it is special.  Preserve relative files that look
14583         like drive letters.
14584         (base_len): Preserve // when it is special.
14585         (last_component): New method, similar to old base_name semantics.
14586         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
14587         base_name.  Strip redundant slashes from ///.
14588
14589 2006-07-03  Jim Meyering  <jim@meyering.net>
14590
14591         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
14592         macro is used before the first cycle_check call.
14593
14594 2006-07-03  Eric Blake  <ebb9@byu.net>
14595
14596         * modules/dirname (Depends-on): Add xstrndup.
14597
14598 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14599
14600         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
14601         test cases, so that config.log is a bit easier to follow.
14602
14603 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14604
14605         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
14606         both are 64 bits, since this seems to be the tradition, and this
14607         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
14608         we ever run into a host that prefers long long to long in this
14609         case, we'll need another configure-time test.  Problem reported by
14610         Jim Meyering.
14611
14612 2006-07-02  Eric Blake  <ebb9@byu.net>
14613
14614         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
14615
14616 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14617
14618         * modules/inttypes (Depends-on): No longer depends on stdint.
14619         * modules/stdint (Description): Say more about assumptions.
14620         Say that the fast types might differ.  Say macros are used.
14621         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
14622         (Makefile.am): Revise list of substituted symbols to match
14623         new stdint.m4.
14624         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
14625         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
14626         * tests/test-stdint.c (verify_same_types)
14627         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
14628         the code conforms to C99/C89.
14629         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
14630         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
14631
14632 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14633
14634         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
14635         but fix a bug, by requiring at least 64 bits.
14636         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
14637         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
14638         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
14639         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
14640
14641         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
14642         changes.  Make 2.59 a prerequisite.  Check and substitute for
14643         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
14644         inttypes.h.  Do not use special include files; just use the
14645         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
14646         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
14647         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
14648         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
14649         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
14650         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
14651         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
14652         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
14653         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
14654         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
14655         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
14656         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
14657         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
14658         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
14659         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
14660         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
14661         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
14662         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
14663         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
14664         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
14665         WINT_MAX.  Check for C99 conformance more strictly, by detecting
14666         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
14667         not check for things that C99 does not require, e.g., int8_t.  If
14668         a test isn't needed unless <stdint.h> isn't working, and is
14669         unlikely to be needed for any other reason, then don't do it
14670         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
14671         size_t, since we assume C89 freestanding at least.  Do not check
14672         for sig_atomic_t, wchar_t, or wint_t, since the code now does
14673         the right thing even if the types are not defined.  Instead use:
14674         (gl_STDINT_TYPE_PROPERTIES): New macro.
14675         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
14676         testing whether <sys/types.h> clashes, as Autoconf does this for
14677         us now.  All uses removed.
14678         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
14679         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
14680         (gl_CHECK_TYPE_SAME):
14681         Remove; no longer needed.
14682         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
14683         exists, since we'll return 0 anyway in that case.
14684         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
14685
14686 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14687
14688         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
14689         possible collision with system files.
14690         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
14691         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
14692         WCHAR_MIN and WCHAR_MAX in this case.
14693         (<stddef.h>): Do not include; no longer needed.
14694         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
14695         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
14696         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
14697         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
14698         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
14699         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14700         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14701         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14702         !defined(__c99))]: Include in this case too, since it's harmless
14703         now.
14704         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14705         dangerous to do so.
14706         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14707         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14708         (_STDINT_MIN, _STDINT_MAX): New macros.
14709         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14710         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14711         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14712         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14713         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14714         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14715         macros, not typedefs; this simplifies things quite a bit.
14716         Use long int for all types narrower than int64_t.
14717         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14718         Define in terms of long long int or int64_t or long int,
14719         not int64_t or int32_t.  This saves some compile-time testing.
14720         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14721         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14722         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14723         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14724         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14725         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14726         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14727         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14728         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14729         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14730         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14731         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14732         undef any previous version and define our own version, for
14733         simplicity and consistency with the new macros for types.
14734         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14735         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14736         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14737         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14738         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14739         @WINT_T_SUFFIX@ to keep things simple here.
14740         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14741         Simplify by assuming typical 8/16/32/64 host, since we're
14742         already doing that elsewhere anyway.
14743         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14744         and assume long long int is 64 bits if available.  This
14745         speeds up 'configure'.
14746
14747 2006-07-01  Eric Blake  <ebb9@byu.net>
14748
14749         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14750         Reported by Andreas Buening.
14751
14752 2006-07-01  Eric Blake  <ebb9@byu.net>
14753
14754         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14755
14756 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14757
14758         * lib/getaddrinfo.c: fixed typo
14759
14760 2006-06-29  Jim Meyering  <jim@meyering.net>
14761
14762         * modules/strftime (Maintainer): Add my name, since with the
14763         FPRINTFTIME changes strftime.c has forked from glibc.
14764
14765 2006-06-29  Eric Blake  <ebb9@byu.net>
14766
14767         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14768
14769 2006-06-29  Eric Blake  <ebb9@byu.net>
14770
14771         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14772
14773 2006-06-29  Eric Blake  <ebb9@byu.net>
14774
14775         * lib/stat_.h: New file.
14776
14777 2006-06-29  Eric Blake  <ebb9@byu.net>
14778
14779         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14780         unused static function.
14781
14782 2006-06-29  Eric Blake  <ebb9@byu.net>
14783
14784         * doc/functions.texi (Function Portability): Document missing lstat
14785         on mingw.
14786
14787 2006-06-29  Eric Blake  <ebb9@byu.net>
14788
14789         * MODULES.html.sh: Add sys_stat.
14790         * modules/sys_stat: New module.
14791         * modules/mkstemp (Depends-on): Add sys_stat.
14792
14793 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14794
14795         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14796
14797 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14798
14799         * m4/c-bs-a.m4: Removed.
14800
14801 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14802
14803         * lib/strftime.c: Assume strftime() exists.
14804
14805 2006-06-29  Derek Price  <derek@ximbiot.com>
14806
14807         * modules/c-bs-a: Removed - \a is C89.
14808         * MODULES.html.sh: Remove c-bs-a.
14809
14810 2006-06-29  Bruno Haible  <bruno@clisp.org>
14811
14812         * modules/wcwidth (License): Change to LGPL.
14813
14814 2006-06-28  Simon Josefsson  <jas@extundo.com>
14815
14816         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14817         on _WIN32.
14818
14819         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14820         getnameinfo.
14821
14822 2006-06-28  Simon Josefsson  <jas@extundo.com>
14823
14824         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14825
14826 2006-06-28  Simon Josefsson  <jas@extundo.com>
14827
14828         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14829         functions there.  It will succeed on Windows XP, but on Windows
14830         2000 and (presumably) earlier, it will fail, and use the internal
14831         re-implementation.
14832         (use_win32_p): New function.
14833         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14834         Support AI_NUMERICSERV to disable getservbyname.
14835         (getnameinfo): New function, only supports
14836         NI_NUMERICHOST|NI_NUMERICSERV for now.
14837
14838         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14839         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14840         getnameinfo.
14841
14842 2006-06-28  Eric Blake  <ebb9@byu.net>
14843
14844         * modules/wcwidth: New file.
14845         * modules/mbchar (Depends-on): Add wcwidth.
14846         * modules/mbswidth (Depends-on): Add wcwidth.
14847         * MODULES.html.sh: Add wcwidth.
14848
14849 2006-06-28  Eric Blake  <ebb9@byu.net>
14850
14851         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14852         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14853
14854 2006-06-28  Eric Blake  <ebb9@byu.net>
14855
14856         * lib/xvasprintf.h: Fix comments.
14857
14858 2006-06-28  Eric Blake  <ebb9@byu.net>
14859
14860         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14861         * lib/mbswidth.c (wcwidth): Move from here...
14862         * lib/wcwidth.h: ...to this new file.
14863
14864 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14865
14866         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14867
14868         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14869         it's obsolete.
14870         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14871
14872 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14873
14874         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14875         Autoconf 2.60 says this stuff was obsolete.
14876
14877 2006-06-28  Bruno Haible  <bruno@clisp.org>
14878
14879         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14880
14881 2006-06-28  Bruno Haible  <bruno@clisp.org>
14882
14883         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14884         gt_TYPE_WCHAR_T.
14885
14886 2006-06-28  Bruno Haible  <bruno@clisp.org>
14887
14888         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14889         declaration for wcwidth.
14890         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14891
14892 2006-06-28  Bruno Haible  <bruno@clisp.org>
14893
14894         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14895         (mkdir): Define using _mkdir.
14896
14897 2006-06-28  Bruno Haible  <bruno@clisp.org>
14898
14899         * lib/getaddrinfo.h: Fix POSIX URL.
14900         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14901         _WIN32.
14902         (use_win32_p): Make static.
14903         (getaddrinfo): Reject service name if it is empty or does not consist
14904         solely of decimal digits, or if its value is > 65535.
14905         (getnameinfo): Remove useless casts.
14906
14907 2006-06-27  Simon Josefsson  <jas@extundo.com>
14908
14909         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14910         Eggert and Martin Lambers.
14911
14912 2006-06-27  Simon Josefsson  <jas@extundo.com>
14913
14914         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14915         Eggert and Martin Lambers.
14916
14917 2006-06-27  Bruno Haible  <bruno@clisp.org>
14918
14919         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14920         result to 0, not to empty.
14921         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14922
14923 2006-06-27  Bruno Haible  <bruno@clisp.org>
14924
14925         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14926
14927 2006-06-26  Simon Josefsson  <jas@extundo.com>
14928
14929         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14930         present.
14931
14932 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14933
14934         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14935         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14936         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14937
14938 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14939
14940         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14941
14942 2006-06-26  Bruno Haible  <bruno@clisp.org>
14943
14944         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14945
14946 2006-06-26  Bruno Haible  <bruno@clisp.org>
14947
14948         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14949
14950 2006-06-26  Bruno Haible  <bruno@clisp.org>
14951
14952         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14953         SGI C compiler in pre-C99 mode.
14954         Suggested by Mark D. Baushke and Larry Jones.
14955
14956 2006-06-26  Bruno Haible  <bruno@clisp.org>
14957
14958         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14959         WCHAR_MAX.
14960         Reported by Mark D. Baushke and Larry Jones.
14961
14962 2006-06-26  Bruno Haible  <bruno@clisp.org>
14963
14964         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14965         in pre-C99 mode.
14966         Suggested by Mark D. Baushke and Larry Jones.
14967
14968 2006-06-23  Simon Josefsson  <jas@extundo.com>
14969             Bruno Haible  <bruno@clisp.org>
14970
14971         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14972         Emit mostlyclean-local rule.
14973         (func_emit_tests_Makefile_am): Likewise.
14974         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14975
14976 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14977
14978         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14979
14980 2006-06-23  Bruno Haible  <bruno@clisp.org>
14981
14982         * tests/test-stdint.c: Update to match ISO C 99 Technical
14983         Corrigendum 1.
14984
14985 2006-06-23  Bruno Haible  <bruno@clisp.org>
14986
14987         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14988
14989 2006-06-23  Bruno Haible  <bruno@clisp.org>
14990
14991         * lib/stdint_.h: Treat IRIX like OpenBSD.
14992
14993 2006-06-23  Bruno Haible  <bruno@clisp.org>
14994
14995         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14996         ISO C 99 Technical Corrigendum 1.
14997
14998 2006-06-22  Simon Josefsson  <jas@extundo.com>
14999
15000         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
15001         MinGW.
15002
15003 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15004
15005         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
15006         needed.  Some compiler complained about some of them.  Problem reported
15007         by Larry Jones in
15008         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
15009
15010 2006-06-21  Simon Josefsson  <jas@extundo.com>
15011
15012         * tests/test-getaddrinfo.c: New file.
15013
15014         * modules/getaddrinfo-tests: New file.
15015
15016         * MODULES.html.sh: Add inet_pton.
15017
15018         * modules/inet_pton: New file.
15019
15020 2006-06-21  Simon Josefsson  <jas@extundo.com>
15021
15022         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
15023         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
15024         of using the (limited) gnulib implementation on Windows XP.
15025
15026         * m4/inet_pton.m4: New file.
15027
15028 2006-06-21  Simon Josefsson  <jas@extundo.com>
15029
15030         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
15031         variable.
15032
15033         * lib/socket_.h: Don't define WINVER.
15034
15035         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
15036         slightly modified to work in gnulib.
15037
15038 2006-06-21  Simon Josefsson  <jas@extundo.com>
15039
15040         * doc/gnulib.texi (Windows sockets): Add.
15041
15042 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
15043
15044         * lib/read-file.c (fread_file): Start with buffer allocation of
15045         0 bytes rather than 1 byte; this simplifies the code.
15046         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
15047         code to free buffer and save/restore errno.
15048         (internal_read_file): Remove unused local.
15049
15050 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
15051
15052         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
15053         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
15054         Problem reported by Denis Excoffier in
15055         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
15056
15057 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15058
15059         * modules/sys_socket, modules/socklen: Include sys/types since
15060         FreeBSD 4.x's sys/socket.h needs it.
15061
15062 2006-06-19  Simon Josefsson  <jas@extundo.com>
15063
15064         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
15065
15066 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
15069
15070 2006-06-19  Bruno Haible  <bruno@clisp.org>
15071
15072         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
15073         and FULL_PATH_INTTYPES_H in angle brackets.
15074         Reported by Mark D. Baushke <mdb@gnu.org>.
15075
15076 2006-06-17  Eric Blake  <ebb9@byu.net>
15077
15078         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
15079         errno.
15080
15081 2006-06-17  Bruno Haible  <bruno@clisp.org>
15082
15083         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
15084         <sys/inttypes.h>.
15085
15086 2006-06-17  Bruno Haible  <bruno@clisp.org>
15087
15088         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
15089         whether errno is declared. Assume <errno.h> declares errno.
15090
15091 2006-06-17  Bruno Haible  <bruno@clisp.org>
15092
15093         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
15094
15095 2006-06-17  Bruno Haible  <bruno@clisp.org>
15096
15097         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
15098         problem on Solaris 2.5.1.
15099
15100 2006-06-16  Eric Blake  <ebb9@byu.net>
15101
15102         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
15103         * lib/unicodeio.c [!defined errno]: Likewise.
15104         * lib/strtol.c [!defined errno]: Likewise.
15105         * lib/strtod.c [!defined errno]: Likewise.
15106
15107 2006-06-15  Eric Blake  <ebb9@byu.net>
15108
15109         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
15110
15111 2006-06-15  Eric Blake  <ebb9@byu.net>
15112
15113         * config/srclist.txt (ssize_t.m4): Lose sync.
15114
15115 2006-06-15  Bruno Haible  <bruno@clisp.org>
15116
15117         * modules/stdint (Files): Include m4/full-header-path.m4,
15118         m4/size_max.m4, m4/wchar_t.m4.
15119         (Makefile.am): Many more substitutions.
15120         * modules/stdint-tests: New file.
15121         * tests/test-stdint.c: New file.
15122
15123 2006-06-15  Bruno Haible  <bruno@clisp.org>
15124
15125         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
15126         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
15127         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
15128         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
15129         gl_CHECK_TYPE_SAME): New macros.
15130
15131 2006-06-15  Bruno Haible  <bruno@clisp.org>
15132
15133         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
15134
15135 2006-06-15  Bruno Haible  <bruno@clisp.org>
15136
15137         * lib/stdint_.h: Rewritten to be fully auto-configured.
15138         Fixes bug on HP-UX/IA64.
15139
15140 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
15141
15142         * lib/getdate.y (__attribute__): Don't define if already defined.
15143         Problem reported by Larry Jones.
15144         * lib/utimens.c (__attribute__): Likewise.
15145
15146 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
15147
15148         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
15149         reported by Andreas Schwab.
15150
15151 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15152             Bruno Haible  <bruno@clisp.org>
15153
15154         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
15155         check for the declaration of strnlen and a run test that exposes the
15156         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
15157         rpl_strndup.
15158
15159 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15160             Bruno Haible  <bruno@clisp.org>
15161
15162         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
15163
15164 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15165
15166         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
15167         compile test, for Tru64 4.0D.
15168
15169 2006-05-28  Karl Berry  <karl@gnu.org>
15170
15171         * config/srclist.txt (printf-args.c): lose sync.
15172
15173 2006-05-26  Martin Lambers  <marlam@marlam.de>
15174
15175         * lib/getpass.c: Updates the test for the native W32 API, and adds
15176         missing includes, thus fixing compilation warnings.
15177
15178 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15179
15180         * lib/exclude.c (exclude_fnmatch): New function.
15181         (excluded_file_name): Call exclude_fnmatch.
15182         * lib/exclude.h (excluded_file_name): New prototype
15183
15184 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
15185
15186         * lib/tempname.c (small_open, large_open): New macros.
15187         (__open, __open64) [!_LIBC]: Remove.
15188         (__gen_tempname): Use small_open and large_open instead of __open
15189         and __open64.  This fixes a portability bug on HP-UX 11.11i
15190         reported by Simon Wing-Tang in
15191         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
15192
15193 2006-05-24  Bruno Haible  <bruno@clisp.org>
15194
15195         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
15196         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
15197         Reported by Thorsten Maerz <torte@netztorte.de> via
15198         Aaron Stone <aaron@serendipity.cx>.
15199
15200 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15201
15202         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
15203         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
15204         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
15205         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
15206         not really conditional on the cache.
15207         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
15208
15209 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15210
15211         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
15212         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
15213         (my_usleep): Don't mishandle maximum value.
15214
15215 2006-05-19  Jim Meyering  <jim@meyering.net>
15216
15217         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
15218
15219 2006-05-17  Bruno Haible  <bruno@clisp.org>
15220
15221         Cygwin portability.
15222         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
15223
15224 2006-05-17  Bruno Haible  <bruno@clisp.org>
15225
15226         * lib/stdint_.h: Fix recognition of Cygwin.
15227
15228 2006-05-15  Bruno Haible  <bruno@clisp.org>
15229
15230         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
15231         on libtool patch by Ralf Wildenhues.
15232
15233 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
15236         test for C99 conformance; (bool) 0.5 is an integer constant
15237         expression, but (bool) -0.5 is not.  Problem reported by Fedor
15238         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
15239
15240 2006-05-11  Simon Josefsson  <jas@extundo.com>
15241
15242         * m4/xvasprintf.m4: Fix obvious typo.
15243
15244 2006-05-11  Jim Meyering  <jim@meyering.net>
15245
15246         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
15247         James Lemley.
15248
15249 2006-05-10  Simon Josefsson  <jas@extundo.com>
15250
15251         * lib/md4.c: Typo fix, update copyright years.
15252         (K1, K2): Don't use L because it turn computations into 64-bit on
15253         64-bit platforms.
15254
15255 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
15256
15257         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
15258         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
15259         unwanted sign propagation, e.g., on hosts with 64-bit int.
15260         There still are some problems with reeelly weird theoretical hosts
15261         (e.g., 33-bit int) but it's not worth worrying about now.
15262         * lib/sha1.c (rol): Likewise.
15263         (K1, K2, K3, K4): Remove unnecessary L suffix.
15264
15265 2006-05-10  Bruno Haible  <bruno@clisp.org>
15266
15267         * lib/des.c: Cast to avoid warnings.
15268
15269 2006-05-09  Bruno Haible  <bruno@clisp.org>
15270
15271         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
15272         (Depends-on): Depend also on xsize, stdarg.
15273         (configure.ac): Add gl_XVASPRINTF.
15274
15275 2006-05-09  Bruno Haible  <bruno@clisp.org>
15276
15277         * m4/xvasprintf.m4: New file.
15278
15279 2006-05-09  Bruno Haible  <bruno@clisp.org>
15280
15281         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
15282         (EOVERFLOW): Define fallback value.
15283         (xstrcat): New function.
15284         (xvasprintf): Recognize the special case of a string concatenation.
15285
15286 2006-05-08  Eric Blake  <ebb9@byu.net>
15287
15288         * gnulib-tool (func_version): Base copyright year on CVS date.
15289         (func_emit_copyright_notice): New function.
15290         (func_emit_lib_Makefile_am): Use it.
15291         (func_emit_tests_Makefile_am): Likewise.
15292         (func_import): Likewise.
15293
15294 2006-05-08  Bruno Haible  <bruno@clisp.org>
15295
15296         * modules/stdarg: New file.
15297         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
15298
15299 2006-05-08  Bruno Haible  <bruno@clisp.org>
15300
15301         * m4/stdarg.m4: New file, from GNU gettext.
15302
15303 2006-05-08  Bruno Haible  <bruno@clisp.org>
15304
15305         * config/srclist.txt (build-aux/config.rpath): different from latest
15306         release.
15307
15308 2006-05-08  Bruno Haible  <bruno@clisp.org>
15309
15310         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
15311
15312 2006-05-05  Jim Meyering  <jim@meyering.net>
15313
15314         * m4/warning.m4: New file, derived from bison's file by the same name.
15315
15316 2006-05-03  Bruno Haible  <bruno@clisp.org>
15317
15318         * lib/stdint_.h: Shorter URL.
15319         * lib/inttypes.h: Likewise.
15320
15321 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15322
15323         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
15324
15325 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15326
15327         * lib/verify.h: Document the internals better.  Most of this change
15328         was written by Bruno Haible.
15329
15330 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15331
15332         * doc/verify.texi: New file, partly based on a proposal by
15333         Bruno Haible.
15334
15335 2006-05-02  Bruno Haible  <bruno@clisp.org>
15336
15337         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
15338         test from here...
15339         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
15340
15341 2006-04-29  Bruno Haible  <bruno@clisp.org>
15342
15343         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
15344         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
15345
15346 2006-04-29  Bruno Haible  <bruno@clisp.org>
15347
15348         * gnulib-tool: Make --update option actually work.
15349
15350 2006-04-29  Bruno Haible  <bruno@clisp.org>
15351
15352         * doc/gcd.texi: New file.
15353         * doc/gnulib.texi: Include it.
15354
15355 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
15356
15357         * lib/getdate.y (get_date): When adding relative date, start with the
15358         initial time, not with the result of the first mktime call.
15359
15360 2006-04-25  Bruno Haible  <bruno@clisp.org>
15361
15362         * gnulib-tool (func_import): Output the include directives in three
15363         blocks, sorted separately.
15364         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15365
15366 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15367
15368         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
15369         to define main with arguments, for C++.  Reported by Eric Blake.
15370         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
15371         Prefer 'int main ()' to 'int main (void)', for C++.
15372         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
15373         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
15374         for 'main', for C99 and C++.
15375
15376 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15377
15378         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
15379         Don't assume that exit status -1 is valid.
15380         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15381         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15382         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
15383         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
15384         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
15385         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
15386         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
15387         functions can be used without declaring them, or that you can
15388         exit with status -1.
15389         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
15390
15391 2006-04-24  Karl Berry  <karl@gnu.org>
15392
15393         * config/srclist.txt (longdouble.m4): sync lost.
15394
15395 2006-04-24  Eric Blake  <ebb9@byu.net>
15396
15397         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
15398
15399 2006-04-24  Bruno Haible  <bruno@clisp.org>
15400
15401         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
15402         poll() implementation in AIX.
15403         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15404
15405 2006-04-24  Bruno Haible  <bruno@clisp.org>
15406
15407         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
15408         assigned exactly once.
15409
15410 2006-04-23  Claudio Fontana  <claudio@gnu.org>
15411             Bruno Haible  <bruno@clisp.org>
15412
15413         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
15414         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
15415         for AM_CPPFLAGS.
15416
15417 2006-04-23  Bruno Haible  <bruno@clisp.org>
15418
15419         * modules/copy-file: Depend on unistd.
15420         * modules/execute: Likewise.
15421         * modules/fatal-signal: Likewise.
15422         * modules/findprog: Likewise.
15423         * modules/mkdtemp : Likewise.
15424         * modules/pipe: Likewise.
15425         * modules/wait-process: Likewise.
15426
15427 2006-04-23  Bruno Haible  <bruno@clisp.org>
15428
15429         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
15430         condition was already detected.
15431         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15432
15433 2006-04-23  Bruno Haible  <bruno@clisp.org>
15434
15435         * lib/copy-file.c: Include <unistd.h> unconditionally.
15436         * lib/execute.c: Likewise.
15437         * lib/fatal-signal.c: Likewise.
15438         * lib/findprog.c: Likewise.
15439         * lib/mkdtemp.c: Likewise.
15440         * lib/pipe.h: Likewise.
15441         * lib/pipe.c: Likewise.
15442         * lib/wait-process.h: Likewise.
15443
15444 2006-04-23  Bruno Haible  <bruno@clisp.org>
15445
15446         * gnulib-tool (func_usage): Fix --import description. Document
15447         --update.
15448         (func_import): Create temporary file in a temporary directory, if
15449         --dry-run is specified. Silence errors from 'grep' when there are no
15450         m4 files in $m4dir.
15451         (func_create_testdir): Silence errors from 'grep' when there are no
15452         m4 files in $m4dir.
15453         Reported by Karl Berry <karl@freefriends.org>.
15454
15455 2006-04-20  Bruno Haible  <bruno@clisp.org>
15456
15457         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
15458         one argument, so that the code will be portable to Autoconf 2.60.
15459         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
15460         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
15461         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
15462
15463 2006-04-19  Derek Price  <derek@ximbiot.com>
15464             Eric Blake  <ebb9@byu.net>
15465
15466         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
15467         rather than "/full/path.h".  Update comment to match.  Shorten &
15468         generalize m4_translit call via AS_TR_CPP.
15469
15470 2006-04-19  Derek Price  <derek@ximbiot.com>
15471             Eric Blake  <ebb9@byu.net>
15472
15473         * lib/inttypes.h: Correct grammar in comment.
15474
15475 2006-04-18  Derek Price  <derek@ximbiot.com>
15476             Paul Eggert  <eggert@cs.ucla.edu>
15477
15478         * modules/inttypes: New file.
15479         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
15480
15481 2006-04-18  Derek Price  <derek@ximbiot.com>
15482             Paul Eggert  <eggert@cs.ucla.edu>
15483
15484         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
15485         New files.
15486
15487 2006-04-18  Derek Price  <derek@ximbiot.com>
15488             Paul Eggert  <eggert@cs.ucla.edu>
15489
15490         * lib/inttypes.h: New file.
15491         * lib/strtoimax.c: Assume <inttypes.h>.
15492
15493 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
15494
15495         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
15496         isn't mounted.  Problem reported by Kir Kolyshkin.
15497
15498 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15499
15500         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
15501         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
15502         Derek R. Price.
15503         * lib/regex.h (RE_DUP_MAX): Update comment to match current
15504         implementation.
15505
15506 2006-04-12  Eric Blake  <ebb9@byu.net>
15507
15508         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
15509         is now done automatically by the corresponding Autoconf macro.
15510
15511 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
15512
15513         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
15514         time_r.h.
15515
15516 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15517
15518         Merge regex changes from libc, removing some of our
15519         POSIX-conformance changes that were rejected and redoing them in a
15520         less-intrusive way.
15521
15522         * lib/regcomp.c (re_compile_internal, init_dfa):
15523         Length arg is now size_t, not Idx.  All uses changed.
15524         (peek_token): Forward decl now says internal_function.
15525         (__re_error_msgid, __re_error_msgid_idx):
15526         Now static rather than extern with attribute_hidden.
15527         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
15528         For some reason libc prefers K&R style defns for external functions.
15529         (regerror) [!defined _LIBC]: Likewise.
15530         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
15531         (seek_collating_symbol_entry, lookup_collation_sequence_value):
15532         (build_range_exp, build_collating_symbol):
15533         Use K&R-style defn.
15534         (re_compile_fastmap): Use '\0' to memset, not 0.
15535         (utf8_sb_map): Make the calculations more obvious.
15536         (init_dfa, parse_bracket_exp, build_charclass_op):
15537         Call calloc and cast result, as glibc does.
15538         (init_word_char, fetch_token, peek_token, peek_token_bracket):
15539         (build_range_exp, build_collating_symbol):
15540         Now internal functions.
15541
15542         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
15543
15544         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
15545         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
15546         Don't depend on VMS; depend on __VMS instead, for POSIX
15547         namespace cleanness.
15548         (regoff_t): Define to ssize_t, not long int.
15549
15550         Remove the REG_ macros named below.  Instead, make the old names
15551         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
15552         __USE_GNU_REGEX.
15553         (REG_BACKSLASH_ESCAPE_IN_LISTS):
15554         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
15555         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
15556         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
15557         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
15558         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
15559         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
15560         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
15561         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
15562         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
15563         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
15564         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
15565         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
15566         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
15567         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
15568         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
15569         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
15570         (REG_NREGS):
15571         Remove.  All uses replaced by the old RE_* names.
15572         (RE_BACKSLASH_ESCAPE_IN_LISTS):
15573         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
15574         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
15575         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
15576         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
15577         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
15578         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
15579         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
15580         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
15581         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
15582         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
15583         Don't bother having these macros be independent of each others'
15584         values, since they no longer exist in the POSIX name space.
15585
15586         Rename the following member names back to their old names,
15587         unless !__USE_GNU_REGEX.  All uses changed back.
15588         (buffer): Renamed from re_buffer.
15589         (allocated): Renamed from re_allocated.
15590         (used): Renamed from re_used.
15591         (syntax): Renamed from re_syntax.
15592         (fastmap): Renamed from re_fastmap.
15593         (translate): Renamed from re_translate.
15594         (can_be_null): Renamed from re_can_be_null.
15595         (regs_allocated): Renamed from re_regs_allocated.
15596         (fastmap_accurate): Renamed from re_fastmap_accurate.
15597         (no_sub): Renamed from re_no_sub.
15598         (not_bol): Renamed from re_not_bol.
15599         (not_eol): Renamed from re_not_eol.
15600         (newline_anchor): Renamed from re_newline_anchor.
15601         (num_regs): Renamed from rm_num_regs.
15602         (start): Renamed from rm_start.
15603         (end): Renamed from rm_end.
15604
15605         (free_state): Move up a bit.
15606
15607         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
15608         #define to be empty.
15609         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
15610         when that is what is intended.
15611         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
15612         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
15613         (MAX): New macro.
15614         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
15615         All uses changed back to re_malloc, etc.  It's now the caller's
15616         responsibility to check for overflow; all callers changed.
15617         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
15618         (re_x2nrealloc): Remove.
15619         (free_state): Remove decl.
15620
15621         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
15622         (re_set_registers, re_exec):
15623         Use K&R-style defn.
15624
15625         2006-01-31  Roland McGrath  <roland@redhat.com>
15626
15627         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
15628         Reported by Mike Frysinger <vapier@gentoo.org>.
15629
15630         2006-01-15  Andreas Jaeger  <aj@suse.de>
15631
15632         [BZ #1950]
15633         * lib/regex_internal.c (re_string_reconstruct): Adjust for
15634         build_wcs_upper_buffer change.
15635         (build_wcs_upper_buffer): Change return type.
15636
15637         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
15638
15639         * lib/regex_internal.h: Include <stdint.h> if available.
15640
15641         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
15642
15643         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
15644
15645         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
15646
15647         * lib/regcomp.c: Adjust for changed secondary hash function.
15648
15649         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
15650
15651         * lib/regex.h: Pretty printing.
15652         Clean up namespace a bit.
15653
15654         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
15655
15656         * lib/regexec.c (update_cur_sifted_state, check_arrival,
15657         check_arrival_add_next_nodes): Avoid using uninitialized variable.
15658
15659         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15660                     Ulrich Drepper  <drepper@redhat.com>
15661
15662         [BZ #1302]
15663         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
15664         changed.
15665         (bitset_word_t): Renamed from bitset_word.  All uses changed.
15666
15667         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
15668
15669         [BZ #281]
15670         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
15671         * lib/regcomp.c: Remove unnecessary uses of
15672         unsigned RE_TRANSLATE_TYPE.
15673         * lib/regex_internal.h: Likewise.
15674         * lib/regex_internal.c: Likewise.
15675         * lib/regexec.c: Likewise.
15676         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
15677
15678         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
15679
15680         * lib/regexec.c (find_recover_state): Remove unnecessary
15681         initialization.
15682         (transit_state_bkref): Make DFA a const pointer.
15683         (get_subexp): Likewise.
15684         (check_arrival): Likewise.
15685         (update_cur_sifted_state): Likewise.
15686         (re_search_internal): Likewise.
15687         (prune_impossible_nodes): Likewise.
15688         (acquire_init_state_context): Likewise.
15689         (proceed_next_node): Likewise.
15690         (set_regs): Likewise.
15691         (free_fail_stack_return): Likewise.
15692         (check_arrival_expand_ecl): Mark DFA parameter as const.
15693         (check_arrival_expand_ecl_sub): Likewise.
15694         (check_subexp_limits): Likewise.
15695         (sub_epsilon_src_nodes):  Likewise.
15696         (add_epsilon_src_nodes):  Likewise.
15697         (merge_state_array): Likewise.
15698         (update_regs): Likewise.
15699         (build_trtable): Likewise.
15700         (sift_states_backward): Mark MCTX parameter as const.
15701         (build_sifted_states): Likewise.
15702         (update_cur_sifted_state): Likewise.
15703         (sift_states_mkref): Likewise.
15704         (check_arrival_expand_ecl): Mark eclosure as const.
15705         (check_dst_limits_calc_pos_1): Likewise.
15706         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15707         pointer.
15708
15709         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15710
15711         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15712         (transit_state_sb): Likewise.
15713         (transit_state_mb): Likewise.
15714         (sift_states_iter_mb): Likewise.
15715         (check_arrival_add_next_nodes): Likewise.
15716         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15717         [_LIBC] (re_search_2_stub): Use mempcpy.
15718
15719         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15720         mbrtowc for very simple UTF-8 case.
15721
15722         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15723         a pointer-to-const.
15724         (re_acquire_state_context): Likewise.
15725         * lib/regex_internal.h: Adjust prototypes.
15726
15727         * lib/regex.c: Prevent using C++ compilers.
15728
15729         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15730         (re_acquire_state_context): Likewise.
15731
15732 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15733
15734         * modules/regex (Depends-on): Add ssize_t.
15735
15736 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15737
15738         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15739         translation table.
15740
15741 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15742
15743         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15744
15745 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15746             Bruno Haible  <bruno@clisp.org>
15747
15748         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15749         <sys/types.h> and <inttypes.h>.
15750
15751 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15752
15753         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15754         `__error_t_defined', so argp.h will not typedef the former.
15755
15756 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15757
15758         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15759         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15760         glibc names.  Even if glibc is changed to conform to POSIX, the
15761         traditional names will be available anyway, since regex depends on
15762         the extensions module.  Also, fix a longstanding typo in the
15763         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15764         reported by Emanuele Giaquinta.  Also, change sense of cached
15765         variable, so that the message makes sense.
15766
15767 2006-03-24  Simon Josefsson  <jas@extundo.com>
15768
15769         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15770         including some doc fixes.
15771         (base64_encode_alloc): Fix +1 bug on allocation failures.
15772
15773 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15774
15775         * lib/base64.c (base64_encode): Do not read past end of array with
15776         unsanitized input on systems with CHAR_BIT > 8.
15777
15778 2006-03-24  Eric Blake  <ebb9@byu.net>
15779
15780         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15781
15782 2006-03-22  Karl Berry  <karl@gnu.org>
15783
15784         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15785         * config/srclistvars.sh (COREUTILS): new var.
15786
15787 2006-03-17  Jim Meyering  <jim@meyering.net>
15788
15789         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15790         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15791
15792 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15793
15794         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15795         no longer needs it.  Instead, check that regoff_t is as least
15796         as wide as ptrdiff_t.
15797
15798         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15799         so that our regex.h stays compatible with the installed regex.
15800         This is helpful for installers who configure --without-included-regex.
15801         Problem reported by Emanuele Giaquinta.
15802
15803 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15804
15805         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15806         Typedef to long int, not to off_, as POSIX will likely change
15807         in that direction.
15808
15809 2006-03-15  Eric Blake  <ebb9@byu.net>
15810
15811         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15812
15813 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15814
15815         * lib/argp-help.c (validate_uparams): Fix typo
15816         * lib/argp-parse.c (argp_default_options): Consistently begin help
15817         messages with a lowercase letter.
15818
15819 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15820
15821         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15822         overrun buffers and shouldn't be used (much as gets shouldn't be
15823         used).
15824         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15825
15826 2006-03-08  Simon Josefsson  <jas@extundo.com>
15827
15828         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15829         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15830
15831 2006-03-08  Simon Josefsson  <jas@extundo.com>
15832
15833         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15834         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15835
15836 2006-03-08  Simon Josefsson  <jas@extundo.com>
15837
15838         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15839         signal that configure disabled the device.
15840
15841 2006-03-08  Simon Josefsson  <jas@extundo.com>
15842
15843         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15844         languages.
15845
15846 2006-03-07  Simon Josefsson  <jas@extundo.com>
15847
15848         * modules/getopt (Depends-on): Add unistd.
15849
15850         * modules/unistd: New file.
15851
15852 2006-03-07  Simon Josefsson  <jas@extundo.com>
15853
15854         * modules/gc-random: New file.
15855
15856 2006-03-07  Simon Josefsson  <jas@extundo.com>
15857
15858         * m4/unistd_h.m4: New file.
15859
15860 2006-03-07  Simon Josefsson  <jas@extundo.com>
15861
15862         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15863         test to be side-effect free by storing the result in the cache
15864         variable gl_cv_lib_readline, and moving the assignment of
15865         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15866         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15867
15868 2006-03-07  Simon Josefsson  <jas@extundo.com>
15869
15870         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15871         error on missing devices (the functions will return an error).
15872
15873         * m4/gc.m4: Move random stuff to gc-random.m4
15874
15875 2006-03-07  Simon Josefsson  <jas@extundo.com>
15876
15877         * lib/unistd_.h: New file.
15878
15879 2006-03-07  Simon Josefsson  <jas@extundo.com>
15880
15881         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15882
15883 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15884
15885         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15886         Problem reported by Juan Manuel Guerrero.
15887
15888 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15889
15890         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15891         the unistd module.
15892         * lib/getlogin_r.c: Likewise.
15893         * lib/getlogin_r.h: Likewise.
15894         * lib/glob.c: Likewise.
15895         * lib/pagealign_alloc.c: Likewise.
15896         * lib/unistd_.h: Remove; no longer needed.
15897
15898 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15899
15900         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15901         Add unistd.
15902         * modules/c-stack (Depends-on): Add unistd.
15903         * modules/getlogin_r: Likewise.
15904         * modules/glob: Likewise.
15905         * modules/pagealign_alloc: Likewise.
15906         * modules/unistd (Files): Remove lib/unistd_.h.
15907         (EXTRA_DIST): Remove.
15908         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15909         need unistd_.h.
15910         (MOSTLYCLEANFILES): Remove unistd.h-t.
15911
15912 2006-03-03  Simon Josefsson  <jas@extundo.com>
15913
15914         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15915
15916 2006-03-03  Simon Josefsson  <jas@extundo.com>
15917
15918         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15919         libidn and bison.
15920
15921 2006-03-03  Simon Josefsson  <jas@extundo.com>
15922
15923         * build-aux/maint.mk: Add indent target.
15924
15925 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15926
15927         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15928         our replacement poll.h in any case, to avoid a differing
15929         declaration from a system header.  Seen on AIX.
15930
15931 2006-03-01  Simon Josefsson  <jas@extundo.com>
15932
15933         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15934         <kasal@ucw.cz>.
15935
15936 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15937
15938         * modules/gettime (Depends-on): Add extensions module.
15939         * modules/nanosleep (Depends-on): Likewise.
15940         * modules/settime (Depends-on): Likewise.
15941
15942 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15943
15944         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15945         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15946         pedantically.
15947         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15948         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15949
15950         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15951         not "==".  Reported by Ralf Wildenhues.
15952
15953 2006-03-01  Karl Berry  <karl@gnu.org>
15954
15955         * doc/Copyright/request-*: new files, synced from gnuorg.
15956
15957 2006-03-01  Karl Berry  <karl@gnu.org>
15958
15959         * config/srclist.txt (Copyright/*): new entries.
15960
15961 2006-02-28  Simon Josefsson  <jas@extundo.com>
15962
15963         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15964
15965 2006-02-27  Simon Josefsson  <jas@extundo.com>
15966
15967         * lib/base64.h: Indent #define's.  From Jim Meyering
15968         <jim@meyering.net>.
15969
15970 2006-02-27  Jim Meyering  <jim@meyering.net>
15971
15972         Revert the change of 2006-02-24, so these files can continue
15973         to be sync'd from gettext.
15974         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15975         of `config.h'.
15976
15977 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15978
15979         * modules/intprops: New file.
15980         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15981         Add intprops.
15982         * modules/getloadavg (Files): Remove lib/intprops.h.
15983         (Depends-on): Add intprops.
15984         * modules/human: Likewise.
15985         * modules/inttostr: Likewise.
15986         * modules/openat: Likewise.
15987         * modules/sig2str: Likewise.
15988         * modules/userspec: Likewise.
15989         * modules/utimecmp: Likewise.
15990         * modules/xnanosleep: Likewise.
15991         * modules/xstrtol: Likewise.
15992
15993 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15994
15995         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15996         * modules/lock-tests (TESTS): Use $(EXEEXT).
15997         * modules/tls-tests: Likewise.
15998         * modules/argp-tests: Likewise.
15999         (check_PROGRAMS): New var, replacing...
16000         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
16001
16002 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
16003
16004         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
16005         `config.h'.
16006
16007 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
16008
16009         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
16010
16011 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
16012
16013         Sync from coreutils.
16014         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
16015         gl_CHDIR_SAFER.
16016
16017 2006-02-22  Jim Meyering  <jim@meyering.net>
16018
16019         Sync from coreutils.
16020         * m4/chdir-safer.m4: New file.
16021
16022 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
16023
16024         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
16025         AT_FDCWD exceeds INT_MAX.
16026         * lib/openat.h (AT_FDCWD): Likewise.
16027
16028 2006-02-17  Eric Blake  <address@hidden>
16029
16030         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
16031
16032 2006-02-16  Simon Josefsson  <jas@extundo.com>
16033
16034         * modules/getaddrinfo (Depends-on): Add sys_socket.
16035
16036 2006-02-15  Simon Josefsson  <jas@extundo.com>
16037
16038         * build-aux/maint.mk: Add dsyntax-check rule.
16039
16040 2006-02-15  Eric Blake  <ebb9@byu.net>
16041
16042         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
16043         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
16044         'present but cannot compile' warnings on cygwin.
16045         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
16046         use ws2tcpip.h if sys/socket.h works.
16047         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
16048         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
16049
16050 2006-02-14  Simon Josefsson  <jas@extundo.com>
16051
16052         * modules/maintainer-makefile (Files): Rename.
16053
16054         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
16055         and (the local) Makefile.cfg to maint-cfg.mk.
16056
16057         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
16058         to the latter.
16059
16060         * modules/maintainer-makefile: New module.
16061
16062         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
16063         severaly stripped to make it possible to build it up from scratch
16064         with reliable tests.
16065
16066         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
16067         fixes to permit overriding the default actions when configure and
16068         makefile are not available.
16069
16070 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
16071
16072         Sync from coreutils.
16073         * modules/lstat (Depends-on): Don't depend on xalloc.
16074         (License): Change from GPL to LGPL, since this is now simply a
16075         replacement for a libc function.
16076
16077 2006-02-14  Jim Meyering  <jim@meyering.net>
16078
16079         Sync from coreutils.
16080
16081         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
16082         failure on deficient systems, and simplify gnulib lgpl dependencies.
16083         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
16084         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
16085
16086         * lib/xalloc-die.c: Remove unused definition of N_.
16087
16088 2006-02-14  Jim Meyering  <jim@meyering.net>
16089
16090         Sync from coreutils.
16091         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
16092         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
16093         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
16094         double-quote uses of that variable, to accommodate the rare case in
16095         which getmntent is available in none of the libraries checked.  This
16096         happens at least on FreeBSD 5.0.
16097
16098 2006-02-13  Simon Josefsson  <jas@extundo.com>
16099
16100         * gnulib-tool (Usage): Fix --import, from
16101         karl@freefriends.org (Karl Berry).
16102
16103 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
16104
16105         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
16106
16107 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
16108
16109         * lib/argp-namefrob.h: Restore changes accidentally lost during the
16110         "autoupdate" on 2005-12-12.
16111
16112 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
16113
16114         * modules/closeout (Depends-on): Remove atexit.
16115
16116 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
16117
16118         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
16119         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
16120
16121 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
16122
16123         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
16124         __EXTENSIONS__ if this causes compilation to fail.  Problem
16125         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
16126         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
16127
16128 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
16129
16130         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
16131         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
16132         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
16133         All uses changed.
16134
16135 2006-01-26  Simon Josefsson  <jas@extundo.com>
16136
16137         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
16138         prototype is visible on mingw32.
16139
16140         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
16141         for mingw32.
16142
16143         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
16144         mingw32).
16145
16146 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
16147
16148         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
16149         attempt to open for write; this always fails, at least on POSIX
16150         hosts.  This reinstates the 2006-01-09 change, which was
16151         inadvertently removed.
16152
16153 2006-01-26  Bruno Haible  <bruno@clisp.org>
16154
16155         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
16156         Reported by Paul Eggert.
16157
16158 2006-01-26  Bruno Haible  <bruno@clisp.org>
16159             Paul Eggert  <eggert@cs.ucla.edu>
16160
16161         * lib/stdbool_.h (_Bool)
16162         [(! (defined __cplusplus || defined __BEOS__)
16163           && !defined __GNUC__
16164           && !(defined __HP_cc || defined __xlc__
16165                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
16166                || defined __sgi))]:
16167         #define to signed char in these cases too; this simplifies
16168         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
16169         etc., separately) and makes it more conservative.
16170
16171 2006-01-25  Simon Josefsson  <jas@extundo.com>
16172
16173         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
16174         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
16175         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
16176
16177 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
16178
16179         * lib/argp-namefrob.h: Bugfix. Remove stray #
16180
16181 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
16182
16183         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
16184         so that we test the test.
16185         Check for yet another HP-UX cc bug involving *bool |= bool.
16186
16187 2006-01-25  Karl Berry  <karl@gnu.org>
16188
16189         * config/srclist.txt (vasnprintf.c): sync lost.
16190
16191 2006-01-25  Jim Meyering  <jim@meyering.net>
16192
16193         Sync from the stable (b5) branch of coreutils:
16194
16195         * lib/fts.c (fts_children): Don't let close() clobber errno from
16196         failed fchdir().
16197
16198         * lib/fts.c (fts_stat): When following a symlink-to-directory,
16199         don't necessarily interpret stat-fails+lstat-succeeds as indicating
16200         a dangling symlink.  That can also happen at least for ELOOP.
16201         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
16202         FYI, this bug predates the inclusion of fts.c in coreutils.
16203
16204         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
16205         in their own block, so pre-c99 compilers don't object.
16206
16207         Avoid the double-free (first in fts_read, second in fts_close) that
16208         would occur when an `active' directory is made inaccessible (e.g.,
16209         via chmod a-x) during a traversal.
16210         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16211         before returning.  Reproduce this failure by
16212         mkdir -p a/b; cd a; chmod a-x . b
16213         Reported by Stavros Passas.
16214
16215 2006-01-25  Jim Meyering  <jim@meyering.net>
16216
16217         * lib/fileblocks.c: Remove more useless parentheses.
16218         * lib/readutmp.h: Likewise.
16219
16220 2006-01-25  Bruno Haible  <bruno@clisp.org>
16221
16222         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
16223         warnings.
16224         Reported by Paul Eggert.
16225
16226 2006-01-25  Bruno Haible  <bruno@clisp.org>
16227
16228         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
16229         rid of a trap command. For Solaris sh.
16230         Reported by Mark D. Baushke <mdb@gnu.org>.
16231
16232 2006-01-24  Simon Josefsson  <jas@extundo.com>
16233
16234         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
16235         Bruno.
16236
16237 2006-01-24  Karl Berry  <karl@gnu.org>
16238
16239         * config/srclist.txt (argp-namefrob.h): sync lost.
16240
16241 2006-01-24  Jim Meyering  <jim@meyering.net>
16242
16243         * modules/openat (Files): Add lib/intprops.h.
16244         From Mark D. Baushke.
16245
16246 2006-01-24  Jim Meyering  <jim@meyering.net>
16247
16248         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
16249         Reported by Mark D. Baushke.
16250
16251 2006-01-24  Jim Meyering  <jim@meyering.net>
16252
16253         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
16254
16255 2006-01-24  Bruno Haible  <bruno@clisp.org>
16256
16257         * modules/strnlen (Maintainer): Change from glibc to all.
16258
16259 2006-01-24  Bruno Haible  <bruno@clisp.org>
16260
16261         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
16262         Patch by Paul Eggert.
16263
16264 2006-01-24  Bruno Haible  <bruno@clisp.org>
16265
16266         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
16267         already has it.
16268         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
16269         2005-11-26.
16270
16271         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
16272         'signed char' to avoid problems with the built-in _Bool type.
16273         Reported by Paul Eggert on 2005-11-26.
16274
16275 2006-01-24  Bruno Haible  <bruno@clisp.org>
16276
16277         * gnulib-tool (func_import): Avoid constructing complicated sed
16278         expressions inside backquote.
16279         Report and solution by Mark D. Baushke <mdb@gnu.org>.
16280
16281 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
16282
16283         These changes imported from libc.
16284         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
16285         test and two separate function calls.
16286         * lib/strndup.c (__strndup): Add libc_hidden_def.
16287
16288 2006-01-23  Simon Josefsson  <jas@extundo.com>
16289
16290         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
16291         Remove the test_*_SOURCES variable: automake infers it by default.
16292         * modules/tls-tests: Likewise.
16293
16294 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16295
16296         Work around porting bugs reported by Dieter in
16297         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
16298         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
16299         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
16300         Include "getopt.h" first, to check interface.
16301         (getenv): Declare only if defined HAVE_DECL_GETENV &&
16302         !HAVE_DECL_GETENV.
16303         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
16304         (__strndup): Revert to K&R-style function dfns, the glibc style.
16305         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
16306         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
16307         Include strnlen.h first, to get prototype properly.
16308         (strnlen): Renamed from __strnlen.
16309         Remove weak alias.
16310
16311 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16312
16313         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
16314
16315 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16316
16317         * config/srclist.txt: Adjust to reflect glibc reorganization.
16318         This affects only comments.
16319
16320 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16321
16322          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
16323          Reported by Bruce Korb <bkorb@gnu.org>.
16324
16325 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16326
16327         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
16328         to pacify gcc -Wswitch-default.
16329
16330 2006-01-22  Bruno Haible  <bruno@clisp.org>
16331
16332         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
16333         temporary buffer for sprintf, take into account the precision also
16334         for 'd', 'i', 'u', 'o', 'x', 'X'.
16335
16336 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16337
16338         * modules/argp-tests: New module
16339         * tests/test-argp.c: New file
16340         * tests/test-argp-2.sh: New file
16341
16342 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16343
16344         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
16345         (__argp_base_name): Removed
16346         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
16347         typo.
16348         (__argp_base_name): Provide macro definition or extern declaration
16349         depending on the configuration
16350
16351 2006-01-20  Simon Josefsson  <jas@extundo.com>
16352
16353         * modules/inet_ntop (Depends-on): Depend on sys_socket.
16354
16355 2006-01-20  Simon Josefsson  <jas@extundo.com>
16356
16357         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
16358
16359 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16360
16361         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
16362         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
16363         Suggested by Bruno Haible.
16364
16365 2006-01-20  Karl Berry  <karl@gnu.org>
16366
16367         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
16368         until changes propagate, I guess.
16369
16370 2006-01-19  Simon Josefsson  <jas@extundo.com>
16371
16372         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
16373
16374 2006-01-19  Simon Josefsson  <jas@extundo.com>
16375
16376         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
16377
16378 2006-01-19  Simon Josefsson  <jas@extundo.com>
16379
16380         * gnulib-tool: Set check_PROGRAMS.
16381
16382         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16383         modules/des-tests, modules/gc-arcfour-tests,
16384         modules/gc-arctwo-tests, modules/gc-des-tests,
16385         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16386         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16387         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16388         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16389         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16390         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
16391         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
16392         test_*_SOURCES.
16393
16394 2006-01-18  Simon Josefsson  <jas@extundo.com>
16395
16396         * modules/socklen (Depends-on): Depend on sys_socket.
16397
16398 2006-01-18  Simon Josefsson  <jas@extundo.com>
16399
16400         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16401         modules/des-tests, modules/gc-arcfour-tests,
16402         modules/gc-arctwo-tests, modules/gc-des-tests,
16403         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16404         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16405         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16406         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16407         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16408         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
16409         $(EXEEXT) to automake TESTS variable, for mingw32.
16410
16411 2006-01-17  Simon Josefsson  <jas@extundo.com>
16412
16413         * modules/socklen (Include): Need sys/socket.h.
16414
16415 2006-01-17  Bruno Haible  <bruno@clisp.org>
16416
16417         * modules/ssize_t (Include): Add <sys/types.h>.
16418
16419 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16420
16421         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
16422         it's not portable and it doesn't work with cross-compiles.
16423         Problem reported by Bruno Haible.  Fix missing-$ typo in
16424         'test "gl_cv_ignore_unused_libraries" ...' that prevented
16425         -zignore from being used with Sun's C compiler.
16426
16427 2006-01-12  Simon Josefsson  <jas@extundo.com>
16428
16429         * lib/base64.c: Fix warning, reported by Bruno Haible
16430         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
16431
16432 2006-01-12  Bruno Haible  <bruno@clisp.org>
16433
16434         * modules/ldd: New file.
16435         * build-aux/ldd.sh.in: New file.
16436         * MODULES.html.sh (Support for building libraries and executables): Add
16437         ldd.
16438
16439 2006-01-12  Bruno Haible  <bruno@clisp.org>
16440
16441         * m4/ldd.m4: New file.
16442
16443 2006-01-12  Bruno Haible  <bruno@clisp.org>
16444
16445         * gnulib-tool (func_import, func_create_testdir): Don't go into an
16446         endless loop while replacing $auxdir with build-aux.
16447
16448 2006-01-11  Simon Josefsson  <jas@extundo.com>
16449
16450         * lib/stdint_.h (SIZE_MAX): Add missing (.
16451
16452 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
16453
16454         Sync from coreutils.
16455         * lib/md5.c: Fix commentary typos.
16456         (alignof, UNALIGNED_P): No need for a GCC-specific version.
16457         * lib/md5.h (__attribute__): Remove; unused.
16458         * lib/sha1.c: Fix commentary to match md5 better.
16459         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
16460         so that we don't need to worry about alignment.  All uses changed.
16461         This merges the 2005-10-28 md5 change into sha1.
16462
16463 2006-01-11  Jim Meyering  <jim@meyering.net>
16464
16465         Sync from coreutils.
16466         * lib/md5.c (OP): Fix spacing.
16467
16468 2006-01-11  Bruno Haible  <bruno@clisp.org>
16469
16470         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16471         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
16472         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
16473
16474 2006-01-11  Bruno Haible  <bruno@clisp.org>
16475
16476         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16477         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
16478         the "early" section as well.
16479
16480 2006-01-11  Bruno Haible  <bruno@clisp.org>
16481
16482         Avoid "ar: no archive members specified" error on MacOS X.
16483         * gnulib-tool (func_modules_add_dummy): New function.
16484         (func_import, func_create_testdir): Invoke it.
16485
16486 2006-01-11  Bruno Haible  <bruno@clisp.org>
16487
16488         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
16489         with $auxdir in AC_CONFIG_FILES statements.
16490
16491 2006-01-11  Bruno Haible  <bruno@clisp.org>
16492
16493         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
16494         Initialize also noinst_HEADERS to empty.
16495
16496 2006-01-11  Bruno Haible  <bruno@clisp.org>
16497
16498         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
16499         variables.
16500         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
16501         autoreconf.
16502
16503 2006-01-11  Bruno Haible  <bruno@clisp.org>
16504
16505         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
16506         overridable by the user.
16507         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16508
16509 2006-01-10  Simon Josefsson  <jas@extundo.com>
16510
16511         * modules/sys_socket: New file.
16512
16513 2006-01-10  Simon Josefsson  <jas@extundo.com>
16514
16515         * m4/sys_socket_h.m4: New file.
16516
16517 2006-01-10  Simon Josefsson  <jas@extundo.com>
16518
16519         * lib/socket_.h: New file.
16520
16521 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16522
16523         * modules/readutmp (Maintainer): Add myself.
16524
16525 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16526
16527         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
16528         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
16529         People who are still concerned with buggy memcmp implementations
16530         can invoke gl_FUNC_MEMCMP themselves.
16531
16532 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16533
16534         * lib/regex_internal.h (BITSET_WORD_BITS):
16535         Work around a bug in 64-bit PGC (before version 6.1-2), where the
16536         preprocessor mishandles large unsigned values as if they were signed.
16537         Problem reported by Claudio Fontana in
16538         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
16539
16540 2006-01-10  Jim Meyering  <jim@meyering.net>
16541
16542         Avoid the double-free (first in fts_read, second in fts_close) that
16543         would occur when an `active' directory is made inaccessible (e.g.,
16544         via chmod a-x) during a traversal.
16545         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16546         before returning.  Reproduce this failure by
16547         mkdir -p a/b; cd a; chmod a-x . b
16548         Reported by Stavros Passas.
16549
16550         Sync from coreutils.
16551         * lib/sha1.c: Tweak grammar in a comment.
16552
16553 2006-01-10  Jim Meyering  <jim@meyering.net>
16554
16555         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
16556         Patch by Joerg Sonnenberger.
16557
16558 2006-01-10  Bruno Haible  <bruno@clisp.org>
16559
16560         * modules/readutmp: Depend on module free.
16561         * modules/strtok_r: Depend on module restrict.
16562
16563 2006-01-10  Bruno Haible  <bruno@clisp.org>
16564
16565         * modules/gettext (configure.ac): Add an invocation of
16566         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
16567
16568 2006-01-10  Bruno Haible  <bruno@clisp.org>
16569
16570         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
16571         Reported by Werner Lemberg <wl@gnu.org>.
16572
16573 2006-01-10  Bruno Haible  <bruno@clisp.org>
16574
16575         * lib/localcharset.c: Update from GNU gettext.
16576
16577 2006-01-10  Bruno Haible  <bruno@clisp.org>
16578
16579         * lib/argp.h (__const): Remove macro. Use const instead.
16580         * lib/argp-fmtstream.h (__const): Likewise.
16581         * lib/glob_.h (__const): Remove macro.
16582         * lib/glob-libc.h: Use const instead of __const.
16583
16584 2006-01-10  Bruno Haible  <bruno@clisp.org>
16585
16586         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
16587         variable.
16588         Needed to avoid an automake error regarding the 'gettext' module.
16589
16590 2006-01-09  Simon Josefsson  <jas@extundo.com>
16591
16592         * modules/inet_ntop (Depends-on): Add restrict.
16593
16594 2006-01-09  Simon Josefsson  <jas@extundo.com>
16595
16596         * modules/gc-rijndael-tests (License): Put under LGPL.
16597
16598         * modules/gc-des-tests (License): Likewise.
16599
16600         * modules/gc-arcfour-tests (License): Likewise.
16601
16602         * modules/gc-arctwo-tests (License): Likewise.
16603
16604         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
16605
16606         * modules/gc-hmac-sha1-tests (Files): Likewise.
16607
16608         * modules/gc-hmac-md5-tests (License): Likewise.
16609
16610         * modules/gc-sha1-tests (License): Likewise.
16611
16612         * modules/gc-md5-tests (License): Likewise.
16613
16614         * modules/gc-md4-tests (License): Likewise.
16615
16616         * modules/gc-md2-tests (License): Likewise.
16617
16618         * modules/gc-tests (License): Likewise.
16619
16620         * modules/des-tests (License): Likewise.
16621
16622         * modules/md4-tests (License): Likewise.
16623
16624         * modules/md2-tests (License): Likewise.
16625
16626 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16627
16628         Sync from coreutils:
16629
16630         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
16631         * modules/lib-ignore: New file.
16632         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
16633         chdir-safer.m4, lchmod.m4.
16634         * modules/openat: Add mkdirat.c, openat-priv.h.
16635
16636 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16637
16638         Sync from coreutils.
16639         * m4/lib-ignore.m4: New file.
16640         * m4/lchmod.m4: New file.
16641
16642 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16643
16644         Sync from coreutils.
16645         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
16646         for write access: POSIX says that must fail.
16647         * lib/fts.c (diropen): Likewise.
16648         * lib/save-cwd.c (save_cwd): Likewise.
16649         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
16650         well, for minor improvements on hosts that lack O_DIRECTORY.
16651         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
16652         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
16653         Fall back on chown if open failed with EACCES.
16654
16655         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
16656         Report an error at compile-time if only a 1-second nominal clock
16657         resolution is found.
16658
16659         * lib/lchmod.h: New file.
16660         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
16661         (make_dir_parents): Use lchown rather than chown, and
16662         lchmod rather than chmod.
16663
16664         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
16665         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
16666         "proc" reported by n0dalus.
16667
16668         * lib/mountlist.c: Include <limits.h>.
16669         (dev_from_mount_options)
16670         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
16671         New function.  It no longer assumes "dev=" has the System V meaning
16672         on Linux (since it doesn't).  It also parses "dev=" more carefully.
16673         (read_file_system_list)
16674         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
16675         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
16676         dev= in that case.
16677
16678         * lib/posixtm.h (PDS_PRE_2000): New macro.
16679         * lib/posixtm.c (year): Arg is now syntax_bits rather than
16680         allow_century.  All usages changed.  Reject dates outside the range
16681         1969-1999 if PDS_PRE_2000 is used.
16682
16683 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16684
16685         Sync from coreutils.
16686         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
16687         (Time of day items): Mention the possibility of leap seconds.
16688         Problem reported by Dr. David Alan Gilbert.
16689
16690 2006-01-09  Jim Meyering  <jim@meyering.net>
16691
16692         Sync from coreutils.
16693
16694         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
16695
16696         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
16697
16698         * lib/modechange.c (mode_compile): Reject an invalid mode string
16699         that starts with an octal digit.  From Andreas Gruenbacher.
16700
16701         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16702         and dup to open_safer and dup_safer, respectively.
16703         (openat_permissive): Fix typo in comment.
16704
16705         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16706         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16707         (_): Remove; no longer needed.
16708         (openat): Renamed from rpl_openat; no need for rpl_openat
16709         since openat.h renames openat for us.
16710         Replace most of the body with a call to openat_permissive,
16711         to avoid duplicate code.
16712         Port to (probably hypothetical) environments were mode_t is
16713         wider than int.
16714         (openat_permissive): Require mode arg, so that we can check
16715         types better.  Put it just after flags.  Change cwd failure
16716         indicator from pointer-to-bool to pointer-to-errno-value.
16717         All callers changed.
16718         Invoke openat_save_fail and/or openat_restore_fail if
16719         cwd_errno is null, so that openat can call us.
16720         (openat_permissive, fdopendir, fstatat, unlinkat):
16721         Simplify errno handling to avoid some duplicate code,
16722         as it's OK to set errno on success.
16723         * lib/openat.h: Revamp code so that function macros depend on
16724         __OPENAT_PREFIX only, not also on AT_FDCWD.
16725         (openat_ro): Remove.  Caller changed to use openat_permissive.
16726         (openat_permissive): Now a macro, if not a function.
16727         (openat_restore_fail, openat_save_fail): Now always functions,
16728         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16729
16730         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16731         and openat.c.
16732         * lib/mkdirat.c: Include openat-priv.h.
16733         Remove definitions of macros defined therein.
16734         * lib/openat.c: Likewise.
16735
16736         * lib/mkdirat.c (mkdirat): New file and function.
16737         * lib/openat.h (mkdirat): Declare.
16738
16739         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16740
16741         * lib/openat.h (openat_permissive): Declare.
16742         (openat_ro): Define.
16743
16744         * lib/openat.c (EXPECTED_ERRNO): New macro.
16745         (openat_permissive): New function -- used in remove.c rewrite.
16746         (all functions): Set errno just before returning, only if there
16747         was an actual failure.
16748         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16749
16750         Emulate openat-family functions using Linux's procfs, if possible.
16751         Idea and some code based on Ulrich Drepper's glibc changes.
16752
16753         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16754         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16755         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16756         before falling back on save_cwd and restore_cwd.
16757         (fdopendir, fstatat, unlinkat): Likewise.
16758
16759         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16760         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16761
16762         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16763         as second argument to va_arg.  Otherwise, some versions of gcc
16764         warn that `if this code is reached, the program will abort'.
16765
16766 2006-01-09  Jim Meyering  <jim@meyering.net>
16767
16768         Sync from coreutils.
16769         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16770         Require openat-priv.h.
16771
16772 2006-01-09  Bruno Haible  <bruno@clisp.org>
16773
16774         * modules/strnlen (Include): Use strnlen.h.
16775
16776 2006-01-09  Bruno Haible  <bruno@clisp.org>
16777
16778         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16779
16780 2006-01-09  Bruno Haible  <bruno@clisp.org>
16781
16782         * lib/sysexit_.h (EX_OK): New macro.
16783         Suggested by Martin Lambers <marlam@marlam.de>.
16784
16785 2006-01-09  Bruno Haible  <bruno@clisp.org>
16786
16787         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16788         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16789
16790 2006-01-09  Bruno Haible  <bruno@clisp.org>
16791
16792         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16793         numbers.
16794
16795 2006-01-09  Bruno Haible  <bruno@clisp.org>
16796
16797         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16798         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16799         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16800         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16801
16802 2006-01-09  Bruno Haible  <bruno@clisp.org>
16803
16804         * build-aux/javacomp.sh.in: New file, moved from lib/.
16805         * modules/javacomp-script (Files): Update.
16806         (configure.ac): Add AC_CONFIG_FILES invocation.
16807         (EXTRA_DIST): Remove variable.
16808
16809         * build-aux/javaexec.sh.in: New file, moved from lib/.
16810         * modules/javaexec (Files): Update.
16811         (configure.ac): Add AC_CONFIG_FILES invocation.
16812         (EXTRA_DIST): Remove javaexec.sh.in.
16813
16814         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16815         * modules/csharpcomp-script (Files): Update.
16816         (configure.ac): Add AC_CONFIG_FILES invocation.
16817         (EXTRA_DIST): Remove variable.
16818
16819         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16820         * modules/csharpexec (Files): Update.
16821         (configure.ac): Add AC_CONFIG_FILES invocation.
16822         (EXTRA_DIST): Remove csharpexec.sh.in.
16823
16824 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16825
16826         Sync from coreutils.
16827
16828         Add POSIX ACL support
16829         * lib/acl.h (copy_acl, set_acl): Add declarations.
16830         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16831         systems other than Linux.
16832         (chmod_or_fchmod): New function: use fchmod when possible,
16833         and chmod otherwise.
16834         (file_has_acl): Add a POSIX ACL implementation, with a
16835         Linux-specific subcase.
16836         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16837         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16838         acls are unsupported.
16839         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16840         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16841         are unsupported.
16842
16843 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16844
16845         Sync from coreutils.
16846         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16847
16848 2006-01-07  Bruno Haible  <bruno@clisp.org>
16849
16850         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16851         gl_EARLY.
16852
16853 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16854
16855         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16856         Problem reported for Mingw by Mark Junker.
16857
16858 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16859
16860         * README: Gnulib normally doesn't generate a tarball.
16861
16862 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16863
16864         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16865         long int, not int, for nanosecond counts, so that people who are
16866         used to POSIX struct timespec won't be surprised.  Reported by Jim
16867         Meyering.
16868
16869 2005-12-28  Bruno Haible  <bruno@clisp.org>
16870
16871         * build-aux/config.rpath: Update from GNU gettext.
16872
16873 2005-12-16  Jim Meyering  <jim@meyering.net>
16874
16875         * modules/fprintftime: New module.
16876         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16877
16878 2005-12-16  Jim Meyering  <jim@meyering.net>
16879
16880         * m4/fprintftime.m4: New file.
16881
16882 2005-12-16  Jim Meyering  <jim@meyering.net>
16883
16884         * lib/fprintftime.c, lib/fprintftime.h: New files.
16885
16886 2005-12-15  Simon Josefsson  <jas@extundo.com>
16887
16888         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16889         new m4/socklen.m4.
16890
16891 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16892
16893         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16894         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16895
16896 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16897
16898         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16899         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16900         struct uparams is valid. Fall back to the default values if it is
16901         not.
16902
16903 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16904
16905         * modules/argp (Files): Add argp-pin.c
16906         (Depends-on): dirname
16907         (lib_SOURCES): Add argp-pin.c
16908
16909 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16910
16911         * m4/argp.m4:  Check if program_invocation_name and
16912         program_invocation_short_name are declared and define appropriate
16913         macros if they are not.
16914
16915 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16916
16917         * lib/argp-help.c (__argp_base_name): New function
16918         (__argp_short_program_name): Rewrite using __argp_base_name
16919         * lib/argp-namefrob.h: Define program_invocation_name and
16920         program_invocation_short_name if requested
16921         (__argp_base_name): Add prototype
16922         * lib/argp-parse.c (argp_def): Use gettext wrappers
16923         (argp_default_parser): Use __argp_base_name
16924         * lib/argp-pin.c: New file. Defines program_invocation_name and
16925         program_invocation_short_name on systems that lack them.
16926
16927 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16928
16929         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16930         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16931         porting problem reported by Georg Schwarz in
16932         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16933
16934 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16935
16936         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16937         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16938         porting problem reported by Georg Schwarz in
16939         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16940
16941 2005-12-05  Bruno Haible  <bruno@clisp.org>
16942
16943         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16944         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16945         Reported by Mark Junker <mjscod@gmx.de>.
16946
16947 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16948
16949         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16950         Use implementation from Albert Chin, with some
16951         comments/corrections by Stepan Kasal and myself.
16952
16953 2005-12-02  Bruno Haible  <bruno@clisp.org>
16954
16955         * gnulib-tool (func_import): Accept GPLed build tool modules when
16956         --lgpl is given.
16957         * modules/csharpcomp-script: New file.
16958         * modules/csharpcomp: Depend on it.
16959         * modules/javacomp-script: New file.
16960         * modules/javacomp: Depend on it.
16961         Suggested by Simon Josefsson.
16962
16963 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16964
16965         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16966         statement, to work around an HP-UX 10.20 compiler bug reported by
16967         Peter O'Gorman.
16968
16969 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16970
16971         * modules/savedir (Depends-on): Add openat.
16972
16973 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16974
16975         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16976         (uintmax_t) [defined uintmax_t]: Do not declare.
16977         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16978         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16979         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16980         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16981         sake of portability to weird hosts that C allows (though we don't
16982         know of any practical examples).
16983
16984         * lib/savedir.h (fdsavedir): New decl.
16985         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16986         contains most of the former guts of savedir.
16987         (savedir): Use savedirstream.
16988         Include "openat.h".
16989
16990 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16991
16992         * modules/obstack (Files): Add m4/ulonglong.m4.
16993         Problem reported by Davide Angelocola.
16994
16995 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16996
16997         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16998         coreutils no longer futzes with rounding modes.
16999
17000 2005-11-14  Jim Meyering  <jim@meyering.net>
17001
17002         * lib/mkstemp-safer.c: Include <config.h>, required for possible
17003         replacement of mkstemp.
17004
17005 2005-11-10  Simon Josefsson  <jas@extundo.com>
17006
17007         * lib/readline.c: Remove EOL.
17008
17009 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17010
17011         * modules/gethrxtime (Depends-on): Add gettime.
17012
17013 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17014
17015         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
17016         or gettimeofday; no longer needed.
17017
17018 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17019
17020         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
17021         time business.
17022         (gethrxtime) [! (HAVE_NANOUPTIME
17023         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
17024         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
17025         our own approximation.
17026
17027 2005-11-08  Eric Blake  <ebb9@byu.net>
17028
17029         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
17030
17031 2005-11-08  Eric Blake  <ebb9@byu.net>
17032
17033         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
17034
17035 2005-11-04  Bruno Haible  <bruno@clisp.org>
17036
17037         * gnulib-tool: Implement --update mode.
17038
17039 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17040
17041         Fix porting problem reported by Theodoros V. Kalamatianos.
17042         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
17043         Don't assume that futimes failing means we must fail.
17044
17045 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17046
17047         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
17048         variables to suggest the intended function of the PATH_MAX check.
17049
17050 2005-10-30  Kean Johnston  <jkj@sco.com>
17051
17052         Trivial changes to support SCO systems.
17053         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
17054         as PATH_MAX.
17055         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
17056         where __ptr is null when no I/O is pending.
17057
17058 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17059
17060         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
17061         leave errno alone.  Problem reported by Dmitry V. Levin.
17062
17063 2005-10-28  Simon Josefsson  <jas@extundo.com>
17064
17065         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
17066         Test more.
17067
17068         * tests/test-gc-md2.c, tests/test-md2.c: New files.
17069
17070         * modules/md2, modules/md2-tests: New files.
17071
17072 2005-10-28  Simon Josefsson  <jas@extundo.com>
17073
17074         * m4/inet_ntop.m4: More tests.
17075
17076         * m4/gc-md2.m4, md2.m4: New file.
17077
17078 2005-10-28  Simon Josefsson  <jas@extundo.com>
17079
17080         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
17081         "restrict" keywords, as per POSIX.  Protect the function
17082         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
17083         Don't use K&R prototypes.  Check the sprintf return values.
17084         Re-define EAFNOSUPPORT if not present.  Indent.
17085
17086         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
17087         suggested by Bruno Haible <bruno@clisp.org>.
17088
17089         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
17090
17091         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
17092
17093         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
17094         libgcrypt).
17095
17096         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
17097
17098         * lib/md2.h, lib/md2.c: New files.
17099
17100 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
17101
17102         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
17103         errno alone.  Problem reported by Frederic Jolliton.
17104
17105 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
17106
17107         * modules/verify (License): Change from GPL to LGPL.  This is a
17108         tiny module and there are apparently near-equivalents that are
17109         under the BSD license.
17110
17111 2005-10-24  Simon Josefsson  <jas@extundo.com>
17112
17113         * modules/sha1: Relicense to LGPL.
17114
17115 2005-10-24  Simon Josefsson  <jas@extundo.com>
17116
17117         * lib/md4.h: Shrink buffer size, now that we changed the type.
17118
17119 2005-10-23  Simon Josefsson  <jas@extundo.com>
17120
17121         * gnulib-tool (func_import): Fix --tests-base.
17122
17123 2005-10-22  Simon Josefsson  <jas@extundo.com>
17124
17125         * modules/arcfour (Depends-on): Need stdint.
17126
17127 2005-10-22  Simon Josefsson  <jas@extundo.com>
17128
17129         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
17130         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
17131
17132 2005-10-22  Simon Josefsson  <jas@extundo.com>
17133
17134         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
17135         suggested by Bruno Haible <bruno@clisp.org>.
17136
17137 2005-10-22  Simon Josefsson  <jas@extundo.com>
17138
17139         * lib/crc.h: Include stddef.h, for size_t.
17140
17141 2005-10-22  Simon Josefsson  <jas@extundo.com>
17142
17143         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
17144         arcfour_context struct (simplify test vector testing in GNU
17145         Shishi).
17146
17147 2005-10-21  Simon Josefsson  <jas@extundo.com>
17148
17149         * modules/des, modules/des-tests: New files.
17150
17151         * modules/gc-des, modules/gc-des-tests: New files.
17152
17153         * tests/test-des.c, tests/test-gc-des.c: New file.
17154
17155 2005-10-21  Simon Josefsson  <jas@extundo.com>
17156
17157         * modules/arctwo, modules/arctwo-tests: New files.
17158
17159         * tests/test-arctwo.c: New file.
17160
17161         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
17162
17163         * tests/test-gc-arctwo.c: New file.
17164
17165 2005-10-21  Simon Josefsson  <jas@extundo.com>
17166
17167         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
17168         Bruno Haible <bruno@clisp.org>.
17169
17170         * m4/gc-des.m4: New file.
17171
17172 2005-10-21  Simon Josefsson  <jas@extundo.com>
17173
17174         * m4/arctwo.m4: New file.
17175
17176         * m4/gc-arctwo.m4: New file.
17177
17178 2005-10-21  Simon Josefsson  <jas@extundo.com>
17179
17180         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
17181         block.
17182
17183 2005-10-21  Simon Josefsson  <jas@extundo.com>
17184
17185         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
17186         <bruno@clisp.org>.
17187
17188         * lib/hmac-sha1.c (hmac_sha1): Likewise.
17189
17190         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
17191         Bruno Haible <bruno@clisp.org>.
17192
17193         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
17194         <bruno@clisp.org>.
17195
17196 2005-10-21  Simon Josefsson  <jas@extundo.com>
17197
17198         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
17199
17200 2005-10-21  Simon Josefsson  <jas@extundo.com>
17201
17202         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
17203
17204 2005-10-21  Simon Josefsson  <jas@extundo.com>
17205
17206         * lib/des.h, lib/des.c: New files.
17207
17208         * lib/gc-gnulib.c: Support DES.c
17209
17210 2005-10-21  Simon Josefsson  <jas@extundo.com>
17211
17212         * lib/arctwo.h, lib/arctwo.c: New files.
17213
17214         * lib/gc-gnulib.c: Support ARCTWO.
17215
17216 2005-10-21  Simon Josefsson  <jas@extundo.com>
17217
17218         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
17219         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
17220
17221 2005-10-21  Simon Josefsson  <jas@extundo.com>
17222
17223         * gnulib-tool (func_import, func_create_testdir): Define automake
17224         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
17225         Makefile.am snippet),
17226         suggested by Bruno Haible <bruno@clisp.org>.
17227
17228         * modules/gc (Makefile.am): Use it.
17229
17230 2005-10-21  Bruno Haible  <bruno@clisp.org>
17231
17232         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
17233         patch.
17234
17235 2005-10-19  Simon Josefsson  <jas@extundo.com>
17236
17237         * tests/test-gc-rijndael.c: New file.
17238
17239         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
17240
17241 2005-10-19  Simon Josefsson  <jas@extundo.com>
17242
17243         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
17244         interface too.
17245
17246 2005-10-19  Simon Josefsson  <jas@extundo.com>
17247
17248         * tests/test-gc-arcfour.c: New file.
17249
17250         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
17251
17252 2005-10-19  Simon Josefsson  <jas@extundo.com>
17253
17254         * modules/gc-md4, modules/gc-md4-tests: New file.
17255
17256         * tests/test-gc-md4.c: New file.
17257
17258 2005-10-19  Simon Josefsson  <jas@extundo.com>
17259
17260         * m4/gc-md4.m4: New file.
17261
17262 2005-10-19  Simon Josefsson  <jas@extundo.com>
17263
17264         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
17265         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
17266         <kasal@ucw.cz>.
17267
17268 2005-10-19  Simon Josefsson  <jas@extundo.com>
17269
17270         * m4/gc-arcfour.m4: New file.
17271
17272         * m4/gc-rijndael.m4: New file.
17273
17274 2005-10-19  Simon Josefsson  <jas@extundo.com>
17275
17276         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
17277
17278 2005-10-19  Simon Josefsson  <jas@extundo.com>
17279
17280         * lib/gc-gnulib.c: Support ARCFOUR.
17281
17282 2005-10-19  Simon Josefsson  <jas@extundo.com>
17283
17284         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
17285         support.
17286
17287         * lib/gc.h: Add ECB enum type.
17288
17289         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
17290
17291 2005-10-18  Simon Josefsson  <jas@extundo.com>
17292
17293         * tests/test-md5.c: New file.
17294
17295         * modules/md5-tests: New file.
17296
17297 2005-10-18  Simon Josefsson  <jas@extundo.com>
17298
17299         * tests/test-md4.c: New file.
17300
17301         * modules/md4, modules/md4-tests: New files.
17302
17303 2005-10-18  Simon Josefsson  <jas@extundo.com>
17304
17305         * m4/md4.m4: New file.
17306
17307 2005-10-18  Simon Josefsson  <jas@extundo.com>
17308
17309         * lib/md4.h, lib/md4.c: New files, based on md5.?.
17310
17311 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
17312
17313         * gnulib-tool (func_create_testdir): Omit the second check whether
17314         BUILT_SOURCES in nonempty.
17315
17316 2005-10-17  Simon Josefsson  <jas@extundo.com>
17317
17318         * tests/test-rijndael.c: New file.
17319
17320 2005-10-17  Simon Josefsson  <jas@extundo.com>
17321
17322         * modules/sha1: Depend on stdint instead of md5.
17323
17324         * modules/md5: Depend on stdint, remove uint32_t.
17325
17326 2005-10-17  Simon Josefsson  <jas@extundo.com>
17327
17328         * modules/gc-sha1-tests: New file.
17329
17330         * tests/test-gc-sha1.c: New file.
17331
17332 2005-10-17  Simon Josefsson  <jas@extundo.com>
17333
17334         * m4/md5.m4: Remove call to uint32_t.m4.
17335
17336 2005-10-17  Simon Josefsson  <jas@extundo.com>
17337
17338         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
17339
17340         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
17341         md5.h.
17342
17343         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
17344
17345         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
17346
17347 2005-10-17  Simon Josefsson  <jas@extundo.com>
17348
17349         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
17350
17351 2005-10-17  Simon Josefsson  <jas@extundo.com>
17352
17353         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
17354
17355 2005-10-17  Simon Josefsson  <jas@extundo.com>
17356
17357         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
17358
17359         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
17360
17361 2005-10-17  Bruno Haible  <bruno@clisp.org>
17362
17363         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
17364         that it can also be used in a test.
17365
17366 2005-10-16  Bruno Haible  <bruno@clisp.org>
17367
17368         * gnulib-tool (func_emit_tests_Makefile_am): Also define
17369         TESTS_ENVIRONMENT, so that individual tests can augment it.
17370
17371         * gnulib-tool (func_create_testdir): Use an intermediate target for
17372         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
17373         macros, like $(ALLOCA_H), which cannot be passed through the command
17374         line.
17375
17376 2005-10-15  Simon Josefsson  <jas@extundo.com>
17377
17378         * modules/rijndael-tests: New file.
17379
17380         * modules/rijndael: New file.
17381
17382 2005-10-15  Simon Josefsson  <jas@extundo.com>
17383
17384         * m4/rijndael.m4: New file.
17385
17386 2005-10-15  Simon Josefsson  <jas@extundo.com>
17387
17388         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
17389
17390         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
17391
17392 2005-10-14  Simon Josefsson  <jas@extundo.com>
17393
17394         * tests/test-arcfour.c: New file.
17395
17396         * modules/arcfour, modules/arcfour-tests: New files.
17397
17398 2005-10-14  Simon Josefsson  <jas@extundo.com>
17399
17400         * m4/arcfour.m4: New file.
17401
17402 2005-10-14  Simon Josefsson  <jas@extundo.com>
17403
17404         * lib/arcfour.h, lib/arcfour.c: New files.
17405
17406 2005-10-14  Roland McGrath  <roland@redhat.com>
17407
17408         Import from libc.  [BZ #1331]
17409         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
17410         macro argument.
17411         Reported by Matej Vela <vela@debian.org>.
17412
17413 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17414
17415         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
17416         include <wchar.h>; no longer needed.
17417
17418 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17419
17420         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
17421
17422 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
17423         and  Ulrich Drepper  <drepper@redhat.com>
17424
17425         Import from libc.
17426         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
17427         instead of inline stream orientation test and two separate
17428         function calls.  Pay no attention to USE_IN_LIBIO.
17429
17430 2005-10-13  Simon Josefsson  <jas@extundo.com>
17431
17432         * modules/gc-hmac-md5-tests: New file.
17433
17434         * tests/test-gc-hmac-sha1.c: New file.
17435
17436         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
17437
17438         * modules/gc-hmac-md5-tests: New file.
17439
17440         * tests/test-gc-md5.c: New file.
17441
17442         * modules/gc-md5-tests: New file.
17443
17444 2005-10-13  Simon Josefsson  <jas@extundo.com>
17445
17446         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
17447         Move memory allocation outside of loop.
17448
17449 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17450
17451         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
17452         intermediate directory is in a read-only file system.  Problem
17453         reported by Eric Blake.
17454
17455 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
17456
17457         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
17458
17459 2005-10-12  Simon Josefsson  <jas@extundo.com>
17460
17461         * tests/test-hmac-sha1.c: New file.
17462
17463         * modules/hmac-sha1-tests: New file.
17464
17465         * modules/hmac-sha1: New file.
17466
17467 2005-10-12  Simon Josefsson  <jas@extundo.com>
17468
17469         * modules/gc-sha1: New file.
17470
17471 2005-10-12  Simon Josefsson  <jas@extundo.com>
17472
17473         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
17474
17475         * tests/test-gc-pbkdf2-sha1.c: New file.
17476
17477 2005-10-12  Simon Josefsson  <jas@extundo.com>
17478
17479         * modules/gc-md5, modules/gc-hmac-md5: New files.
17480
17481         * modules/gc (Files): Remove md5, memxor and hmac files.
17482
17483 2005-10-12  Simon Josefsson  <jas@extundo.com>
17484
17485         * m4/gc-pbkdf2-sha1.m4: New file.
17486
17487         * m4/gc-hmac-sha1.m4: New file.
17488
17489         * m4/gc-sha1: New file.
17490
17491         * m4/hmac-sha1.m4: New file.
17492
17493 2005-10-12  Simon Josefsson  <jas@extundo.com>
17494
17495         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
17496
17497         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
17498
17499 2005-10-12  Simon Josefsson  <jas@extundo.com>
17500
17501         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
17502         suggested by Bruno Haible <bruno@clisp.org>.
17503
17504 2005-10-12  Simon Josefsson  <jas@extundo.com>
17505
17506         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
17507
17508 2005-10-12  Simon Josefsson  <jas@extundo.com>
17509
17510         * lib/gc-pbkdf2-sha1.c: New file.
17511
17512         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
17513
17514 2005-10-12  Simon Josefsson  <jas@extundo.com>
17515
17516         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
17517
17518         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
17519
17520 2005-10-12  Simon Josefsson  <jas@extundo.com>
17521
17522         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
17523         GC_USE_HMAC_MD5, respectively.
17524
17525         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
17526         (gc_md5): Fix typo.
17527
17528         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
17529
17530         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
17531
17532         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
17533
17534 2005-10-12  Bruno Haible  <bruno@clisp.org>
17535
17536         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
17537         Reported by Stepan Kasal <kasal@ucw.cz>.
17538
17539 2005-10-11  Simon Josefsson  <jas@extundo.com>
17540
17541         * tests/test-crc.c: New file.
17542
17543         * modules/crc, modules/crc-tests: New files.
17544
17545 2005-10-11  Simon Josefsson  <jas@extundo.com>
17546
17547         * m4/crc.m4: New file.
17548
17549 2005-10-11  Simon Josefsson  <jas@extundo.com>
17550
17551         * lib/gc.h: Add gc_hash and gc_hash_buffer.
17552
17553         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
17554
17555         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
17556
17557 2005-10-11  Simon Josefsson  <jas@extundo.com>
17558
17559         * lib/crc.h, lib/crc.c: New files.
17560
17561         * lib/gc.h (gc_hash_buffer): Add doc.
17562
17563 2005-10-11  Bruno Haible  <bruno@clisp.org>
17564
17565         * modules/c-strcasestr: New file.
17566         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
17567
17568 2005-10-11  Bruno Haible  <bruno@clisp.org>
17569
17570         * modules/c-strcase: New file.
17571         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
17572
17573 2005-10-11  Bruno Haible  <bruno@clisp.org>
17574
17575         * lib/strcasecmp.c: Include limits.h.
17576         (strcasecmp): Avoid integer overflow on exotic platforms.
17577         * lib/strncasecmp.c: Include limits.h.
17578         (strncasecmp): Avoid integer overflow on exotic platforms.
17579         Reported by Paul Eggert.
17580
17581 2005-10-11  Bruno Haible  <bruno@clisp.org>
17582
17583         * lib/c-strcasestr.h: New file, from GNU gettext.
17584         * lib/c-strcasestr.c: New file, from GNU gettext.
17585
17586 2005-10-11  Bruno Haible  <bruno@clisp.org>
17587
17588         * lib/c-strcase.h: New file, from GNU gettext.
17589         * lib/c-strcasecmp.c: New file, from GNU gettext.
17590         * lib/c-strncasecmp.c: New file, from GNU gettext.
17591
17592 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17593
17594         * modules/mempcpy (License): GPL -> LGPL.
17595         * modules/strchrnul (License): Likewise.
17596         * modules/sysexits (License): Likewise.
17597
17598 2005-10-08  Simon Josefsson  <jas@extundo.com>
17599
17600         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
17601
17602 2005-10-07  Simon Josefsson  <jas@extundo.com>
17603
17604         * m4/memxor.m4: Remove gl_C_RESTRICT call.
17605
17606 2005-10-06  Simon Josefsson  <jas@extundo.com>
17607
17608         * tests/test-hmac-md5.c: New file.
17609
17610         * modules/hmac-md5-tests: New file.
17611
17612         * modules/hmac-md5: New file.
17613
17614 2005-10-06  Simon Josefsson  <jas@extundo.com>
17615
17616         * m4/hmac-md5.m4: New file.
17617
17618         * m4/memxor.m4: Require gl_C_RESTRICT.
17619
17620 2005-10-06  Simon Josefsson  <jas@extundo.com>
17621
17622         * lib/memxor.c (memxor): Avoid casts and warnings.
17623
17624 2005-10-06  Simon Josefsson  <jas@extundo.com>
17625
17626         * lib/hmac-md5.c: New file.
17627
17628         * lib/hmac.h: New file.
17629
17630 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17631
17632         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
17633         promotes to int, not unsigned int, to catch the AIX 5.3
17634         compiler bug.
17635
17636 2005-10-05  Simon Josefsson  <jas@extundo.com>
17637
17638         * modules/memxor: New file.
17639
17640         * modules/iconv (Files): Move config.rpath to havelib, it is used
17641         there.
17642
17643         * modules/havelib (Files): Add config.rpath.
17644
17645 2005-10-05  Simon Josefsson  <jas@extundo.com>
17646
17647         * m4/memxor.m4: New file.
17648
17649 2005-10-05  Simon Josefsson  <jas@extundo.com>
17650
17651         * lib/memxor.c (memxor): Fix compiler error.
17652
17653         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
17654         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
17655
17656         * lib/memxor.h, lib/memxor.c: New files.
17657
17658         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
17659         we assume all systems have it, suggested by Jim Meyering
17660         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
17661         any systems lack sys/socket.h; mingw32 is known to lack it, but we
17662         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
17663         same reasons.
17664
17665 2005-10-05  Simon Josefsson  <jas@extundo.com>
17666
17667         * config/srclist.txt: Add glibc bug 1423 for md5.h.
17668
17669 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
17670
17671         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
17672         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
17673         needed, since the source code now assumes these .h files.
17674
17675 2005-10-05  Derek Price  <derek@ximbiot.com>
17676
17677         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
17678
17679 2005-10-05  Bruno Haible  <bruno@clisp.org>
17680
17681         * modules/stdint (License): Change to LGPL.
17682
17683 2005-10-04  Simon Josefsson  <jas@extundo.com>
17684
17685         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
17686         D. Baushke" <mdb@gnu.org>.
17687
17688 2005-10-04  Bruno Haible  <bruno@clisp.org>
17689
17690         * lib/verify.h (verify_true): Provide alternative definition for C++.
17691
17692 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
17693
17694         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
17695         (SSIZE_MAX): New macro, if not already defined.
17696         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
17697         than 2 GiB.
17698
17699 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17700
17701         Sync from coreutils.
17702         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17703         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17704         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17705         ULLONG_MAX doesn't work with 2.7.2.1.
17706
17707 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17708
17709         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17710         From Ben Pfaff.
17711
17712         * modules/exclude (Depends-on): Depend on verify.
17713         * modules/strtoimax (Depends-on): Likewise.
17714         * modules/utimecmp (Depends-on): Likewise.
17715
17716 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17717
17718         * lib/exclude.c: Include verify.h.
17719         (verify): Remove.  All callers changed to use verify.h's version.
17720         * lib/strtoimax.c: Likewise.
17721         * lib/utimecmp.c: Likewis.e
17722
17723         Sync from coreutils.
17724         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17725         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17726         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17727         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17728         bother returning ENOSYS if settimeofday or stime fails; just let
17729         them return whatever errno they want to return.
17730         * lib/utimens.c: Include unistd.h, for dup2.
17731         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17732         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17733
17734 2005-10-02  Jim Meyering  <jim@meyering.net>
17735
17736         Sync from coreutils.
17737         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17738         from glibc-2.2.5 that fails for read-only files.
17739
17740 2005-10-02  Jim Meyering  <jim@meyering.net>
17741
17742         Sync from coreutils.
17743         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17744         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17745         `#if HAVE_CONFIG_H'.
17746         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17747         Remove AT_FDCWD test.
17748         Do not consume the fd unless successful.
17749         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17750         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17751         block, so that we don't even try to compile it if settimeofday is
17752         available.  This works around a compilation failure on OSF1 V5.1,
17753         due to stime requiring a `long int*' while tv_sec is `int'.
17754
17755 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17756
17757         Sync from coreutils.
17758         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17759         against `yes', rather than just testing for nonempty.
17760
17761 2005-10-01  Simon Josefsson  <jas@extundo.com>
17762
17763         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17764         and Darwin.
17765
17766         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17767         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17768         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17769         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17770         Check if struct addrinfo is declared.
17771
17772 2005-10-01  Simon Josefsson  <jas@extundo.com>
17773
17774         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17775         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17776         AI_* and EAI_* definitions.  Protect function declarations.
17777
17778 2005-10-01  Jim Meyering  <jim@meyering.net>
17779
17780         Sync from coreutils.
17781
17782         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17783         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17784         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17785         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17786         in the inet and nsl libraries.  Required on Solaris 5.7.
17787
17788 2005-10-01  Jim Meyering  <jim@meyering.net>
17789
17790         Sync from coreutils.
17791         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17792         in the inet and nsl libraries.  Required on Solaris 5.7.
17793
17794 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17795
17796         * lib/getdelim.c (getdelim): Remove unused variables.
17797
17798 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17799
17800         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17801         so that the code works even with ancient cpp.  Portability problem
17802         with GCC 2.7.2.1 reported by Thomas M.Ott.
17803
17804 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17805
17806         * modules/regex (Depends-on): Add strcase.
17807
17808         * modules/gethostname (Licence): Change from GPL to LGPL, since
17809         gethostname.c is a trivial implementation of a standard library
17810         function.
17811         * modules/poll (License): Change from GPL to LGPL, since it's
17812         derived from LGPL code.
17813
17814 2005-09-27  Jim Meyering  <jim@meyering.net>
17815
17816         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17817         HAVE_CONFIG_H.
17818
17819         * lib/intprops.h (signed_type_or_expr__): Define.
17820         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17821         for unsigned types.
17822
17823 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17824
17825         * lib/verify.h (verify_expr): Remove, replacing with:
17826         (verify_true): New macro that returns true instead of void.
17827         (verify_type__): Remove.
17828         (verify): Use verify_true rather than verify_type__.
17829
17830 2005-09-26  Bruno Haible  <bruno@clisp.org>
17831
17832         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17833         is necessary.
17834         (lib_SOURCES): Remove mbchar.c.
17835         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17836         (Files): Add m4/mbrtowc.m4.
17837         * modules/mbiter: Likewise.
17838         * modules/mbuiter: Likewise.
17839
17840 2005-09-26  Bruno Haible  <bruno@clisp.org>
17841
17842         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17843         compile mbchar.c if they are not both present.
17844         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17845         * m4/mbiter.m4 (gl_MBITER): Likewise.
17846         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17847         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17848         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17849
17850 2005-09-25  Jim Meyering  <jim@meyering.net>
17851
17852         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17853         also uses socklen_t.
17854
17855 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17856
17857         * lib/utimens.c (ENOSYS): Define if not already defined.
17858         (futimens): Support having a null PATH if the file descriptor
17859         is nonnegative.
17860
17861         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17862         Remove.
17863         (__attribute): Define to empty unless GCC 3.1 or later.
17864         This works around a core dump on OpenBSD 3.4, which has GCC
17865         2.95.3, which dumps core when given __attribute__(()).  It also
17866         simplifies other tests, since we really don't want to bother with
17867         worrying about which ancient version of GCC supported what.
17868         Original problem reported by Yoann Vandoorselaere, with part of
17869         the fix suggested by Derek Price.
17870
17871 2005-09-24  Jim Meyering  <jim@meyering.net>
17872
17873         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17874         so we can once again use a positive bitfield width of 1 -- now we
17875         don't have to explain why we were using a bitfield width of 2.
17876
17877 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17878
17879         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17880         and similarly for the other external symbols.  Problem reported
17881         by James Gallager.
17882
17883         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17884         bug reported by Jim Meyering.
17885
17886         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17887         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17888         not needed, since socklen is a prerequisite module.
17889
17890 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17891
17892         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17893         Problem reported by Eric Blake.
17894         (getaddrinfo): Initialize se so that it's not garbage.
17895         Redo internal storage allocation so that it doesn't make unportable
17896         assumptions about alignment.
17897         Fix a memory leak.
17898
17899         * lib/utimens.c (futimens): Use futimesat if available.
17900         Prefer it to futimes since it doesn't have the futimes bug.
17901
17902         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17903         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17904         Instead, declare a function that returns a pointer to an array,
17905         and use verify_type__ to declare the size of the array.
17906         Problem and germ of a solution reported by Bruno Haible.
17907         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17908         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17909
17910 2005-09-23  Jim Meyering  <jim@meyering.net>
17911
17912         Sync from coreutils.
17913         Correct build failure (socklen_t not defined) on at least
17914         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17915         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17916
17917 2005-09-23  Jim Meyering  <jim@meyering.net>
17918
17919         * modules/getaddrinfo (Depends-on): Add socklen.
17920
17921 2005-09-23  Bruno Haible  <bruno@clisp.org>
17922
17923         * tests/test-verify.c: New file.
17924
17925 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17926
17927         Sync from coreutils.
17928
17929         * modules/argmatch (Depends-on): Add verify.
17930         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17931         unistd-safer.
17932         * modules/save-cwd (Depends-on): Likewise.
17933
17934         * modules/openat (Files): Add lib/openat-die.c.
17935         (Depends-on): Remove error, exitfail.
17936         Add dirname.
17937
17938         * modules/verify: New file.
17939         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17940         with "verify" module.
17941
17942 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17943
17944         Sync from coreutils.
17945
17946         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17947         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17948         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17949         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17950         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17951         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17952         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17953         Don't bother checking for string.h, stdlib.h, unistd.h.
17954         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17955         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17956         module's job.
17957         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17958         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17959
17960         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17961         (gl_GETDATE): Use it.
17962
17963         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17964
17965 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17966
17967         Sync from coreutils.
17968
17969         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17970         stat-time.h.
17971         * lib/argmatch.h: Include verify.h
17972         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17973         (ARGMATCH_ASSERT): Remove; unused.
17974         * lib/canonicalize.c: Assume STDC_HEADERS.
17975         * lib/exclude.c: Include "strcase.h".
17976         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17977         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17978         and stdio-safer.h.
17979         (getusershell): Call fopen, not fopen_safer.
17980         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17981         Do not include unistd-safer.h.
17982         (save_cwd): Don't call fd_safer; no longer needed
17983         now that we include fcntl--.h.
17984
17985         * lib/getdate.y (relative_time): New type.
17986         (RELATIVE_TIME_0): New constant.
17987         (parser_control): Use relative_time instead of doing it ourselves.
17988         (%union): Add new relative_time rel member.
17989         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17990         Now typeless.
17991         (relunit, relunit_snumber): Now of type rel.
17992         (zone, rel, relunit, get_date): Adjust to above changes.
17993
17994         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17995         Do not include unistd-safer.h.
17996         (getloadavg): Don't call fd_safer; no longer needed
17997         now that we include fcntl--.h.
17998
17999         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
18000         (make_dir_parents): Treat ENOSYS like EEXIST.
18001
18002         Improve quality of diagnostics on restore_cwd failure.
18003         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
18004         (make_dir_parents): Last arg is now int * (for errno), not bool *.
18005         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
18006         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
18007         each time through the loop.  Do not diagnose restore_cwd failure;
18008         that is the caller's job (and perhaps the caller does not care).
18009
18010         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
18011         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
18012         If the file already exists but is not a directory, don't bother
18013         to try to make its parents.
18014         Close potential file descriptor leak if we can't chdir("/") (!).
18015         Don't always return true if chdir($PWD) fails; return true only
18016         if the requested action was done successfully (except for the
18017         chdir($PWD)).
18018         Don't log final directory unless we actually made it.
18019         Refactor to avoid duplicate code to fix up permissions.
18020         Don't attempt to fix up parent permissions if chdir($PWD) fails.
18021
18022         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
18023         to make it a bit faster and (I hope) clearer.
18024         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
18025         Fix bug in formats like %2N.
18026
18027         * lib/verify.h: New file.
18028
18029 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
18030
18031         Sync from coreutils.
18032         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
18033
18034 2005-09-22  Jim Meyering  <jim@meyering.net>
18035
18036         Sync from coreutils.
18037
18038         * m4/lstat.m4 (gl_FUNC_LSTAT):
18039         Use AC_LIBSOURCES to require lstat.c and lstat.h.
18040         Remove obsolete comment.
18041         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
18042         * m4/xstrtod.m4: Likewise.
18043
18044         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
18045
18046 2005-09-22  Jim Meyering  <jim@meyering.net>
18047
18048         Sync from coreutils.
18049
18050         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
18051
18052         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
18053         the .tm_year member, since otherwise gcc-4.0 would now warn about
18054         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
18055
18056         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
18057         order to avoid an unsuppressible warning from gcc on 64-bit systems.
18058
18059         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
18060         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
18061         when run in a time zone for which daylight savings time is in effect
18062         for the starting date.
18063
18064         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
18065         stop us from restricting permissions of just-created absolute-named
18066         directories.
18067         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
18068         to restore initial working directory.
18069         * lib/mkdir-p.c (make_dir_parents): New parameter:
18070         different_working_dir, to tell caller if/when we change the working
18071         directory and are unable to return to the initial one.
18072         * lib/mkdir-p.h (make_dir_parents): Update prototype.
18073         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
18074         `return false'.  This fixes a bug introduced on 2004-07-30.
18075
18076         * lib/openat.c (fdopendir): Be sure to close the supplied
18077         file descriptor before returning.  This makes our replacement
18078         implementation a little closer to Solaris's, where fdopendir
18079         ties the file descriptor to the returned DIR* pointer.
18080         * lib/openat.c (unlinkat): New function.
18081         * lib/openat.h (unlinkat): Add prototype.
18082         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
18083         (openat_restore_fail): Rename from openat_restore_die.
18084         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
18085
18086         Provide an alternative to exiting immediately upon save_cwd or
18087         restore_cwd failure.  Now, an application can arrange e.g.,
18088         to perform a longjump in that case.
18089         * lib/openat.c: Include dirname.h.
18090         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
18091         (rpl_openat, fdopendir, fstatat): Call openat_save_die
18092         and openat_restore_die rather than calling error directly.
18093         Don't include "error.h" or "exitfail.h"; they're no longer needed.
18094
18095         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
18096         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
18097         define.
18098
18099         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
18100         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
18101                             int utc, int nanoseconds);
18102         Background:
18103         date should not have to allocate a megabyte of virtual memory to
18104         handle a format argument like +%1048575T.  When implemented with
18105         strftime, it must allocate such a buffer, use strftime to fill it
18106         in, print it, then free it.
18107         With fprintftime, it simply prints everything and exits.
18108         With no need for memory allocation, that's one fewer way to fail.
18109         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
18110         optional field width, not before, so we accept %9:z, not %:9z.
18111         (my_strftime): Be sure to use L_('x') for literals.
18112
18113         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
18114         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
18115         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
18116         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
18117         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
18118         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
18119         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
18120         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
18121         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
18122         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
18123         * lib/xgethostname.c, lib/xreadlink.c:
18124         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
18125
18126         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
18127         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
18128         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
18129         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
18130         and don't include <sys/file.h>).
18131
18132 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
18133
18134         Sync from coreutils.
18135
18136         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
18137         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
18138         [!LDAV_DONE]: Avoid unused variable warning.
18139
18140 2005-09-21  Bruno Haible  <bruno@clisp.org>
18141
18142         * lib/unicodeio.h (unicode_to_mb): New declaration.
18143
18144 2005-09-20  Derek Price  <derek@ximbiot.com>
18145
18146         * lib/getaddrinfo.c: Don't include <netdb.h> included from
18147         getaddrinfo.h.
18148
18149 2005-09-20  Bruno Haible  <bruno@clisp.org>
18150
18151         * gnulib-tool: Remove trailing slashes from the values specified for
18152         --source-base, --m4-base, --tests-base, --aux-dir.
18153         Suggested by Simon Josefsson <jas@extundo.com>.
18154
18155 2005-09-20  Bruno Haible  <bruno@clisp.org>
18156
18157         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
18158         func_modules_to_filelist, func_import, func_create_testdir): Make all
18159         sorting results locale-independent, so that gnulib-cache.m4 doesn't
18160         change when gnulib-tool is invoked in a different locale.
18161
18162 2005-09-19  Simon Josefsson  <jas@extundo.com>
18163
18164         * m4/socklen.m4: Fix typo.
18165
18166 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
18167
18168         Use a consistent style for including <config.h>.
18169         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
18170         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
18171         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
18172         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
18173         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
18174         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
18175         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
18176         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
18177         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
18178         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
18179         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
18180         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
18181         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
18182         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
18183         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
18184         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
18185         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
18186         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
18187         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
18188         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
18189         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
18190         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
18191         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
18192         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
18193         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
18194         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
18195         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
18196         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
18197         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
18198         lib/xstrtoumax.c, lib/yesno.c:
18199         Standardize inclusion of config.h.
18200         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
18201         lib/inttostr.h:  Removed inclusion of config.h from header files.
18202         * lib/inttostr.c:  Adjusted in-tree users.
18203         * lib/timespec.h: Remove superfluous warning to include config.h.
18204         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
18205         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
18206         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
18207         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
18208         config.h with HAVE_CONFIG_H.
18209
18210 2005-09-19  Jim Meyering  <jim@meyering.net>
18211
18212         * modules/pathmax (License): Change to LGPL.
18213
18214 2005-09-19  Derek Price  <derek@ximbiot.com>
18215
18216         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
18217
18218 2005-09-19  Bruno Haible  <bruno@clisp.org>
18219
18220         * gnulib-tool (import): Provide default for --tests-base.
18221
18222 2005-09-19  Bruno Haible  <bruno@clisp.org>
18223
18224         * doc/quote.texi: New file, extracted from gnulib.texi.
18225         * doc/ctime.texi: New file, extracted from gnulib.texi.
18226         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
18227         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
18228         * doc/gnulib.texi: Include them.
18229
18230 2005-09-18  Bruno Haible  <bruno@clisp.org>
18231
18232         Portability fix.
18233         * gnulib-tool (func_readlink): New function.
18234         (func_ln_if_changed): Use it.
18235
18236 2005-09-18  Bruno Haible  <bruno@clisp.org>
18237
18238         * gnulib-tool: Support --with-tests also with --import.
18239         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
18240         (func_import): Use variables $testsbase and $inctests. Emit a
18241         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
18242         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
18243         SUBDIRS += $testsdir.
18244         (func_create_testdir): Update.
18245
18246 2005-09-18  Bruno Haible  <bruno@clisp.org>
18247
18248         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
18249         instead of $dry_run.
18250         (func_cp_if_changed, func_mv_if_changed): Remove functions.
18251         (func_ln_if_changed): Don't handle dry-run here.
18252         (func_import): In dry-run mode, detect more precisely which actions
18253         would be performed, and don't use "...ing" verbs.
18254
18255 2005-09-18  Bruno Haible  <bruno@clisp.org>
18256
18257         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
18258         (func_import): Use join on two temporary files instead of three nested
18259         loops, in order to determine which files are new or old.
18260
18261 2005-09-18  Bruno Haible  <bruno@clisp.org>
18262
18263         * gnulib-tool (func_import): Comment out code that spits out the
18264         new files with --dry-run.
18265
18266 2005-09-18  Bruno Haible  <bruno@clisp.org>
18267
18268         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
18269
18270 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18271
18272         * lib/stat-time.h: New file.
18273         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
18274         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
18275         in a different way.
18276         (timespec_cmp): New function.
18277         * lib/utimecmp.c: Include stat-time.h.
18278         (SYSCALL_RESOLUTION): Depend on whether various struct stat
18279         members exist, not on the obsolescent ST_MTIM_NSEC.
18280         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
18281
18282 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18283
18284         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
18285
18286 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18287
18288         * MODULES.html.sh (File system functions): Add stat-time.
18289         * modules/stat-time: New file.
18290         * modules/timespec (Files): Remove m4/st_mtim.m4; this
18291         is now done in a different way, by the stat-time module.
18292         * modules/utimecmp (Depends-on): Add stat-time.
18293
18294 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
18295
18296         * m4/st_mtim.m4: Remove.  Superseded by...
18297         * m4/stat-time.m4: New file.
18298         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
18299         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
18300
18301 2005-09-15  Derek Price  <derek@ximbiot.com>
18302
18303         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
18304
18305 2005-09-15  Derek Price  <derek@ximbiot.com>
18306
18307         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
18308         * lib/regex_internal.c: Ditto, using this...
18309         (__GNUC_PREREQ): ...new macro.
18310         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
18311         using...
18312         (__GNUC_PREREQ): ...this new macro.
18313
18314         * lib/strstr.h: Include string.h. Define strstr as a macro here.
18315
18316 2005-09-15  Derek Price  <derek@ximbiot.com>
18317             Paul Eggert  <eggert@cs.ucla.edu>
18318
18319         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
18320         changes, consolidating in...
18321         * lib/regex_internal.h: ...this file.
18322
18323 2005-09-13  Jim Meyering  <jim@meyering.net>
18324
18325         * lib/canon-host.c: Filter through gnu indent and reword comments
18326         slightly.
18327         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
18328
18329 2005-09-13  Derek Price  <derek@ximbiot.com>
18330
18331         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
18332         failure.
18333         Reported by Jim Meyering  <jim@meyering.net>.
18334
18335 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18336
18337         * lib/base64.c: Typo.
18338         (base64_encode): Put b64str in initialized data section.
18339
18340 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18341
18342         Merge glibc and coreutils changes into gnulib, plus a few
18343         extra fixes.
18344         * lib/md5.c: Use #error rather than a string.
18345         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
18346         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
18347         (__attribute__): Define to empty for non recent-GCC.
18348         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
18349         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
18350         Renamed from their non-__ counterparts, with new macros replacing
18351         them if not _LIBC.  Add __THROW attribute.
18352         (rol): Remove.
18353         (struct md5_ctx): Align buffer if using GCC.
18354         * lib/sha1.h (struct sha1_ctx): Likewise.
18355         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
18356         The old name was backwards.
18357         (NOTSWAP): Remove; not used.
18358         (rol): New macro, moved here from md5.h.
18359         (sha1_process_block): Remove a FIXME that doesn't make sense.
18360
18361 2005-09-12  Derek Price  <derek@ximbiot.com>
18362
18363         Return usable errors from canon-host.
18364         * lib/canon-host.h: New file.
18365         * lib/canon-host.c (canon_host): Wrap...
18366         (canon_host_r): ...this new function, which now relies exclusively on
18367         getaddrinfo.
18368         (ch_strerror): New function.
18369         (last_cherror): New global.
18370         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
18371         interface.
18372         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
18373         void *.
18374         (freeaddrinfo): Free ai->ai_canonname when set.
18375
18376 2005-09-12  Derek Price  <derek@ximbiot.com>
18377
18378         Make canon-host require getaddrinfo.
18379         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
18380         AC_LIBSOURCE canon-host.h.  Call...
18381         (gl_PREREQ_CANON_HOST): ...this new function, which requires
18382         gl_GETADDRINFO.
18383         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
18384
18385 2005-09-12  Derek Price  <derek@ximbiot.com>
18386
18387         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
18388         LGPL.
18389         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
18390
18391 2005-09-12  Derek Price  <derek@ximbiot.com>
18392
18393         * lib/gai_strerror.c: Include config.h when available.  Include
18394         getaddrinfo.h before other headers to test interface.
18395         Reported by Larry Jones <lawrence.jones@ugs.com>.
18396
18397 2005-09-12  Derek Price  <derek@ximbiot.com>
18398             Paul Eggert  <eggert@cs.ucla.edu>
18399
18400         * modules/glob (Files): Add glob-libc.h.
18401
18402 2005-09-12  Derek Price  <derek@ximbiot.com>
18403             Paul Eggert  <eggert@cs.ucla.edu>
18404
18405         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
18406         glob_.h, glob-libc.h.
18407         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
18408
18409 2005-09-12  Derek Price  <derek@ximbiot.com>
18410             Paul Eggert  <eggert@cs.ucla.edu>
18411
18412         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
18413         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
18414         protecting things that should be done only in gnulib contexts.
18415         * lib/glob_.h: New file, containing only the glob things needed for
18416         gnulib.
18417         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
18418         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
18419         (glob, globfree, glob_pattern_p): Now defined simply in terms of
18420         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
18421         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
18422         and to respect the namespace rules better.
18423
18424 2005-09-08  Simon Josefsson  <jas@extundo.com>
18425
18426         * modules/socklen: New file.
18427
18428 2005-09-08  Simon Josefsson  <jas@extundo.com>
18429
18430         * m4/socklen.m4: New file.
18431
18432 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18433
18434         * modules/utimens (Files): Add m4/utimbuf.m4, since
18435         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
18436         Reported by Sergey Poznyakoff.
18437
18438 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18439
18440         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
18441         definitions, since that's the preferred style in glibc.
18442         Fix a minor spacing issue, and update copyright notice to match
18443         glibc's.
18444
18445 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18446
18447         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
18448
18449 2005-09-06  Simon Josefsson  <jas@extundo.com>
18450
18451         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
18452         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
18453
18454 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18455
18456         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
18457         warning.
18458
18459 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18460
18461         * config/srclist.txt: Add glibc bug 1302.
18462
18463 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
18464
18465         Change bitset word type from unsigned int to unsigned long int,
18466         as this has better performance on typical 64-bit hosts.
18467         Port bitset code to hosts with unusual word sizes.
18468         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
18469         (build_collating_symbol):
18470         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
18471         argument is a bitset.  This is merely a style issue, but it makes
18472         it clearer that an entire array is expected.
18473         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
18474         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
18475         Port to the case where bitset_word is not the same as unsigned int.
18476         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18477         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
18478         Likewise.
18479         * lib/regexec.c (check_dst_limits_calc_pos_1,
18480         check_subexp_matching_top):
18481         (build_trtable, group_nodes_into_DFAstates):
18482         Likewise.
18483         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
18484         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
18485         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
18486         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
18487         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
18488         * lib/regcomp.c (optimize_subexps, lower_subexp):
18489         Work even if bitset_word has holes in its bitwise representation.
18490         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
18491         * lib/regexec.c (check_dst_limits_calc_pos_1,
18492         check_subexp_matching_top):
18493         Likewise.
18494         * lib/regex_internal.c (re_string_reconstruct):
18495         Don't assume UCHAR_MAX == 255.
18496         * lib/regex_internal.h (bitset_set_all): Likewise.
18497         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
18498         All uses changed.
18499         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
18500         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
18501         All uses changed.
18502         (BITSET_WORD_MAX): New macro.
18503         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
18504         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
18505         (bitset_empty, bitset_copy):
18506         Prefer sizeof (bitset) to multiplying it out ourselves.
18507         (bitset_not_merge): Remove; unused.
18508         (bitset_contain): Return bool, not unsigned int with one bit on.
18509         All callers changed.
18510         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
18511         alignment than re_node_set; do this by defining a new internal
18512         type struct dests_alloc and using it to allocate memory.
18513
18514 2005-09-05  Bruno Haible  <bruno@clisp.org>
18515
18516         * gnulib-tool (func_import): Fix comparison in handling of symbolic
18517         links.
18518
18519 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
18520
18521         * modules/size_max (Makefile.am): Add size_max.h
18522
18523 2005-09-04  Derek Price  <derek@ximbiot.com>
18524
18525         * gnulib-tool (func_import): Fix reversed $symbolic logic.
18526
18527 2005-09-03  Simon Josefsson  <jas@extundo.com>
18528
18529         * gnulib-tool: Fix typo.
18530
18531 2005-09-03  Simon Josefsson  <jas@extundo.com>
18532
18533         * config/srclist.txt: Add glibc bug 1293.
18534
18535 2005-09-03  Derek Price  <derek@ximbiot.com>
18536
18537         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
18538         From Larry Jones <lawrence.jones@ugs.com>.
18539
18540 2005-09-02  Simon Josefsson  <jas@extundo.com>
18541
18542         * modules/socklen: New file.
18543
18544 2005-09-02  Simon Josefsson  <jas@extundo.com>
18545
18546         * modules/havelib: New module.
18547
18548         * modules/gettext, modules/iconv, modules/lock, modules/readline:
18549         Use havelib.
18550
18551 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18552
18553         Check for arithmetic overflow when calculating sizes, to prevent
18554         some buffer-overflow issues.  These patches are conservative, in the
18555         sense that when I couldn't determine whether an overflow was possible,
18556         I inserted a run-time check.
18557         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
18558         macros.
18559         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
18560         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
18561         (re_xnrealloc, re_x2nrealloc): New inline functions.
18562         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
18563         parse_bracket_exp):
18564         (build_equiv_class, build_charclass): Check for arithmetic overflow
18565         in size expression calculations.
18566         * lib/regex_internal.c (re_string_realloc_buffers):
18567         (build_wcs_upper_buffer, re_node_set_add_intersect):
18568         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
18569         (re_dfa_add_node, register_state): Likewise.
18570         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
18571         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
18572         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
18573         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
18574
18575 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18576
18577         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18578         m4/ulonglong.m4.  Problem reported by Martin Lambers.
18579
18580 2005-09-02  Bruno Haible  <bruno@clisp.org>
18581
18582         Support for lib vs. lib64 distinction on biarch platforms.
18583         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
18584         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
18585         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
18586
18587 2005-09-02  Bruno Haible  <bruno@clisp.org>
18588
18589         * gnulib-tool (import): In the other first-use case, provide defaults
18590         as well.
18591
18592 2005-09-02  Bruno Haible  <bruno@clisp.org>
18593
18594         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
18595         patches not yet found in the latest gettext release.
18596
18597 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18598
18599         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
18600         to avoid a collision with bits/local_lim.h in glibc.
18601         All uses changed.  Problem reported by Dmitry V. Levin in
18602         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
18603
18604         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
18605         bugs in int versus size_t comparisons.
18606         (re_string_context_at): Fix bug where the code assumed that
18607         Idx is signed.
18608
18609         Use bool where appropriate.
18610         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
18611         All callers changed.
18612         (calc_eclosure_iter): Likewise, for ROOT arg.
18613         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
18614         (build_charclass_op): Likewise, for NON_MATCH arg.
18615         * lib/regex_internal.c (re_string_allocate, re_string_construct):
18616         (re_string_construct_common): Likewise, for ICASE arg.
18617         * lib/regexec.c (re_search_2_stub, re_search_stub):
18618         Likewise, for RET_LEN arg.
18619         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
18620         (set_regs): Likewise, for FL_BACKTRACK arg.
18621         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
18622         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
18623         (calc_eclosure_iter, parse_bracket_exp):
18624         Use bool for internal variables that are booleans.
18625         * lib/regexec.c (re_search_internal, check_matching,
18626         proceed_next_node):
18627         (set_regs, build_sifted_states, sift_states_bkref):
18628         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
18629         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18630         (find_collation_sequence_value):
18631         Likewise.
18632         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
18633         (re_node_set_compare):
18634         Return bool, not int. All callers changed.
18635         * lib/regexec.c (check_halt_node_context, check_dst_limits):
18636         (build_trtable, check_node_accept): Likewise.
18637         * lib/regex_internal.h: Include stdbool.h.
18638
18639         Fix bugs uncovered when converting to bool.
18640         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
18641         failure instead of charging ahead blindly.
18642         * lib/regex_internal.c (register_state): Likewise.
18643         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
18644         for freeing internal storage.
18645         (group_nodes_into_DFA_states): Use unsigned int, not int, for
18646         bitset pieces used as boolean, to avoid undefined behavior
18647         on hosts that do int overflow checking.
18648
18649 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18650
18651         * config/srclist.txt: Add glibc bugs 1285-1287.
18652
18653 2005-09-01  Jim Meyering  <jim@meyering.net>
18654
18655         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
18656         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
18657         Require gl_STAT_MACROS, too.
18658
18659 2005-09-01  Bruno Haible  <bruno@clisp.org>
18660
18661         * gnulib-tool (import): In the first-use case, provide defaults.
18662
18663 2005-09-01  Bruno Haible  <bruno@clisp.org>
18664
18665         * gnulib-tool (func_import): Remove the .tmp files.
18666
18667 2005-09-01  Bruno Haible  <bruno@clisp.org>
18668
18669         * gnulib-tool (func_import): Fix handling of symbolic links.
18670
18671 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18672
18673         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
18674         old glibc regex code mishandles strings longer than 2**31 bytes.
18675         This patch fixes this when the regex code is used in gnulib
18676         (i.e., outside glibc).
18677
18678         This patch should not affect the use of the regex code inside
18679         glibc.  No doubt this problem also needs to be handled for glibc
18680         as well, but the result will be an incompatible change to the
18681         glibc ABI, and the old ABI will have to be supported too.  That
18682         can be the the subject for another patch.
18683
18684         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
18685         governing whether the rest of this patch is active.  By default,
18686         the macro is disabled and the patch has no effect.
18687         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
18688         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
18689         (struct re_pattern_buffer, re_search, re_search_2, re_match):
18690         (re_match_2, re_set_registers): Use the new types.
18691         * lib/regex_internal.h (Idx, re_hashval_t): New types.
18692         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
18693         New macros.
18694         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
18695         (re_string_context_at, bin_tree_t, re_dfastate_t):
18696         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
18697         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
18698         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
18699         (re_string_char_size_at, re_string_wchar_at):
18700         (re_string_elem_size_at):
18701         Use the new types and macros to port to 64-bit hosts.
18702         Use unsigned types for internal values, so that the code
18703         mostly works even for arrays larger than SSIZE_MAX.
18704         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18705         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18706         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18707         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18708         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18709         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18710         (calc_inveclosure, parse_dup_op, build_range_exp):
18711         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18712         (fetch_number, create_token_tree, mark_opt_subexp):
18713         Likewise.
18714         * lib/regex_internal.c (re_string_construct_common,
18715         create_ci_newstate):
18716         (create_cd_newstate, re_string_allocate, re_string_construct):
18717         (re_string_realloc_buffers, build_wcs_upper_buffer):
18718         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18719         (re_string_reconstruct, re_string_peek_byte_case):
18720         (re_string_fetch_byte_case, re_string_context_at):
18721         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18722         (re_node_set_init_copy, re_node_set_add_intersect):
18723         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18724         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18725         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18726         (re_acquire_state, re_acquire_state_context, register_state):
18727         Likewise.
18728         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18729         search_cur_bkref_entry):
18730         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18731         (re_search_internal, re_search_2_stub, re_search_stub)
18732         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18733         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18734         (update_cur_sifted_state, check_dst_limits):
18735         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18736         (check_subexp_limits, sift_states_bkref, merge_state_array):
18737         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18738         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18739         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18740         (expand_bkref_cache, check_node_accept_bytes):
18741         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18742         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18743         (acquire_init_state_context, check_halt_node_context):
18744         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18745         (sift_states_backward, clean_state_log_if_needed):
18746         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18747         (find_recover_state, transit_state_sb, transit_state_mb):
18748         (transit_state_bkref, build_trtable, match_ctx_clean):
18749         Likewise.
18750         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18751         to work around an assumption that REG_MISSING is negative.
18752
18753         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18754         (seek_collating_symbol_entry) [defined _LIBC]:
18755         (lookup_collation_sequence_value) [defined _LIBC]:
18756         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18757         Use prototypes rather than old-style function definitions.
18758         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18759         (transit_state_sb) [0]:
18760         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18761
18762         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18763         rm_eo.
18764
18765         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18766         (optimize_subexps, lower_subexp):
18767         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18768         since the signed shift might overflow.  Use 1u<<31 instead.
18769         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18770         Likewise.
18771         * lib/regexec.c (check_dst_limits_calc_pos_1,
18772         check_subexp_matching_top): Likewise.
18773
18774         * lib/regcomp.c (optimize_subexps, lower_subexp):
18775         Use CHAR_BIT rather than 8, for clarity.
18776         * lib/regexec.c (check_dst_limits_calc_pos_1):
18777         (check_subexp_matching_top): Likewise.
18778         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18779         have to worry about portability issues when shifting it left.
18780         Remove no-longer-needed test for table_size > 0.
18781         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18782         in a word, as the resulting behavior is undefined.
18783         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18784         in one case, a <= should have been an <, and in another case the
18785         whole test was missing.
18786         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18787         the standard name CHAR_BIT.
18788         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18789         this is not true on one's complement and signed-magnitude hosts.
18790
18791         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18792         next_last_offset.
18793         (struct re_dfa_t): Remove unused member states_alloc.
18794         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18795
18796 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18797
18798         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18799         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18800         and large-file glibc and in 32-bit large-file Solaris.
18801
18802 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18803
18804         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18805         lengths fit in regoff_t; this isn't true if regoff_t is the same
18806         width as size_t.
18807         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18808         (= START + RANGE) instead of RANGE.  This avoids overflow
18809         problems when regoff_t is the same width as size_t.
18810         All callers changed.
18811         (re_search_2_stub): Check for overflow when adding the
18812         sizes of the two strings.
18813         (re_search_stub): Check for overflow when adding START
18814         to RANGE; if it occurs, substitute the extreme value.
18815
18816 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18817
18818         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18819
18820 2005-08-31  Jim Meyering  <jim@meyering.net>
18821
18822         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18823         a pointer-to-const.
18824         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18825         (register_state): Likewise.
18826         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18827         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18828         (group_nodes_into_DFAstates): Likewise.
18829
18830 2005-08-31  Jim Meyering  <jim@meyering.net>
18831
18832         * check-module: Add a FIXME comment.
18833
18834 2005-08-31  Eric Blake  <ebb9@byu.net>
18835
18836         * modules/unistd-safer (Files): Add unistd--.h.
18837         * modules/stdio-safer (Files): Add stdio--.h.
18838
18839 2005-08-31  Derek Price  <derek@ximbiot.com>
18840
18841         * lib/getdelim.c (getdelim): Return EOF on EOF.
18842         Reported by Larry Jones <lawrence.jones@ugs.com>.
18843
18844 2005-08-31  Bruno Haible  <bruno@clisp.org>
18845
18846         Avoid unnecessary diffs in the generated lib/Makefile.am.
18847         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18848         the generated files.
18849         (func_import): Don't set cmd.
18850
18851 2005-08-31  Bruno Haible  <bruno@clisp.org>
18852
18853         * lib/strstr.c: Include <stddef.h>, for NULL.
18854         * lib/strcasestr.c: Likewise.
18855         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18856
18857 2005-08-31  Bruno Haible  <bruno@clisp.org>
18858
18859         * gnulib-tool: New option --macro-prefix.
18860         (func_import): Use macro_prefix.
18861         (import): Handle option --macro-prefix.
18862
18863 2005-08-31  Bruno Haible  <bruno@clisp.org>
18864
18865         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18866         Also use new variables cached_lgpl, cached_libtool.
18867
18868 2005-08-31  Bruno Haible  <bruno@clisp.org>
18869
18870         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18871         always instantiating them.
18872
18873 2005-08-31  Bruno Haible  <bruno@clisp.org>
18874
18875         * gnulib-tool (func_import): Read the previous cached settings
18876         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18877         earlier added by gnulib but are now dropped. Warn when a gnulib file
18878         overwrites a non-gnulib file.
18879
18880 2005-08-31  Bruno Haible  <bruno@clisp.org>
18881
18882         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18883         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18884         projects that don't keep autogenerated files in CVS. Put into
18885         actioncmd only the specified modules, not the transitive closure.
18886
18887 2005-08-31  Bruno Haible  <bruno@clisp.org>
18888
18889         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18890         Create directories that shall be filled.
18891         (import): Don't look for gl_* macros in configure.ac. Recurse across
18892         all directories containing a gnulib-cache.m4 files, if meaningful.
18893
18894 2005-08-31  Bruno Haible  <bruno@clisp.org>
18895
18896         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18897         (import): Set seen_libtool when we see gl_LIBTOOL.
18898
18899 2005-08-31  Bruno Haible  <bruno@clisp.org>
18900
18901         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18902         declaration macro definitions from generated gnulib.m4.
18903
18904 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18905
18906         * lib/iconvme.h: Add prototype for iconv_alloc.
18907
18908 2005-08-29  Simon Josefsson  <jas@extundo.com>
18909
18910         * lib/iconvme.c: Fix errno.
18911
18912 2005-08-29  Bruno Haible  <bruno@clisp.org>
18913
18914         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18915         that it works when the directory contains spaces.
18916
18917 2005-08-29  Bruno Haible  <bruno@clisp.org>
18918
18919         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18920
18921 2005-08-29  Bruno Haible  <bruno@clisp.org>
18922
18923         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18924         Emit more advice.
18925
18926 2005-08-29  Bruno Haible  <bruno@clisp.org>
18927         and Stepan Kasal  <kasal@ucw.cz>
18928
18929         * check-module: If more parameters are given, check each of them
18930         separately; add more exceptions, as noted by Jim Meyering.
18931         (check_module): New procedure.
18932         (%exempt_header): Now contains all exceptions.
18933
18934 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18935
18936         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18937
18938 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18939
18940         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18941
18942 2005-08-28  Bruno Haible  <bruno@clisp.org>
18943
18944         * m4/gnulib-tool.m4: New file.
18945
18946 2005-08-27  Jim Meyering  <jim@meyering.net>
18947
18948         * modules/unistd-safer (Files): Add pipe-safer.c.
18949         * modules/fcntl-safer (Files): Add creat-safer.c.
18950
18951 2005-08-27  Jim Meyering  <jim@meyering.net>
18952
18953         * m4/stdlib-safer.m4: New file.  From coreutils.
18954         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18955         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18956         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18957         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18958         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18959
18960 2005-08-27  Jim Meyering  <jim@meyering.net>
18961
18962         * lib/fopen-safer.c: Merge minor changes from coreutils.
18963         * lib/dup-safer.c: Likewise.
18964         * lib/fd-safer.c: Likewise.
18965
18966         Merge from coreutils.
18967         * lib/stdio--.h: New file.
18968         * lib/stdlib--.h: New file.
18969         * lib/mkstemp-safer.c: New file.
18970
18971         GNU tar needs these.
18972         * lib/pipe-safer.c: New file.
18973         * lib/creat-safer.c: New file.
18974         * lib/fcntl--.h (creat): Define to creat_safer.
18975         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18976         * lib/unistd--.h (pipe): Define to pipe_safer.
18977         * lib/unistd-safer.h: Declare pipe_safer.
18978
18979 2005-08-26  Simon Josefsson  <jas@extundo.com>
18980
18981         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18982         Haible <bruno@clisp.org>.
18983
18984 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18985
18986         * lib/regex_internal.h: Remove all references to
18987         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18988         or better.
18989         (bitset_not, bitset_merge, bitset_not_merge):
18990         (bitset_mask, re_string_allocate, re_string_construct):
18991         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18992         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18993         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18994         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18995         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18996         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18997         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18998         (re_acquire_state_context):
18999         Remove unnecessary forward decls.
19000         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
19001         Put __attribute at function definition,
19002         now that the function decl has been removed.
19003         * lib/regex_internal.c (re_string_peek_byte_case):
19004         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
19005         Likewise.
19006
19007 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
19008
19009         * m4/regex.m4: Add AC_PREREQ(2.50).
19010         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
19011
19012 2005-08-25  Simon Josefsson  <jas@extundo.com>
19013
19014         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
19015         __fsetlocking.
19016
19017 2005-08-25  Simon Josefsson  <jas@extundo.com>
19018
19019         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
19020         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
19021         GLIBC specific code.
19022
19023 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
19024
19025         Make regex safe for g++.  This fixes one real bug (an "err"
19026         that should have been "*err").  g++ problem reported by
19027         Sam Steingold.
19028         * lib/regex_internal.h (re_calloc): New macro, consistent with
19029         re_malloc etc.  All callers of calloc changed to use re_calloc.
19030         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
19031         not int.  All callers changed.
19032         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
19033         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
19034         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
19035         (find_recover_state): Change "err" to "*err"; this fixes what
19036         appears to be a real bug.
19037         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
19038         versus int.
19039
19040 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
19041
19042         * modules/regex (Depends-on): Add malloc, since the code
19043         assumes that !malloc(0) means failure.
19044
19045 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
19046
19047         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
19048
19049         alloca modernization/simplification for regex.
19050         * lib/regex.c: Remove portability cruft for alloca.  This no longer
19051         needs to be at the start of the file, and can be moved into
19052         regex_internal.h and simplified.
19053         * lib/regex_internal.h: Include <alloca.h>.
19054         (__libc_use_alloca) [!defined _LIBC]: New macro.
19055         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
19056         now works outside glibc.
19057
19058 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
19059
19060         * config/srclist.txt: Add glibc bugs 1241, 1245.
19061
19062 2005-08-25  Jim Meyering  <jim@meyering.net>
19063
19064         * lib/open-safer.c: Include <config.h>.
19065         Otherwise, we'd lose LARGEFILE support in any file using
19066         e.g. "fcntl--.h"
19067
19068 2005-08-25  Bruno Haible  <bruno@clisp.org>
19069
19070         * m4/minmax.m4: Require autoconf 2.52.
19071         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
19072         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
19073         alternatives of translit over the alphabet.
19074         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
19075
19076 2005-08-24  Simon Josefsson  <jas@extundo.com>
19077
19078         * tests/test-getpass.c: New file.
19079
19080 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
19081
19082         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
19083         for GNU regex features.
19084
19085 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
19086
19087         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
19088         * lib/regex.h (regerror): Likewise.
19089
19090         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
19091         requires this.  (The code never needed it.)
19092
19093         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
19094         All uses of recently-renamed identifiers changed to use the new,
19095         POSIX-compliant names.  The code will build and run just fine
19096         without these changes, but it's better to eat our own dog food
19097         and use the standard-conforming names.
19098
19099         * lib/regex.h: Fix a multitude of POSIX name space violations.
19100         These changes have an effect only for programs that define
19101         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
19102         do not change anything for programs compiled in the normal way.
19103         Also, there is no effect on the ABI.
19104
19105         (_REGEX_SOURCE): New macro.
19106         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
19107         defined and _GNU_SOURCE is not; this fixes a name space violation.
19108
19109         Rename the following macros to obey POSIX requirements.
19110         The old names are still visible as macros if _REGEX_SOURCE is defined.
19111         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
19112         RE_BACKSLASH_ESCAPE_IN_LISTS.
19113         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
19114         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
19115         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
19116         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
19117         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
19118         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
19119         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
19120         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
19121         (REG_INTERVALS): renamed from RE_INTERVALS.
19122         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
19123         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
19124         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
19125         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
19126         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
19127         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
19128         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
19129         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
19130         RE_UNMATCHED_RIGHT_PAREN_ORD.
19131         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
19132         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
19133         (REG_DEBUG): renamed from RE_DEBUG.
19134         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
19135         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
19136         unusual, since we can't clash with the POSIX REG_ICASE.
19137         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
19138         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
19139         (REG_NO_SUB): renamed from RE_NO_SUB.
19140         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
19141         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
19142         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
19143         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
19144         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
19145         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
19146         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
19147         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
19148         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
19149         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
19150         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
19151         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
19152         RE_SYNTAX_POSIX_MINIMAL_BASIC.
19153         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
19154         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
19155         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
19156         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
19157         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
19158         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
19159         (REG_FIXED): Renamed from REGS_FIXED.
19160         (REG_NREGS): Renamed from RE_NREGS.
19161
19162         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
19163         of other REG_* macros, since POSIX says the user is allowed to
19164         #undef these macros selectively.
19165
19166         (reg_errcode_t): Update comment stating what other tables need
19167         to be consistent.
19168
19169         Rename the following enum values to obey POSIX requirements.
19170         The old names are still visible as macros.
19171         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
19172         is not defined, since GNU is supposed to be a superset of POSIX as
19173         much as possible, and since we want reg_errcode_t to be a signed
19174         type for implementation consistency.
19175         (_REG_NOERROR): Renamed from REG_NOERROR.
19176         (_REG_NOMATCH): Renamed from REG_NOMATCH.
19177         (_REG_BADPAT): Renamed from REG_BADPAT.
19178         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
19179         (_REG_ECTYPE): Renamed from REG_ECTYPE.
19180         (_REG_EESCAPE): Renamed from REG_EESCAPE.
19181         (_REG_ESUBREG): Renamed from REG_ESUBREG.
19182         (_REG_EBRACK): Renamed from REG_EBRACK.
19183         (_REG_EPAREN): Renamed from REG_EPAREN.
19184         (_REG_EBRACE): Renamed from REG_EBRACE.
19185         (_REG_BADBR): Renamed from REG_BADBR.
19186         (_REG_ERANGE): Renamed from REG_ERANGE.
19187         (_REG_ESPACE): Renamed from REG_ESPACE.
19188         (_REG_BADRPT): Renamed from REG_BADRPT.
19189         (_REG_EEND): Renamed from REG_EEND.
19190         (_REG_ESIZE): Renamed from REG_ESIZE.
19191         (_REG_ERPAREN): Renamed from REG_ERPAREN.
19192         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
19193         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
19194         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
19195         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
19196
19197         (_REG_RE_NAME, _REG_RM_NAME): New macros.
19198         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
19199         changed.  But support the old name if the new one is not defined
19200         and if _REGEX_SOURCE.
19201
19202         Change the following member names in struct re_pattern_buffer.
19203         The old names are still supported if !_REGEX_SOURCE.
19204         The new names are always supported, regardless of _REGEX_SOURCE.
19205         (re_buffer): Renamed from buffer.
19206         (re_allocated): Renamed from allocated.
19207         (re_used): Renamed from used.
19208         (re_syntax): Renamed from syntax.
19209         (re_fastmap): Renamed from fastmap.
19210         (re_translate): Renamed from translate.
19211         (re_can_be_null): Renamed from can_be_null.
19212         (re_regs_allocated): Renamed from regs_allocated.
19213         (re_fastmap_accurate): Renamed from fastmap_accurate.
19214         (re_no_sub): Renamed from no_sub.
19215         (re_not_bol): Renamed from not_bol.
19216         (re_not_eol): Renamed from not_eol.
19217         (re_newline_anchor): Renamed from newline_anchor.
19218
19219         Change the following member names in struct re_registers.
19220         The old names are still supported if !_REGEX_SOURCE.
19221         The new names are always supported, regardless of _REGEX_SOURCE.
19222         (rm_num_regs): Renamed from num_regs.
19223         (rm_start): Renamed from start.
19224         (rm_end): Renamed from end.
19225
19226         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
19227         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
19228         Prepend __ to parameter names.
19229
19230         Undo yesterday's changes.
19231
19232 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
19233
19234         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
19235         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
19236         lib/regex.c.
19237
19238 2005-08-24  Jim Meyering  <jim@meyering.net>
19239
19240         Sync from coreutils.
19241         * m4/fcntl-safer.m4: New file.
19242
19243         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
19244         and object files for this module.
19245
19246 2005-08-24  Jim Meyering  <jim@meyering.net>
19247
19248         Sync from coreutils.
19249         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
19250
19251 2005-08-24  Jim Meyering  <jim@meyering.net>
19252
19253         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
19254         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
19255
19256 2005-08-24  Jim Meyering  <jim@meyering.net>
19257
19258         * modules/fcntl-safer: New module.
19259         * modules/fts (Depends-on): Add fcntl-safer.
19260         * MODULES.html.sh (File descriptor based Input/Output):
19261         Add fcntl-safer.
19262
19263 2005-08-24  Bruno Haible  <bruno@clisp.org>
19264
19265         Support for unit test modules.
19266         * modules/README: Mention tests modules.
19267         * modules/TEMPLATE-TESTS: New file.
19268         * gnulib-tool: New options --extract-tests-module, --with-tests and
19269         --tests-base (unused for the moment).
19270         (testsbase, inctests): New variables.
19271         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
19272         (func_verify_module): Exclude TEMPLATE-TESTS.
19273         (func_verify_nontests_module, func_verify_tests_module): New functions.
19274         (func_get_dependencies): Add implicit dependency for tests modules.
19275         (func_get_tests_module): New function.
19276         (func_modules_transitive_closure): When --with-tests was specified,
19277         include the unit tests as well, unless explicitly avoided.
19278         (func_emit_lib_Makefile_am): Ignore the tests modules here.
19279         (func_emit_tests_Makefile_am): New function.
19280         (func_create_testdir): When --with-tests was specified, emit a
19281         tests/ directory.
19282         * MODULES.html.sh (Future developments): Update.
19283
19284 2005-08-24  Bruno Haible  <bruno@clisp.org>
19285
19286         * modules/tls-tests: New file.
19287         * tests/test-tls.c: New file, from GNU gettext.
19288
19289 2005-08-24  Bruno Haible  <bruno@clisp.org>
19290
19291         * modules/lock-tests: New file.
19292         * tests/test-lock.c: New file, from GNU gettext.
19293
19294 2005-08-24  Bruno Haible  <bruno@clisp.org>
19295
19296         * lib/lock.h: Add multiple inclusion guard.
19297         * lib/tls.h: Add multiple inclusion guard.
19298
19299 2005-08-24  Bruno Haible  <bruno@clisp.org>
19300
19301         * gnulib-tool: Add support for the --aux-dir option to
19302         --create-testdir, --create-megatestdir, --test, --megatest.
19303         (func_create_testdir, func_create_megatestdir): Optionally emit a
19304         AC_CONFIG_AUX_DIR directive.
19305         (create-testdir, create-megatestdir, test, megatest): Provide a
19306         default value for $auxdir.
19307
19308 2005-08-24  Bruno Haible  <bruno@clisp.org>
19309
19310         * gnulib-tool (import): Use compound statement instead of subshell
19311         where possible.
19312
19313 2005-08-24  Bruno Haible  <bruno@clisp.org>
19314
19315         * gnulib-tool (import): Change --aux-dir default to "build-aux".
19316
19317 2005-08-24  Bruno Haible  <bruno@clisp.org>
19318
19319         * gnulib-tool (func_version): Update.
19320
19321 2005-08-24  Bruno Haible  <bruno@clisp.org>
19322
19323         * gnulib-tool (func_import, func_create_testdir,
19324         func_create_megatestdir): Quote all autoconf macro arguments.
19325
19326 2005-08-24  Bruno Haible  <bruno@clisp.org>
19327
19328         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
19329         option --force, because --force causes the aclocal.m4 of each
19330         subdirectory to be newer than the corresponding config.h.in.
19331
19332 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19333
19334         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
19335         All contents moved to gl_REGEX.
19336         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
19337         assume that it does.
19338
19339 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19340
19341         * lib/regex.h (REG_NOSYS)
19342         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
19343         Define, since POSIX requires it as of 2001.
19344         (_REG_ENOSYS)
19345         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
19346         New private symbol, used to keep the enum signed in all cases.
19347         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
19348         Youngman in
19349         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
19350
19351         * lib/regex_internal.c (re_string_skip_chars, register_state):
19352         (calc_state_hash):
19353         Remove forward decls; no longer needed now that we use prototypes.
19354         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
19355         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
19356         (clean_state_log_if_needed): Likewise.
19357
19358 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19359
19360         * config/srclist.txt: Add glibc bugs 1231-1233.
19361
19362 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19363
19364         Fix problems reported by Sam Steingold in
19365         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
19366         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
19367         assumed that reg_errcode_t is a signed type, which is not
19368         necessarily true if _XOPEN_SOURCE is not defined.
19369         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
19370         since some compilers warn about it otherwise.
19371
19372 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19373
19374         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
19375         (init_word_char, create_initial_state, duplicate_node_closure):
19376         (fetch_token, peek_token_bracket, build_range_exp):
19377         (build_collating_symbol): Remove forward decls; no longer needed
19378         now that we use prototypes.
19379
19380         * lib/regcomp.c:
19381         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
19382         (re_compile_fastmap_iter, regcomp, regerror, regfree):
19383         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
19384         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
19385         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
19386         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
19387         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
19388         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
19389         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
19390         (build_range_exp, build_collating_symbol, parse_bracket_exp):
19391         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
19392         (build_charclass, build_charclass_op, fetch_number, create_tree):
19393         (create_token_tree, mark_opt_subexp, duplicate_tree):
19394         Use prototypes rather than old-style definitions.
19395
19396         * lib/regex_internal.c:
19397         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
19398         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
19399         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
19400         (re_string_reconstruct, re_string_peek_byte_case):
19401         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
19402         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
19403         (re_node_set_init_copy, re_node_set_add_intersect):
19404         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
19405         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
19406         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
19407         (re_acquire_state, re_acquire_state_context, register_state):
19408         (create_ci_newstate, create_cd_newstate, free_state):
19409         Likewise.
19410         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
19411         re_search_2):
19412         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
19413         (re_search_internal, prune_impossible_nodes):
19414         (acquire_init_state_context, check_matching, static):
19415         (check_halt_node_context, check_halt_state_context, proceed_next_node):
19416         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
19417         (update_regs, sift_states_backward, build_sifted_states):
19418         (clean_state_log_if_needed, merge_state_array):
19419         (update_cur_sifted_state, add_epsilon_src_nodes):
19420         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
19421         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
19422         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
19423         (find_recover_state, check_subexp_matching_top, transit_state_mb):
19424         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
19425         (check_arrival, check_arrival_add_next_nodes):
19426         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
19427         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
19428         (check_node_accept_bytes, check_node_accept, extend_buffers):
19429         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
19430         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
19431         (sift_ctx_init):
19432         Likewise.
19433
19434         * lib/regex_internal.h:
19435         (re_string_allocate, re_string_construct, re_string_reconstruct):
19436         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
19437         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
19438         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
19439         (re_string_context_at, re_string_peek_byte_case):
19440         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
19441         is defined, since we now use prototypes always.
19442
19443         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
19444         C89 or better.  All uses removed.
19445
19446 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19447
19448         * config/srclist.txt: Add glibc bugs 1220-1227.
19449
19450 2005-08-20  Jim Meyering  <jim@meyering.net>
19451
19452         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
19453         of unused local, dfa.
19454
19455 2005-08-20  Bruno Haible  <bruno@clisp.org>
19456
19457         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
19458
19459 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19460
19461         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
19462         (re_node_set_insert_last, re_dfa_add_node):
19463         Rename local variables to avoid GCC shadowing warnings.
19464
19465 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19466
19467         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
19468         [defined lint]: Suppress bogus uninitialized-variable warnings.
19469
19470         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
19471         and let the caller return REG_ESPACE if out of space.  This
19472         removes an uninitialied-variable warning with GCC 4.0.1, and also
19473         avoids taking the address of a local variable.  All callers
19474         changed.
19475
19476 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19477
19478         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
19479         $LIBCSRC/posix/regexec.c.
19480         Add glibc bug 1217 for regcomp.c.
19481
19482 2005-08-19  Jim Meyering  <jim@meyering.net>
19483
19484         * lib/regexec.c (proceed_next_node): Redo local variables to
19485         avoid GCC shadowing warnings.
19486
19487 2005-08-18  Bruno Haible  <bruno@clisp.org>
19488
19489         * lib/strstr.c (strstr): Fix return value in multibyte case.
19490         * lib/strcasestr.c (strcasestr): Likewise.
19491
19492 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19493
19494         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
19495
19496 2005-08-17  Jim Meyering  <jim@meyering.net>
19497
19498         Make the %s format (seconds since the epoch) work for a negative
19499         number and when used with a zero-padded field width, e.g. %015s.
19500
19501         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
19502         label so that it precedes the code to set `digits'.  Otherwise,
19503         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
19504         print `00-22'.  Now, it prints `-0022', as it should.
19505
19506 2005-08-17  Bruno Haible  <bruno@clisp.org>
19507
19508         * modules/strstr (Files): Add m4/mbrtowc.m4.
19509         (Depends-on): Add mbuiter.
19510
19511 2005-08-17  Bruno Haible  <bruno@clisp.org>
19512
19513         * modules/strcasestr: New file.
19514         * MODULES.html.sh (String handling, based on ANSI C 89): Add
19515         strcasestr.
19516
19517 2005-08-17  Bruno Haible  <bruno@clisp.org>
19518
19519         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
19520
19521 2005-08-17  Bruno Haible  <bruno@clisp.org>
19522
19523         * modules/mbuiter: New file.
19524         * MODULES.html.sh (Extended multibyte and wide character utilities):
19525         Add mbuiter.
19526
19527 2005-08-17  Bruno Haible  <bruno@clisp.org>
19528
19529         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
19530         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
19531
19532 2005-08-17  Bruno Haible  <bruno@clisp.org>
19533
19534         * m4/strcasestr.m4: New file.
19535
19536 2005-08-17  Bruno Haible  <bruno@clisp.org>
19537
19538         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
19539         * lib/strstr.c: Completely rewritten, with multibyte locale support.
19540
19541 2005-08-17  Bruno Haible  <bruno@clisp.org>
19542
19543         * lib/strcasestr.h: New file.
19544         * lib/strcasestr.c: New file.
19545
19546 2005-08-17  Bruno Haible  <bruno@clisp.org>
19547
19548         * lib/strcasecmp.c: Use mbuiter.h.
19549
19550 2005-08-17  Bruno Haible  <bruno@clisp.org>
19551
19552         * lib/mbuiter.h: New file.
19553
19554 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
19555
19556         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
19557         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
19558         and gl_GETOPT are both invoked via different paths (as happens
19559         with GNU tar CVS because it uses both argp and getopt), the former
19560         wins.
19561
19562 2005-08-16  Bruno Haible  <bruno@clisp.org>
19563
19564         * modules/tls: New file.
19565         * MODULES.html.sh (Multithreading): Add tls.
19566
19567 2005-08-16  Bruno Haible  <bruno@clisp.org>
19568
19569         * modules/strnlen1: New file.
19570         * MODULES.html.sh (String handling): Add strnlen1.
19571
19572 2005-08-16  Bruno Haible  <bruno@clisp.org>
19573
19574         * modules/strcase (Files): Add m4/mbrtowc.m4.
19575         (Depends-on): Add strnlen1, mbchar.
19576
19577 2005-08-16  Bruno Haible  <bruno@clisp.org>
19578
19579         * modules/mbiter: New file.
19580         * MODULES.html.sh (Extended multibyte and wide character utilities):
19581         Add mbiter.
19582
19583 2005-08-16  Bruno Haible  <bruno@clisp.org>
19584
19585         * modules/mbfile: New file.
19586         * MODULES.html.sh (Extended multibyte and wide character utilities):
19587         Add mbfile.
19588
19589 2005-08-16  Bruno Haible  <bruno@clisp.org>
19590
19591         * modules/mbchar: New file.
19592         * MODULES.html.sh (Extended multibyte and wide character utilities):
19593         New section.
19594
19595 2005-08-16  Bruno Haible  <bruno@clisp.org>
19596
19597         * m4/tls.m4: New file, from GNU gettext.
19598
19599 2005-08-16  Bruno Haible  <bruno@clisp.org>
19600
19601         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
19602         always.
19603         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
19604
19605 2005-08-16  Bruno Haible  <bruno@clisp.org>
19606
19607         * m4/mbiter.m4: New file.
19608
19609 2005-08-16  Bruno Haible  <bruno@clisp.org>
19610
19611         * m4/mbfile.m4: New file.
19612
19613 2005-08-16  Bruno Haible  <bruno@clisp.org>
19614
19615         * m4/mbchar.m4: New file.
19616
19617 2005-08-16  Bruno Haible  <bruno@clisp.org>
19618
19619         * lib/tls.h: New file, from GNU gettext.
19620         * lib/tls.c: New file, from GNU gettext.
19621
19622 2005-08-16  Bruno Haible  <bruno@clisp.org>
19623
19624         * lib/strnlen1.h: New file.
19625         * lib/strnlen1.c: New file.
19626
19627 2005-08-16  Bruno Haible  <bruno@clisp.org>
19628
19629         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
19630         (mbi_init): Update.
19631         (mbi_avail, mbi_advance): Let the iteration end before the terminating
19632         NUL byte, not after it.
19633
19634 2005-08-16  Bruno Haible  <bruno@clisp.org>
19635
19636         * lib/strcase.h (strcasecmp): Add note in comments.
19637         * lib/strncasecmp.c: Use code from strcasecmp.c.
19638         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
19639         (strcasecmp): Work correctly in multibyte locales.
19640
19641 2005-08-16  Bruno Haible  <bruno@clisp.org>
19642
19643         * lib/mbiter.h: New file.
19644
19645 2005-08-16  Bruno Haible  <bruno@clisp.org>
19646
19647         * lib/mbfile.h: New file.
19648
19649 2005-08-16  Bruno Haible  <bruno@clisp.org>
19650
19651         * lib/mbchar.h: New file.
19652         * lib/mbchar.c: New file.
19653
19654 2005-08-16  Bruno Haible  <bruno@clisp.org>
19655
19656         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
19657         the valid ones. Makes the comparison operations transitive:
19658         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
19659         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
19660
19661 2005-08-15  Simon Josefsson  <jas@extundo.com>
19662
19663         * modules/ssize_t (License): Change to 'unlimited'.
19664
19665         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
19666
19667 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
19668
19669         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
19670         Add comments for each pending glibc patch.
19671
19672 2005-08-15  Bruno Haible  <bruno@clisp.org>
19673
19674         * lib/regex.h (__restrict_arr): Don't define to __restrict if
19675         __cplusplus is defined.
19676
19677 2005-08-14  Jim Meyering  <jim@meyering.net>
19678
19679         Sync from coreutils.
19680
19681         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
19682         Use the hash-table-based cycle-detection code not just when
19683         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
19684         Reported by James Youngman in
19685         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
19686         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
19687         FTS_TIGHT_CYCLE_CHECK.
19688         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
19689         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
19690         once again.
19691         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
19692         * lib/fts.c (fd_safer): Remove decl.
19693         Include fcntl--.h rather than unistd-safer.h
19694         (fts_safe_changedir): Don't call fd_safer; no longer needed
19695         now that we include fcntl--.h.
19696
19697 2005-08-12  Simon Josefsson  <jas@extundo.com>
19698
19699         * modules/getndelim2: Use ssize_t module.
19700         * modules/getnline: Likewise.
19701         * modules/safe-read: Likewise.
19702         * modules/xreadlink: Likewise.
19703
19704         * modules/ssize_t: New file.
19705
19706 2005-08-12  Simon Josefsson  <jas@extundo.com>
19707
19708         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19709
19710 2005-08-12  Simon Josefsson  <jas@extundo.com>
19711
19712         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19713         ssize_t.
19714
19715 2005-08-12  Simon Josefsson  <jas@extundo.com>
19716
19717         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19718         readline, getdelim and check_version.
19719         (Support for systems lacking ISO C 99: Sizes of integer types):
19720         Add size_max.
19721
19722 2005-08-12  Bruno Haible  <bruno@clisp.org>
19723
19724         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19725
19726 2005-08-11  Simon Josefsson  <jas@extundo.com>
19727
19728         * modules/readline: New file.
19729
19730         * modules/strnlen (Files): Add strnlen.h.
19731
19732 2005-08-11  Simon Josefsson  <jas@extundo.com>
19733
19734         * m4/readline.m4: New file.
19735
19736 2005-08-11  Simon Josefsson  <jas@extundo.com>
19737
19738         * lib/readline.h, readline.c: New file.
19739
19740 2005-08-11  Simon Josefsson  <jas@extundo.com>
19741
19742         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19743         gl_AVOID.
19744
19745 2005-08-11  Bruno Haible  <bruno@clisp.org>
19746
19747         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19748
19749 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19750
19751         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19752
19753 2005-08-10  Simon Josefsson  <jas@extundo.com>
19754
19755         * tests/test-iconvme.c: New file.
19756
19757 2005-08-10  Simon Josefsson  <jas@extundo.com>
19758
19759         * m4/strnlen.m4: New file.
19760
19761         * m4/strndup.m4: Don't check for strnlen declaration, done in
19762         strnlen.m4.
19763
19764 2005-08-10  Simon Josefsson  <jas@extundo.com>
19765
19766         * lib/strndup.c: Use strnlen.h.
19767
19768         * lib/strnlen.h: New file.
19769
19770 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19771
19772         * README: Typos.
19773
19774 2005-08-02  Simon Josefsson  <jas@extundo.com>
19775
19776         * modules/readline: New file.
19777
19778 2005-08-02  Simon Josefsson  <jas@extundo.com>
19779
19780         * modules/getdelim: New file.
19781
19782         * modules/getline: Rewrite, don't use getndelim2.
19783
19784 2005-08-02  Simon Josefsson  <jas@extundo.com>
19785
19786         * m4/getline.m4: Separate out getdelim stuff into separate module.
19787
19788         * m4/getdelim.m4: New file.
19789
19790 2005-08-02  Simon Josefsson  <jas@extundo.com>
19791
19792         * lib/getline.h, getline.c: Rewrite.
19793
19794         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19795
19796 2005-07-31  Bruno Haible  <bruno@clisp.org>
19797
19798         * lib/lock.h (gl_lock_initializer): New macro.
19799         (gl_lock_define_initialized): Use it.
19800         (gl_rwlock_initializer): New macro.
19801         (gl_rwlock_define_initialized): Use it.
19802         (gl_recursive_lock_initializer): New macro.
19803         (gl_recursive_lock_define_initialized): Use it.
19804
19805 2005-07-30  Karl Berry  <karl@gnu.org>
19806
19807         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19808         Report from Ben Pfaff, regarding getopt.
19809
19810 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19811
19812         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19813         normal way.
19814         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19815         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19816         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19817         (gl_GETOPT): Use the new macros.  Most of the implementation
19818         is moved to the new macros.  This is for programs like Emacs
19819         that don't want all the functionality of gl_GETOPT.
19820
19821 2005-07-26  Bruno Haible  <bruno@clisp.org>
19822
19823         * m4/lock.m4: Update from GNU gettext.
19824
19825 2005-07-26  Bruno Haible  <bruno@clisp.org>
19826
19827         * lib/lock.h: Update from GNU gettext.
19828         * lib/lock.c: Update from GNU gettext.
19829
19830 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19831
19832         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19833         obsolescent AC_TRY_RUN.  Include the default includes files, for
19834         'exit'.
19835
19836 2005-07-24  Bruno Haible  <bruno@clisp.org>
19837
19838         * modules/visibility: New file.
19839         * MODULES.html.sh (Misc): Add visibility.
19840
19841 2005-07-24  Bruno Haible  <bruno@clisp.org>
19842
19843         * m4/visibility.m4: New file.
19844
19845 2005-07-24  Bruno Haible  <bruno@clisp.org>
19846
19847         * doc/visibility.texi: New file.
19848
19849 2005-07-22  Bruno Haible  <bruno@clisp.org>
19850
19851         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19852         $(ALLOCA_H), redundant through BUILT_SOURCES.
19853         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19854         redundant through BUILT_SOURCES.
19855         * modules/byteswap (Makefile.am): Remove explicit dependency on
19856         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19857         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19858         $(FNMATCH_H), redundant through BUILT_SOURCES.
19859         * modules/getopt (Makefile.am): Remove explicit dependency on
19860         $(GETOPT_H), redundant through BUILT_SOURCES.
19861         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19862         redundant through BUILT_SOURCES.
19863         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19864         redundant through BUILT_SOURCES.
19865         * modules/stdbool (Makefile.am): Remove explicit dependency on
19866         $(STDBOOL_H), redundant through BUILT_SOURCES.
19867         * modules/stdint (Makefile.am): Remove explicit dependency on
19868         $(STDINT_H), redundant through BUILT_SOURCES.
19869         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19870         Remove explicit dependency on $(SYSEXITS_H).
19871         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19872
19873 2005-07-18  Simon Josefsson  <jas@extundo.com>
19874
19875         * lib/check-version.c (check_version): Accept identical versions too.
19876
19877 2005-07-18  Bruno Haible  <bruno@clisp.org>
19878
19879         * modules/lock: New file.
19880         * MODULES.html.sh (Multithreading): New section.
19881
19882 2005-07-18  Bruno Haible  <bruno@clisp.org>
19883
19884         * m4/lock.m4: New file, from GNU gettext.
19885
19886 2005-07-18  Bruno Haible  <bruno@clisp.org>
19887
19888         * lib/lock.h: New file, from GNU gettext.
19889         * lib/lock.c: New file, from GNU gettext.
19890
19891 2005-07-18  Bruno Haible  <bruno@clisp.org>
19892
19893         * lib/lock.h (gl_once_t): New type.
19894         (gl_once_define, gl_once): New macros.
19895         * lib/lock.c (fresh_once): New variable.
19896         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19897         functions.
19898
19899 2005-07-16  Simon Josefsson  <jas@extundo.com>
19900
19901         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19902         workaround, suggested by Bruno.
19903
19904 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19905
19906         * modules/xalloc (Depends-on): Add xalloc-die.
19907         * modules/xvasprintf (Depends-on): Add xalloc-die.
19908
19909 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19910
19911         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19912         with a minor change.
19913
19914 2005-07-15  Bruno Haible  <bruno@clisp.org>
19915
19916         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19917         When using lib/poll.c, define poll as rpl_poll.
19918
19919 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19920
19921         * modules/argp (Depends-on): Remove unlocked-io.
19922
19923 2005-07-14  Derek Price  <derek@ximbiot.com>
19924
19925         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19926         for glob symlink bug.
19927
19928 2005-07-14  Bruno Haible  <bruno@clisp.org>
19929
19930         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19931         Instead, test for *_unlocked function declarations directly.
19932
19933 2005-07-11  Simon Josefsson  <jas@extundo.com>
19934
19935         * modules/size_max: New file.
19936
19937         * modules/xsize: Depend on size_max module for size_max.m4.
19938
19939 2005-07-11  Simon Josefsson  <jas@extundo.com>
19940
19941         * lib/size_max.h: New file.
19942
19943 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19944
19945         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19946         copyright symbol and the year.
19947         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19948         (version_etc_va): Use parameterized copyright notice.
19949         Reword to conform to the current GNU coding standards.
19950
19951 2005-07-11  Karl Berry  <karl@gnu.org>
19952
19953         * doc/gnulib.texi (Quoting): new node.
19954         (Initial import): more info, from Patrice.
19955
19956 2005-07-11  Bruno Haible  <bruno@clisp.org>
19957
19958         * gnulib-tool (func_usage): Document option --avoid.
19959         (Command line options): Handle --avoid.
19960         (func_acceptable): New function.
19961         (func_modules_transitive_closure): Use it.
19962
19963 2005-07-11  Bruno Haible  <bruno@clisp.org>
19964
19965         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19966         Reported by Jim Meyering.
19967
19968 2005-07-10  Bruno Haible  <bruno@clisp.org>
19969
19970         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19971         Needed when size_t is smaller than 'unsigned int'.
19972         Reported by Paul Eggert.
19973
19974 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19975
19976         * modules/argp (Depends-on): Add unlocked-io
19977
19978 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19979
19980         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19981         block of defines.
19982
19983 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19984
19985         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19986         fix now.
19987
19988 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19989         and Paul Eggert  <eggert@cs.ucla.edu>
19990
19991         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19992         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19993
19994 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19995
19996         * modules/regex (Files): Add lib/regex_internal.c,
19997         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19998         (Depends-on): Add extensions.
19999         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
20000
20001 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
20002
20003         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
20004         pathconf.
20005         * m4/same.m4 (gl_SAME): Likewise.
20006         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
20007
20008         * m4/regex.m4: Adjust to new libc regex implementation.
20009         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
20010         all the .c and .h parts of (the new) regex.
20011         Quote the m4 stuff better.
20012         Check for RE_ICASE bug of old gnulib.
20013         Check for REG_STARTEND of recent libc.
20014         Rename local variables from jm_* to gl_*.
20015         Quote operand of "test -f".
20016         Say "recent enough" version of libc, not "version 2".
20017         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
20018         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
20019         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
20020         Remove check for btowc, isascii.
20021         Require AM_LANGINFO_CODESET.
20022
20023 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
20024
20025         * lib/regex.c, regex.h: Sync from libc.
20026         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
20027         * lib/regexec.c:
20028         New files, synced from libc, except that regex_internal.h
20029         currently has a small porting fix.
20030
20031 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
20032
20033         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
20034         regex_internal.c, regexec.c.
20035         Add regex_internal.h too, but as a comment, since the libc version
20036         is currently broken in gnulib mode.
20037
20038 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
20039
20040         Support programs like Emacs that use gnulib but not gettext.
20041         * MODULES.html.sh (Internationalization functions): Add gettext-h.
20042         * modules/gettext-h: New file.
20043         * modules/gettext (Files): Remove lib/gettext.h.
20044         (Depends-on): Add gettext-h.
20045         (Makefile.am): Remove lib_SOURCES.
20046         * modules/argmatch, modules/c-stack, modules/closeout:
20047         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
20048         * modules/execute, modules/file-type, modules/getaddrinfo:
20049         * modules/getopt, modules/human, modules/javacomp:
20050         * modules/javaexec, modules/mkdir-p, modules/obstack:
20051         * modules/openat, modules/pagealign_alloc, modules/pipe:
20052         * modules/quotearg, modules/regex, modules/rpmatch:
20053         * modules/unicodeio, modules/userspec, modules/version-etc:
20054         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
20055         * modules/xsetenv:
20056         Depend on gettext-h, not gettext.
20057
20058 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
20059
20060         * gnulib-tool (func_import): Add support for 'public domain' license.
20061         * modules/alloca, modules/atexit, modules/memmove:
20062         Now public domain, not GPL.
20063         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
20064         * modules/realloc, modules/strerror, modules/strtod:
20065         Now LGPL, not GPL.
20066
20067 2005-07-05  Bruno Haible  <bruno@clisp.org>
20068
20069         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
20070         autoconf CVS. Needed for mingw.
20071
20072 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
20073
20074         Remove the dependency of the strftime module on the tzset module.
20075         * modules/strftime (Depends-on): Remove dependency on tzset.
20076
20077 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
20078
20079         Remove the dependency of the strftime module on the tzset module.
20080         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
20081         gl_FUNC_TZSET_CLOBBER.
20082
20083 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
20084
20085         Remove the dependency of the strftime module on the tzset module.
20086         * lib/strftime.c (my_strftime)
20087         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
20088         Copy the input structure, to work around some of the bug with
20089         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
20090         Solaris releases, you should also use the tzset module, but we won't
20091         require it as a dependency any more since we don't want LGPLed code
20092         to depend on GPLed code.
20093
20094 2005-07-02  Jim Meyering  <jim@meyering.net>
20095
20096         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
20097         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
20098         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
20099         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
20100
20101 2005-07-02  Jim Meyering  <jim@meyering.net>
20102
20103         * lib/backupfile.c (backup_args): Change a `0' to NULL.
20104
20105 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
20106
20107         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
20108         declares only 'struct timespec;' (!).
20109
20110 2005-07-01  Jim Meyering  <jim@meyering.net>
20111
20112         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
20113         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
20114         * lib/save-cwd.c, tempname.c:
20115         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
20116         and don't include <sys/file.h>).
20117
20118 2005-06-29  Jim Meyering  <jim@meyering.net>
20119
20120         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
20121         type name.  Use the variable name instead.
20122         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
20123         Likewise.
20124
20125 2005-06-28  Simon Josefsson  <jas@extundo.com>
20126
20127         * modules/check-version (Files): Add check-version.m4.
20128
20129 2005-06-28  Simon Josefsson  <jas@extundo.com>
20130
20131         * m4/check-version.m4: New file, suggested by Jim Meyering
20132         <jim@meyering.net>.
20133
20134 2005-06-28  Simon Josefsson  <jas@extundo.com>
20135
20136         * lib/check-version.h, lib/check-version.c: New files.
20137
20138 2005-06-28  Simon Josefsson  <jas@extundo.com>
20139
20140         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
20141         collision with global variable.  Better indentation.  Don't
20142         increment buffer pointer beyond buffer end.  Based on comments
20143         from Paul Eggert <eggert@cs.ucla.edu>.
20144
20145         * lib/base64.h: Indent.
20146
20147 2005-06-28  Simon Josefsson  <jas@extundo.com>
20148
20149         * doc/gnulib.texi (Library version handling): New section.
20150
20151 2005-06-28  Jim Meyering  <jim@meyering.net>
20152
20153         * check-module (find_included_lib_files): Hard-code another
20154         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
20155         but modules/fts-lgpl (correctly) does not list those files.
20156
20157         * modules/canonicalize (Files): Add lib/pathmax.h.
20158
20159 2005-06-25  Simon Josefsson  <jas@extundo.com>
20160
20161         * modules/check-version: New file.
20162
20163 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
20164
20165         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
20166         initializer of struct addrinfo, as an indication that we don't
20167         care how many members the structure has.
20168
20169 2005-06-24  Derek Price  <derek@ximbiot.com>
20170         and Bruno Haible  <bruno@clisp.org>
20171
20172         Remove stat module & update lstat.
20173         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
20174         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
20175         * m4/stat.m4: Remove this file.
20176
20177 2005-06-24  Derek Price  <derek@ximbiot.com>
20178         and Bruno Haible  <bruno@clisp.org>
20179
20180         Remove stat module & update lstat.
20181         * lib/stat.c: Remove this file...
20182         (slash_aware_lstat): ...moving this content and its support...
20183         * lib/lstat.c (rpl_lstat): ...into here.
20184         * lib/lstat.h: New file.
20185
20186 2005-06-24  Derek Price  <derek@ximbiot.com>
20187         and Bruno Haible  <bruno@clisp.org>
20188
20189         Remove stat module & update lstat.
20190         * config/srclist.txt (libc sources): Remove stat.
20191
20192 2005-06-24  Derek Price  <derek@ximbiot.com>
20193         and Bruno Haible  <bruno@clisp.org>
20194
20195         Remove stat module & update lstat.
20196         * MODULES.html.sh (stat): Remove.
20197         * MODULES.html: Regenerated.
20198         * modules/lstat (Description): Correct function name.
20199         (Files): Add "lstat.h".
20200         (Depends-on): Remove stat, add xalloc, stat-macros.
20201         * modules/stat: Remove this file.
20202         (Include): Add "lstat.h", remove <sys/stat.h>.
20203
20204 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
20205
20206         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
20207         (ranged_convert): Don't save conversion in a temporary struct.
20208         This causes a warning with GCC 4.0.0, and anyway in the typical
20209         case it's not worth the extra 100 bytes or so of code.
20210         (ranged_convert, __mktime_internal): When calling a function via a
20211         pointer P, use P () rather than (*P) (), as we now assume C89 or
20212         better.
20213
20214 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20215
20216         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
20217         "who -r" failed to give output.  Problem reported by Tim Waugh.
20218
20219         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
20220         (xcalloc): Use it to avoid needless tests.
20221         Problem reported by Jim Meyering.
20222
20223 2005-06-20  Derek Price  <derek@ximbiot.com>
20224
20225         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
20226         unnecessary for Autoconfs > 2.59c.
20227
20228 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20229
20230         * lib/argp.h (__option_is_short): Check upper limit of
20231         __key. Isprint() requires its argument to have the value
20232         of an unsigned char or EOF.
20233
20234 2005-06-16  Jim Meyering  <jim@meyering.net>
20235
20236         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
20237         when either N or S is zero.
20238
20239 2005-06-16  Derek Price  <derek@ximbiot.com>
20240
20241         * m4/bison.m4: Declare YACC & YFLAGS precious.
20242
20243 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
20244
20245         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
20246         multibyte string or pattern, fall back on unibyte matching.
20247         Problem reported by James Youngman.
20248
20249 2005-06-08  Bruno Haible  <bruno@clisp.org>
20250
20251         * modules/csharpcomp: New file.
20252         * MODULES.html.sh (C#): Add csharpcomp.
20253
20254 2005-06-08  Bruno Haible  <bruno@clisp.org>
20255
20256         * m4/csharpcomp.m4: New file, from GNU gettext.
20257
20258 2005-06-08  Bruno Haible  <bruno@clisp.org>
20259
20260         * lib/csharpcomp.h: New file, from GNU gettext.
20261         * lib/csharpcomp.c: New file, from GNU gettext.
20262         * lib/csharpcomp.sh.in: New file, from GNU gettext.
20263
20264 2005-06-08  Bruno Haible  <bruno@clisp.org>
20265
20266         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
20267         warning on mingw.
20268
20269 2005-06-07  Derek Price  <derek@ximbiot.com>
20270
20271         Sync from CVS.
20272         * lib/glob_.h: Indent nested #ifdef.
20273
20274 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20275
20276         Sync from coreutils.
20277         Use "file name" when talking about file names, instead of "filename"
20278         or "path", as per the GNU coding standards.
20279         * lib/mkdir-p.c: Renamed from makepath.c.
20280         (make_dir_parents): Renamed from make_path.  All callers changed.
20281         * lib/mkdir-p.h: Likewise.  All includers changed.
20282         * lib/filenamecat.c: Renamed from path-concat.c.
20283         (file_name_concat): Renamed from path_concat.  All callers changed.
20284         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
20285         * lib/filenamecat.h: Likewise.  All includers changed.
20286         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
20287         in comments or local variable names.
20288         * lib/basename.c: Likewise.
20289         * lib/canonicalize.c, canonicalize.h: Likewise.
20290         * lib/dirname.c, dirname.h: Likewise.
20291         * lib/euidaccess.c: Likewise.
20292         * lib/exclude.c: Likewise
20293         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
20294         * lib/fsusage.c, fsuage.h: Likewise.
20295         * lib/fts.c, fts_.h: Likewise.
20296         * lib/getcwd.c: Likewise.
20297         * lib/getloadavg.c: Likewise.
20298         * lib/mkstemp.c: Likewise.
20299         * lib/mountlist.c, mountlist.h: Likewise.
20300         * lib/openat.c, openat.h: Likewise.
20301         * lib/readlink-stub.c: Likewise.
20302         * lib/readutmp.c, readutmp.h: Likewise.
20303         * lib/rename.c: Likewise.
20304         * lib/rmdir.c: Likewise.
20305         * lib/same.c: Likewise.
20306         * lib/savedir.c: Likewise.
20307         * lib/stripslash.c: Likewise.
20308         * lib/tempname.c: Likewise.
20309         * lib/xreadlink.c: Likewise.
20310         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
20311         All uses changed.
20312         * lib/exclude.h: Likewise.
20313
20314         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
20315         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20316         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
20317         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20318         * lib/pathmax.h: Include <limits.h> unconditionally, since other
20319         files have been getting away with it for years (MORE/BSD 4.3
20320         is extinct now).
20321         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
20322         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20323
20324         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
20325         Define to 256, not 255, as per modern POSIX.
20326
20327 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20328
20329         Sync from coreutils.
20330         Use "file name" when talking about file names, instead of "filename"
20331         or "path", as per the GNU coding standards.
20332         * MODULES.html.sh: mkdir-p renamed from makepath.
20333         filenamecat renamed from path-concat.
20334         * modules/filenamecat: Renamed from modules/path-concat.
20335         (Files): filenamecat.h and filenamecat.c renamed from
20336         path-concat.h and path-concat.c.
20337         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
20338         (Include): filenamecat.h, not path-concat.h.
20339         * modules/mkdir-p: Renamed from modules/makepath.
20340         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
20341         makepath.c.
20342         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
20343         (Include): mkdir-p.h, not makepath.h.
20344
20345 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20346
20347         Sync from coreutils.
20348         * m4/mkdir-p.m4: Renamed from makepath.m4.
20349         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
20350         Rename files from makepath.c to mkdir-p.c, and from
20351         makepath.h to mkdir-p.h.
20352         * m4/filenamecat.m4: Renamed from path-concat.m4.
20353         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
20354         Rename files from path-concat.c to filenamecat.c,
20355         and from path-concat.h to filenamecat.h.
20356         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
20357         "file name" in local variables or comments.
20358         * m4/rename.m4: Likewise.
20359
20360 2005-06-01  Bruno Haible  <bruno@clisp.org>
20361
20362         * modules/csharpexec: New file.
20363         * MODULES.html.sh (C#): New section.
20364
20365 2005-06-01  Bruno Haible  <bruno@clisp.org>
20366
20367         * m4/csharp.m4: New file, from GNU gettext.
20368         * m4/csharpexec.m4: New file, from GNU gettext.
20369
20370 2005-06-01  Bruno Haible  <bruno@clisp.org>
20371
20372         * lib/csharpexec.h: New file, from GNU gettext.
20373         * lib/csharpexec.c: New file, from GNU gettext.
20374         * lib/csharpexec.sh.in: New file, from GNU gettext.
20375
20376 2005-05-31  Derek Price  <derek@ximbiot.com>
20377             Paul Eggert  <eggert@cs.ucla.edu>
20378
20379         Sync from cvs.
20380         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20381
20382 2005-05-31  Derek Price  <derek@ximbiot.com>
20383             Paul Eggert  <eggert@cs.ucla.edu>
20384
20385         Sync from cvs.
20386         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20387
20388 2005-05-29  Derek Price  <derek@ximbiot.com>
20389
20390         * config/srclist.txt (glob_.h, glob.c): Add these files.
20391
20392 2005-05-29  Derek Price  <derek@ximbiot.com>
20393
20394         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
20395         * modules/glob: New file.
20396         * modules/getlogin_r: Add link to POSIX spec in description.
20397
20398 2005-05-29  Derek Price  <derek@ximbiot.com>
20399             Paul Eggert  <eggert@cs.ucla.edu>
20400
20401         * m4/glob.m4: New file.
20402
20403 2005-05-29  Derek Price  <derek@ximbiot.com>
20404             Paul Eggert  <eggert@cs.ucla.edu>
20405
20406         * lib/glob_.h, lib/glob.c: New files.
20407
20408 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20409
20410         * modules/fts (Files): Remove m4/inttypes-pri.m4.
20411         * modules/fts-lgpl (Depends-on): Remove gettext.
20412
20413 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20414
20415         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
20416         and don't require gt_INTTYPES_PRI.
20417
20418 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20419
20420         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
20421
20422         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
20423         the configuration hassle isn't worth it.
20424         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
20425         (LONGEST_MODIFIER, PRIuMAX): Remove.
20426
20427 2005-05-27  Bruno Haible  <bruno@clisp.org>
20428
20429         * lib/getlogin_r.h: Remove second include of <stddef.h>.
20430
20431 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
20432
20433         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
20434         _POSIX_PTHREAD_SEMANTICS for Solaris.
20435
20436 2005-05-25  Derek Price  <derek@ximbiot.com>
20437
20438         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
20439
20440 2005-05-25  Derek Price  <derek@ximbiot.com>
20441             Paul Eggert  <eggert@cs.ucla.edu>
20442
20443         * modules/getlogin_r, m4/getlogin_r.m4: New files.
20444         * lib/getlogin_r.c, getlogin_r.h: New files.
20445
20446 2005-05-25  Bruno Haible  <bruno@clisp.org>
20447             Derek Price  <derek@ximbiot.com>
20448
20449         * lib/getlogin_r.h: Simplify API documentation.
20450
20451 2005-05-23  Derek Price  <derek@ximbiot.com>
20452
20453         * modules/minmax (Files): Add m4/minmax.m4.
20454         (configure.ac): Add gl_MINMAX.
20455
20456 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
20457
20458         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
20459         so that unistd-safer.h (GPL'ed code) need not be included.
20460
20461 2005-05-22  Bruno Haible  <bruno@clisp.org>
20462
20463         * m4/minmax.m4: New file.
20464         Based on a patch by Derek Price <derek@ximbiot.com>.
20465
20466 2005-05-22  Bruno Haible  <bruno@clisp.org>
20467
20468         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
20469         (INT64_MIN): Fix definition.
20470         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
20471
20472         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
20473         NEED_SIGNED_INT_TYPES.
20474
20475         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
20476         HAVE_SYSTEM_INTTYPES.
20477
20478 2005-05-22  Bruno Haible  <bruno@clisp.org>
20479
20480         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
20481         Also include <sys/param.h> if it defines MIN, MAX.
20482         Based on a patch by Derek Price <derek@ximbiot.com>.
20483
20484 2005-05-21  Jim Meyering  <jim@meyering.net>
20485
20486         * modules/fts (Files): Add m4/inttypes-pri.m4.
20487         (Depends-on): Add lstat and remove gettext.  Alphabetize.
20488
20489 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20490
20491         New fts module.
20492         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
20493         (setup_dir, free_dir): New functions.
20494         (enter_dir, leave_dir): Define trivial
20495         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
20496         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
20497         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
20498         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
20499         Move to fts-cycle.c.
20500         (fts_open): Use setup_dir.
20501         (fts_close): Use free_dir.
20502         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
20503         This adds a label and some gotos, but the alternatives were messier.
20504         Check for memory allocation failure when entering a dir.
20505         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
20506         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
20507         (FTS): New member fts_cycle, that is a union that contains the
20508         old active_dir_ht and cycle_state.  All uses changed to mention
20509         fts_cycle.ht and fts_cycle.state.
20510         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
20511         fts.c, with the following changes:
20512         (setup_dir, free_dir): New functions.
20513         (enter_dir): Now returns bool.  Return true if successful, false
20514         if memory exhausted.  All callers changed.
20515         Do not bother partly cleaning up on
20516         memory allocation failure; that is free_dir's job.
20517         However, free ad if hash_insert fails, to avoid memory leak.
20518         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
20519         fts->fts_options to see which union member to use.
20520
20521 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20522
20523         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
20524         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
20525
20526 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20527
20528         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
20529
20530 2005-05-20  Jim Meyering  <jim@meyering.net>
20531
20532         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
20533         Now a macro, to pacify GCC.
20534
20535 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20536
20537         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
20538         of -1.
20539
20540 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20541
20542         * lib/chown.c (rpl_chown): Return -1 on failure.
20543
20544 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20545
20546         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
20547         Don't check for stddef.h.
20548         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
20549         don't use its results.
20550         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
20551         since we include them unconditionally.  Don't require
20552         AM_STDBOOL_H, since stdbool is a prerequisite.
20553         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
20554         since we assume C89 or better.
20555         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
20556         as we don't use their results.
20557         Don't check for fchdir, memmove, memset, strrchr, as we use
20558         them unconditionally.
20559         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
20560         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
20561
20562 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20563
20564         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
20565         Include <stddef.h> unconditionally, since we assume C89 now.
20566         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
20567         * lib/fts.c: Include fts_.h first, to check interface.
20568         Do not include intprops.h; no longer needed.
20569         Include cycle-check.h and hash.h, since fts_.h no longer does.
20570         Remove unnecessary casts of closedir to void.
20571         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
20572         decide whether to decrement nlinks.
20573         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
20574         (FTS): Use struct hash_table * instead of Hash_table, so that
20575         we no longer need to include hash.h here.
20576
20577 2005-05-18  Jim Meyering  <jim@meyering.net>
20578
20579         * modules/dirfd (License): Change to LGPL.  Most of the code
20580         is already in the public domain.
20581
20582 2005-05-18  Jim Meyering  <jim@meyering.net>
20583
20584         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
20585         Reported by Yoann Vandoorselaere.
20586
20587 2005-05-17  Jim Meyering  <jim@meyering.net>
20588
20589         * m4/fts.m4: New file, from coreutils.
20590
20591 2005-05-17  Jim Meyering  <jim@meyering.net>
20592
20593         * lib/fts.c, lib/fts_.h: New files, from coreutils.
20594
20595 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20596
20597         Sync from coreutils.
20598         * m4/unlinkdir.m4: New file.
20599
20600 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20601
20602         Sync from coreutils.
20603         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
20604         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
20605         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
20606         White space changes only.
20607         * lib/makepath.c (make_path): Port to hosts where leading "//" is
20608         special.
20609         * lib/yesno.c: Include getline.h, not ctype.h.
20610         (yesno): Don't remove leading white space; POSIX doesn't allow it.
20611         Use getline to remove arbitrary restriction on response length.
20612
20613 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20614
20615         * config/srclist-update: Spell out "Street" in FSF postal
20616         mail address; this is the style the FSF seems to prefer.
20617
20618         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
20619         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
20620         this updates FSF postal mail address.
20621
20622         Sync from coreutils.
20623         * modules/unlinkdir: New file.
20624         * modules/yesno (Depends-on): Add getline.
20625         * MODULES.html.sh (File system functions): Add unlinkdir.
20626
20627 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20628
20629         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
20630         lib/strsep.h:
20631         Change the initial comment to refer to GPL, not LGPL.
20632         gnulib-tool will change it to LGPL as needed.
20633
20634         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
20635         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
20636         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
20637         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
20638         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
20639         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
20640         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
20641         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
20642         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
20643         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
20644         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
20645         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
20646         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
20647         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
20648         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
20649         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
20650         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
20651         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
20652         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
20653         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
20654         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
20655         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
20656         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
20657         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
20658         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
20659         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
20660         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
20661         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
20662         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
20663         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
20664         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
20665         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
20666         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
20667         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
20668         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
20669         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
20670         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
20671         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
20672         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
20673         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
20674         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
20675         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
20676         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
20677         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
20678         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
20679         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
20680         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
20681         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
20682         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
20683         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
20684         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20685         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
20686         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
20687         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
20688         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
20689         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
20690         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
20691         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
20692         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
20693         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
20694         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
20695         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
20696         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
20697         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
20698         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
20699         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20700         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20701         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20702         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20703         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20704         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20705         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20706         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20707         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20708         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20709         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20710         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20711         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20712         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20713         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20714         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20715         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20716         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20717         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20718         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20719         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20720         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20721         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20722         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20723         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20724         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20725         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20726         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20727         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20728         lib/yesno.c, lib/yesno.h:
20729         Update FSF postal mail address.
20730
20731 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20732
20733         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20734         tests/test-memmem.c, tests/test-stpncpy.c:
20735         Update FSF postal mail address.
20736
20737 2005-05-13  Bruno Haible  <bruno@clisp.org>
20738
20739         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20740         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20741         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20742         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20743         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20744         Add support for 64-bit integers in the MSVC compiler.
20745
20746 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20747
20748         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20749
20750 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20751
20752         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20753
20754 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20755
20756         * doc/getdate.texi (General date syntax): Don't say that date
20757         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20758         Problem reported by Nic Ferrier.
20759
20760 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20761
20762         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20763         specified in ai_socktype. Fix invalid ai_protocol
20764         check. ai_protocol is usually set to 0 or depending on
20765         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20766         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20767         ai_socktype / ai_protocol in the returned addrinfo structure.
20768
20769 2005-05-10  Simon Josefsson  <jas@extundo.com>
20770
20771         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20772         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20773
20774 2005-05-10  Karl Berry  <karl@gnu.org>
20775
20776         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20777         (from http://www.gnu.org/licenses).
20778         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20779         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20780         fdl.texi suffices.
20781
20782 2005-05-10  Karl Berry  <karl@gnu.org>
20783
20784         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20785         (COPYING.DOC): remove.
20786
20787         * config/srclist-update: new FSF address.
20788
20789 2005-05-10  Derek Price  <derek@ximbiot.com>
20790
20791         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20792         possible.
20793
20794 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20795             Bruno Haible  <bruno@clisp.org>
20796
20797         * modules/inet_ntop: New file.
20798         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20799         inet_ntop.
20800
20801 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20802             Bruno Haible  <bruno@clisp.org>
20803
20804         * m4/inet_ntop.m4: New file.
20805
20806 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20807             Bruno Haible  <bruno@clisp.org>
20808
20809         * lib/inet_ntop.h: New file.
20810         * lib/inet_ntop.c: New file, from glibc with modifications.
20811
20812 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20813
20814         * modules/time_r (License): Change to LGPL.
20815         * modules/extensions (License): Change to LGPL.  Actually,
20816         the license is more permissive than that, but currently gnulib-tool
20817         doesn't know how to handle more-permissive licenses.
20818
20819         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20820         Problem reported by Dave Love.
20821
20822 2005-05-08  Jim Meyering  <jim@meyering.net>
20823
20824         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20825         blank.
20826
20827 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20828
20829         * modules/argmatch (Depends-on): Add stdbool.
20830         * modules/backupfile (Depends-on): Likewise.
20831         * modules/chdir-long (Depends-on): Likewise.
20832         * modules/closeout (Depends-on): Likewise.
20833         * modules/cycle-check (Depends-on): Likewise.
20834         * modules/dirname (Depends-on): Likewise.
20835         * modules/fnmatch (Depends-on): Likewise.
20836         * modules/fsusage (Depends-on): Likewise.
20837         * modules/fwriteerror (Depends-on): Likewise.
20838         * modules/getcwd (Depends-on): Likewise.
20839         * modules/getloadavg (Depends-on): Likewise.
20840         * modules/hard-locale (Depends-on): Likewise.
20841         * modules/makepath (Depends-on): Likewise.
20842         * modules/mountlist (Depends-on): Likewise.
20843         * modules/nanosleep (Depends-on): Likewise.
20844         * modules/posixtm (Depends-on): Likewise.
20845         * modules/quotearg (Depends-on): Likewise.
20846         * modules/readtokens (Depends-on): Likewise.
20847         * modules/readtokens0 (Depends-on): Likewise.
20848         * modules/readutmp (Depends-on): Likewise.
20849         * modules/save-cwd (Depends-on): Likewise.
20850         * modules/strftime (Depends-on): Likewise.
20851         * modules/userspec (Depends-on): Likewise.
20852         * modules/utimecmp (Depends-on): Likewise.
20853         * modules/xgetcwd (Depends-on): Likewise.
20854         * modules/xnanosleep (Depends-on): Likewise.
20855         * modules/xstrtod (Depends-on): Likewise.
20856         * modules/yesno (Depends-on): Likewise.
20857
20858 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20859
20860         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20861         needless checks.
20862
20863 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20864
20865         Merge from coreutils.  Among other things,
20866         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20867         * lib/fd-safer.c: New file.
20868         * lib/fcntl-safer.h, open-safer.c: Remove.
20869         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20870         * lib/dup-safer.c: Include unistd-safer.h first.
20871         Don't include errno.h.
20872         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20873         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20874         * lib/file-type.c: Rely on file-type.h change.
20875         * lib/getloadavg.c: Include unistd-safer.h.
20876         (getloadavg): Use safer open.
20877         * lib/getusershell.c: Include "stdio-safer.h".
20878         (getusershell): Use safer fopen.
20879         * lib/long-options.c (long_options): Use NULL rather than 0.
20880         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20881         'free'.
20882         * lib/modechange.c: Likewise.
20883         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20884         (MODE_DONE): New constant.
20885         (struct mode_change): Remove 'next' member.
20886         (make_node_op_equals): New function; like the old one of the
20887         same name, except it allocates an array.
20888         (mode_compile, mode_create_from_ref): Use it.
20889         (mode_compile): Allocate result as an array, not a linked list.
20890         Parse octal string ourself, so that we catch mistakes like "+0".
20891         (mode_adjust): Arg is an array, not a linked list.
20892         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20893         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20894         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20895         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20896         Remove.  This is now stat-macros.h's job.
20897         (talloc): Remove.  All callers replaced by xalloc, so that
20898         our invokers don't have to worry about reporting memory failures.
20899         (make_node_op_equals): Remove.
20900         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20901         New constants.
20902         (struct mode_change): Moved here from modechange.h.
20903         (mode_append_entry): Remove.
20904         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20905         apps to have incorrect behavior.  Use simpler algorithm for head
20906         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20907         Detect more invalid usages rather than having somewhat-random behavior.
20908         Don't insert an "a=" action, as that leads to incorrect behavior.
20909         (mode_compile, mode_create_from_ref): Return NULL on error instead
20910         of an enum, since now there's only one way to have an error.  All
20911         callers changed.
20912         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20913         at the correct time.  Simplify calculation of "+u" and its ilk.
20914         Don't mishandle "+X".
20915         (mode_free): Remove "register" and localize decls.
20916         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20917         (struct mode_change): Move to modechange.c; callers don't
20918         need to see this stuff.
20919         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20920         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20921         (mode_change, mode_adjust): Reflect the new signatures noted above.
20922         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20923         that might redefine system include files.
20924         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20925         (my_usleep): Use NULL rather than (void *) 0.
20926         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20927         Use siginterrupt to specify that system calls should be interrupted.
20928         (rpl_nanosleep): Move initialization of suspended closer to call of
20929         my_usleep.
20930         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20931         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20932         (desirable_utmp_entry): New function.
20933         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20934         using x2nrealloc, to simplify logic.
20935         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20936         size calculation.  Do not assume utmp file is a regular file.
20937         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20938         (READ_UTMP_CHECK_PIDS): New constant.
20939         * lib/save-cwd.c: Include unistd-safer.h.
20940         (save_cwd): Use fd_safer.
20941         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20942         [!_LIBC] Include "stat-macros.h" instead.
20943         * lib/unistd-safer.h (fd_safer): New decl.
20944
20945 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20946
20947         * modules/getloadavg (Depends-on): Add unistd-safer.
20948         * modules/getusershell (Depends-on): Add stdio-safer.
20949         * modules/lstat (Depends-on): Remove xalloc.
20950         * modules/mkstemp (Depends-on): Add stat-macros.
20951         * modules/modechange (Depends-on): Remove xstrtol.
20952         Add stat-macros, xalloc.
20953         * modules/save-cwd (Depends-on): Add unistd-safer.
20954         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20955         * modules/unistd-safer (Files): Add lib/fd-safer.c
20956         (Makefile.am): Remove lib_SOURCES.
20957
20958         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20959         Remove fcntl-safer; unistd-safer supersedes it.
20960
20961 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20962
20963         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20964         AC_HEADER_STAT.
20965         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20966         (gl_PREREQ_CHOWN): Remove.
20967         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20968         it.  Don't require AC_HEADER_STAT.
20969         (gl_PREREQ_LSTAT): Remove.
20970         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20971         Don't require AC_HEADER_STAT.
20972         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20973         (gl_PREREQ_RMDIR): Remove.
20974         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20975         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20976         the stat-macros module a prerequisite.
20977         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20978         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20979         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20980         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20981         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20982         variable names.
20983         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20984         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20985         variable prefixes.
20986         * m4/fcntl-safer.m4: Remove.
20987         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20988         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20989         Invoke gl_PREREQ_FD_SAFER.
20990         (gl_PREREQ_FD_SAFER): New macro.
20991         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20992         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20993         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20994         Remove duplicate call to AC_LIBOBJ(readutmp).
20995         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20996
20997         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20998         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20999
21000 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
21001
21002         * MODULES.html.sh (Misc): Add byteswap.
21003
21004 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
21005
21006         * modules/getcwd (Depends-on): Add extensions.
21007         * modules/openat (Depends-on): Likewise.
21008
21009 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
21010
21011         * modules/byteswap: New file.
21012
21013 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
21014
21015         * m4/byteswap.m4: New file.
21016
21017 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
21018
21019         * lib/byteswap_.h: New file.
21020
21021 2005-04-25  Karl Berry  <karl@gnu.org>
21022
21023         * m4/gettext.m4: Update from GNU gettext 0.14.4.
21024
21025 2005-04-25  Albert Chin  <china@thewrittenword.com>
21026
21027         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
21028         Toolkit C bug.
21029
21030 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
21031
21032         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
21033         (func_ln_if_changed) Remove forcibly for no error message
21034         in case file does not exist.
21035
21036 2005-04-19  Simon Josefsson  <jas@extundo.com>
21037
21038         * gnulib-tool (Options): Make --symlink mean --symbolic.
21039
21040 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
21041
21042         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
21043
21044 2005-04-16  Simon Josefsson  <jas@extundo.com>
21045
21046         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
21047
21048 2005-04-15  Simon Josefsson  <jas@extundo.com>
21049
21050         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
21051
21052 2005-04-15  Simon Josefsson  <jas@extundo.com>
21053
21054         * gnulib-tool: Rename --symlink to --symbolic.
21055
21056 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
21057
21058         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
21059         symbolic links to files instead of copying/moving.  Add --aux-dir,
21060         specifying directory relative --dir where auxiliary build tools
21061         are placed.
21062
21063 2005-04-14  Bruno Haible  <bruno@clisp.org>
21064
21065         * modules/allocsa (License): Change to LGPL.
21066         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
21067
21068 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
21069
21070         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
21071         that "UTC +1 second" continues to work.  Problem reported
21072         by Dmitry V. Levin.
21073         (relunit_snumber): New rule.
21074         (relunit): Use it.
21075
21076 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
21077
21078         * lib/getdate.y (universal_time_zone_table): New constant.
21079         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
21080         universal_time_zone_table.
21081         (lookup_zone): Prefer universal_time_zone_table to
21082         local_time_zone_table, so that "GMT" time stamps are allowed in
21083         London during the summer.  Problem reported by Ian Abbott.
21084
21085 2005-04-12  Jim Meyering  <jim@meyering.net>
21086
21087         * lib/human.c (humblock): Set *options even when returning due to
21088         xstrtoumax conversion failure.  Thanks to a used-uninitialized
21089         warning from gcc-4.
21090
21091 2005-04-09  Jim Meyering  <jim@meyering.net>
21092
21093         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
21094         -Wuninitialized: initialize tm0.tm_year.
21095
21096 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
21097
21098         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
21099         count, since there's no maximum.  All uses changed.
21100         Add member dsts_seen.
21101         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
21102         not being INT_MAX.
21103         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
21104         Use pc_rels_seen to decide whther a date is absolute.
21105
21106         * lib/getdate.y (number): Don't overwrite year.
21107         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
21108         check.
21109
21110 2005-04-02  Simon Josefsson  <jas@extundo.com>
21111
21112         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
21113         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
21114
21115 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
21116
21117         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
21118         where no absolute path name can be longer than PATH_MAX.
21119
21120 2005-03-27  Jim Meyering  <jim@meyering.net>
21121
21122         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
21123
21124 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
21125
21126         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
21127         "one's complement" -> "ones' complement" in comment, as per Knuth.
21128         "value of type" -> "type or expression" in comment.
21129         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
21130
21131 2005-03-26  Jim Meyering  <jim@meyering.net>
21132
21133         Comment nits.
21134         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
21135         Correct typos: s/or/of/.
21136
21137 2005-03-26  Jim Meyering  <jim@meyering.net>
21138
21139         * modules/check-include-files: Move to ../ and rename to...
21140         * check-module: ...this.
21141
21142 2005-03-25  Jim Meyering  <jim@meyering.net>
21143
21144         * modules/xvasprintf (Files): Add xalloc.h.
21145
21146 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
21147
21148         * modules/gettext (Files): config/config.rpath ->
21149         build-aux/config.rpath
21150         * modules/iconv (Files): Likewise.
21151         Problem reported by Oskar Liljeblad.
21152
21153 2005-03-23  Jim Meyering  <jim@meyering.net>
21154
21155         * modules/check-include-files: New script to check for
21156         missing dependencies, multiple includes, etc.
21157
21158         * modules/c-strtold (Depends-on): Add xalloc.
21159         * modules/c-strtod (Depends-on): Add xalloc.
21160         * modules/hash (Depends-on): Add xalloc.
21161         (Files): Remove lib/xalloc.h.
21162
21163         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
21164         * modules/userspec (Files): Add lib/inttostr.h.
21165
21166 2005-03-23  Jim Meyering  <jim@meyering.net>
21167
21168         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
21169
21170 2005-03-22  Jim Meyering  <jim@meyering.net>
21171
21172         * modules/stat-macros: New module.
21173         * modules/canonicalize, modules/euidaccess, modules/file-type,
21174         * modules/filemode, modules/lchown, modules/makepath,
21175         * modules/rmdir, modules/stat: Depend on new stat-macros module
21176         rather than listing lib/stat-macros.h manually.
21177         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
21178
21179 2005-03-22  Jim Meyering  <jim@meyering.net>
21180
21181         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
21182
21183 2005-03-22  Bruno Haible  <bruno@clisp.org>
21184
21185         * config/srclist.txt: Replace target directory 'config' with
21186         'build-aux'.
21187         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
21188         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
21189         ../build-aux/.
21190
21191 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
21192
21193         * modules/chdir-long (Depends-on): Add mempcpy.
21194
21195         * modules/acl, modules/backupfile, modules/c-strtod,
21196         modules/c-strtold, modules/canon-host, modules/canonicalize,
21197         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
21198         modules/exclude, modules/exitfail, modules/file-type,
21199         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
21200         modules/getdate, modules/getline, modules/getpagesize,
21201         modules/getpass, modules/getugroups, modules/group-member,
21202         modules/hard-locale, modules/hash, modules/human, modules/idcache,
21203         modules/inttostr, modules/long-options, modules/makepath,
21204         modules/md5, modules/memcasecmp, modules/memcoll,
21205         modules/modechange, modules/mountlist, modules/path-concat,
21206         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
21207         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
21208         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
21209         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
21210         modules/strftime, modules/strndup, modules/strverscmp,
21211         modules/timespec, modules/unlocked-io, modules/userspec,
21212         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
21213         modules/yesno:
21214         Remove lib_SOURCES line from Makefile.am section, as this is now
21215         done automatically by the corresponding Autoconf macro.
21216
21217 2005-03-21  Jim Meyering  <jim@meyering.net>
21218
21219         Changes imported from coreutils.
21220
21221         * lib/cycle-check.c: Don't include xalloc.h.
21222
21223         * lib/path-concat.c: Don't include assert.h.
21224         (path_concat): Remove assertion that would have triggered
21225         for ABASE starting with more than one slash.
21226         Reported by Andreas Schwab.
21227
21228         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
21229         properly when ABASE is an absolute file name.
21230         Correct the description of this function.
21231         Include <assert.h>.
21232         Add an assertion and a test driver.
21233         This fixes a bug introduced on 2004-07-02.
21234         Andreas Schwab reported the resulting failure of cp --parents:
21235         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
21236
21237 2005-03-21  Jim Meyering  <jim@meyering.net>
21238
21239         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
21240         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
21241
21242 2005-03-21  Jim Meyering  <jim@meyering.net>
21243         and  Paul Eggert  <eggert@cs.ucla.edu>
21244
21245         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
21246         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
21247         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
21248         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
21249         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
21250         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
21251         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
21252         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
21253         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
21254         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
21255         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
21256         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
21257         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
21258         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
21259         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
21260         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
21261         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
21262         for these modules.
21263
21264 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21265
21266         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
21267         (which shouldn't happen), generate nothing instead of returning 0
21268         immediately, so that nstrftime (NULL, ...) doesn't return 0.
21269
21270 2005-03-16  Bruno Haible  <bruno@clisp.org>
21271
21272         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
21273         HAVE_LONGLONG_64BIT.
21274
21275 2005-03-16  Bruno Haible  <bruno@clisp.org>
21276
21277         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
21278         HAVE_LONGLONG_64BIT.
21279
21280 2005-03-16  Bruno Haible  <bruno@clisp.org>
21281
21282         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
21283         HAVE_LONGLONG_64BIT.
21284
21285 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21286
21287         * lib/strftime.c (my_strftime): Prepend space to format so that we can
21288         reliably distinguish strftime failure from empty output on POSIX
21289         hosts.
21290
21291 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21292
21293         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
21294         (iconv_string): Don't guess a size-zero buffer, as that might cause
21295         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
21296         result would be 'too large', where 'too large' is (heuristically)
21297         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
21298         overflow concerns.  This will prevent some unwanted malloc failures
21299         when the inputs are very large.
21300
21301 2005-03-15  Karl Berry  <karl@gnu.org>
21302
21303         * config/srclist.txt (config.rpath): from gettext.
21304         * config/config.rpath: update.
21305
21306 2005-03-15  Bruno Haible  <bruno@clisp.org>
21307
21308         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
21309         to 'negate'.
21310
21311         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
21312         variable.
21313
21314         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
21315         results.
21316
21317 2005-03-14  Simon Josefsson  <jas@extundo.com>
21318
21319         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
21320         <fx@gnu.org>.
21321
21322 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21323
21324         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
21325         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
21326         intprops.h.
21327         * lib/strtol.c: Likewise.
21328
21329 2005-03-14  Jim Meyering  <jim@meyering.net>
21330
21331         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
21332         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
21333         to be nonzero so that we (and caller) can detect the difference
21334         between a valid zero-length expansion and an error return, even
21335         when the underlying strftime fails before writing anything into
21336         that location.
21337
21338 2005-03-14  Bruno Haible  <bruno@clisp.org>
21339
21340         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
21341         Update from GNU gettext 0.14.3.
21342
21343 2005-03-10  Jim Meyering  <jim@meyering.net>
21344
21345         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
21346
21347 2005-03-10  Jim Meyering  <jim@meyering.net>
21348
21349         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
21350         so that this module works on systems without fchdir.
21351
21352 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
21353
21354         Factor int-properties macros into a single file, except for
21355         glibc-related files.
21356         * lib/intprops.h: New file.
21357         * lib/getloadavg.c: Include it instead of limits.h.
21358         (INT_STRLEN_BOUND): Remove.
21359         * lib/human.c: Include intprops.h.
21360         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
21361         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
21362         302/1000.
21363         * lib/inttostr.h: Include intprops.h instead of limits.h.
21364         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
21365         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
21366         for consistency with intprops.h.
21367         (time_t_is_integer, twos_complement_arithmetic): Use them.
21368         * lib/sig2str.h: Include <signal.h>, intprops.h.
21369         (INT_STRLEN_BOUND): Remove.
21370         * lib/strftime.c (TYPE_SIGNED): Remove.
21371         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
21372         * lib/strtol.c: Adjust comments to match intprops.h.
21373         * lib/userspec.c: Include intprops.h.
21374         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
21375         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
21376         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
21377         instead of rolling our own expressions.
21378         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
21379
21380         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
21381         instead of int.
21382         (my_strftime): Do not mishandle years close to INT_MAX, by doing
21383         the right thing even if adding 1900 would overflow.  Similarly
21384         for tm_mon + 1 and tm_yday + 1.
21385         Make %Y always equivalent to %C%y, and similarly for %G and %g.
21386         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
21387         (DO_SIGNED_NUMBER): New macro.
21388         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
21389
21390 2005-03-07  Bruno Haible  <bruno@clisp.org>
21391
21392         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
21393
21394 2005-03-07  Bruno Haible  <bruno@clisp.org>
21395
21396         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
21397
21398 2005-03-04  Derek R. Price  <derek@ximbiot.com>
21399
21400         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
21401         (func_import): Only replace files via --import when they have actually
21402         changed.
21403
21404 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21405
21406         * m4/mmap-anon.m4: New file.
21407         * m4/pagealign_alloc.m4: New file.
21408
21409 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21410             Bruno Haible  <bruno@clisp.org>
21411
21412         * modules/pagealign_alloc: New file.
21413         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
21414
21415 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21416             Bruno Haible  <bruno@clisp.org>
21417
21418         * lib/pagealign_alloc.h: New file.
21419         * lib/pagealign_alloc.c: New file.
21420
21421 2005-03-03  Bruno Haible  <bruno@clisp.org>
21422
21423         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
21424         Use an all-permissive copyright notice, recommended by RMS.
21425
21426 2005-03-02  Bruno Haible  <bruno@clisp.org>
21427
21428         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
21429         of AIX, the replacement has to be done only after <string.h> is
21430         included, therefore not in config.h. stpncpy.h does the replacement,
21431         and stpncpy.c uses it.
21432
21433 2005-03-02  Bruno Haible  <bruno@clisp.org>
21434
21435         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
21436         stpncpy.c uses it.
21437
21438 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21439
21440         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
21441         The workaround isn't strictly needed for POSIX conformance, and
21442         it's too much of a pain to configure and maintain.  We'll ask
21443         people to fix their kernels instead.
21444         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
21445         (NANOSLEEP_BUG_WORKAROUND): Remove.
21446         (xnanosleep): Remove the workaround.
21447
21448 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21449
21450         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
21451         Reported by Derek Price.
21452         (Include): Add "timespec.h".
21453
21454         * modules/xnanosleep (Depends-on): Remove gethrxtime.
21455
21456 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21457
21458         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
21459         to detect nanosleep bug.
21460
21461 2005-03-01  Bruno Haible  <bruno@clisp.org>
21462
21463         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
21464
21465 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
21466
21467         * modules/gethrxtime: New file.
21468         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
21469         (Depends-on): Add gethrxtime.
21470         (configure.ac): Add gl_XNANOSLEEP.
21471         (Makefile.am): Remove lib_SOURCES line.
21472
21473 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21474
21475         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
21476         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
21477
21478 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21479
21480         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
21481         * lib/timespec.h (gettime): Return void, since it always
21482         succeeds now.  All uses changed.
21483         * lib/gettime.c (gettime) Likewise.
21484         [HAVE_NANOTIME]: Prefer nanotime.
21485         Assume gettimeofday succeeds, as POSIX requires.
21486         Assime time () succeeds, since other code already does.
21487         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
21488         (timespec_subtract): Remove.
21489         (NANOSLEEP_BUG_WORKAROUND): New constant.
21490         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
21491         things considerably.  Use it only on GNU/Linux hosts, since the
21492         workaround shouldn't be needed elsewhere.
21493
21494 2005-02-24  Bruno Haible  <bruno@clisp.org>
21495
21496         * modules/gettext (Files): Add m4/glibc2.m4.
21497
21498 2005-02-24  Bruno Haible  <bruno@clisp.org>
21499
21500         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
21501         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
21502         * m4/progtest.m4:
21503         Update from GNU gettext 0.14.2.
21504         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
21505
21506 2005-02-24  Bruno Haible  <bruno@clisp.org>
21507
21508         * lib/localcharset.c: Update from GNU gettext 0.14.2.
21509         * lib/config.charset: Update from GNU gettext 0.14.2.
21510
21511 2005-02-24  Bruno Haible  <bruno@clisp.org>
21512
21513         * lib/gettext.h: Update from GNU gettext 0.14.2.
21514
21515 2005-02-23  Simon Josefsson  <jas@extundo.com>
21516
21517         * m4/iconvme.m4: New file.
21518
21519 2005-02-23  Jim Meyering  <jim@meyering.net>
21520
21521         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
21522         change.
21523         Thanks to Bruno Haible for catching it.
21524
21525 2005-02-22  Simon Josefsson  <jas@extundo.com>
21526
21527         * modules/iconvme: New file.
21528
21529         * MODULES.html.sh: Add iconvme.
21530
21531 2005-02-22  Simon Josefsson  <jas@extundo.com>
21532
21533         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
21534
21535 2005-02-22  Simon Josefsson  <jas@extundo.com>
21536
21537         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
21538
21539 2005-02-22  Jim Meyering  <jim@meyering.net>
21540
21541         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
21542         s/ifndef/ifdef/.
21543
21544 2005-02-20  Neil Conway  <neilc@samurai.com>
21545
21546         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
21547         returned by OSX/Darwin if the specified buffer is not large
21548         enough for the hostname.
21549
21550 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21551
21552         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
21553         pass it to _help, otherwise the latter coredumps trying to
21554         dereference state.root_argp.
21555
21556 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21557
21558         * modules/chdir-long (Depends-on): Add memrchr.
21559         * modules/memrchr (Files): Add lib/memrchr.h.
21560         (Include): "memrchr.h".
21561
21562 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21563
21564         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
21565
21566 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21567
21568         * lib/memrchr.h: New file.
21569         * lib/chdir-long.c: Include it.
21570         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
21571         Don't bother including stddef.h.
21572
21573 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
21574
21575         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
21576         inclusion.
21577         Include <sys/types.h>, for dev_t.
21578         (ME_DUMMY, ME_REMOTE): Move from here....
21579         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
21580         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
21581         Dmitry V. Levin.
21582         Include mountlist.h first, to test the interface.
21583
21584 2005-01-29  Bruno Haible  <bruno@clisp.org>
21585
21586         * lib/progname.c (program_name): Initialize.
21587         Needed when linking statically on MacOS X.
21588
21589 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21590
21591         Sync from coreutils.
21592         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
21593         (Depends-on): Add c-strtod.
21594         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
21595
21596 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21597
21598         Sync from coreutils.
21599         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
21600
21601         Remove files that are specific to coreutils.
21602         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
21603
21604 2005-01-28  Bruno Haible  <bruno@clisp.org>
21605
21606         * modules/javacomp: New file.
21607         * MODULES.html.sh (Java): Add javacomp.
21608
21609 2005-01-28  Bruno Haible  <bruno@clisp.org>
21610
21611         * m4/javacomp.m4: New file, from GNU gettext.
21612
21613 2005-01-28  Bruno Haible  <bruno@clisp.org>
21614
21615         * lib/javacomp.sh.in: New file, from GNU gettext.
21616         * lib/javacomp.h: New file, from GNU gettext.
21617         * lib/javacomp.c: New file, from GNU gettext.
21618
21619 2005-01-26  Simon Josefsson  <jas@extundo.com>
21620
21621         * lib/gai_strerror.c: Use GPL in header.
21622
21623 2005-01-26  Bruno Haible  <bruno@clisp.org>
21624
21625         * modules/javaexec: New file.
21626         * MODULES.html.sh (Java): Add javaexec.
21627
21628 2005-01-26  Bruno Haible  <bruno@clisp.org>
21629
21630         * m4/javaexec.m4: New file, from GNU gettext.
21631
21632 2005-01-26  Bruno Haible  <bruno@clisp.org>
21633
21634         * lib/javaexec.sh.in: New file, from GNU gettext.
21635         * lib/javaexec.h: New file, from GNU gettext.
21636         * lib/javaexec.c: New file, from GNU gettext.
21637
21638 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21639
21640         * modules/lchown (Depends-on): Remove lchown.h
21641
21642 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21643
21644         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
21645         must be defined if the header file was not found, in order
21646         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
21647
21648 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21649
21650         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
21651         initializers for struct pentry_state.
21652         (__argp_error): Check return value of __asprintf
21653         (__argp_failure): Translate error message
21654
21655         * lib/argp-parse.c: Removed braces around the expansion of N_()
21656
21657 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
21658
21659         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
21660         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
21661         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
21662         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
21663         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
21664         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
21665         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
21666         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
21667         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
21668         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
21669         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
21670         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
21671         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
21672         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
21673         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
21674         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
21675         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
21676         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
21677         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
21678         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
21679         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
21680         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
21681         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
21682         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
21683         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
21684         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
21685         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
21686         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
21687         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
21688         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
21689         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
21690         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
21691         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
21692         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
21693         xstrtol.m4, xstrtoumax.m4, yesno.m4:
21694         Use an all-permissive copyright notice, recommended by RMS.
21695
21696 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
21697
21698         * modules/chdir-long (Depends-on): Remove mempcpy.
21699
21700 2005-01-21  Jim Meyering  <jim@meyering.net>
21701
21702         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21703         same value as for Solaris 9.
21704
21705         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21706         component length.  This included changing the parameter to be
21707         of type `char *' rather than `char const *'.
21708         * lib/chdir-long.h (chdir_long): Update prototype.
21709
21710         * lib/openat.c (fdopendir, fstatat): New functions.
21711         * lib/openat.h: Include headers required for use of DIR and struct
21712         stat.
21713         [AT_SYMLINK_NOFOLLOW]: Define.
21714         (fdopendir, fstatat): Add prototypes.
21715
21716 2005-01-21  Bruno Haible  <bruno@clisp.org>
21717
21718         * modules/classpath: New file.
21719         * MODULES.html.sh (Java): Add classpath.
21720
21721 2005-01-21  Bruno Haible  <bruno@clisp.org>
21722
21723         * lib/classpath.h: New file, from GNU gettext.
21724         * lib/classpath.c: New file, from GNU gettext.
21725
21726 2005-01-20  Simon Josefsson  <jas@extundo.com>
21727
21728         * modules/version-etc-fsf: New file.
21729
21730 2005-01-20  Simon Josefsson  <jas@extundo.com>
21731
21732         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21733         * lib/version-etc.c: Remove version_etc_copyright.
21734         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21735         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21736
21737 2005-01-20  Simon Josefsson  <jas@extundo.com>
21738
21739         * lib/base64.h (isbase64): Add.
21740
21741         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21742         using a unsigned prototype, don't inline.
21743         (base64_decode): Use it.
21744
21745 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21746
21747         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21748         it.
21749
21750 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21751
21752         * lib/save-cwd.c (save_cwd): Remove code to support the case
21753         where fchdir is missing or flaky.
21754
21755 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21756
21757         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21758
21759 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21760
21761         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21762         AC_LIBSOURCES now does this.
21763         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21764         with new ullong_max module.
21765
21766 2005-01-19  Bruno Haible  <bruno@clisp.org>
21767
21768         * modules/sh-quote: New file.
21769         * MODULES.html.sh (Executing programs): Add sh-quote.
21770
21771 2005-01-19  Bruno Haible  <bruno@clisp.org>
21772
21773         * lib/sh-quote.h: New file, from GNU gettext.
21774         * lib/sh-quote.c: New file, from GNU gettext.
21775
21776 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21777
21778         Merge from coreutils.
21779         * m4/ullong_max.m4: New file.
21780         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21781         (gl_MACROS): Assume localeconv exists.
21782
21783 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21784
21785         Merge changes from coreutils, as described below in several
21786         changelogs dated today.
21787
21788         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21789         (O_DIRECTORY): Remove; not needed here, since "." must be
21790         a directory.  All uses removed.
21791         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21792         universal on Suns, and we also need to test for IRIX.
21793         Revamp code to use 'if' rather than '#if'.
21794         Avoid unnecessary comparison of cwd->desc to 0.
21795
21796         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21797         for known valid error numbers rather than observed invalid ones.
21798
21799 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21800
21801         * modules/ullong_max: New file.
21802
21803         * modules/chdir-long, modules/openat: New files.
21804         * modules/save-cwd (Depends-on): Depend on chdir-long.
21805         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21806
21807 2005-01-18  Jim Meyering  <jim@meyering.net>
21808
21809         Merge from coreutils.
21810         * m4/chdir-long.m4, m4/openat.m4: New files.
21811         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21812         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21813         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21814         is sane and DOES follow symlinks.  Besides, testing 20 different
21815         systems found no broken chown implementations.
21816         Prompted by a change in rsync's copy of this macro.
21817         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21818
21819         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21820
21821         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21822         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21823         NULL-means-set-to-current-time semantics.
21824         Remove temporary file immediately, rather than waiting
21825         for configure's at-exit trap code to do it.
21826
21827 2005-01-18  Jim Meyering  <jim@meyering.net>
21828
21829         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21830
21831         * lib/utimens.c (futimens): Account for the fact that futimes
21832         can also fail with errno == ENOSYS or errno == ENOENT.
21833         Patch from Dmitry V. Levin.
21834
21835         Change the name of the robust chdir function from chdir to chdir_long.
21836         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21837         (restore_cwd): Use chdir_long, not chdir.
21838         * lib/chdir-long.c: Renamed from chdir.c.
21839         * lib/chdir-long.h: Renamed from chdir.h.
21840         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21841         Hurd.
21842
21843 2005-01-18  Bruno Haible  <bruno@clisp.org>
21844
21845         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21846         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21847         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21848         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21849         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21850         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21851         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21852         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21853         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21854         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21855         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21856         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21857         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21858         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21859         Use an all-permissive copyright notice, recommended by RMS.
21860
21861 2005-01-18  Bob Proulx  <bob@proulx.com>
21862
21863         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21864         simplify offsetof() macro construct to avoid compile failure with
21865         native HP-UX 11.0 ANSI C compiler.
21866
21867 2005-01-17  Bruno Haible  <bruno@clisp.org>
21868
21869         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21870         redundant because stpncpy.m4 takes care of it.
21871
21872 2005-01-17  Bruno Haible  <bruno@clisp.org>
21873
21874         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21875
21876 2005-01-17  Bruno Haible  <bruno@clisp.org>
21877
21878         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21879         used.
21880
21881 2005-01-17  Bruno Haible  <bruno@clisp.org>
21882
21883         * lib/fwriteerror.h (fwriteerror): Change specification to include
21884         fclose.
21885         * lib/fwriteerror.c: Include <stdbool.h>.
21886         (fwriteerror): At the end, close the file stream. Record whether
21887         stdout was already closed.
21888
21889 2005-01-17  Bruno Haible  <bruno@clisp.org>
21890
21891         * lib/execute.c (environ): Declare if needed.
21892         * lib/pipe.c (environ): Likewise.
21893         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21894
21895 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21896
21897         * modules/argp: Depend on vsnprintf
21898
21899 2005-01-10  Jim Meyering  <jim@meyering.net>
21900
21901         * modules/closeout (Depends-on): Add atexit.
21902
21903 2005-01-06  Bruno Haible  <bruno@clisp.org>
21904
21905         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21906
21907 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21908
21909         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21910         definitions to be after all include files, to avoid collisions.
21911         Problem reported by Bob Proulx.
21912
21913 2005-01-04  Jim Meyering  <jim@meyering.net>
21914
21915         Changes imported from coreutils.
21916         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21917         as the mkstemp template, use a temporary directory and an
21918         8.3-friendly template to avoid trouble on systems like DJGPP.
21919         Reported by Juan M. Guerrero via Stepan Kasal.
21920         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21921         close. Remove the temporary directory right away, rather than waiting
21922         for configure's at-exit trap code to do it.
21923         Suggestion from Stepan Kasal.
21924
21925 2005-01-01  Simon Josefsson  <jas@extundo.com>
21926
21927         * gnulib-tool: Print #include directives when --import'ing.
21928
21929 2004-12-28  Simon Josefsson  <jas@extundo.com>
21930
21931         * tests/test-base64.c: Include required header files.  Remove
21932         unused variables.
21933
21934 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21935
21936         * modules/error (Depends-on): Remove gettext.
21937
21938 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21939
21940         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21941         not needed.  This removes a dependency on the gettext module.
21942         [defined _LIBC]: Do not include <libintl.h>; not needed.
21943
21944 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21945
21946         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21947         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21948
21949 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21950
21951         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21952         HAVE_DECL_STRTOLD.
21953
21954 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21955
21956         * modules/getdate (Depends-on): Remove alloca-opt.
21957
21958 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21959
21960         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21961
21962 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21963
21964         * lib/argp-parse.c: Include <stddef.h>.
21965         (alignof, alignto): New macros.
21966         (parser_init): Don't assume that void * is aligned sufficiently
21967         for struct option.
21968
21969         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21970         need to extend the stack.
21971         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21972         large.
21973
21974 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21975
21976         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21977
21978 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21979
21980         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21981         (2004-10-24) change.  Apparently this was a false alarm.
21982
21983         * modules/getdate: Depend on alloca-opt, not alloca.
21984
21985 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21986
21987         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21988         Remove now-obsolete comment about AIX.
21989         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21990         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21991         (YYMAXDEPTH): New macro.
21992
21993 2004-12-18  Simon Josefsson  <jas@extundo.com>
21994
21995         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21996
21997 2004-12-18  Bruno Haible  <bruno@clisp.org>
21998
21999         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
22000
22001 2004-12-18  Bruno Haible  <bruno@clisp.org>
22002
22003         * lib/fatal-signal.c (fatal_signals): Make non-const.
22004         (init_fatal_signals): New function.
22005         (uninstall_handlers, install_handlers): Ignore signals that were set to
22006         SIG_IGN.
22007         (at_fatal_signal): Call init_fatal_signals.
22008         (init_fatal_signal_set): Likewise. Ignore signals that were set to
22009         SIG_IGN.
22010         Reported by Paul Eggert.
22011
22012 2004-12-18  Bruno Haible  <bruno@clisp.org>
22013
22014         * doc/alloca.texi: New file.
22015         * doc/alloca-opt.texi: New file.
22016
22017 2004-12-17  Jim Meyering  <jim@meyering.net>
22018
22019         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
22020         Otherwise, install-sh could exit with improper exit status when
22021         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
22022
22023 2004-12-16  Simon Josefsson  <jas@extundo.com>
22024
22025         * tests/test-base64.c: Add license.
22026
22027 2004-12-15  Stepan Kasal  <address@hidden>
22028
22029         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
22030
22031 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
22032
22033         * modules/getcwd (Files): Add m4/d-ino.m4.
22034         Suggested by Mark D. Baushke.
22035
22036 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
22037
22038         * lib/getdate.y (textint): New member "negative".
22039         (time_zone_hhmm): New function.
22040         Expect 14 shift-reduce conflicts, not 13.
22041         (o_colon_minutes): New rule.
22042         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
22043         (yylex): Set the "negative" member of signed numbers.
22044
22045 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
22046
22047         * doc/getdate.texi (Time of day items, Time zone items):
22048         Describe new formats +00:00, UTC+00:00.
22049
22050 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
22051
22052         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
22053         spurious "-l"s.  Problem reported by Stepan Kasal.
22054
22055 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
22056
22057         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
22058         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
22059
22060 2004-12-04  Simon Josefsson  <jas@extundo.com>
22061
22062         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
22063         Vandoorselaere <yoann@prelude-ids.org>.
22064
22065 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
22066
22067         Changes imported from coreutils.
22068         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
22069         exist.
22070         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
22071
22072 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
22073
22074         Changes imported from coreutils.
22075         * lib/hard-locale.c: Assume <locale.h> exists.
22076         Include "strdup.h".
22077         (GLIBC_VERSION): New macro.
22078         (hard_locale): Assume setlocale exists.
22079         Rewrite to avoid #ifdef.
22080         Use strdup rather than malloc + strcpy.
22081         * lib/human.c: Assume <locale.h> exists.
22082         (human_readable): Assume localeconv exists.
22083
22084 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
22085
22086         * modules/hard-locale (Depends-on): Add strdup.
22087
22088 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
22089
22090         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
22091         convert T2, not T.  (Imported from libc.)
22092
22093 2004-11-30  Simon Josefsson  <jas@extundo.com>
22094
22095         * modules/restrict (License): Change to LGPL.
22096
22097 2004-11-30  Simon Josefsson  <jas@extundo.com>
22098
22099         * m4/restrict.m4: Add copyright and copying conditions.
22100
22101 2004-11-30  Simon Josefsson  <jas@extundo.com>
22102
22103         * m4/base64.m4: New file.
22104
22105 2004-11-30  Simon Josefsson  <jas@extundo.com>
22106
22107         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
22108         base64.
22109
22110         * tests/test-base64.c: New file.
22111
22112         * modules/base64: New file.
22113
22114 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
22115
22116         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
22117         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
22118
22119         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
22120
22121 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
22122
22123         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
22124         (__getcwd.c): Don't restore errno; glibc doesn't.
22125         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
22126         first, falling back to our code only if its results look suspicious.
22127         Ensure that the resulting buffer is only as large as necessary.
22128
22129         * lib/readutmp.c: Include readutmp.h first.
22130         Include <errno.h>, since readutmp.h no longer does that.
22131         * lib/readutmp.h: Don't include <errno.h>,
22132         <sys/param.h>, <time.h>; not needed to establish interface.
22133         (errno): Remove decl.
22134         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
22135         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
22136         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
22137
22138 2004-11-28  Simon Josefsson  <jas@extundo.com>
22139
22140         * lib/base64.h, base64.c: New file.
22141
22142 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
22143
22144         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
22145
22146 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
22147
22148         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
22149         (Depends-on): Remove pathmax, same.  Add mempcpy.
22150         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
22151         (Makefile.am): Append getcwd.h to lib_SOURCES.
22152         (Include): Add getcwd.h.
22153         (Maintainer): Change from Jim Meyering to "all, glibc",
22154         since getdate now uses intended-for-glibc code.
22155         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
22156         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
22157
22158 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
22159
22160         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
22161         HP's ANSI C compiler.
22162         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
22163         Declaring int functions causes warnings on some modern systems and
22164         shouldn't be needed to compile on ancient ones.
22165         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
22166         defined.
22167
22168         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
22169         with the following changes.
22170         (__set_errno): Parenthesize properly.
22171         Include <stdbool.h>.
22172         (MIN, MAX, MATCHING_INO): New macros.
22173         (__getcwd): Define with prototype, not K&R form.
22174         Use heuristics to allocate default buffer on stack if possible.
22175         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
22176         behavior, and to avoid the PATH_MAX limit when computing
22177         ../../../../...
22178         Use MATCHING_INO to compare inode number to file.
22179         Check for arithmetic overflow in size calculations.
22180         Fix bug in reallocation of dot array that caused getcwd to fail
22181         on directories nested deeper than 75.
22182         Be more careful about saving errno on error.
22183         Do not use realloc; use only free+malloc, as this is a bit
22184         more flexible and avoids a needless copy operation.
22185         Do not inspect st_dev and st_ino for symbolic links; POSIX
22186         doesn't specify the latter.
22187         Check for closedir errors.
22188         Avoid needless casts.
22189         Use "#ifdef weak_alias" around weak_alias, to be like other
22190         glibc code.
22191         The following changes to getcwd.c have effect only when used in
22192         gnulib; they have no effect inside glibc proper.
22193         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
22194         as alloca isn't used.
22195         (alloca, __alloca): Likewise.
22196         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
22197         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22198         unconditionally, as gnulib assumes C89 or better.
22199         Do not include <sys/param.h>.
22200         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
22201         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
22202         better.
22203         (NULL) [!defined NULL]: Remove; we assume C89 or better.
22204         Include <dirent.h> in a way that is compatible with modern Autoconf.
22205         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
22206         New macros, if not already defined.
22207         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
22208         Use "_LIBC", not "defined _LIBC", for consistency.
22209         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
22210         a mempcpy module.
22211         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
22212         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
22213         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
22214         credit only to Jim Meyering and adjust the copyright dates.
22215         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
22216         <stdlib.h>, <unistd.h>, "pathmax.h".
22217         Instead, include "xgetcwd.h" (first) and "getcwd.h".
22218         (INITIAL_BUFFER_SIZE): Remove.
22219         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
22220
22221 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
22222
22223         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
22224         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
22225         Use the _ONCE methods, for efficiency.
22226         Check for fcntl.h.  In test program, include <errno.h>
22227         and <fcntl.h> if available.  Remove old K&R cruft from
22228         test program.  Check for common errors in GNU/Linux,
22229         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
22230         don't do AC_LIBOBJ, as that's getcwd.m4's job.
22231         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
22232         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
22233         name accordingly.
22234         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
22235         accommodate new getcwd.c.
22236         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
22237         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
22238         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
22239         that's all we need now.
22240
22241 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22242
22243         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
22244         argp-parse.c depends on getopt internals, that means we should
22245         always use our getopt, to be on the safe side.
22246         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
22247         order not to spoil the result of an eventual previous invocation
22248         of gl_GETOPT_SUBSTITUTE.
22249
22250 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22251
22252         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
22253         redefinition warnings. To avoid them, include the defines
22254         in `#if !defined __need_getopt ... #endif'. The only place
22255         where __getopt_argv_const is used is in definitions
22256         of getopt_long and getopt_long_only below, which are as well
22257         protected by `#ifndef __need_getopt'.
22258         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
22259         __need_getopt after including <stdio.h> and <unistd.h> These
22260         headers might have defined it.
22261
22262 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22263
22264         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
22265
22266 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22267
22268         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
22269         (futimens): New function, which uses futimes if available.
22270         (futimens, utimens): Support timespec==NULL, with same semantics
22271         as utime and utimens.
22272         * lib/utimens.h (futimens): New decl.
22273
22274 2004-11-23  Jim Meyering  <jim@meyering.net>
22275
22276         * lib/getopt_.h: Remove trailing blanks.
22277
22278 2004-11-23  Jim Meyering  <jim@meyering.net>
22279
22280         * lib/__fpending.c: Add comment.
22281
22282 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
22283
22284         * modules/canonicalize (Depends-on): Add xreadlink.
22285         Problem reported by James Youngman.
22286
22287 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
22288
22289         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
22290         New macros.
22291         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
22292         optopt): Use them instead of invoking ## directly; otherwise, the
22293         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
22294
22295 2004-11-19  Bruno Haible  <bruno@clisp.org>
22296
22297         * lib/strtok_r.c: Move comments from here...
22298         * lib/strtok_r.h: ... to here.
22299
22300 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22301
22302         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
22303         implementations that mishandle size_t overflow.
22304
22305 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22306
22307         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
22308         might fail.  Problem reported by Yoann Vandoorselaere.
22309         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
22310         implementations that mishandle size_t overflow.
22311
22312 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22313
22314         * modules/canon-host (Depends-on): Add strdup.
22315
22316 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22317
22318         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
22319
22320 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22321
22322         * lib/canon-host.c: Include "strdup.h".
22323         (canon_host): Use getaddrinfo if available, so that IPv6 works.
22324         Use strdup instead of malloc/strcpy to duplicate strings.
22325
22326         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
22327         (human_space_before_unit): New constant.
22328         * lib/human.c (human_readable): Support it.
22329
22330         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
22331         (xgetcwd): Set errno correctly when failing.
22332         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
22333         the failure is actually due to a PATH_MAX problem.
22334
22335         Further getopt changes to make it more likely that glibc will
22336         buy the changes back.
22337         * lib/getopt.c (POSIXLY_CORRECT): New constant.
22338         (getopt): Use it, so to preserve glibc semantic
22339         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
22340         when compiling for libc.
22341         * lib/getopt_.h (__getopt_argv_const): Bring it back.
22342         (getopt_long, getopt_long_only): Use it.
22343
22344         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22345         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
22346         (getopt): Argv is now char * const *, as per standard.
22347         (_getopt_internal_r, _getopt_internal): Argv is now char **,
22348         not char *__getopt_argv_const *.
22349         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22350         _getopt_long_only_r): Likewise.
22351         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
22352         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22353         _getopt_long_r, _getopt_long_only_r): Likewise.
22354         * lib/getopt_.h (__getopt_argv_const): Remove.
22355         (getopt): Argv is now char * const *, as per standard.
22356
22357         * lib/getdate.y (tORDINAL): New token.
22358         (day, relunit): Allow it for relative times.
22359         (relative_time_table): Use tORDINAL for ordinals.
22360
22361 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22362
22363         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
22364         Document that "second" isn't allowed as an ordinal number.
22365
22366 2004-11-16  Jim Meyering  <jim@meyering.net>
22367
22368         * modules/closeout (Depends-on): Add fpending.
22369
22370 2004-11-15  Jim Meyering  <jim@meyering.net>
22371
22372         * lib/closeout.c: Include "__fpending.h" once again.
22373         Include <stdbool.h>.
22374         (close_stdout): Don't fail just because stdout was closed initially,
22375         since some programs don't write to stdout in the normal course of
22376         operation (other than --version and --help), and we don't want this
22377         function to make e.g. `touch file >&-' fail.
22378         But do fail if it was closed and someone has tried to write to it.
22379         E.g., `printf foo >&-' must fail.
22380
22381 2004-11-13  Jim Meyering  <jim@meyering.net>
22382
22383         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
22384
22385 2004-11-12  Simon Josefsson  <jas@extundo.com>
22386
22387         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
22388         small doc fix is still pending.
22389
22390 2004-11-11  Simon Josefsson  <jas@extundo.com>
22391
22392         * modules/strtok_r: New file.
22393
22394         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22395         strtok_r.
22396
22397 2004-11-11  Simon Josefsson  <jas@extundo.com>
22398
22399         * m4/strtok_r.m4: New file.
22400
22401         * m4/getopt.m4: Replace opterr.
22402
22403 2004-11-11  Simon Josefsson  <jas@extundo.com>
22404
22405         * lib/strtok_r.h, strtok_r.c: New file.
22406
22407 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22408
22409         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
22410         of replacing opterr, getopt, etc.  This should handle the
22411         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
22412
22413 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22414
22415         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
22416         we can stop lying to compilers about the constness of argv when we
22417         are compiled outside glibc.
22418         (getopt, getopt_long, getopt_long_only): Use it.
22419         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22420         _getopt_internal, getopt): Likewise.
22421         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22422         _getopt_long_only_r): Likewise.
22423         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22424         _getopt_long_r, _getopt_long_only_r): Likewise.
22425
22426         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
22427         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
22428         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
22429         the other external symbols.
22430         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
22431         declaration, since the above renaming now works around collisions.
22432
22433 2004-11-11  Jim Meyering  <jim@meyering.net>
22434
22435         * lib/linebreak.c: Remove trailing blanks.
22436         * lib/alloca_.h: Likewise.
22437         * lib/acosl.c: Likewise.
22438         * lib/euidaccess.c: Likewise.
22439         * lib/allocsa.h: Likewise.
22440
22441 2004-11-10  Simon Josefsson  <jas@extundo.com>
22442
22443         * m4/getaddrinfo.m4: New file.
22444
22445 2004-11-10  Simon Josefsson  <jas@extundo.com>
22446
22447         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
22448
22449 2004-11-10  Simon Josefsson  <jas@extundo.com>
22450
22451         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22452         getaddrinfo.
22453
22454         * modules/getaddrinfo: New file.
22455
22456 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22457
22458         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
22459
22460 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22461
22462         * lib/mktime.c (SHR): New macro, which is a portable
22463         substitute for >> that should work even on Crays.
22464         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
22465         Problem reported by Mark D. Baushke in
22466         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
22467         * lib/getdate.y (SHR): Likewise.
22468         (tm_diff): Use it.
22469         * lib/strftime.c (SHR): Likewise.
22470         (tm_diff): Use it.
22471         * lib/quotearg.c (struct quoting_options): Use unsigned int for
22472         quote_these_too, so that right shifts are well defined.  All uses
22473         changed.
22474
22475 2004-11-10  Jim Meyering  <jim@meyering.net>
22476
22477         Ensure that no close failure goes unreported.
22478         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
22479         return early when it seems there's nothing to flush.
22480         Don't include __fpending.h.
22481
22482 2004-11-10  Jim Meyering  <jim@meyering.net>
22483
22484         * modules/closeout (Depends-on): Remove fpending.
22485
22486 2004-11-10  Jim Meyering  <jim@meyering.net>
22487
22488         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
22489
22490 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22491
22492         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
22493         gl_FUNC_STRFTIME.
22494         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
22495         and AC_REQUIRE when possible, to avoid duplicate checks.
22496         Check for <wchar.h>.
22497
22498 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22499
22500         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
22501
22502 2004-11-09  Bruno Haible  <bruno@clisp.org>
22503
22504         * m4/sockpfaf.m4: New file.
22505
22506 2004-11-05  Bruno Haible  <bruno@clisp.org>
22507
22508         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
22509         Reported by Mark D. Baushke <mdb@cvshome.org>.
22510
22511 2004-11-04  Bruno Haible  <bruno@clisp.org>
22512
22513         2004-09-11  Bruno Haible  <bruno@clisp.org>
22514                 * allocsa.valgrind: New file.
22515         2004-02-06  Bruno Haible  <bruno@clisp.org>
22516                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
22517                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
22518                 Reported by Christopher Seip <chris.seip@hp.com>.
22519
22520 2004-11-04  Bruno Haible  <bruno@clisp.org>
22521
22522         * modules/allocsa (Files): Add lib/allocsa.valgrind.
22523         (Makefile.am): Distribute it.
22524
22525 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
22526
22527         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
22528         with errno == ERANGE if the buffer is too small.
22529         Problem reported by Mark D. Baushke.
22530
22531 2004-11-03  Albert Chin  <china@thewrittenword.com>
22532             Paul Eggert  <eggert@cs.ucla.edu>
22533
22534         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
22535         equivalent, substitute $ac_type for equivalent type rather than
22536         blindly using uint32_t *always* which won't work if uint32_t is not
22537         available.  Define _UINT32_T to work around typedef of uint32_t if
22538         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
22539         2.5.1.
22540
22541 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22542
22543         * m4/jm-macros.m4: Sync from coreutils.
22544         (gl_MACROS): Check for mbrlen, for pathchk.
22545         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
22546
22547 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22548
22549         * lib/xreadlink.c (MAXSIZE): New macro.
22550         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
22551         size does not exceed MAXSIZE.  Avoid cast.
22552         As suggested by Mark D. Baushke in
22553         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
22554         if readlink fails with buffer size just under MAXSIZE, try again
22555         with MAXSIZE.
22556
22557 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22558
22559         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
22560
22561 2004-11-02  Derek R. Price  <derek@ximbiot.com>
22562         and  Paul Eggert  <eggert@cs.ucla.edu>
22563
22564         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
22565         (get_date): Overparenthesize to avoid GCC warning.
22566
22567 2004-11-02  Bruno Haible  <bruno@clisp.org>
22568
22569         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
22570         returns void.
22571
22572 2004-11-02  Bruno Haible  <bruno@clisp.org>
22573
22574         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
22575         function returns void.
22576
22577 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22578
22579         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
22580         fflush_unlocked, flockfile, funlockfile, funlockfile,
22581         fputs_unlocked, putc_unlocked.
22582
22583 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22584
22585         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22586         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
22587         already declared.
22588
22589 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22590
22591         * modules/getdate (Files): Add doc/getdate.texi.
22592         (Depends-on): Add setenv, xalloc.
22593
22594 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22595
22596         * lib/getdate.y: Add support for TZ="foo" within a date string.
22597         Fix some bugs near time_t boundaries.  Reject dates with
22598         out-of-range components, e.g., "Sept 31".
22599         Include <stdlib.h>, "setenv.h", "xalloc.h".
22600         (ISDIGIT_LOCALE): Remove; unused.
22601         Note that the TZ and time functions used here are not reentrant.
22602         (mktime_ok, get_tz): New functions.
22603         (TZBUFSIZE): New constant.
22604         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
22605         This requires that we sometimes generate our own TZ="XXX..." setting.
22606
22607 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22608
22609         * doc/getdate.texi: New file, from coreutils with modifications for
22610         the new TZ parsing.
22611
22612 2004-10-27  Derek R. Price  <derek@ximbiot.com>
22613
22614         * lib/mktime.c (not_equal_tm): Remove redundant check.
22615
22616 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22617
22618         * modules/regex (lib_SOURCES): Add regex.c.
22619         Reported by James Youngman in
22620         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
22621
22622 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22623
22624         * lib/getdate.y: Use Bison 1.875 features, and some minor
22625         code cleanups.  This change does not affect semantics.
22626         Don't include <stdlib.h>; no longer needed.
22627         Don't include unlocked-io.h; only the "#if TEST" code uses
22628         stdio, and performance isn't crucial there.
22629         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
22630         Bison 1.875 features as described below.
22631         All uses of "PC." replaced by "pc->".
22632         (YYSTYPE): Add a forward declaration.
22633         (yylex, yyerror): Use full prototypes in forward decls.
22634         Use "%pure-parser" rather than obsolescent "%pure_parser".
22635         Use %parse-param and %lex-param instead of obsolescent
22636         YYPARSE_PARAM and YYLEX_PARAM.
22637         (meridian_table, month_and_day_table, time_units_table,
22638         relative_time_table, time_zone_table, military_table,
22639         lookup_zone, lookup_word, get_date):
22640         Use NULL instead of 0 where appropriate.
22641         (to_hour): Avoid abort (), to avoid a dependency on
22642         stdlib.h.
22643         (yyerror, yylex): Now accepts parser_control * arg.
22644         (main) [TEST]: Use '\0' rather than 0 for char.
22645
22646 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22647
22648         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
22649
22650 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22651
22652         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
22653         It's now the caller's responsibility to handle the case where
22654         !HAVE_GETPAGESIZE && !defined getpagesize.
22655
22656         * lib/mktime.c (leapyear): Arg is long int, not int.
22657
22658 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
22659
22660         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
22661
22662 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
22663
22664         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
22665         missing.  Problem reported by James Youngman.
22666
22667 2004-10-16  Simon Josefsson  <jas@extundo.com>
22668
22669         * gnulib-tool: Fix comments.  Fix parse problem.
22670         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
22671
22672 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
22673
22674         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
22675         implementation of getopt_long.  Problem reported by Alexander Taler in:
22676         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
22677
22678 2004-10-15  Bruno Haible  <bruno@clisp.org>
22679
22680         * gnulib-tool: Untabify. Initialize supplied_libname.
22681         (func_usage): More homogenous output.
22682         (func_modules_transitive_closure, func_modules_to_filelist,
22683         func_emit_lib_Makefile_am): New functions.
22684         (func_import): New function, extracted from big case statement. Use
22685         func_get_license, func_modules_transitive_closure,
22686         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
22687         opt_lgpl. Don't use test -a, as it's not portable.
22688         (func_create_testdir): Use func_modules_transitive_closure,
22689         func_modules_to_filelist, func_emit_lib_Makefile_am.
22690
22691 2004-10-15  Bruno Haible  <bruno@clisp.org>
22692
22693         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
22694
22695 2004-10-15  Bruno Haible  <bruno@clisp.org>
22696
22697         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
22698         the portions belonging to each module.
22699         Suggested by Derek Robert Price <derek@ximbiot.com>.
22700
22701 2004-10-12  Simon Josefsson  <jas@extundo.com>
22702
22703         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22704         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22705         to real functions.
22706
22707 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22708
22709         * modules/vsnprintf: New file.
22710
22711 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22712
22713         * m4/vsnprintf.m4: New file.
22714
22715 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22716
22717         * lib/vsnprintf.h: New file.
22718         * lib/vsnprintf.c: New file.
22719
22720 2004-10-11  Bruno Haible  <bruno@clisp.org>
22721
22722         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22723         vsnprintf.
22724
22725 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22726
22727         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22728
22729 2004-10-07  Bruno Haible  <bruno@clisp.org>
22730
22731         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22732         fits into the provided buffer.
22733
22734 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22735
22736         * lib/diacrit.c, diacrit.h: Add GPL notice.
22737
22738         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22739         notice.
22740         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22741         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22742         This avoids a potential constant-folding bug.
22743
22744 2004-10-05  Bruno Haible  <bruno@clisp.org>
22745
22746         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22747         for the declaration of strsep.
22748
22749 2004-10-05  Bruno Haible  <bruno@clisp.org>
22750
22751         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22752
22753 2004-10-04  Simon Josefsson  <jas@extundo.com>
22754
22755         * modules/memmem: New file.
22756         * tests/test-memmem.c: New file.
22757         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22758
22759 2004-10-04  Simon Josefsson  <jas@extundo.com>
22760
22761         * m4/memmem.m4: New file.
22762
22763 2004-10-04  Simon Josefsson  <jas@extundo.com>
22764
22765         * lib/memmem.h: New file.
22766         * lib/memmem.c: New file, taken from glibc.
22767
22768 2004-10-04  Simon Josefsson  <jas@extundo.com>
22769
22770         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22771         '#ifdef USE_UNLOCKED_IO'.
22772
22773 2004-10-04  Simon Josefsson  <jas@extundo.com>
22774
22775         * config/srclist.txt: Add memmem from glibc.
22776
22777 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22778
22779         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22780
22781         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22782         modules/exclude, modules/getdate, modules/getline,
22783         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22784         modules/getusershell, modules/linebuffer, modules/md5,
22785         modules/mountlist, modules/posixtm, modules/readtokens,
22786         modules/readutmp, modules/regex, modules/sha1,
22787         modules/version-etc, modules/yesno:
22788         Remove dependency on unlocked-io.
22789
22790 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22791
22792         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22793
22794         * m4/unlocked-io.m4: Add copyright notice.
22795         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22796
22797 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22798
22799         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22800         * lib/xmalloc.c (xmemdup): Likewise.
22801         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22802         XFREE): Remove these long-obsolescent macros.
22803         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22804         * lib/xstrdup.c: Remove.
22805
22806         * lib/regex.c (re_comp): Cast gettext return value to char *,
22807         Problem reported by Martin Neitzel via Mark D. Baushke.
22808
22809 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22810
22811         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22812         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22813         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22814         regex.c, sha1.c, version-etc.c, yesno.c:
22815         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22816         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22817         the includer's responsibility.
22818
22819         Sync from coreutils.
22820
22821         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22822         points to the start of a string, as the C Standard says the
22823         resulting behavior is undefined.
22824
22825         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22826         simple -> simple_backups, numbered_existing ->
22827         numbered_existing_backups, numbered -> numbered_backups
22828         to avoid shadowing problems.  All uses changed.
22829         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22830         * lib/backupfile.c (check_extension, numbered_backup):
22831         Rename locals to avoid shadowing 'basename'.
22832         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22833         once.
22834
22835         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22836         * lib/.cvsignore: Add getopt.h.
22837
22838 2004-10-04  Bruno Haible  <bruno@clisp.org>
22839
22840         * modules/README: New file.
22841         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22842         not a module.
22843
22844 2004-10-02  Jim Meyering  <jim@meyering.net>
22845
22846         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22847
22848 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22849
22850         * modules/strsep: New file.
22851
22852 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22853
22854         * m4/strsep.m4: New file.
22855
22856 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22857
22858         * lib/strsep.h: New file.
22859         * lib/strsep.c: New file.
22860
22861 2004-10-01  Simon Josefsson  <jas@extundo.com>
22862
22863         * lib/snprintf.c (snprintf): Handle size==0.
22864
22865 2004-10-01  Simon Josefsson  <jas@extundo.com>
22866             Bruno Haible  <bruno@clisp.org>
22867
22868         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22869         (snprintf): Declare 'args'.
22870
22871 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22872
22873         * lib/snprintf.c: Remove comments as to why each header is needed.
22874
22875 2004-10-01  Bruno Haible  <bruno@clisp.org>
22876
22877         * MODULES.html.sh: Add strsep.
22878
22879 2004-09-30  Simon Josefsson  <jas@extundo.com>
22880
22881         * modules/snprintf: New file.
22882
22883 2004-09-30  Simon Josefsson  <jas@extundo.com>
22884
22885         * m4/snprintf.m4: New file.
22886
22887 2004-09-30  Simon Josefsson  <jas@extundo.com>
22888
22889         * lib/snprintf.h, lib/snprintf.c: New files.
22890
22891 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22892
22893         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22894         (hol_entry_help): Never translate an empty string.
22895         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22896         * lib/argp.h (OPTION_NO_TRANS): New option.
22897
22898 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22899
22900         * modules/argp (Maintainer): Replace Simon Josefsson
22901         by Sergey Poznyakoff.
22902
22903 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22904
22905         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22906         changes merged back into glibc.
22907
22908 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22909
22910         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22911
22912 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22913
22914         * lib/xvasprintf.c: Include xalloc.h.
22915         (xvasprintf): Use xalloc_die, not xmalloc_die.
22916
22917 2004-09-29  Bruno Haible  <bruno@clisp.org>
22918
22919         * modules/alloca-opt: New file, derived from modules/alloca.
22920         * modules/allocsa: Depend on alloca-opt instead of alloca.
22921         * modules/setenv: Likewise.
22922         * modules/vasnprintf: Likewise.
22923         * MODULES.html.sh: Add alloca-opt.
22924
22925 2004-09-28  Simon Josefsson  <jas@extundo.com>
22926
22927         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22928         LGPL, and to replace license template from GPL to LGPL.
22929
22930 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22931
22932         * modules/dummy: Change license to LGPL.
22933
22934 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22935
22936         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22937
22938 2004-09-24  Simon Josefsson  <jas@extundo.com>
22939
22940         * modules/minmax (License): Change from GPL to LGPL.
22941
22942 2004-09-23  Simon Josefsson  <jas@extundo.com>
22943
22944         * gnulib-tool (--import): Typo.
22945
22946 2004-09-23  Simon Josefsson  <jas@extundo.com>
22947
22948         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22949
22950 2004-09-22  Bruno Haible  <bruno@clisp.org>
22951
22952         * modules/*: Add 'License' field.
22953         * gnulib-tool: Accept --extract-license option.
22954         (func_get_license): New function.
22955
22956 2004-09-21  Bruno Haible  <bruno@clisp.org>
22957
22958         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22959         Reported by Simon Josefsson.
22960
22961 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22962
22963         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22964         gl_AC_TYPE_LONG_LONG.
22965
22966 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22967
22968         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22969
22970 2004-09-18  Simon Josefsson  <jas@extundo.com>
22971         and  Paul Eggert  <eggert@cs.ucla.edu>
22972
22973         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22974         calls with autoreconf.  Define GL_LIB.
22975
22976 2004-09-14  Karl Berry  <karl@gnu.org>
22977
22978         * config/srclist.txt: unsync setenv.c, sigh.
22979
22980 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22981
22982         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22983         Problem reported by Bruno Haible in:
22984         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22985
22986 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22987
22988         * config/srclist.txt: Comment out argp-pvh.c.
22989
22990 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22991
22992         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22993         in case some system header has #define'd it.  Problem reported by
22994         Soeren D. Schulze in
22995         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22996
22997 2004-09-09  Karl Berry  <karl@gnu.org>
22998
22999         * regex.[ch]: delete from the root.  These were supposed to be
23000                 synced with emacs cvs, but this has not happened for about
23001                 a year, and anyway nothing else uses emacs regex.[ch].
23002                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
23003                 lib/regex[.ch] is untouched.
23004
23005 2004-09-09  Bruno Haible  <bruno@clisp.org>
23006
23007         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
23008
23009 2004-09-09  Bruno Haible  <bruno@clisp.org>
23010
23011         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
23012         modifications.
23013         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
23014
23015 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
23016
23017         * modules/xvasprintf: New file.
23018         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
23019
23020 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
23021
23022         * lib/xvasprintf.h: New file.
23023         * lib/xvasprintf.c: New file.
23024         * lib/xasprintf.c: New file.
23025
23026 2004-09-08  Bruno Haible  <bruno@clisp.org>
23027
23028         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
23029
23030 2004-09-08  Bruno Haible  <bruno@clisp.org>
23031
23032         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
23033         length is > INT_MAX.
23034         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
23035         more.
23036
23037 2004-09-08  Bruno Haible  <bruno@clisp.org>
23038
23039         * lib/stdint_.h: New file, taken from GNU clisp.
23040
23041 2004-09-08  Bruno Haible  <bruno@clisp.org>
23042             Oskar Liljeblad  <oskar@osk.mine.nu>
23043
23044         * modules/stdint: New file.
23045         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
23046
23047 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
23048
23049         Import from coreutils.
23050         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
23051         strings on unbounded length.  alloca's performance benefits aren't
23052         that important here.
23053         (V_STRDUP): Remove.
23054         (parse_with_separator): New function, with most of the internals
23055         of the old parse_user_spec.  Allow user to omit both user and group,
23056         for compatibility with FreeBSD.
23057         Clone only the user name, not the entire spec.
23058         Do not set *uid, *gid unless entirely successful.
23059         Avoid memory leak in some failing cases.
23060         Fix regression for USER.GROUP reported by Dmitry V. Levin in
23061         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
23062         (parse_user_spec): Rewrite to use parse_with_separator.
23063
23064 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
23065
23066         * modules/userspec: Don't depend on alloca.
23067
23068 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
23069
23070         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
23071
23072 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
23073
23074         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
23075         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
23076         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
23077
23078 2004-08-16  Simon Josefsson  <jas@extundo.com>
23079
23080         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
23081         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
23082         Add --dry-run for --import.
23083         Let user provided command line parameters override configure.ac
23084         settings.
23085
23086 2004-08-12  Simon Josefsson  <jas@extundo.com>
23087
23088         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
23089         as discussed with Paul Eggert in threads rooted at
23090         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
23091         and
23092         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
23093         Before, the test was empty, and relied on ELIDE_CODE in source
23094         code.)
23095         (gl_PREREQ_GETOPT): New macro.
23096         (gl_GETOPT): Use them.
23097
23098 2004-08-12  Simon Josefsson  <jas@extundo.com>
23099
23100         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
23101         * lib/getopt_.h: Renamed from getopt.h.
23102
23103 2004-08-12  Simon Josefsson  <jas@extundo.com>
23104
23105         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
23106         Change default library name from libfoo to libgnu.
23107         Now, if you have a configure.ac that says:
23108                 gl_SOURCE_BASE(gl)
23109                 gl_M4_BASE(gl/m4)
23110                 gl_MODULES(error getopt etcetera)
23111                 gl_INIT
23112         you can import all you need by running:
23113                 ../gnulib/gnulib-tool --import
23114
23115         * modules/getopt (Files): Rename getopt.h to getopt_.h.
23116         (Makefile.am): Rewrite, use logic from argz.
23117         (Include): Use <getopt.h> instead of "getopt.h".
23118
23119 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
23120
23121         * modules/argp (Files): Add m4/unlocked-io.m4.
23122         (Depends-on): Add extensions.
23123
23124 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
23125
23126         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
23127         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
23128         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
23129         Check for program_invocation_name, program_invocation_short_name,
23130         flockfile, funlockfile, features.h, _getopt_long_only_r.
23131
23132 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
23133
23134         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
23135         its complicated substitute.
23136         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
23137         and program_invocation_name.
23138         (__argp_basename) [!_LIBC]: Remove; the only use was
23139         replaced by its body.
23140         (__argp_short_program_name): Change condition from
23141         !defined __argp_short_program_name to
23142         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
23143         to match argp-namefrob.h.
23144         (__argp_failure): Don't assume strerror_r returns char *.
23145         * lib/argp-parse.c (N_): Define unconditionally.
23146         (argp_default_options): Fill out initializers with 0 to avoid
23147         gcc warnings.
23148
23149 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
23150
23151         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
23152         getopt1.c.
23153
23154 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
23155
23156         Merge from coreutils.
23157
23158         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
23159
23160         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
23161         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
23162
23163 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
23164
23165         Merge from coreutils.
23166
23167         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
23168         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
23169         for Reliant Unix 5.43.
23170
23171         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
23172         (union fooround): Use uintmax_t, not long int.
23173         The rest is a merge from libc:
23174         [defined _LIBC]: Include <shlib-compat.h>.
23175         (_obstack) [defined _LIBC]: Remove after 2.3.4.
23176
23177         * lib/settime.c (settime): Recode to avoid warning with
23178         Sun Forte C 6U2.
23179
23180         * lib/strverscmp.c: Convert to UTF-8.
23181
23182 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
23183
23184         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
23185         m4/uintmax_t.m4.
23186
23187 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23188
23189         * modules/xalloc-die: New file.
23190         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
23191
23192         * modules/md5 (Files): Add m4/uint32_t.m4.
23193         * modules/sha1: Renamed from modules/sha.
23194         (Files):
23195         Rename lib/sha.h to lib/sha1.h.
23196         Rename lib/sha.c to lib/sha1.c.
23197         Rename m4/sha.m4 to m4/sha1.m4.
23198         (lib_SOURCES): Likewise.
23199         (configure.ac): Rename gl_SHA to gl_SHA1.
23200         (Include): sha.h -> sha1.h.
23201
23202 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23203
23204         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
23205         * m4/sha1.m4: Renamed from sha.m4.
23206         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
23207
23208 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23209
23210         * lib/obstack.h (obstack_empty_p):
23211         Don't assume that chunk->contents is suitably aligned.
23212         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
23213         Likewise. Problem reported by Benno in
23214         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
23215
23216         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
23217         readable.  This could be improved further but it'd take some work.
23218
23219 2004-08-08  Simon Josefsson  <jas@extundo.com>
23220
23221         * modules/xgethostname (Depends-on): Remove exit and error (not
23222         used).
23223
23224         * modules/getpass-gnu: Add getpass.h.
23225         (Depends-on): Add stdbool.
23226         * modules/getpass: Add getpass.h.
23227
23228 2004-08-08  Simon Josefsson  <jas@extundo.com>
23229
23230         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
23231         Check getpass declaration.
23232
23233 2004-08-08  Simon Josefsson  <jas@extundo.com>
23234
23235         * lib/xgethostname.c: Don't include error.h (not used).
23236
23237         * lib/getpass.h: Add.
23238         * lib/getpass.c: Include getpass.h first.
23239
23240 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
23241
23242         * lib/xalloc-die.c: New file.
23243         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
23244         All uses removed.
23245         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
23246         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
23247         xalloc-die.c.
23248         (_, N_, xalloc_die): Move to xalloc-die.c.
23249         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
23250         so that we needn't mess with xalloc_msg_memory_exhausted.
23251
23252         * lib/sha1.h: Renamed from sha.h.
23253         (SHA1_H): Renamed from _SHA_H.
23254         (sha1_ctx): Renamed from sha_ctx.
23255         (sha1_init_ctx): Renamed from sha_init_ctx.
23256         (sha1_process_block): Renamed from sha_process_block.
23257         (sha1_process_bytes): Renamed from sha_process_bytes.
23258         (sha1_finish_ctx): Renamed from sha_finish_ctx.
23259         (sha1_read_ctx): Renamed from sha_read_ctx.
23260         (sha1_stream): Renamed from sha_stream.
23261         (sha1_buffer): Renamed from sha_buffer.
23262         * lib/sha1.c: Likewise; renamed from sha.c.
23263         Do not include <sys/types.h>.
23264         Include <stddef.h> rather than <stdlib.h>.
23265
23266 2004-08-08  Bruno Haible  <bruno@clisp.org>
23267
23268         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
23269         FILESYSTEM_PREFIX_LEN.
23270         * lib/progreloc.c: Likewise.
23271         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
23272
23273 2004-08-06  Simon Josefsson  <jas@extundo.com>
23274
23275         * modules/progname (Depends-on): Don't depend on stdbool.
23276
23277 2004-08-06  Simon Josefsson  <jas@extundo.com>
23278
23279         * modules/getsubopt: New file.
23280         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
23281         getsubopt.
23282
23283 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23284
23285         More merge from coreutils.
23286
23287         * m4/utimens.m4, m4/utimecmp.m4: New files.
23288         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
23289         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
23290         prereq.m4, sha.m4: Import changes from coreutils.
23291
23292 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23293
23294         More merge from coreutils.
23295         * modules/raise, modules/readtokens0, modules/utimens:
23296         * modules/utimecmp, module/xnanosleep: New files.
23297         * modules/strftime: Add lib/strftime.h.
23298         Change include from <time.h> to "strftime.h".
23299         * modules/yesno: Add lib/yesno.h.
23300         * modules/backupfile: Remove lib/addext.c.
23301         * modules/euidaccess: Add stat-macros.h.
23302         * modules/canonicalize, modules/euidaccess,
23303         modules/filemode, modules/lchown, modules/makepath,
23304         modules/rmdir, modules/stat: Likewise.
23305
23306 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23307
23308         Merge from tar.
23309         * lib/argp-help.c (make_hol, hol_append): Don't assume that
23310         SIZE_MAX is a valid preprocessor constant.
23311         (__argp_basename): Change from "#ifndef _LIBC"
23312         to "#ifndef __argp_short_program_name", so that
23313         we don't compile these functions for tar.
23314
23315         More merges from coreutils.
23316         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
23317         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
23318         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
23319         * lib/addext.c: Remove; no longer needed.
23320         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
23321         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
23322         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
23323         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
23324         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
23325         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
23326         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
23327         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
23328         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
23329         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
23330         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
23331         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
23332         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
23333         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
23334         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
23335         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
23336         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
23337         Import changes from coreutils.
23338
23339 2004-08-05  Simon Josefsson  <jas@extundo.com>
23340
23341         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
23342
23343 2004-08-05  Simon Josefsson  <jas@extundo.com>
23344
23345         * m4/getsubopt.m4: New file.
23346
23347 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23348
23349         Merge from coreutils.
23350
23351         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
23352         * m4/getcwd-path-max.m4: New files.
23353
23354         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
23355         FILESYSTEM_PREFIX_LEN ->
23356         FILE_SYSTEM_PREFIX_LEN.
23357         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
23358         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
23359         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
23360         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
23361
23362         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
23363         prerequisite modules now handle the DOS stuff.
23364         Don't check for unistd.h.
23365
23366 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23367
23368         Merge from coreutils.
23369
23370         * lib/.gdb-history: Remove; this doesn't belong here.
23371
23372         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
23373         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
23374         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
23375         * lib/getcwd.c: New files.
23376
23377         * lib/dirname.h: Include <stdbool.h>.
23378         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
23379         for consistency with POSIX terminology.  All uses changed.
23380         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
23381         (strip_trailing_slashes): Use bool for booleans.
23382         * lib/stripslash.c (strip_trailing_slashes): Likewise.
23383
23384         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
23385         sometimes returns a positive errno value even when it succeeds.
23386         (print_errno_message) [!LIBC]: Fall back on strerror if
23387         __strerror_r fails.
23388
23389         * lib/path-concat.c (mempcpy): Don't define if a system header defines
23390         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
23391         (longest_relative_suffix): New function.
23392         (path_concat): Use it.  Assume first argument is not NULL.
23393         Port to DOS.  Omit redundant separators.
23394         Report an error instead of returning NULL.
23395         Use mempcpy instead of memcpy.
23396         (xpath_concat): Remove: not declared or used.
23397
23398         * lib/same.h: Include <stdbool.h>
23399         (same_name): Return bool, not int.
23400         * lib/same.c (same_name): Likewise.
23401         (errno): Don't declare; we assume C89 or better now.
23402
23403         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
23404         if not already defined.
23405
23406         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
23407         * lib/dup-safer.c (errno): Likewise.
23408
23409 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23410
23411         Merge from coreutils.
23412         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
23413         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
23414         * modules/path-concat: Don't depend on strdup.
23415
23416 2004-08-03  Simon Josefsson  <jas@extundo.com>
23417
23418         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
23419         * lib/progname.h: Don't include stdbool.h.
23420
23421 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23422
23423         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
23424         * MODULES.html.sh (func_all_modules): Remove fatal.
23425
23426 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23427
23428         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
23429
23430 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23431
23432         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
23433         working.
23434
23435 2004-08-02  Simon Josefsson  <jas@extundo.com>
23436
23437         * lib/getsubopt.h: New file, with comments from Bruno Haible.
23438         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
23439         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
23440
23441 2004-08-01  Simon Josefsson  <jas@extundo.com>
23442
23443         * lib/xgetdomainname.c: Include stdlib.h, for free().
23444
23445 2004-07-19  Bruno Haible  <bruno@clisp.org>
23446
23447         * MODULES.html.sh (func_all_modules): Add dummy.
23448
23449 2004-07-16  Simon Josefsson  <jas@extundo.com>
23450
23451         * modules/dummy: New file.
23452
23453 2004-07-16  Simon Josefsson  <jas@extundo.com>
23454
23455         * lib/dummy.c: New file.
23456
23457 2004-07-16  Bruno Haible  <bruno@clisp.org>
23458
23459         * lib/backupfile.h: Add extern "C" for C++.
23460         * lib/closeout.h: Likewise.
23461         * lib/copy-file.h: Likewise.
23462         * lib/findprog.h: Likewise.
23463         * lib/full-write.h: Likewise.
23464         * lib/pathname.h: Likewise.
23465         * lib/progname.h: Likewise.
23466         * lib/stpcpy.h: Likewise.
23467         * lib/stpncpy.h: Likewise.
23468         * lib/strcase.h: Likewise.
23469         * lib/strstr.h: Likewise.
23470         * lib/xalloc.h: Likewise.
23471
23472         * lib/mbswidth.h: Add extern "C" for C++.
23473         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
23474
23475 2004-07-13  Robert Millan  <robertmh@gnu.org>
23476
23477         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
23478
23479 2004-07-09  Simon Josefsson  <jas@extundo.com>
23480
23481         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
23482         failed without this.)
23483
23484 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23485
23486         * modules/chown (Files): Add lib/fchown-stub.c, since
23487         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
23488
23489 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23490
23491         * lib/fchown-stub.c: New file.
23492
23493 2004-06-24  Jim Meyering  <jim@meyering.net>
23494
23495         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
23496
23497 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23498
23499         * modules/argz: Omit "#include".
23500
23501         * MODULES.html.sh (func_all_modules): Add calloc, to match
23502         2004-06-01 addition of calloc module.
23503
23504 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23505
23506         * m4/argz.m4: New file, which is autoupdated from libtool.
23507
23508 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23509
23510         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
23511         libtool.
23512
23513 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23514
23515         * config/srclist-update: Don't insist on "USA." before the
23516         close-comment, as libtool omits the period and puts the */ on a
23517         separate line.
23518         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
23519         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
23520
23521 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
23522
23523         * modules/argz: New file.
23524         * MODULES.html.sh (func_all_modules): Add argz.
23525
23526 2004-06-12  Jim Meyering  <jim@meyering.net>
23527         and  Paul Eggert  <eggert@cs.ucla.edu>
23528
23529         * modules/hash (Files): Add lib/xalloc.h.
23530         * modules/pipe (Depends-on): Add wait-process.
23531         * modules/stat (Depends-on): Add xalloc.
23532         * modules/userspec (Files): Add lib/userspec.h.
23533         * modules/xstrto
23534
23535         Upgrade from gettext-0.13.
23536         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
23537         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
23538         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
23539
23540 2004-06-10  Jim Meyering  <jim@meyering.net>
23541
23542         * lib/calloc.c: New file.
23543
23544 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
23545
23546         * lib/getdate.y (yylex): Allow space between sign and number.
23547         Problem reported by Dan Jacobson.
23548
23549 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23550
23551         Merge from coreutils CVS.
23552
23553         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
23554         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
23555         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
23556         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
23557         xstrtol.m4: Fix copyright date and/or serial number.
23558
23559         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
23560         See if we need an fchown replacement.
23561         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
23562         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
23563         and use the replacement function if we detect either defect.
23564
23565         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
23566         gl_UTIMECMP.
23567
23568 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23569         and  Jim Meyering  <jim@meyering.net>
23570
23571         Merge from coreutils CVS.
23572
23573         * lib/stat-macros.h: New file, with contents from file-type.h
23574         and coreutils' system.h.
23575         * lib/file-type.c: Include "stat-macros.h".
23576         * lib/file-type.h (file_type): Move all macro definitions to new file,
23577         stat-macros.h.
23578
23579         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
23580         Wrap old code with this conditional.
23581         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
23582         function that does not dereference symlinks.
23583         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
23584
23585         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
23586         dependency problems.
23587         (xreadlink): Accept new arg SIZE, for efficiency.
23588         All decls and uses changed.
23589         * lib/xreadlink.h: Include <stddef.h>, for size_t.
23590
23591         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
23592         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
23593
23594         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
23595         sysexits.h.
23596
23597 2004-06-01  Jim Meyering  <jim@meyering.net>
23598
23599         * m4/calloc.m4: New file.
23600
23601 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
23602
23603         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
23604         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
23605         Also, fix a typo in a diagnostic.
23606
23607 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23608
23609         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
23610         or AC_FUNC_REALLOC.
23611
23612 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23613
23614         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
23615         macros to be defined.
23616         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
23617         the allocator returns NULL because the requested size is zero.
23618
23619 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
23620
23621         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
23622         var.  Add comment explaining why libc still defines it.  This
23623         merges the following patch from glibc:
23624         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
23625
23626 2004-05-20  Andreas Schwab  <schwab@suse.de>
23627
23628         * m4/free.m4: Replace free if it not known to work, not the other
23629         way round.
23630
23631 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
23632
23633         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
23634         present in glibc since revision 1.1 of this file.
23635         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
23636         obstack_alignment_mask, obstack_alloc, obstack_base,
23637         obstack_blank, obstack_blank_fast, obstack_chunk_size,
23638         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
23639         obstack_grow0, obstack_init, obstack_int_grow,
23640         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
23641         obstack_next_free, obstack_object_size, obstack_ptr_grow,
23642         obstack_ptr_grow_fast, obstack_room): Remove declarations of
23643         nonexistent functions.
23644
23645 2004-05-18  Karl Berry  <karl@gnu.org>
23646
23647         * config/srclist.txt: break link for vasnprintf.c.
23648
23649 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23650
23651         Port obstack to the AS/400, where pointers are 16 bytes wide and
23652         you cannot cast an integer to a valid pointer.  This patch is
23653         currently waiting to be integrated into glibc; see
23654         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
23655
23656         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
23657         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
23658         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
23659         (struct obstack): temp member is now a union of a pointer and
23660         an integer, instead of an integer.  All integer uses changed.
23661         This does not affect the physical layout of struct obstack,
23662         except on hosts (like the AS/400) where the size or alignment of
23663         void * is greater than that of ptrdiff_t.
23664         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
23665         __STDC__)]: Store temporary in pointer member of union, not
23666         integer member.
23667         * lib/obstack.c: Include <stddef.h>, for offsetof.
23668         (struct fooalign): Remove; it doesn't need a name.
23669         (union fooround): Change double to long double, and add void *.
23670         (DEFAULT_ALIGNMENT): Use offsetof to compute.
23671         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
23672         not a macro.  Hence the values are always int; so remove all
23673         casts-to-int in uses.
23674
23675 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23676
23677         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
23678         we can get this patch merged into glibc.
23679
23680 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23681             Paul Eggert  <eggert@cs.ucla.edu>
23682
23683         * m4/argp: Depend on alloca.
23684
23685 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23686             Paul Eggert  <eggert@cs.ucla.edu>
23687
23688         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
23689         freecoding.
23690
23691 2004-05-17  Bruno Haible  <bruno@clisp.org>
23692
23693         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
23694         precision that consists of a '.' followed by an empty digit string.
23695         Patch by Tor Lillqvist <tml@iki.fi>.
23696
23697 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23698
23699         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23700         for backward compatibility with older code.  We need our own
23701         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23702         it under some other name, and our alloca.h will define it.
23703
23704 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23705             Derek Price  <derek@ximbiot.com>
23706
23707         * lib/alloca.c: Include <alloca.h>, to get our interface.
23708         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23709         include <alloca.h> first.  Use C89 prototype for alloca; this
23710         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23711         Use #elif for simplicity, since we can assume C89 now.
23712         Don't try to source the system alloca.h since it will not be found
23713         and to prevent recursively including its replacement.
23714         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23715         * lib/regex.c: Likewise.
23716
23717 2004-05-16  Derek Price  <derek@ximbiot.com>
23718             Paul Eggert  <eggert@cs.ucla.edu>
23719
23720         getline cleanup.  This changes the getndelim2 API: both order of
23721         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23722         no delimiter).
23723
23724         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23725         interface does that.
23726         (getline): Always use getdelim, so that we don't have two
23727         copies of this code.
23728         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23729         if available.
23730         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23731         (GETNDELIM2_MAXIMUM): New macro.
23732         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23733         instead of the old practice of delim2==0.  All callers changed.
23734         Return -1 on overflow, instead of returning junk.
23735         Do not set *linesize unless allocation succeeds.
23736         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23737         that we include sys/types.h.
23738         * lib/getnline.h: Likewise.
23739         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23740         (getndelim2): Reorder arguments.
23741         * lib/getnline.c (getnline, getndelim):
23742         Don't discard the NMAX argument.
23743         (getnline): Invoke getndelim, to avoid code duplication.
23744         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23745         of (size_t) -1 by callers of the getnline family.
23746
23747 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23748
23749         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23750         Check for gettimeofday.
23751         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23752         Check for settimeofday, stime.
23753
23754 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23755
23756         * lib/nanosleep.c (suspended): Change its type from int to
23757         sig_atomic_t volatile.
23758         (first_call): Make it private to rpl_nanosleep, and have it
23759         be zero initially as that's a bit faster.
23760         (my_usleep): Round up fractional times instead of truncating them,
23761         as this is the usual meaning for 'sleep'.
23762
23763         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23764         doesn't work.
23765         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23766         (ENOSYS): Define if not defined.
23767         (settime): Fall back on stime if it exists and settimeofday fails.
23768         But don't bother with fallbacks if a method fails with errno == EPERM.
23769
23770 2004-05-11  Jim Meyering  <jim@meyering.net>
23771
23772         Prior to this change, the save_cwd caller required read access to the
23773         current directory on most systems (ones with the fchdir function).
23774
23775         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23776         fails, try write-only, and finally, resort to using xgetcwd.
23777
23778 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23779
23780         * lib/obstack.c, obstack.h: Import changes from libc.
23781
23782 2004-04-28  Bruno Haible  <bruno@clisp.org>
23783
23784         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23785         also implicitly appends .exe to executables.
23786         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23787         accepts Windows pathnames.
23788         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23789         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23790         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23791         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23792         Reported by Derek Robert Price <derek@ximbiot.com>.
23793
23794 2004-04-21  Karl Berry  <karl@gnu.org>
23795
23796         * config/srclist.txt (localcharset.c): break sync.
23797
23798 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23799
23800         * m4/host-os.m4: Add a copyright notice.
23801
23802 2004-04-20  Jim Meyering  <jim@meyering.net>
23803
23804         Change UTILS_ to gl_ in AC_DEFINE'd names.
23805         Change utils_- and jm_-prefixed variables, too.
23806         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23807         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23808         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23809
23810         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23811         Don't emit trailing blanks.
23812         Also rename jm_-prefixed variables to have gl_ prefix.
23813
23814         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23815         Also rename jm_-prefixed variables to have gl_ prefix.
23816
23817         * m4/jm-macros.m4: Reflect the renamings.
23818         * m4/prereq.m4: Likewise.
23819
23820 2004-04-20  Jim Meyering  <jim@meyering.net>
23821
23822         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23823         memory.
23824
23825 2004-04-20  Jim Meyering  <jim@meyering.net>
23826             Bruno Haible  <bruno@clisp.org>
23827
23828         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23829         memory when realloc fails.
23830
23831 2004-04-19  Jim Meyering  <jim@meyering.net>
23832
23833         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23834         now that readutmp.c may call `free (0)'.
23835
23836 2004-04-19  Bruno Haible  <bruno@clisp.org>
23837
23838         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23839         * m4/inttypes_h.m4: Likewise.
23840         * m4/stdint_h.m4: Likewise.
23841         * m4/intmax_t.m4: Likewise.
23842         * m4/uintmax_t.m4: Likewise.
23843
23844 2004-04-18  Jim Meyering  <jim@meyering.net>
23845
23846         * m4/prereq.m4: Don't forbid jm_ prefix.
23847
23848         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23849         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23850         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23851         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23852         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23853         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23854         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23855         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23856         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23857         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23858         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23859         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23860         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23861         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23862         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23863         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23864         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23865         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23866         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23867
23868 2004-04-18  Jim Meyering  <jim@meyering.net>
23869
23870         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23871         failure, don't leak memory and do call END_UTMP_ENT.
23872
23873 2004-04-16  Jim Meyering  <jim@meyering.net>
23874
23875         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23876         coreutils' stat program.
23877         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23878
23879 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23880
23881         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23882         C89.
23883         (CHAR_BIT): Remove, since we assume C89.
23884         Include <stdint.h> if available, as per current Autoconf CVS advice.
23885
23886 2004-03-31  Jim Meyering  <jim@meyering.net>
23887
23888         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23889         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23890         * m4/xalloc.m4: Likewise.
23891
23892 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23893
23894         Merge from coreutils.
23895
23896         * m4/inttostr.m4: New file.
23897         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23898         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23899         Require gl_CLOCK_TIME.
23900         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23901
23902 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23903
23904         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23905         not bool, to be more consistent with Unix conventions.
23906         Suggested by Bruno Haible.
23907
23908         Merge from coreutils.
23909
23910         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23911         * lib/umaxtostr.c: New files.
23912
23913         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23914         the usual <time.h> dance.
23915         (get_date): Change signature to support fractional time stamps.
23916         All callers changed.
23917         * lib/getdate.y: Include "getdate.h" first, as we can now
23918         assume C89 and don't need to worry about 'const'.
23919         Similarly, include "unlocked-io.h" near start, not in middle.
23920         Include <limits.h>.
23921         (textint.value): Use long int rather than int.
23922         (textint.digits): Use size_t rather than int.
23923         (BILLION, LOG10_BILLION): New constants.
23924         (parser_control): New member rel_ns.  Members day_ordinal,
23925         time_zone, month, day, hour, minutes, rel_year, rel_month,
23926         rel_day, rel_hour, rel_minutes, rel_seconds
23927         are now long int, not int.  Member seconds is now struct timespec,
23928         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23929         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23930         not int.
23931         (%union.intval): Now long int, not int.
23932         New member timespec.
23933         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23934         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23935         (spec): Now is a timespec or an item list.
23936         (timespec, items): New nonterminals.
23937         (time, rel, relunit, number, get_date):
23938         Add support for fractional seconds.
23939         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23940         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23941         (to_hour): First arg is now long int, not int.
23942         (to_year): Returns long int, not int.
23943         Don't treat year -70 like 70.
23944         (tm_diff): Returns long int, not int.
23945         (lookup_word): Use bool instead of int when appropriate.
23946         (yylex): Use size_t for count, not int.
23947         Detect overflow when parsing large integer constants.
23948         Add support for fractions.
23949         (get_date): Make pointers 'const' if possible.
23950         Use more-portable code to detect integer overflow.
23951         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23952         Don't use ctime; it's not reliable if the year has >4 digits.
23953
23954         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23955         This is for compatibility with BSD.
23956
23957         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23958         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23959         From coreutils' system.h.
23960
23961         * lib/userspec.c: Don't include "posixver.h".
23962         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23963         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23964         compatible extension.  Simplify code by removing a boolean int
23965         that was always nonzero if a string was nonnull.
23966
23967 2004-03-30  Jim Meyering  <jim@meyering.net>
23968
23969         Merge from coreutils.
23970
23971         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23972         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23973         on some systems one must include <grp.h> before it.
23974         Reported by Christian Krackowizer.
23975
23976 2004-03-30  Jim Meyering  <jim@meyering.net>
23977
23978         Merge from coreutils.
23979
23980         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23981
23982         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23983         an empty input stream.
23984
23985         * lib/readtokens.c: Include <stdbool.h>.
23986         (readtoken): Use `size_t' rather than int/long.
23987         All callers adjusted.
23988         Use `bool' rather than `int' where appropriate.
23989         Use memset rather than an explicit loop.
23990         Use x2nrealloc rather than xrealloc.
23991         Allow the use of `\0' as a delimiter.
23992         (readtokens): Likewise.
23993         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23994
23995 2004-03-30  Jim Meyering  <jim@meyering.net>
23996
23997         * m4/realloc.m4: Remove file, since now it does no more than
23998         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23999         the `configure.ac' section of module/realloc.
24000         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
24001
24002 2004-03-30  Bruno Haible  <bruno@clisp.org>
24003
24004         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
24005         nonnull.
24006
24007 2004-03-29  Paul Eggert  <eggert@twinsun.com>
24008
24009         Merge changes to getloadavg.c from coreutils and Emacs.
24010
24011         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
24012         Define to an expression, not to the empty string.
24013         Include cloexec.h and xalloc.h.
24014         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
24015         Use set_cloexec_flag rather than rolling our own.
24016         * lib/cloexec.c, lib/cloexec.h: New files.
24017
24018 2004-03-29  Paul Eggert  <eggert@twinsun.com>
24019
24020         * m4/cloexec.m4: New file.
24021
24022 2004-03-18  Paul Eggert  <eggert@twinsun.com>
24023
24024         * lib/getopt.h: Sync with libc CVS.
24025
24026 2004-03-18  Paul Eggert  <eggert@twinsun.com>
24027             Bruno Haible  <bruno@clisp.org>
24028
24029         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
24030         mbswidth.
24031
24032 2004-03-18  Paul Eggert  <eggert@twinsun.com>
24033             Bruno Haible  <bruno@clisp.org>
24034
24035         * lib/mbswidth.h: Include <wchar.h> only if
24036         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
24037         <wchar.h>.
24038         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
24039
24040 2004-03-09  Paul Eggert  <eggert@twinsun.com>
24041
24042         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
24043         Sync with libc CVS.
24044         * lib/getopt_int.h: New file, also synced from libc.
24045
24046 2004-03-09  Paul Eggert  <eggert@twinsun.com>
24047
24048         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
24049         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
24050         Bring back getopt.c, getopt.h, getopt1.c.
24051
24052 2004-03-07  Paul Eggert  <eggert@twinsun.com>
24053
24054         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
24055         All uses changed.  Check for sa_sigaction member; this fixes
24056         a bug first reported by Jason Andrade in
24057         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
24058
24059 2004-03-07  Paul Eggert  <eggert@twinsun.com>
24060
24061         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
24062         '#if' expressions.  Unlike the code it replaces, it does not
24063         depend on (defined _SC_PAGESIZE).  However, it does depend on
24064         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
24065         first reported by Jason Andrade in
24066         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
24067
24068 2004-02-25  Simon Josefsson  <jas@extundo.com>
24069
24070         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
24071
24072 2004-02-25  Simon Josefsson  <jas@extundo.com>
24073
24074         * lib/strdup.h: New file.
24075         * lib/strdup.c: Include it.
24076         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
24077         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
24078
24079 2004-02-23  Karl Berry  <karl@gnu.org>
24080
24081         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
24082         (from fencepost.gnu.org:/gd/gnuorg).
24083
24084 2004-02-23  Karl Berry  <karl@gnu.org>
24085
24086         * config/srclistvars.sh (GNUORG) [karl]: redefine.
24087         * config/srclist.txt: add maintain/standards documents.
24088
24089 2004-02-18  Bruno Haible  <bruno@clisp.org>
24090
24091         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
24092         Reported by Derek Robert Price <derek@ximbiot.com>.
24093
24094 2004-02-16  Karl Berry  <karl@gnu.org>
24095
24096         * config/mkinstalldirs, install-sh: update from automake.
24097
24098 2004-02-06  Karl Berry  <karl@gnu.org>
24099
24100         * m4/po.m4: update from gettext 0.14.1.
24101
24102 2004-02-06  Karl Berry  <karl@gnu.org>
24103
24104         * lib/config.charset: update from gettext 0.14.1.
24105
24106 2004-02-05  Paul Eggert  <eggert@twinsun.com>
24107
24108         Add comments and code, prompted by suggestions from Bruno Haible
24109         for sh-quote.
24110         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
24111         describing the enum quoting_style values.
24112         * lib/quotearg.c (quotearg_alloc): New function.
24113         (quotearg_buffer_restyled): Treat lone { and } as special.
24114         Treat = as special.  Work around bug with older shells
24115         that "see" a '\' that is really the 2nd byte of a multibyte char.
24116         Quote empty string with shell_quoting_style.
24117
24118 2004-02-03  Bruno Haible  <bruno@clisp.org>
24119
24120         * m4/pipe.m4: New file, from GNU gettext.
24121
24122 2004-02-03  Bruno Haible  <bruno@clisp.org>
24123
24124         * lib/pipe.h: New file, from GNU gettext.
24125         * lib/pipe.c: New file, from GNU gettext.
24126
24127 2004-01-27  Bruno Haible  <bruno@clisp.org>
24128
24129         * m4/execute.m4: New file, from GNU gettext.
24130
24131 2004-01-27  Bruno Haible  <bruno@clisp.org>
24132
24133         * lib/execute.h: New file, from GNU gettext.
24134         * lib/execute.c: New file, from GNU gettext.
24135         * lib/w32spawn.h: New file, from GNU gettext.
24136
24137 2004-01-24  Paul Eggert  <eggert@twinsun.com>
24138
24139         Merge from diffutils.
24140
24141         * lib/file-type.c (file_type): Add typed memory objects.
24142         * lib/file-type.h (S_TYPEISTMO): New macro.
24143
24144         * lib/c-stack.h (c_stack_action): Remove argv argument.
24145         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
24146         (die): Don't calculate message unless segv_action returns.
24147         (get_stack_location, min_address_from_argv, max_address_from_argv,
24148         volatile stack_base, volatile_stack_size): Remove.
24149         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
24150         that every segmentation violation is a stack overflow.  (Ouch!)
24151         See Debian bug 136249 (still outstanding) for more info about why
24152         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
24153
24154 2004-01-24  Paul Eggert  <eggert@twinsun.com>
24155
24156         Exit-status fix from coreutils.
24157
24158         Use exit_failure consistently in place of EXIT_FAILURE,
24159         so that program exit statuses are consistent on failure.
24160
24161         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
24162         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
24163         * lib/argmatch.h: Comment fix to match the above.
24164         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
24165         Now a macro referring to exit_failure, instead of a separate
24166         variable.  Include "exitfail.h" to get it.
24167         * lib/xstrtol.h: Include "exitfail.h".
24168         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
24169
24170         * lib/long-options.c (parse_long_options): Use prototype
24171         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
24172         for clarity.
24173
24174 2004-01-21  Jim Meyering  <jim@meyering.net>
24175
24176         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
24177         so as not to conflict with a different-sized __mktime_internal
24178         function in GNU libc.
24179         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
24180         Problem building statically-linked `ls' reported by Michael Brunnbauer.
24181
24182 2004-01-20  Karl Berry  <karl@gnu.org>
24183
24184         * config/config.guess: update from config.
24185
24186         * config/srclistvars.sh: GNUWWWLICENSES for karl.
24187
24188 2004-01-20  Bruno Haible  <bruno@clisp.org>
24189
24190         Safer stack allocation.
24191         * lib/setenv.c: Include allocsa.h.
24192         (alloca): Remove fallback definition.
24193         (freea): Remove macro.
24194         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
24195         instead of freea.
24196
24197 2004-01-20  Bruno Haible  <bruno@clisp.org>
24198
24199         * m4/eealloc.m4: New file, from GNU gettext.
24200
24201 2004-01-20  Bruno Haible  <bruno@clisp.org>
24202
24203         * m4/allocsa.m4: New file, from GNU gettext.
24204
24205 2004-01-20  Bruno Haible  <bruno@clisp.org>
24206
24207         * lib/xallocsa.h: New file, from GNU gettext.
24208         * lib/xallocsa.c: New file, from GNU gettext.
24209
24210 2004-01-20  Bruno Haible  <bruno@clisp.org>
24211
24212         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
24213
24214 2004-01-20  Bruno Haible  <bruno@clisp.org>
24215
24216         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
24217         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
24218         specially.
24219
24220 2004-01-20  Bruno Haible  <bruno@clisp.org>
24221
24222         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
24223         patch.
24224
24225 2004-01-20  Bruno Haible  <bruno@clisp.org>
24226
24227         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
24228
24229 2004-01-20  Bruno Haible  <bruno@clisp.org>
24230
24231         * lib/eealloc.h: New file.
24232
24233 2004-01-20  Bruno Haible  <bruno@clisp.org>
24234
24235         * lib/binary-io.h: Avoid warnings on Cygwin.
24236
24237 2004-01-20  Bruno Haible  <bruno@clisp.org>
24238
24239         * lib/allocsa.h: New file, from GNU gettext.
24240         * lib/allocsa.c: New file, from GNU gettext.
24241
24242 2004-01-18  Karl Berry  <karl@gnu.org>
24243
24244         * doc/gpl.texi, doc/lgpl.texi: new files.
24245
24246 2004-01-18  Karl Berry  <karl@gnu.org>
24247
24248         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
24249         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
24250
24251 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24252
24253         Merge from coreutils.
24254
24255         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
24256         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
24257         (gl_DEFAULT_POSIX2_VERSION): Move
24258         the documentation from 'configure' into 'config.hin',
24259         so that 'configure --help' isn't burdened by it and
24260         we don't have to worry about its formatting there.
24261         Reword the documentation so that it's more succinct
24262         and can be run together into a single paragraph.
24263         * m4/same.m4 (gl_SAME): Check for pathconf.
24264
24265 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24266
24267         Merge from coreutils.
24268
24269         * lib/posixver.c: Include posixver.h.
24270
24271         * lib/same.c: Include <stdbool.h>, <limits.h>.
24272         (_POSIX_NAME_MAX): Define if not defined.
24273         (MIN): New macro.
24274         (same_name): If file names are silently truncated, report
24275         that the file names are the same if they are the same after
24276         the silent truncation.
24277
24278         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
24279         conversion function.
24280         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
24281         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
24282         longer needed.
24283
24284 2004-01-15  Jim Meyering  <jim@meyering.net>
24285
24286         Merge from coreutils.
24287
24288         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
24289         if no library is required.
24290         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
24291         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
24292         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
24293         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
24294         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
24295         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
24296         value, $ac_cv_search_crypt, if it's "none required".
24297         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
24298         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
24299         not gl_FUNC_GETLOADAVG.
24300         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
24301         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
24302
24303 2004-01-15  Jim Meyering  <jim@meyering.net>
24304
24305         Merge from coreutils.
24306
24307         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
24308         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
24309         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
24310
24311         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24312         optional configure-time default.
24313
24314         * lib/version-etc.c (version_etc_copyright): Update copyright date.
24315
24316         * lib/xreadlink.c (xreadlink): Correct outdated comment.
24317
24318 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
24319
24320         Merge from coreutils.
24321
24322         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
24323         value, $ac_cv_search_nanosleep, if it's "none required".
24324
24325 2004-01-14  Paul Eggert  <eggert@twinsun.com>
24326
24327         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
24328         with like-named macro in fnmatch.c.
24329         (EXT): Use an internal constant instead.
24330
24331         Merge fnmatch patches from glibc.
24332         * lib/fnmatch.c (mbsinit): Remove define.
24333         Add libc_hidden_ver (__fnmatch, fnmatch).
24334         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
24335         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
24336
24337 2004-01-14  Karl Berry  <karl@gnu.org>
24338
24339         * config/install-sh: update from automake.
24340
24341 2004-01-13  Karl Berry  <karl@gnu.org>
24342
24343         * config/install-sh: update from automake.
24344
24345 2004-01-09  Karl Berry  <karl@gnu.org>
24346
24347         * config/install-sh: update from automake.
24348
24349 2004-01-05  Karl Berry  <karl@gnu.org>
24350
24351         * config/config.{sub,guess}: update from config.
24352
24353 2003-12-31  Karl Berry  <karl@gnu.org>
24354
24355         * config/depcomp: update from automake.
24356
24357 2003-12-14  Karl Berry  <karl@gnu.org>
24358
24359         * lib/config.charset: update from gettext-runtime.
24360
24361 2003-12-03  Paul Eggert  <eggert@twinsun.com>
24362
24363         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
24364         Bug reported by Alfred M. Szmidt.
24365
24366 2003-12-03  Bruno Haible  <bruno@clisp.org>
24367
24368         * m4/gettext.m4: Upgrade from gettext-0.13.
24369         * m4/po.m4: Upgrade from gettext-0.13.
24370         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
24371         * m4/intmax.m4: New file, from gettext-0.13.
24372         * m4/printf-posix.m4: New file, from gettext-0.13.
24373
24374 2003-11-29  Karl Berry  <karl@gnu.org>
24375
24376         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
24377
24378 2003-11-25  Paul Eggert  <eggert@twinsun.com>
24379             Bruno Haible  <bruno@clisp.org>
24380
24381         * lib/printf-parse.h: Don't include sys/types.h.
24382         (ARG_NONE): New macro.
24383         (char_directive): Change type of *arg_index fields to size_t.
24384         * lib/printf-parse.c: Don't include sys/types.h.
24385         (SSIZE_MAX): Remove macro.
24386         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
24387         Remove unnecessary overflow check.
24388         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
24389         fields.
24390
24391 2003-11-25  Bruno Haible  <bruno@clisp.org>
24392
24393         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
24394
24395 2003-11-25  Bruno Haible  <bruno@clisp.org>
24396
24397         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
24398         gt_TYPE_SSIZE_T.
24399
24400 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24401
24402         * modules/alloca: Remove dependency on xalloc.
24403
24404 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24405
24406         * lib/alloca.c: Remove dependency on xalloc module.
24407         (xalloc_die): Remove.
24408         (memory_full) [!defined emacs]: New macro.
24409         [!defined emacs]: Don't include xalloc.h.
24410         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
24411         address arithmetic overflows.  Change datatypes a bit to avoid
24412         unnecessary casts.
24413
24414 2003-11-22  Jim Meyering  <jim@meyering.net>
24415
24416         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
24417         s/size/size_t/.
24418
24419 2003-11-21  Karl Berry  <karl@gnu.org>
24420
24421         * config/config.{sub,guess}: update from config.
24422
24423 2003-11-18  Karl Berry  <karl@gnu.org>
24424
24425         * config/config.{sub,guess}: update from config.
24426
24427         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
24428
24429 2003-11-17  Paul Eggert  <eggert@twinsun.com>
24430
24431         * README: Mention that S+T cannot overflow if S is the size of
24432         an existing object and T is sufficiently small.
24433
24434 2003-11-17  Jim Meyering  <jim@meyering.net>
24435
24436         On systems without utime and without a utimes function capable of
24437         dealing with a NULL struct utimbuf* argument, this utime replacement
24438         could -- in unusual circumstances -- leak a file descriptor.
24439         * lib/utime.c: Include <unistd.h> and <errno.h>.
24440         (utime_null): Be sure to close `fd' and to preserve errno.
24441         Reported by Geoff Collyer via Arnold Robbins.
24442
24443 2003-11-17  Bruno Haible  <bruno@clisp.org>
24444
24445         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
24446         (Depends-on): Add xsize.
24447
24448 2003-11-17  Bruno Haible  <bruno@clisp.org>
24449
24450         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
24451
24452 2003-11-17  Bruno Haible  <bruno@clisp.org>
24453
24454         * lib/vasnprintf.c (alloca): Remove fallback definition.
24455         (freea): Remove definition.
24456         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
24457         Reported by Paul Eggert.
24458
24459 2003-11-16  Paul Eggert  <eggert@twinsun.com>
24460             Bruno Haible  <bruno@clisp.org>
24461
24462         Protect against address arithmetic overflow.
24463         * lib/printf-args.h: Include stddef.h.
24464         (arguments): Change type of field 'count' to size_t.
24465         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
24466         'unsigned int' where appropriate.
24467         * lib/printf-parse.h: Include sys/types.h.
24468         (char_directive): Change type of *arg_index fields to ssize_t.
24469         (char_directives): Change type of fields 'count', max_*_length to
24470         size_t.
24471         * lib/printf-parse.c: Include sys/types.h and xsize.h.
24472         (SSIZE_MAX): Define fallback value.
24473         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
24474         instead of 'int' where appropriate. Check a_allocated, d_allocated
24475         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
24476         * lib/vasnprintf.c: Include xsize.h.
24477         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
24478         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
24479         overflow. Avoid wraparound when converting a width or precision from
24480         decimal to binary.
24481
24482 2003-11-16  Bruno Haible  <bruno@clisp.org>
24483
24484         Update from GNU gettext.
24485         * lib/printf-parse.c: Generalize to it can be compiled for wide
24486         strings.
24487         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
24488         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
24489         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
24490         SNPRINTF): New macros.
24491         Don't include <alloca.h> if the file is used inside libintl.
24492         (local_wcslen): New function, for Solaris 2.5.1.
24493         (VASNPRINTF): Use it instead of wcslen.
24494
24495 2003-11-16  Bruno Haible  <bruno@clisp.org>
24496
24497         * lib/xsize.h (xmax): New function.
24498         (xsum, xsum3, xsum4): Declare as "pure" functions.
24499
24500 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24501
24502         * modules/xalloc (Files): Undo latest change, since xalloc.h
24503         no longer needs SIZE_MAX or PTRDIFF_MAX.
24504
24505 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24506
24507         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
24508         gl_PTRDIFF_MAX.
24509
24510 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24511
24512         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
24513         "return", to pacify some unknown compiler.  Problem reported
24514         by Joerg Schilling.
24515
24516 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24517
24518         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
24519         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
24520         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
24521         heuristic is just as accurate as far as we know, and it removes a
24522         dependency on size_max.m4 and ptrdiff_max.m4.
24523
24524 2003-11-11  Bruno Haible  <bruno@clisp.org>
24525
24526         * modules/xsize (Files): Add m4/size_max.m4.
24527         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
24528
24529 2003-11-11  Bruno Haible  <bruno@clisp.org>
24530
24531         * m4/size_max.m4: New file.
24532         * m4/ptrdiff_max.m4: New file.
24533         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
24534         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
24535         (gl_XALLOC): Invoke it.
24536
24537 2003-11-11  Bruno Haible  <bruno@clisp.org>
24538
24539         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
24540         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
24541         defined.
24542
24543 2003-11-10  Paul Eggert  <eggert@twinsun.com>
24544
24545         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
24546         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
24547         rejected some allocations of exactly SIZE_MAX - 2 bytes.
24548         From Bruno Haible.
24549         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
24550         not (size_t) -1, since it's defined here.
24551
24552 2003-11-09  Karl Berry  <karl@gnu.org>
24553
24554         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
24555
24556 2003-11-06  Paul Eggert  <eggert@twinsun.com>
24557
24558         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
24559         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
24560         Reject sizes of exactly SIZE_MAX bytes.
24561         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
24562         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
24563
24564 2003-11-05  Bruno Haible  <bruno@clisp.org>
24565
24566         * lib/xsize.h: Include limits.h, to avoid a possible collision with
24567         SIZE_MAX defined in <limits.h> on Solaris.
24568
24569 2003-11-04  Jim Meyering  <jim@meyering.net>
24570
24571         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
24572         variable names, rather than @VAR@.
24573         * modules/poll: Likewise.
24574
24575 2003-11-04  Bruno Haible  <bruno@clisp.org>
24576
24577         * modules/xsize: New file.
24578         * modules/linebreak: Depend on xsize.
24579         * MODULES.html.sh (func_all_modules): Add xsize.
24580
24581 2003-11-04  Bruno Haible  <bruno@clisp.org>
24582
24583         * m4/xsize.m4: New file.
24584
24585 2003-11-04  Bruno Haible  <bruno@clisp.org>
24586
24587         * lib/xsize.h: New file.
24588         * lib/linebreak.c: Include xsize.h.
24589         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
24590         argument for overflow.
24591         Suggested by Paul Eggert.
24592
24593 2003-11-03  Karl Berry  <karl@gnu.org>
24594
24595         * config/config.{guess,sub}: update from config.
24596
24597 2003-11-03  Jim Meyering  <jim@meyering.net>
24598
24599         * modules/userspec (lib_SOURCES): Add userspec.h.
24600         (Include): Add "userspec.h".
24601         Improve description.
24602
24603 2003-11-03  Jim Meyering  <jim@meyering.net>
24604
24605         * lib/userspec.c: Include "userspec.h".
24606         * lib/userspec.h: New file.
24607
24608 2003-11-03  Bruno Haible  <bruno@clisp.org>
24609
24610         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
24611
24612 2003-11-03  Bruno Haible  <bruno@clisp.org>
24613
24614         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
24615         available, to avoid (extremely rare) race condition.
24616         Suggested by Paul Eggert.
24617
24618 2003-11-02  Karl Berry  <karl@gnu.org>
24619
24620         * config/srclist.txt (vasprintf.c): sync broken, sigh.
24621
24622 2003-10-31  Paul Eggert  <eggert@twinsun.com>
24623
24624         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
24625         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
24626         (read_filesystem_list): Set and use me_type_malloced.
24627         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
24628         whatever the type happens to be), for brevity and consistency.
24629         Check for size calculation overflow on Alphas running OSF/1.
24630
24631 2003-10-31  Jim Meyering  <jim@meyering.net>
24632
24633         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
24634
24635         * lib/linebuffer.c: Include <string.h> for declaration of memset.
24636
24637 2003-10-30  Paul Eggert  <eggert@twinsun.com>
24638             Bruno Haible  <bruno@clisp.org>
24639
24640         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
24641         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
24642
24643 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
24644
24645         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
24646         netbsd*-gnu*.  Suggested by Robert Millan.
24647
24648 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24649
24650         * modules/group-member: Depend on stdbool.
24651
24652 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24653
24654         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
24655
24656 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24657
24658         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
24659         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
24660         after the 'gnu' in these cases.  This fixes some bugs in the
24661         previous change, and is based on suggestions by Robert Millan.
24662
24663 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24664
24665         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
24666         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
24667         no longer needed.
24668         * lib/quotearg.c (quotearg_n_options): Use it.
24669         * lib/group-member.c: Include <stdbool.h>.
24670         (free_group_info): Arg is now const *; don't free arg.
24671         (get_group_info): Now returns bool and accepts struct group_info *,
24672         rather than returning a malloc'ed struct group_info *.
24673         All uses changed.  Check for overflow in internal size calculation.
24674
24675         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
24676         rather than xmalloc/xrealloc.
24677         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
24678         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
24679         conformance bug: the old code used a pointer after freeing the
24680         storage that it addressed.
24681         * lib/hash.c (hash_initialize): Simplify the code by using
24682         xalloc_oversized rather than doing it by hand.
24683         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
24684         the buffer preserved.  Use free and xmalloc instead.
24685         * lib/quotearg.c (quotearg_n_options): Likewise.
24686         Use a simpler test for size overflow.  Don't use xalloc_oversized
24687         because unsigned int might be wider than size_t (!); this suggests
24688         that we should switch from unsigned int to size_t for slot numbers.
24689
24690 2003-10-28  Paul Eggert  <eggert@twinsun.com>
24691
24692         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
24693         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
24694         NetBSD kernels.  Requested by Richard Stallman.
24695
24696 2003-10-27  Paul Eggert  <eggert@twinsun.com>
24697
24698         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
24699         to allocate the returned structure.  Do not allocate a subarray,
24700         as x2nrealloc will do that.
24701         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24702         instead of xnrealloc.
24703         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24704
24705 2003-10-27  Bruno Haible  <bruno@clisp.org>
24706
24707         * lib/stdbool_.h: Better support for BeOS.
24708
24709 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24710
24711         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24712         now uses inline.
24713
24714 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24715
24716         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24717         callers that want to do their own size-overflow checking.  Include
24718         <stdbool.h>, since xalloc_oversized returns bool.
24719         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24720         to use xalloc_oversized.
24721
24722         Add two functions x2realloc, x2nrealloc, for programs that grow
24723         arrays dynamically by doubling their sizes.
24724         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24725         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24726         New functions.
24727
24728         Port to C99 semantics for 'inline' of external functions.
24729         Bug reported by Bruno Haible.
24730         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24731         with the old contents of xnmalloc.
24732         (xnmalloc, xmalloc): Use it.
24733         (xnrealloc_inline): New static inline function,
24734         with the old contents of xnrealloc.
24735         (xnrealloc, xrealloc): Use it.
24736
24737         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24738         that.
24739
24740 2003-10-26  Karl Berry  <karl@gnu.org>
24741
24742         * config/srclist.txt (COPYING.DOC): no longer available from
24743         /gd/gnuorg; don't know where the ultimate source is.
24744
24745 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24746
24747         Fix several address-calculation bugs in the hash modules,
24748         plus some minor code cleanup.
24749
24750         * lib/hash.h: Include <stdbool.h>, for bool.
24751         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24752         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24753         hash_get_n_entries, hash_get_max_bucket_length,
24754         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24755         hash_rehash): Use size_t rather than unsigned.
24756         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24757         hash_get_n_buckets_used, hash_get_n_entries,
24758         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24759         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24760         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24761         Likewise.
24762         (SIZE_MAX): Define if not defined.
24763         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24764         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24765         hash_print):
24766         Use const * when possible.
24767         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24768         (check_tuning): Fix bug: if tuning parameters were very close to
24769         0 or 1, rounding errors could have caused subscript violations.
24770         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24771         (hash_initialize): Add 'fail:' label
24772         to free table and return NULL, and use it to simplify code.
24773         Use calloc rather than clearing the storage ourself.
24774         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24775         buffer size calculations.
24776         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24777         Include <stddef.h>, for size_t.
24778         * lib/hash-pjw.c (hash_pjw): Likewise.
24779         Switch to method described by Bruno Haible.
24780         Include <limits.h>, for CHAR_BIT.
24781         (SIZE_BITS): New macro.
24782
24783 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24784
24785         * m4/getline.m4 (AM_FUNC_GETLINE):
24786         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24787         hosts.  Problem reported by Derek Robert Price in
24788         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24789         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24790         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24791
24792 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24793
24794         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24795         ceiling the allocation at NMAX bytes rather than silently
24796         discarding input bytes before NMAX is reached.  This makes
24797         a difference only if NMAX exceeds SIZE_MAX / 2.
24798
24799         * lib/obstack.c: Merge from glibc.
24800         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24801         Add libc_hidden_def (_obstack_newchunk).
24802         (_obstack_free) [! defined _LIBC]: Remove.
24803         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24804         a clone of the function body.
24805         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24806         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24807
24808         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24809         glibc.
24810         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24811         arg to memcpy.
24812
24813         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24814         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24815         Don't use lvalue casts, as GCC plans to remove support for them
24816         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24817         was also present in the non-GCC version, indicating that this
24818         code had always been buggy and had never been widely used.
24819         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24820         Use the fast variant of each macro, rather than copying the
24821         definiens of the fast variant; that way, we'll be more likely to
24822         catch future bugs in the fast variants.
24823
24824 2003-10-20  Bruno Haible  <bruno@clisp.org>
24825
24826         * modules/wait-process: New file.
24827         * MODULES.html.sh (func_all_modules): Add wait-process.
24828
24829 2003-10-20  Bruno Haible  <bruno@clisp.org>
24830
24831         * m4/wait-process.m4: New file.
24832
24833 2003-10-20  Bruno Haible  <bruno@clisp.org>
24834
24835         * lib/wait-process.h: New file, from GNU gettext.
24836         * lib/wait-process.c: New file, from GNU gettext.
24837
24838 2003-10-19  Jim Meyering  <jim@meyering.net>
24839
24840         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24841         HPUX 10.20.
24842
24843 2003-10-18  Karl Berry  <karl@gnu.org>
24844
24845         * config/config.guess: update from config.
24846
24847 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24848
24849         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24850         (getgroups): First arg is int, not size_t.
24851         Don't let 'free' mangle errno.
24852
24853 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24854
24855         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24856
24857 2003-10-16  Karl Berry  <karl@gnu.org>
24858
24859         * config/config.{guess,sub}: update from config.
24860
24861 2003-10-16  Jim Meyering  <jim@meyering.net>
24862
24863         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24864         memcpy.
24865
24866 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24867
24868         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24869         (SIZE_MAX): Remove.
24870         (new_exclude, add_exclude_file): Initial size no longer needs to
24871         be a power of 2.
24872         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24873         our own address arithmetic overflow checking.
24874
24875         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24876         (fnmatch): Do not alloca more than 2000 wide characters;
24877         instead, use malloc for large buffers.
24878         Check for address arithmetic overflow, and return -1
24879         with errno set to ENOMEM in that case.
24880         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24881         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24882         instead, return -1.  Check for address arithmetic overflow.
24883
24884 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24885
24886         Handle invalid suffixes and overflow independently, so that
24887         callers can treat them independently as needed.  Fix some bugs in
24888         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24889         suffix for a human-readable blocksize.  The major caller-visible
24890         change is the addition of a new
24891         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24892         that both overflow and suffix chars were found.
24893
24894         * lib/human.c (humblock): Don't check separately for invalid suffix
24895         char; that is xstrtoumax's job (now that its bug is fixed).
24896         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24897         INTMAX_MAX]: New macros.
24898         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24899         TYPE_MAXIMUM): New macros.
24900         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24901         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24902         if overflow occurs, as it's what __strtol does and it's more useful
24903         in practice.
24904         (__xstrtol): If __strtol reports some error other than ERANGE,
24905         reflect it to the caller as LONGINT_INVALID.  If it reports
24906         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24907         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24908         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24909         value.
24910         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24911         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24912         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24913         [defined UINTMAX_MAX]: New macros.
24914
24915 2003-10-14  Bruno Haible  <bruno@clisp.org>
24916
24917         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24918
24919 2003-10-14  Bruno Haible  <bruno@clisp.org>
24920
24921         * m4/sig_atomic_t: New file, from GNU gettext.
24922         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24923
24924 2003-10-14  Bruno Haible  <bruno@clisp.org>
24925
24926         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24927         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24928         Also use volatile where needed.
24929
24930 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24931
24932         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24933         Change maintainer from Bruno Haible to 'all'.
24934
24935 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24936
24937         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24938
24939 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24940
24941         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24942         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24943         and define in terms of the other primitives.
24944         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24945         (SIZE_MAX): Define if not already defined.
24946         (array_size_overflow): New function.
24947         (xalloc_die): Abort instead of exiting if 'error' returns.
24948         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24949         (xmalloc, xrealloc): Use them.
24950         (xcalloc): Check for address arithmetic overflow.
24951         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24952         a bit faster than strcpy.
24953
24954 2003-10-10  Simon Josefsson  <jas@extundo.com>
24955
24956         * modules/argp (Depends-on): Add restrict and strcase.
24957
24958 2003-10-10  Simon Josefsson  <jas@extundo.com>
24959
24960         * m4/argp.m4: Add AC_C_INLINE.
24961
24962 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24963
24964         Merge getpass from libc, plus a few fixes.
24965
24966         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24967         Include <stdbool.h>.
24968         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24969         __fsetlocking to empty.
24970         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24971         do include <bits/libc-lock.h>.
24972         Do not include <fcntl.h>; not needed.
24973         [_LIBC]: Include <wchar.h>.
24974         (NOTCANCEL_MODE): New macro.
24975         (flockfile, funlockfile) [_LIBC]: New macros.
24976         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24977         [!_LIBC]: New macros.
24978         (call_fclose): New function.
24979         (getpass): Use it.  Save tty stream separately; this simplifies the
24980         code and makes it more reliable if stdin happens to equal stdout.
24981         Invoke __fsetlocking on tty.
24982         Handle thread cancellation if needed.
24983         Namespace cleanup (use __tcgetattr, __getline).
24984         Use bool for Booleans.
24985         [USE_IN_LIBIO]: Handle wide streams.
24986         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24987         stream might go where.
24988
24989         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24990         doesn't have to include <stdio.h> before us.
24991         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24992         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24993         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24994         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24995         if not declared, so that we can use getpass.c code from libc without
24996         rewriting it.
24997         (flockfile, ftrylockfile, funlockfile): New macros.
24998
24999 2003-10-08  Paul Eggert  <eggert@twinsun.com>
25000
25001         * modules/getpass: Depend on stdbool.
25002
25003 2003-10-08  Paul Eggert  <eggert@twinsun.com>
25004
25005         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
25006
25007 2003-10-07  Karl Berry  <karl@gnu.org>
25008
25009         * config/config.{guess,sub}: update from config.
25010
25011 2003-10-06  Jim Meyering  <jim@meyering.net>
25012             Bruno Haible  <bruno@clisp.org>
25013
25014         This lets translators provide better translations for the
25015         "Written by ..." part of --version output.
25016         * lib/version-etc.h: Include stdarg.h.
25017         (version_etc_copyright): Declare as readonly.
25018         (version_etc): Make this function variadic with a NULL-terminated list
25019         of author name strings.
25020         (version_etc_va): New declaration.
25021         * lib/version-etc.c: Include stdarg.h, stdlib.h.
25022         (version_etc_copyright): Declare as readonly.
25023         (version_etc_va): New function. Provide a different translatable string
25024         for each possible number of authors < 10. Abbreviate when there are 10
25025         authors or more.
25026         (version_etc): Make this function variadic. Call version_etc_va.
25027         Suggestion from Gary V. Vaughan.
25028
25029         * lib/long-options.h (parse_long_options): Change prototype: the
25030         authors string is moved to the end and becomes variadic.
25031         * lib/long-options.c: Include stdarg.h.
25032         (parse_long_options): Make this function variadic, too.
25033         Call version_etc_va, not version_etc.
25034
25035 2003-10-06  Bruno Haible  <bruno@clisp.org>
25036
25037         * modules/version-etc-2: Remove file.
25038         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
25039
25040 2003-10-06  Bruno Haible  <bruno@clisp.org>
25041
25042         * modules/fatal-signal: New file.
25043         * MODULES.html.sh (func_all_modules): Add fatal-signal.
25044
25045 2003-10-06  Bruno Haible  <bruno@clisp.org>
25046
25047         * m4/fatal-signal.m4: New file.
25048         * m4/signalblocking.m4: New file, from GNU gettext.
25049
25050 2003-10-06  Bruno Haible  <bruno@clisp.org>
25051
25052         * lib/version-etc-2.h: Remove file.
25053         * lib/version-etc-2.c: Remove file.
25054
25055 2003-10-06  Bruno Haible  <bruno@clisp.org>
25056
25057         * lib/fatal-signal.h: New file, from GNU gettext.
25058         * lib/fatal-signal.c: New file, from GNU gettext.
25059
25060 2003-10-05  Paul Eggert  <eggert@twinsun.com>
25061
25062         * README: Rework advice for preventing empty .o files.
25063         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
25064         not <sys/types.h>.
25065
25066 2003-10-04  Karl Berry  <karl@gnu.org>
25067
25068         * lib/argp*: update from libc.
25069
25070 2003-10-04  Karl Berry  <karl@gnu.org>
25071
25072         * config/config.{guess,sub}: update from config.
25073
25074 2003-10-02  Bruno Haible  <bruno@clisp.org>
25075
25076         * modules/lchown (Include): Add lchown.h.
25077         * modules/time_r (Include): Use "..." syntax.
25078         * modules/xgetdomainname (Include): Add xgetdomainname.h.
25079
25080 2003-10-01  Simon Josefsson  <jas@extundo.com>
25081
25082         * MODULES.html.sh (func_all_modules): Move gethostname from section
25083         'based on' to section 'lacking' POSIX:2001.
25084
25085 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
25086
25087         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
25088         to output mode on the same stream.
25089
25090 2003-09-29  Paul Eggert  <eggert@twinsun.com>
25091
25092         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
25093         Fix arg typo in previous patch.
25094
25095 2003-09-28  Jim Meyering  <jim@meyering.net>
25096
25097         * lib/error.c: Correct cpp indentation.
25098
25099 2003-09-27  Paul Eggert  <eggert@twinsun.com>
25100
25101         * modules/free: New file.
25102
25103 2003-09-27  Paul Eggert  <eggert@twinsun.com>
25104
25105         * m4/free.m4: New file.
25106
25107 2003-09-27  Paul Eggert  <eggert@twinsun.com>
25108
25109         * lib/minmax.h (MIN, MAX)
25110         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
25111         Omit the special code that used __typeof__, since we worry that
25112         it could be more trouble than it's worth.  See:
25113         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
25114         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
25115
25116         * lib/free.c: New file.
25117
25118 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
25119
25120         Trivial fixes to Makefile.am parts of module listings.
25121         * modules/strstr: Append strstr.h to lib_SOURCES.
25122         * modules/strcase: Likewise, for strcase.h.
25123
25124 2003-09-27  Karl Berry  <karl@gnu.org>
25125
25126         * config/mkinstalldirs: update from automake.
25127
25128 2003-09-26  Paul Eggert  <eggert@twinsun.com>
25129
25130         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
25131         (error_tail): Do not loop, reallocating temporary buffer, since
25132         the output cannot contain more wide characters than the input
25133         contains bytes, the size must be big enough already.  This avoids
25134         one potential size overflow calculation.  Check for size overflow
25135         when calculating temporary buffer size.  Free temporary buffer
25136         when done, if it was allocated with malloc; this plugs a memory
25137         leak.  Remove casts from void * to pointers, that are no longer
25138         needed now that we're assuming C89 or better.
25139
25140         Merge error changes from glibc.
25141
25142         * lib/error.c, error.h: Update copyright notice header to match glibc.
25143         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
25144         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
25145         Disable cancellation while printing error.
25146         * lib/error.h: Prepend __ to parameter names.
25147
25148 2003-09-26  Jim Meyering  <jim@meyering.net>
25149
25150         * lib/error.c (error_tail): Move some declarations
25151         into inner scope where the local variables are used.
25152
25153 2003-09-26  Bruno Haible  <bruno@clisp.org>
25154
25155         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
25156         stpncpy().
25157         Don't define stpncpy through config.h; it's now done through stpncpy.h.
25158
25159 2003-09-26  Bruno Haible  <bruno@clisp.org>
25160
25161         * lib/stpncpy.h (gnu_stpncpy): New declaration.
25162         (stpncpy): Define as alias for gnu_stpncpy.
25163         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
25164
25165 2003-09-25  Simon Josefsson  <jas@extundo.com>
25166
25167         * lib/xgetdomainname.h: New file.
25168         * lib/xgetdomainname.c: New file.
25169
25170 2003-09-25  Simon Josefsson  <jas@extundo.com>
25171             Bruno Haible  <bruno@clisp.org>
25172
25173         * modules/getdomainname: New file.
25174         * modules/xgetdomainname: New file.
25175         * MODULES.html.sh (func_all_modules): Add getdomainname,
25176         xgetdomainname.
25177
25178 2003-09-25  Simon Josefsson  <jas@extundo.com>
25179             Bruno Haible  <bruno@clisp.org>
25180
25181         * m4/getdomainname.m4: New file.
25182
25183 2003-09-25  Simon Josefsson  <jas@extundo.com>
25184             Bruno Haible  <bruno@clisp.org>
25185
25186         * lib/getdomainname.h: New file.
25187         * lib/getdomainname.c: New file.
25188
25189 2003-09-25  Karl Berry  <karl@gnu.org>
25190
25191         * lib/argp-fmtstream.c, argp-help.c: update from libc.
25192
25193 2003-09-25  Karl Berry  <karl@gnu.org>
25194
25195         * config/install-sh: update from automake.
25196
25197 2003-09-25  Bruno Haible  <bruno@clisp.org>
25198
25199         * modules/version-etc-2: New file, from modules/version-etc with
25200         modifications.
25201         * MODULES.html.sh (func_all_modules): Add version-etc-2.
25202
25203 2003-09-25  Bruno Haible  <bruno@clisp.org>
25204
25205         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
25206         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
25207
25208 2003-09-24  Simon Josefsson  <jas@extundo.com>
25209
25210         * modules/xgethostname: Add xgethostname.h.
25211
25212 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25213
25214         * lib/linebuffer.c (freebuffer): Don't free the argument, just
25215         the buffer associated with the argument.  Bug reported by
25216         Simon Josefsson.
25217
25218 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25219
25220         * README: Document assumptions that 'int' is at least 32 bits
25221         wide, that integer arithmetic is 2's complement without overflow,
25222         that there are no holes in integer values, that adding sizes of
25223         two nonoverlapping objects can't overflow, and that all-bits-zero
25224         yields scalar zero.  Fix spelling and capitalization typos.
25225
25226 2003-09-19  Karl Berry  <karl@gnu.org>
25227
25228         * lib/argp.h: update from libc.
25229
25230 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25231
25232         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
25233         to avoid spurious warnings like "AC_RUN_IFELSE was called before
25234         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
25235
25236 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25237
25238         * gnulib-tool: Use "test -h", not "test -L", for portability
25239         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
25240         (tags_regexp): Remove, since \| doesn't conform to POSIX.
25241         (sed_extract_prog): Issue s commands one-by-one, rather than
25242         using \| in one s command.
25243
25244 2003-09-16  Paul Eggert  <eggert@twinsun.com>
25245
25246         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
25247         input error, instead of returning NULL the next time we are called
25248         (and therefore losing track of errno).
25249
25250 2003-09-16  Bruno Haible  <bruno@clisp.org>
25251
25252         * gnulib-tool (func_create_testdir): Warn about duplicated
25253         dependencies.
25254
25255 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25256
25257         * modules/argmatch, modules/fatal, modules/obstack,
25258         modules/xalloc, modules/xgethostname: Sort dependencies by
25259         importance, not alphabetically.
25260
25261 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25262
25263         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
25264         fails, so that the caller gets the proper errno.
25265
25266         * lib/readutmp.c (read_utmp): Likewise.
25267         Check for fstat error.  Close stream and free storage
25268         when failing.
25269
25270 2003-09-14  Karl Berry  <karl@gnu.org>
25271
25272         * config/srclist.txt (strdup.c): disable for c89 changes.
25273
25274 2003-09-14  Jim Meyering  <jim@meyering.net>
25275
25276         * lib/getloadavg.c: Correct cpp indentation.
25277         * lib/strdup.c: Likewise.
25278         * lib/vasnprintf.c: Likewise.
25279
25280 2003-09-14  Bruno Haible  <bruno@clisp.org>
25281
25282         * modules/fwriteerror: New file.
25283         * MODULES.html.sh (func_all_modules): Add fwriteerror.
25284
25285 2003-09-14  Bruno Haible  <bruno@clisp.org>
25286
25287         * lib/fwriteerror.h: New file.
25288         * lib/fwriteerror.c: New file.
25289
25290 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25291
25292         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
25293         modules/xgethostname, modules/xalloc: Depend on exit.
25294
25295 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25296
25297         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
25298
25299         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
25300         and AC_MINIX, too, so that their extensions are available.
25301
25302         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
25303         This macro has been superseded by gl_BACKUPFILE.
25304
25305         More patches to assume C89 or better.
25306
25307         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
25308
25309         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
25310         unconditionally.
25311         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
25312         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
25313         Include <string.h>, <stdlib.h> unconditionally.
25314         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
25315         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
25316         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
25317         headers or for string.h.
25318         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
25319         or strtoul.
25320
25321         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
25322         headers.
25323         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
25324         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25325         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
25326         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
25327         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25328         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
25329         memcpy, memset.
25330         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
25331         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
25332         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
25333         strtol.
25334         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
25335         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
25336         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
25337         strtoul.
25338
25339 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25340
25341         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
25342         * lib/obstack.c [!defined _LIBC]: Likewise.
25343         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
25344         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
25345         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
25346
25347         More changes to assume C89 or better.
25348
25349         * lib/error.c (error_tail): Assume vprintf.
25350
25351         * lib/argmatch.c (getenv): Remove decl.
25352         * lib/progreloc.c (get_full_program_name): Define via prototype.
25353         * lib/setenv.c (clearenv): Likewise.
25354         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
25355         needed.
25356         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
25357         (malloc, memcpy): Remove decls.
25358         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
25359         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
25360         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25361         (memcpy): Remove macro.
25362         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
25363         (__P): Remove.  All uses removed.
25364         (PTR): Remove.  All uses changed to void *.
25365         (CHAR_BIT, NULL): Remove.
25366         (spaces, zeros, memset_space, memset_zero)
25367         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
25368         Remove.
25369         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
25370         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
25371         Define with prototype.
25372         Remove now-unnecessary prototype decl.
25373         (extra_args_spec): Assume ANSI C.  All uses changed.
25374         (extra_args_spec_iso): Remove.
25375         (my_strftime, emacs_strftimeu): Define via prototype.
25376         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
25377         unconditionally.
25378         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
25379         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
25380         (strtoul, strtol): Remove decls.
25381         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
25382         LONG_MAX): Remove.
25383         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25384         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
25385         (LOCALE_PARAM_PROTO): New macro.
25386         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
25387         (INTERNAL (strtol), strtol): Define with a prototype.
25388         (PARAMS): Remove.  All uses removed.
25389         * lib/tempname.c: Include <string.h> unconditionally.
25390         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
25391         * lib/xgethostname.c (main): Define with a prototype.
25392         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
25393         Include <stdlib.h> unconditionally.
25394         (calloc, malloc, realloc, free): Remove decls.
25395         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
25396         Include <stdlib.h> unconditionally.  Sort include file names.
25397         (strtod): Remove.
25398         (xstrtod): Define with a prototype.
25399         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
25400         (strtol, strtoul): Remove decls.
25401
25402 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25403
25404         More patches to assume C89 or better.
25405         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
25406         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
25407         string.h, memchr, STDC_HEADERS.
25408
25409 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25410
25411         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
25412         Include <stdlib.h>, <string.h> unconditionally.
25413         Remove now-unnecessary cast to char *.
25414         * lib/strnlen.c: Include <string.h> unconditionally.
25415         * lib/yesno.c (yesno): Define with a prototype.
25416
25417 2003-09-11  Bruno Haible  <bruno@clisp.org>
25418
25419         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
25420
25421 2003-09-10  Jim Meyering  <jim@meyering.net>
25422
25423         * lib/error.c: Correct indentation of cpp directives.
25424
25425 2003-09-10  Bruno Haible  <bruno@clisp.org>
25426
25427         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
25428         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
25429         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
25430         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
25431         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
25432         <stdlib.h> and <string.h> checks.
25433         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
25434         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
25435
25436 2003-09-10  Bruno Haible  <bruno@clisp.org>
25437
25438         * lib/strcspn.c: Include <string.h> unconditionally.
25439         * lib/strpbrk.c: Include <string.h> unconditionally.
25440         * lib/strstr.c: Include <string.h> unconditionally.
25441         * lib/unicodeio.c: Include <string.h> unconditionally.
25442         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
25443         * lib/unsetenv.c: Likewise.
25444         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
25445         * lib/yesno.c: Include <stdlib.h> unconditionally.
25446         (rpmatch): Add prototype.
25447
25448 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25449
25450         More patches to assume C89 or better.
25451         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
25452         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
25453         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
25454         or for string.h.
25455         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
25456         stdlib.h.
25457         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
25458         C headers.
25459         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
25460         string.h.
25461         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
25462         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
25463         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
25464         or for string.h.
25465         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
25466         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
25467         C headers.
25468         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
25469         memcpy.
25470         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
25471         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
25472         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
25473         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
25474         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
25475         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
25476         string.h, free.
25477         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
25478         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
25479         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
25480         C headers, or for string.h.
25481         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
25482         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
25483         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
25484         headers, memory.h, stdlib.h, string.h, strings.h.
25485         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
25486         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
25487         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
25488         strchr.
25489         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
25490         headers, memory.h, string.h.
25491         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
25492         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
25493         free.
25494         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
25495         headers.
25496         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
25497         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
25498         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
25499         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
25500         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
25501
25502 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25503
25504         More K&R removal.
25505
25506         * lib/acosl.c (main): Use a prototype.
25507         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
25508         tanl.c: Likewise.
25509
25510         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
25511
25512         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
25513         (getopt, etopt_long, getopt_long_only, _getopt_internal)
25514         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
25515         with a prototype.
25516         * lib/getopt.c (const): Remove macro.
25517         Include <string.h> unconditionally.
25518         (my_index): Remove; all uses changed to strchr.
25519         (strlen): Remove decl.
25520         (exchange): Remove forward decl; no longer needed.
25521         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
25522         Define with prototype.
25523         * lib/getopt1.c (const): Remove macro.
25524         (getopt_long, getopt_long_only, main): Define with prototype.
25525
25526         * lib/getugroups.c: Include <string.h> unconditionally.
25527
25528         * lib/getusershell.c: Include <stdlib.h> unconditionally.
25529         (getusershell, setusershell, endusershell, readname, main):
25530         Define with prototypes.
25531
25532         * lib/group-member.c: Include group-member.h first.
25533         Include <stdlib.h> unconditionally.
25534
25535         * lib/hard-locale.c: Include hard-locale.h first.
25536         Include <stdlib.h>, <string.h> unconditionally.
25537
25538         * lib/hash.c (free, malloc): Remove decls.
25539         Include <stdlib.h> unconditionally.
25540
25541         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
25542         (getenv): Do not declare.
25543
25544         * lib/idcache.c: Include <string.h> unconditionally.
25545
25546         * lib/long-options.c: Include long-options.h first, to test interface.
25547         Include <stdlib.h> unconditionally.
25548
25549         * lib/makepath.c: Include makepath.h first, to test interface.
25550         Include <stdlib.h> and <string.h> unconditionally.
25551
25552         * lib/linebuffer.c: Include <stdlib.h>.
25553         (free): Remove decl.
25554
25555         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
25556         stddef.h. rpl_malloc returns void *, not char *.
25557         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
25558         prototype.
25559
25560         * lib/md5.h: Include <limits.h> unconditionally.
25561         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
25562         (__P): Remove; all uses removed.
25563         * lib/md5.c: Include "md5.h" first.
25564         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
25565         md5_buffer, md5_process_bytes, md5_process_block):
25566         Define with prototypes.
25567         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
25568         * lib/sha.c: Include "sha.h" first.
25569         Include <stdlib.h>, <string.h> unconditionally.
25570
25571         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
25572         * lib/memcmp.c (__ptr_t): Likewise.
25573         * lib/memrchr.c (__ptr_t): Likewise.
25574         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
25575         Include <string.h> unconditionally.
25576         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
25577         * lib/memchr.c: Include <stdlib.h> unconditionally.
25578         * lib/memchr.c (LONG_MAX): Remove.
25579         * lib/memrchr.c (LONG_MAX): Likewise.
25580         * lib/memchr.c (__memchr): Define via a prototype.
25581         * lib/memrchr.c (__memrchr): Likewise.
25582         * lib/memcmp.c (__P): Remove, and remove all uses.
25583         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
25584         Remove forward decls; no longer needed.
25585         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
25586         Use types required by C89 in prototype.
25587
25588         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
25589         * lib/savedir.c: Likewise.
25590         * lib/mkdir.c (free): Remove decl.
25591         * lib/rmdir.c (rmdir): Define with a prototype.
25592         * lib/savedir.c: Include savedir.h first, to test interface.
25593
25594         * lib/mktime.c (STDC_HEADERS): Remove.
25595         Include <stdlib.h>, <string.h> unconditionally.
25596
25597         * lib/modechange.c: Include <stdlib.h> unconditionally.
25598         (malloc): Remove decl.
25599
25600         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
25601         (free): Remove decl.
25602
25603         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
25604         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
25605         (This type really should be intptr_t, but that's a C99ism.)
25606         (_obstack_memcpy): Remove: all uses changed to memcpy.
25607         Include <string.h> unconditionally.
25608         (struct obstack): Assume __STDC__ for types of members
25609         chunkfun, freefun, extra_arg.
25610         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
25611         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
25612         obstack_begin, obstack_specify_allocation,
25613         obstack_specify_allocation_with_arg, obstack_chunkfun,
25614         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
25615         Remove unprototyped decls and the macros that use them.
25616         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
25617         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
25618         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
25619         (defined __STDC__ && __STDC__)]:
25620         Remove nonprototyped code.
25621         Include <stdlib.h> unconditionally.
25622         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
25623         _obstack_allocated_p, _obstack_free, obstack_free,
25624         _obstack_memory_used, print_and_abort):
25625         Define using prototypes.
25626         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
25627         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
25628         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
25629         obstack_next_free, obstack_object_size, obstack_room) [0]:
25630         Remove unused, unprototyped code.
25631
25632         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
25633
25634         * lib/physmem.c (physmem_total, physmem_available, main): Define
25635         with prototypes.
25636
25637         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
25638         (main): Define with a prototype.
25639
25640         * lib/posixver.c (getenv): Remove decl.
25641
25642         * lib/putenv.c (malloc): Returns void *, not char *.
25643         Include <string.h> unconditionally.
25644         (strchr, memcpy, NULL): Do not define.
25645
25646         * lib/readtokens.c: Include readtokens.h first, to test interface.
25647         Include <stdlib.h>, <string.h> unconditionally.
25648         (init_tokenbuffer): Define with a prototype.
25649
25650         * lib/regex.c (PARAMS): Remove.  All uses removed.
25651         All uses of _RE_ARGS removed, too.
25652         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
25653         unconditionally.
25654         (bzero): Assume memset exists.
25655         (memcmp, memcpy, NULL): Remove.
25656         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
25657         char, or assignments to local vars of type signed char.
25658         (init_syntax_once, PREFIX(extract_number_and_incr),
25659         PREFIX(print_partial_compiled_pattern),
25660         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
25661         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
25662         PREFIX(regex_grow_registers), PREFIX(regex_compile),
25663         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
25664         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
25665         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
25666         wcs_compile_range, byte_compile_range, truncate_wchar,
25667         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
25668         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
25669         count_mbs_length, wcs_re_match_2_internal,
25670         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
25671         PREFIX(alt_match_null_string_p),
25672         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
25673         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
25674         regfree, PREFIX(extract_number)): Define with prototype.  Remove
25675         now-unnecessary declaration, if any.
25676         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
25677         regcomp, regexec):
25678         Remove now-unnecessary casts among pointer types.
25679         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
25680
25681         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
25682         (free): Remove decl.
25683
25684         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
25685
25686         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
25687         (free): Remove decl.
25688
25689         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
25690         * lib/xgetcwd.c: Likewise.
25691
25692         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
25693         (free): Remove decl.
25694
25695         * lib/strchrnul.c (strchrnul): Define with a prototype.
25696         Fix bug: c_in was not converted to char before searching.
25697
25698         The following changes are not K&R related:
25699
25700         * lib/group-member.h: Include <sys/types.h>, so that this file is
25701         self-contained.
25702         * lib/makepath.h: Likewise.
25703
25704         * lib/getusershell.c (readname, default_index, line_size, readname):
25705         Use size_t, not int, for sizes.
25706         (readname): If the size overflows, report an error instead of
25707         looping forever.
25708
25709 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25710
25711         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25712         libc.
25713
25714 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25715
25716         * README: New section: portability guidelines.
25717
25718 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25719
25720         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25721         C89 spec.
25722
25723 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25724
25725         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25726
25727 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25728
25729         Assume C89 or better; remove K&R cruft.
25730         A few of these changes were first proposed by Derek Robert Price
25731         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25732
25733         * lib/addext.c: Include <string.h> unconditionally.
25734         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25735         Don't declare getenv or malloc.
25736
25737         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25738         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25739         (NULL): Remove.
25740         (find_stack_direction, alloca): Use prototypes.
25741
25742         * lib/atexit.c (atexit): Define using a prototype.
25743
25744         * lib/basename.c, dirname.c, stripslash.c:
25745         Include <string.h> unconditionally.
25746
25747         * lib/bcopy.c: Include <stddef.h>.
25748         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25749
25750         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25751
25752         * lib/error.h (error, error_at_line, error_print_progname)
25753         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25754         * lib/error.c: Include error.h first, to check interface.
25755         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25756         (VA_START): Remove; all uses changeed to va_start.
25757         (exit, strerror): Remove decls.
25758         (error_print_progname): Prototype uncondionally.
25759         Don't include <errno.h>; no longer needed.
25760         (private_strerror): Remove.
25761         (error_tail): Always define.
25762         (error, error_at_line): Assume C89 or better; always use prototypes.
25763         * lib/fatal.c: Include "fatal.h" first, to test interface.
25764         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25765         (VA_START): Remove; all uses changed to va_start.
25766         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25767         this case.
25768         (exit): Remove decl.
25769         (fatal): Prototype unconditionally.  Assume va_start works.
25770         Abort at end, to pacify gcc.
25771
25772         * lib/euidaccess.c (main): Define with a prototype.
25773
25774         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25775
25776         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25777
25778         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25779         prototypes.
25780         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25781         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25782         (getenv): Remove decl.
25783         (fnmatch): Define using a prototype.
25784         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25785         (FCT): Define using a prototype.
25786
25787         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25788
25789         * lib/gethostname.c: Include <stddef.h>.
25790         (gethostname): Define with prototype.  Length is size_t, not int.
25791
25792 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25793
25794         Assume C89 or better; remove K&R cruft.
25795         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25796         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25797         string.h, getenv, malloc.
25798         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25799         headers.
25800         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25801         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25802         do not check for strerror.
25803         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25804         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25805         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25806         do not check for doprnt or vprintf.
25807         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25808         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25809
25810 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25811
25812         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25813         getversion.c should have been removed then, but was accidentally
25814         preserved.
25815
25816         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25817         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25818
25819 2003-09-08  Karl Berry  <karl@gnu.org>
25820
25821         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25822                 config, forget about prep.
25823
25824         * config/depcomp, missing: update from automake.
25825
25826 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25827
25828         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25829         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25830
25831 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25832
25833         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25834         copy_tm_result.  Bug reported by Simon Josefsson in
25835         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25836
25837 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25838
25839         * m4/time_r.m4: New file.
25840         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25841         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25842         is. Check for timegm declaration.
25843         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25844         Do not check for gmtime_r.
25845         Replace mktime if __mktime_internal does not exist and if mktime
25846         hasn't been replaced already.
25847
25848 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25849
25850         * lib/time_r.c, lib/time_r.h: New files.
25851
25852         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25853         __localtime_r.
25854         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25855         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25856
25857         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25858         __gmtime_r.
25859         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25860         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25861         Include <time_r.h>.
25862
25863         * lib/timegm.c: Switch to glibc implementation, with the following
25864         changes:
25865         [defined HAVE_CONFIG_H]: Include <config.h>.
25866         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25867         (__mktime_internal) [!defined _LIBC]: New decl.
25868         (__gmtime_r) [!defined _LIBC]: New macro and function.
25869         (timegm): Use a prototype, since gnulib assumes C89.
25870         Do not bother declaring tmp to be const, as it's not really usefu.
25871         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25872         (timegm): Declare only if HAVE_DECL_TIMEGM.
25873
25874 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25875
25876         * MODULES.html.sh (func_all_modules): Add time_r.
25877         * modules/time_r: New file.
25878         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25879         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25880
25881 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25882
25883         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25884         Bug reported by Lute Kamstra in
25885         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25886
25887         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25888         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25889         course with correspondingly smaller numbers for tomorrow and
25890         yesterday.  From Tadayoshi Funaba.  Originally installed into
25891         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25892         coreutils merge?).
25893
25894 2003-08-31  Simon Josefsson  <jas@extundo.com>
25895
25896         * modules/timegm: New file.
25897         * MODULES.html.sh (func_all_modules): Add timegm.
25898
25899 2003-08-31  Simon Josefsson  <jas@extundo.com>
25900
25901         * m4/timegm.m4: New file.
25902
25903 2003-08-31  Simon Josefsson  <jas@extundo.com>
25904
25905         * lib/timegm.h: New file.
25906         * lib/timegm.c: New file.  Based on
25907         wget-1.8.2/src/http.c:mktime_from_utc.
25908
25909 2003-08-31  Karl Berry  <karl@gnu.org>
25910
25911         * lib/argp.h: update from libc.
25912
25913 2003-08-28  Bruno Haible  <bruno@clisp.org>
25914
25915         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25916         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25917         followed by '#define fnmatch fnmatch_posix' gives an error.
25918
25919 2003-08-28  Bruno Haible  <bruno@clisp.org>
25920
25921         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25922         warning on QNX, which defines O_BINARY to 000000.
25923
25924 2003-08-27  Jim Meyering  <jim@meyering.net>
25925
25926         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25927         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25928         would fail after 32.  Reported by Danny Levinson.  Details here:
25929         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25930
25931 2003-08-24  Bruno Haible  <bruno@clisp.org>
25932
25933         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25934         MSVC7 <stdio.h> is included later.
25935
25936 2003-08-22  Simon Josefsson  <jas@extundo.com>
25937
25938         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25939
25940 2003-08-20  Karl Berry  <karl@gnu.org>
25941
25942         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25943
25944 2003-08-20  Bruno Haible  <bruno@clisp.org>
25945
25946         * modules/progname: New file.
25947         * MODULES.html.sh (func_all_modules): Add progname.
25948
25949 2003-08-20  Bruno Haible  <bruno@clisp.org>
25950
25951         * lib/progname.h: New file, from GNU gettext.
25952         * lib/progname.c: New file, from GNU gettext.
25953         * lib/progreloc.c: New file, from GNU gettext.
25954
25955 2003-08-19  Jim Meyering  <jim@meyering.net>
25956
25957         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25958         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25959
25960 2003-08-19  Bruno Haible  <bruno@clisp.org>
25961
25962         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25963         more.
25964
25965 2003-08-19  Bruno Haible  <bruno@clisp.org>
25966
25967         * lib/xstrdup.c: Assume <string.h> exists.
25968
25969 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25970
25971         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25972         in makefile rules.
25973
25974 2003-08-18  Jim Meyering  <jim@meyering.net>
25975
25976         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25977         * m4/lib-ld.m4: Likewise.
25978
25979 2003-08-18  Jim Meyering  <jim@meyering.net>
25980
25981         * lib/setenv.h: Indent nested cpp directive.
25982         * lib/vasnprintf.c: Remove trailing blanks.
25983
25984 2003-08-17  Simon Josefsson  <jas@extundo.com>
25985
25986         * modules/xstrndup: New file.
25987         * MODULES.html.sh (func_all_modules): Add xstrndup.
25988
25989 2003-08-17  Simon Josefsson  <jas@extundo.com>
25990
25991         * modules/argp: Fix autoconf macro name. Add more dependencies.
25992
25993 2003-08-17  Simon Josefsson  <jas@extundo.com>
25994
25995         * m4/xstrndup.m4: New file.
25996
25997 2003-08-17  Simon Josefsson  <jas@extundo.com>
25998
25999         * m4/argp.m4: New file.
26000
26001 2003-08-17  Simon Josefsson  <jas@extundo.com>
26002             Bruno Haible  <bruno@clisp.org>
26003
26004         * lib/xstrndup.h: New file.
26005         * lib/xstrndup.c: New file.
26006
26007 2003-08-17  Bruno Haible  <bruno@clisp.org>
26008
26009         * modules/strndup (Files, Include): Add lib/strndup.h.
26010
26011 2003-08-17  Bruno Haible  <bruno@clisp.org>
26012
26013         * modules/euidaccess (Files): Add lib/euidaccess.h.
26014
26015 2003-08-17  Bruno Haible  <bruno@clisp.org>
26016
26017         * lib/strndup.h: New file.
26018
26019 2003-08-17  Bruno Haible  <bruno@clisp.org>
26020
26021         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
26022         like AC_GNU_SOURCE.
26023         * modules/extensions (configure.ac): Comment out the invocation of
26024         gl_USE_SYSTEM_EXTENSIONS.
26025
26026 2003-08-16  Paul Eggert  <eggert@twinsun.com>
26027
26028         Merges from coreutils, etc.
26029         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
26030         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
26031         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
26032         fixing a typo.
26033         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
26034         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
26035
26036 2003-08-16  Paul Eggert  <eggert@twinsun.com>
26037
26038         Document merge from coreutils.
26039         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
26040         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
26041         * modules/utime: Add m4/utimes-null.m4.
26042
26043 2003-08-16  Paul Eggert  <eggert@twinsun.com>
26044
26045         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
26046         space, undoing this 2003-08-12 change:
26047         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
26048
26049 2003-08-16  Paul Eggert  <eggert@twinsun.com>
26050
26051         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
26052         strtoul.c from libc, undoing this 2003-08-12 change:
26053         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
26054
26055 2003-08-16  Jim Meyering  <jim@meyering.net>
26056
26057         Merges from coreutils.
26058         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
26059         prefix.  Adjust cache variables similarly.  Create 500 rather than
26060         just 300 files, to exercise bug on Darwin6.5, too.
26061         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
26062         $missing_dir.
26063         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
26064         AM_SYS_POSIX_TERMIOS.
26065         Reported by mkc@mathdogs.com.
26066         Also change use of $am_cv_sys_posix_termios
26067         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
26068         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
26069         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
26070         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
26071         in /proc/mounts until it finds one with matching device number.  This
26072         is unnecessary when the FILE argument *is* a mount point.  No stat call
26073         is necessary in that case.  So, disable the statvfs-testing code on
26074         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
26075         as RedHat bug# 84846.
26076         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
26077         to 1MB, so as not to render systems with no stack size limit (e.g.,
26078         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
26079         Include <unistd.h>.  On some systems,
26080         it is required for the definition of _SC_PAGESIZE.
26081
26082 2003-08-16  Jim Meyering  <jim@meyering.net>
26083
26084         Merge from coreutils.
26085         * lib/xstrtoimax.c: #else #if -> #elif.
26086         * lib/xstrtoumax.c: Likewise.
26087
26088 2003-08-16  Jim Meyering  <jim@meyering.net>
26089
26090         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
26091         * m4/utimes.m4: Removed.
26092         * m4/utimes-null.m4: Renamed from utimes.m4.
26093
26094         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
26095         to 1MB, so as not to render systems with no stack size limit (e.g.,
26096         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
26097         Include <unistd.h>.  On some systems,
26098         it is required for the definition of _SC_PAGESIZE.
26099
26100 2003-08-16  Jim Meyering  <jim@meyering.net>
26101         and Paul Eggert  <eggert@cs.ucla.edu>
26102
26103         Merges from coreutils, etc.
26104
26105         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
26106         using the latest version from cvs.  This avoids problems with #line
26107         directives using a vendor (Sun) compiler.
26108         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
26109         Don't set GETGROUPS_LIB here; now it's
26110         done via getgroups.m4's wrapper function.
26111         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
26112         rather than just in sh-util/configure.in, so that the
26113         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
26114         same.
26115         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
26116         AC_FUNC_GETLOADAVG where to find getloadavg.c.
26117         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
26118         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
26119         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
26120         Remove code that is now done by the newly-required macros.
26121         Append $(EXEEXT) to DF_PROG.
26122         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
26123         Do not invoke or require the following here,
26124         since prereq.m4 or some gnulib .m4 now does this for us:
26125         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
26126         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
26127         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
26128         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
26129         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
26130         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
26131         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
26132         AC_FUNC_OBSTACK.
26133         Do not replace the following functions, as this is now the job
26134         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
26135         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
26136         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
26137         atexit getpass, strdup, getpagesize.
26138         Replace 'raise'.
26139         Do not check for the following functions, as this is now the job
26140         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
26141         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
26142         setregid.
26143         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
26144         Check for sys/sysctl.h.
26145         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
26146         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
26147         of checking for ssize_t ourselves.
26148
26149         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
26150         Require every macro that gnulib/modules/* suggests for us.
26151         (jm_PREREQ_ADDEXT): New macro.
26152         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
26153         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
26154
26155         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
26156         (gl_PHYSMEM): Use it.
26157         Also check for `table' function.
26158         Check for new headers and functions.
26159         Add check for sys/sysmp.h.
26160         With suggestions from Kaveh Ghazi.
26161         Ignore headers that are present but cannot be compiled.  This
26162         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
26163         C 5.4.
26164
26165 2003-08-15  Paul Eggert  <eggert@twinsun.com>
26166
26167         Document merge from coreutils.
26168         * modules/userspec: Depend on posixver.
26169         * modules/strftime: Depend on tzset.
26170
26171 2003-08-15  Paul Eggert  <eggert@twinsun.com>
26172
26173         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
26174         rather than tab, after '#' in shell-script copyright notices.
26175         Suggested by Bruno Haible.
26176
26177 2003-08-15  Paul Eggert  <eggert@twinsun.com>
26178
26179         * config/srclist-update: Use three spaces, rather than tab, after '#'
26180         in shell-script copyright notices.  Suggested by Bruno Haible.
26181         Remove unnecessary parenthesization in regular expression.
26182
26183 2003-08-15  Jim Meyering  <jim@meyering.net>
26184
26185         Merge from coreutils.
26186         * lib/xgethostname.c: Include <stdlib.h>.
26187         (xghostname): Don't exit for anything other than memory-related
26188         failure; just return NULL.
26189         * lib/userspec.c: Include "posixver.h".
26190         (parse_user_spec): Accept `.' as a separator only
26191         in pre-POSIX-200112 mode.
26192         * lib/strtoimax.c: Use #elif rather than #else #if.
26193         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
26194         Remove function, now that we can rely on a working tzset function.
26195         [!_LIBC]: Ensure that the required autoconf test has been run.
26196         [!defined _NL_CURRENT && HAVE_STRFTIME]:
26197         Use underlying_strftime for %r.
26198         * lib/sha.c: Merge in some clean-up and optimization changes from
26199         glibc.
26200         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
26201         Ensure that it is a multiple of 64.
26202         Rearrange loop exit tests so as to avoid performing an
26203         additional fread after encountering an error or EOF.
26204         * lib/realloc.c: Update copyright date.
26205
26206 2003-08-15  Jim Meyering  <jim@meyering.net>
26207         and Paul Eggert  <eggert@twinsun.com>
26208
26209         Merge from coreutils.
26210         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
26211         member but strut utmpx does not.  Needed for AIX 4.3.3.
26212         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
26213
26214 2003-08-15  Jim Meyering  <jim@meyering.net>
26215         and Paul Eggert  <eggert@cs.ucla.edu>
26216
26217         Merges from coreutils, etc.
26218         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
26219         Require gl_FUNC_TZSET_CLOBBER.
26220         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
26221         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
26222         members.
26223
26224 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26225
26226         Help the merge from coreutils.
26227         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
26228         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
26229         * m4/tzset.m4: Use it too.
26230
26231 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26232
26233         * modules/tzset: New file.
26234
26235 2003-08-14  Jim Meyering  <jim@meyering.net>
26236
26237         Merges from coreutils.
26238         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
26239         variable names, rather than @FNMATCH_H@.
26240         * modules/alloca: Likewise for $(ALLOCA_H).
26241
26242         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
26243         the three copies of the literal target, `fnmatch.h'.
26244         * modules/alloca (alloca.h): Likewise.
26245
26246 2003-08-14  Jim Meyering  <jim@meyering.net>
26247
26248         Merge from coreutils.
26249         * m4/tzset.m4: New file.
26250         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
26251         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
26252         otherwise, AIX 5.1 systems would end up using the latter.
26253         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
26254         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
26255         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
26256         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
26257
26258 2003-08-14  Jim Meyering  <jim@meyering.net>
26259
26260         Merge from coreutils.
26261         * lib/obstack.h: Whitespace changes.
26262         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
26263         and xcalloc return values.
26264         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
26265         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
26266         hang on OSF/1 5.1 for DIR on both local and remote file systems.
26267         Reported by (and fix confirmed by) Nelson H. F. Beebe.
26268         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26269         error from mntctl.
26270         Use mntctl's return value to drive the entry-processing loop, since
26271         we can't rely on the value of the vmt_length member in the last
26272         entry.  On some systems doing so could result in exhausting
26273         virtual memory.  Based in part on a patch from Mike Jetzer.
26274
26275 2003-08-14  Jim Meyering  <jim@meyering.net>
26276         and Paul Eggert  <eggert@twinsun.com>
26277
26278         Merges from coreutils, plus other fixes.
26279         * lib/physmem.c: Merge in portability changes from gcc/libiberty
26280         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
26281         for credits and details.  Thanks to Kaveh Ghazi for helping
26282         to keep these files in sync.
26283         (ARRAY_SIZE): Define it.
26284         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
26285         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
26286         (memcasecmp): Don't assume size_t fits in unsigned int.
26287         Remove casts and duplicate code.
26288         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
26289         (memcpy): Remove definition.
26290         Merge in some clean-up and optimization changes from glibc.
26291         [BLOCKSIZE]: Move definition to top of file.
26292         Ensure that it is a multiple of 64.
26293         Rearrange loop exit tests so as to avoid performing an
26294         additional fread after encountering an error or EOF.
26295         * lib/md5.h (md5_uintptr): Define.
26296         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
26297         return to the initial working directory.  Preserve errno
26298         for caller.
26299         * lib/idcache.c: Include "xalloc.h".
26300         (xmalloc, xrealloc): Remove decls.
26301         (getuser): Remove casts no longer required in C89.
26302         * lib/human.c: Include stdio.h, for sprintf.
26303         * lib/group-member.c: Include "xalloc.h".
26304         (xmalloc, xrealloc): Remove decls.
26305         (get_group_info): Remove casts no longer required in C89.
26306         * lib/getusershell.c (readname): Remove casts no longer required in
26307         C89.
26308         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
26309         * lib/getline.c: Whitespace fix, from coreutils.
26310
26311 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26312
26313         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
26314         Check for isascii.
26315
26316         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26317         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26318         Undo previous (whitespace-only) change.
26319
26320 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26321
26322         * lib/exclude.c: Include <ctype.h>
26323         (IN_CTYPE_DOMAIN): New macro.
26324         (is_space): New fn.
26325         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
26326         and empty lines.
26327
26328         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26329         Undo previous (whitespace-only) change.
26330
26331 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26332
26333         * config/srclist-update: Change update back to the old behavior,
26334         leaving whitespace alone.  Use one 'sed' command rather than a
26335         pipeline.
26336         (fixlicense): Now a variable, not a function.
26337         (remove_trailing_blanks): Remove.
26338         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
26339         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26340         Undo previous (whitespace-only) change.
26341
26342 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26343
26344         Merge from coreutils.
26345         * modules/euidaccess: Add lib_SOURCES, include for new
26346         file euidaccess.h
26347
26348 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26349
26350         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26351         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26352         Normalize leading white space and remove trailing white space.
26353
26354         Merge from coreutils
26355         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
26356
26357         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
26358         0.12.1.  These files are now being upgraded automatically by
26359         ../config/srclist-update.
26360
26361 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26362
26363         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26364         Normalize leading white space and remove trailing white space.
26365         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
26366         notice, as per ../config/srclist-update.
26367
26368         Merge from coreutils.
26369         * lib/euidaccess.h: New file.
26370         * lib/euidaccess.c: Include it.
26371         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
26372         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
26373         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
26374
26375 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26376
26377         * config/srclist-update: Add copyright notice.
26378         (remove_id_lines, remove_trailing_blanks): New constants.
26379         (fixfile): Use them to normalize spacing a bit in copied files.
26380         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26381         Normalize leading white space and remove trailing white space.
26382
26383         * config/texinfo.tex: Sync with texinfo.
26384
26385         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
26386         strtoul.c from libc, to merge coreutils whitespace changes.
26387
26388         * config/srclist.txt: Get the following m4 files from gettext:
26389         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
26390         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
26391         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
26392         wint_t.m4.
26393
26394 2003-08-12  Karl Berry  <karl@gnu.org>
26395
26396         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
26397         been made.
26398
26399 2003-08-11  Paul Eggert  <eggert@twinsun.com>
26400
26401         * modules/gnu-source, m4/gnu-source.m4:
26402         Remove; we're assuming Autoconf 2.54 or later now.
26403         Suggested by Bruno Haible.
26404         * MODULES.html.sh (func_all_modules): Remove gnu-source.
26405
26406 2003-08-11  Bruno Haible  <bruno@clisp.org>
26407
26408         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
26409
26410 2003-08-11  Bruno Haible  <bruno@clisp.org>
26411
26412         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
26413         (vasnprintf): Use it instead of wcslen.
26414
26415 2003-08-11  Bruno Haible  <bruno@clisp.org>
26416
26417         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
26418         value to ensure that _Bool promotes to int. Use #define for _Bool when
26419         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
26420
26421 2003-08-10  Karl Berry  <karl@gnu.org>
26422
26423         * lib/regex.h: update from libc (whitespace fix).
26424
26425 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26426
26427         Merge some files from coreutils.  These changes were
26428         originally made by Jim Meyering.
26429         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
26430         many older Unixes require this.
26431         * lib/alloca.c (alloca): Remove cast to argument of free;
26432         no longer needed in C89.
26433         * lib/alloca_.h, regex.h: Fix white space to match
26434         what GNU indent does.
26435
26436 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26437
26438         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
26439         apparently Emacs's Unicode mode got confused before my 2003-08-05
26440         checkin.
26441
26442 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26443
26444         * m4/extensions.m4: New file.
26445         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
26446         Require gl_USE_SYSTEM_EXTENSIONS.
26447         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
26448         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
26449
26450 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26451
26452         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
26453         * modules/extensions, modules/gnu-source: New files.
26454         * modules/timespec, modules/unlocked-io: Depend on extensions.
26455
26456 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26457
26458         * modules/restrict: New file.
26459         * MODULES.html.sh (func_all_modules): Add restrict.
26460         * modules/regex: Depend on restrict.
26461
26462 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26463
26464         * m4/restrict.m4: New file.
26465         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
26466
26467 2003-08-07  Bruno Haible  <bruno@clisp.org>
26468
26469         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
26470         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
26471
26472 2003-08-07  Bruno Haible  <bruno@clisp.org>
26473
26474         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
26475         makes the module 'getndelim2' compatible with the module 'getline'.
26476
26477 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26478
26479         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
26480         byte with "\201" to avoid glitches when editing that source file
26481         with multi-gnome-terminal.
26482
26483 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26484
26485         * lib/bumpalloc.h: Remove.
26486
26487 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26488
26489         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
26490         * modules/bumpalloc: Remove.
26491
26492 2003-08-04  Paul Eggert  <eggert@twinsun.com>
26493
26494         * lib/getloadavg.c: Change copyright notice and spacing to conform to
26495         GNU coding style.
26496
26497         Merge from coreutils.
26498         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
26499         1. From glibc.
26500         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
26501         from Karl Berry, implemented by Jim Meyering.
26502         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
26503         from Dmitry V. Levin.
26504         Remove anachronistic cast of xrealloc.
26505         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
26506         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
26507         type. Otherwise, it wouldn't compile with at least /bin/cc on
26508         ymp-cray-unicos9.0.2.X.
26509         Combine two mostly-identical uses of alloca into one.
26510         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
26511
26512 2003-08-04  Dave Love  <d.love@dl.ac.uk>
26513
26514         [From Emacs.]
26515
26516         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
26517         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
26518         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
26519         obsolete NLIST_NAME_UNION.
26520         [__GNU__]: Undef BSD and FSCALE.
26521         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
26522
26523 2003-08-03  Paul Eggert  <eggert@twinsun.com>
26524
26525         * lib/stdbool_.h (_Bool): Make it signed char, instead of
26526         an enum type, so that it's guaranteed to promote to int.  See:
26527         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
26528
26529 2003-08-03  Karl Berry  <karl@gnu.org>
26530
26531         * config/depcomp: update from automake.
26532
26533 2003-07-31  Paul Eggert  <eggert@twinsun.com>
26534
26535         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
26536         (strerror): Don't assume that a printable int fits in 14 bytes.
26537
26538 2003-07-31  Bruno Haible  <bruno@clisp.org>
26539
26540         * modules/getpass-gnu: New file.
26541         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
26542
26543 2003-07-31  Bruno Haible  <bruno@clisp.org>
26544
26545         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
26546
26547 2003-07-24  Karl Berry  <karl@gnu.org>
26548
26549         * config/missing: update from automake.
26550
26551 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
26552             Bruno Haible  <bruno@clisp.org>
26553
26554         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
26555         * lib/getline.c (getline, getdelim): Likewise.
26556         Remove _GNU_SOURCE define; now it's defined in config.h through
26557         m4/getline.m4.
26558
26559 2003-07-23  Karl Berry  <karl@gnu.org>
26560
26561         * config/config.sub: update from prep.
26562
26563 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26564
26565         * modules/xalloc (Depends-on): Add exitfail.
26566         * modules/xmemcoll: Likewise.
26567
26568 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26569
26570         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
26571         over-parenthesization in macros.
26572
26573         Sync with coreutils.
26574
26575         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
26576         required by C99.
26577
26578         Use `exit_failure' for xalloc and xmemcoll instead of their own
26579         private exit-failure variables.
26580         * lib/xalloc.h (xalloc_exit_failure): Remove.
26581         * lib/xmalloc.c: Likewise.  Include exitfail.h.
26582         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
26583         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
26584         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
26585         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
26586
26587 2003-07-20  Jim Meyering  <jim@meyering.net>
26588
26589         * modules/closeout (Depends-on): Add exitfail.
26590         Suggestion from Bruno Haible.
26591
26592 2003-07-19  Karl Berry  <karl@gnu.org>
26593
26594         * config/config.sub: update from prep.
26595
26596 2003-07-18  Paul Eggert  <eggert@twinsun.com>
26597
26598         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
26599         Remove.
26600         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
26601         to test that it can stand by itself.  Include "exitfail.h".
26602         Clients should set exit_failure instead.
26603         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
26604
26605 2003-07-18  Bruno Haible  <bruno@clisp.org>
26606
26607         * modules/getndelim2: New file.
26608         * modules/getline: Share files with module getndelim2.
26609         * modules/getnline: Depend on getndelim2 instead of sharing files with
26610         it. Add getnline.c to lib_SOURCES.
26611         * MODULES.html.sh (func_all_modules): Add getndelim2.
26612
26613 2003-07-18  Bruno Haible  <bruno@clisp.org>
26614
26615         * m4/getndelim2.m4: New file.
26616         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
26617         invoke gl_PREREQ_GETNDELIM2.
26618         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
26619         gl_PREREQ_GETNDELIM2.
26620         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
26621         gl_GETNDELIM2.
26622
26623 2003-07-18  Bruno Haible  <bruno@clisp.org>
26624
26625         * lib/getndelim2.h: New file.
26626         * lib/getndelim2.c: Make into a module of its own. Include config.h,
26627         getndelim2.h.
26628         (getndelim2): Make non-static. Change return type to ssize_t.
26629         * lib/getline.h: Change argument names.
26630         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
26631         * lib/getnline.c: Include getndelim2.h.
26632
26633 2003-07-18  Andreas Schwab  <schwab@suse.de>
26634
26635         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
26636
26637 2003-07-17  Karl Berry  <karl@gnu.org>
26638
26639         * config/config.sub: update from prep.
26640
26641 2003-07-17  Bruno Haible  <bruno@clisp.org>
26642
26643         * modules/getnline: New file.
26644         * modules/getline: Add lib/getndelim2.c to source file list.
26645         * MODULES.html.sh (func_all_modules): Add getnline.
26646
26647 2003-07-17  Bruno Haible  <bruno@clisp.org>
26648
26649         * m4/getnline.m4: New file.
26650
26651 2003-07-17  Bruno Haible  <bruno@clisp.org>
26652
26653         * m4/Makefile.am.in: Remove file.
26654         * m4/Makefile.am: Remove file.
26655         * m4/Makefile.in: Remove file.
26656
26657 2003-07-17  Bruno Haible  <bruno@clisp.org>
26658
26659         * lib/getnline.h: New file.
26660         * lib/getnline.c: New file.
26661         * lib/getndelim2.c: New file, extracted from getline.c.
26662         (getndelim2): Renamed from getdelim2, with added nmax argument.
26663         * lib/getline.c: Include getndelim2.c.
26664         (getdelim2): Moved out to getndelim2.c.
26665         (getline, getdelim): Update.
26666
26667 2003-07-17  Bruno Haible  <bruno@clisp.org>
26668
26669         * lib/Makefile.am: Remove file.
26670         * lib/Makefile.in: Remove file.
26671
26672 2003-07-17  Bruno Haible  <bruno@clisp.org>
26673
26674         * configure.in: Remove file.
26675         * Makefile.in: Remove file.
26676
26677 2003-07-17  Bruno Haible  <bruno@clisp.org>
26678
26679         * MODULES.html.sh: Put the </BODY> right before </HTML>.
26680
26681 2003-07-16  Karl Berry  <karl@gnu.org>
26682
26683         * config/srclist-update: was running fixlicense twice, which caused
26684                 texinfo.tex to be nullified for some reason.  Simplify,
26685                 $gplsrc is no longer needed as far as I can see?
26686
26687 2003-07-16  Jim Meyering  <jim@meyering.net>
26688
26689         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
26690
26691 2003-07-15  Paul Eggert  <eggert@twinsun.com>
26692
26693         * config/srclist.txt: Get the following files from gettext-runtime/intl
26694         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
26695         ref-del.sin.  From Bruno Haible.
26696         * config/srclist-update (fixfile): Change grep pattern again, since the
26697         previous fix didn't work (there was another trailing $).  Use
26698         '[$]' to escape the $s.
26699
26700 2003-07-15  Karl Berry  <karl@gnu.org>
26701
26702         * lib/vasnprintf.c: update from gettext.
26703
26704 2003-07-15  Karl Berry  <karl@gnu.org>
26705
26706         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26707         gets expanded when surrounded by '$'.
26708
26709 2003-07-15  Jim Meyering  <jim@meyering.net>
26710
26711         * modules/save-cwd: Don't depend on error.  From Derek Price.
26712
26713 2003-07-15  Jim Meyering  <jim@meyering.net>
26714
26715         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26716
26717 2003-07-14  Simon Josefsson  <jas@extundo.com>
26718
26719         * modules/mempcpy: New file.
26720         * MODULES.html.sh (func_all_modules): Add mempcpy.
26721
26722 2003-07-14  Simon Josefsson  <jas@extundo.com>
26723
26724         * m4/mempcpy.m4: New file.
26725
26726 2003-07-14  Simon Josefsson  <jas@extundo.com>
26727
26728         * lib/mempcpy.h: New file.
26729         * lib/mempcpy.c: New file.
26730
26731 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26732
26733         * modules/getdate, modules/posixtm: Depend on mktime.
26734
26735 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26736
26737         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26738         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26739         unicodeio.c, unicodeio.h, unlocked-io.h:
26740         Switch from LGPL to GPL.
26741
26742 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26743
26744         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26745         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26746         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26747         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26748         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26749         updated automatically by ../config/srclist-update.  This changes
26750         their license from LPGL to GPL.
26751
26752 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26753
26754         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26755         assumed to refer to the root of the most recent stable gettext version.
26756         * config/srclistvars.sh: Add defaults for eggert.
26757         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26758         Match "This program" as well as "The program".  This is needed
26759         for gettext.
26760
26761 2003-07-14  Jim Meyering  <jim@meyering.net>
26762
26763         Don't emit diagnostics.  Let callers do that.
26764         * lib/save-cwd.c: Don't include "error.h".
26765         (save_cwd): Don't call error.  Ensure that errno is valid
26766         when returning nonzero.
26767
26768         * lib/save-cwd.h (restore_cwd): Update prototype.
26769         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26770         Simplify.  Don't call error upon failure.  Let callers do that.
26771         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26772         when auditing is enabled.  But don't bother updating the #if.
26773
26774 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26775
26776         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26777         it breaks C++ compilation.
26778         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26779
26780 2003-07-10  Simon Josefsson  <jas@extundo.com>
26781
26782         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26783
26784 2003-07-10  Jim Meyering  <jim@meyering.net>
26785
26786         * m4/clock_time.m4: Remove trailing blank.
26787         * m4/intmax_t.m4: Likewise.
26788
26789 2003-07-10  Jim Meyering  <jim@meyering.net>
26790
26791         * lib/vasnprintf.c: Remove trailing blanks.
26792         Make cpp indentation consistent.
26793
26794 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26795
26796         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26797         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26798         Switch from LGPL to GPL.
26799
26800 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26801
26802         * config/srclist.txt: Sort sublists.  Add
26803         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26804         that differ from gnulib for one reason or another; we'd like this list
26805         to be smaller but for now let's document what we have.
26806
26807 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26808
26809         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26810         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26811         and sweeter "eval x=$x".
26812         * config/srclist.txt: Get lib/argp* from glibc.
26813
26814 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26815
26816         * lib/mktime.c: Fix some boundary cases and remove need for floating
26817         point.
26818
26819         Issue a compile-time diagnostic if time_t is floating point, or if
26820         two's complement arithmetic is not in effect, or if arithmetic
26821         right shift does not propagate the sign.  These assumptions were
26822         all in the original code but they weren't checked.
26823
26824         (TIME_T_MIDPOINT, verify): New macros.
26825         (__isleap): Remove; it has integer overflow problems.
26826         (leapyear): New function, without those problems.
26827         (ydhms_tm_diff): Remove; splitting into two parts.
26828         (ydhms_diff): New function, containing the arithmetic part of
26829         the old ydhms_tm_diff function.  Issue a compile-time
26830         diagnostic if we are not using C99 integer division.
26831         Avoid casts when possible.
26832         (guess_time_tm): New function, containing the checking part of
26833         the old ydhms_tm_diff function.  Return the new value, rather than
26834         the difference between it and the old.  Accept a new argument T
26835         so that *T specifies the old value.  Check for overflow in the result.
26836
26837         (__mktime_internal): Use a time_t offset, not a long int offset.
26838         This undoes the 2003-06-04 change, which is no longer needed now
26839         that we have better overflow checking.
26840         (localtime_offset): Likewise.
26841
26842         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26843         and long are 64-bit but int is only 32-bit.
26844         (ydhms_diff): Use long int to store year1 and yday1.
26845         Issue a compile-time diagnostic if long int is not wide enough.
26846
26847         (__mktime_internal): Use long int to store adjusted year and yday.
26848         Use plain C rather than preprocessor commands, if that doesn't
26849         affect efficiency.
26850         Check for overflow (and try to repair) after each probe
26851         rather than checking only at the very end.  This avoids some bugs
26852         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26853         does not equal GMT offset at maximum time).
26854         Use integer to check for overflow rather than floating point; this
26855         is more portable to non-IEEE hosts, and is a tad faster.
26856         When we detect that we are oscillating between two values,
26857         don't check whether tm_isdst has the requested value, since
26858         we already know the answer.  When tm_isdst has the wrong value,
26859         use a different heuristic to find the right one, based on the
26860         extreme values actually observed in practice in tz2003a,
26861         rather than the (overly optimistic) "previous 3 calendar quarters".
26862
26863         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26864         "T const" to accommodate glibc style.
26865         (check_result): Use less-confusing report format.  "long" -> "long int.
26866         (main): Likewise.
26867         Don't loop if the iteration overflows time_t.
26868         Allow a negative step in the iteration.
26869
26870 2003-07-06  Karl Berry  <karl@gnu.org>
26871
26872         * config/depcomp: update from automake.
26873         * config/config.sub: update from prep.
26874
26875 2003-07-03  Karl Berry  <karl@gnu.org>
26876
26877         * config/config.guess: update from prep.
26878
26879 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26880
26881         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26882         xreadlink.c now includes it unconditionally.
26883
26884 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26885
26886         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26887         having it depend on HAVE_SYS_TYPES_H.
26888
26889 2003-07-01  Bruno Haible  <bruno@clisp.org>
26890
26891         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26892         <sys/types.h> should be sufficient.
26893         Reported by Paul Eggert.
26894
26895 2003-06-26  Karl Berry  <karl@gnu.org>
26896
26897         * config/depcomp: update from automake.
26898
26899 2003-06-26  Bruno Haible  <bruno@clisp.org>
26900
26901         * modules/human: Depend on module stdbool.
26902
26903 2003-06-25  Bruno Haible  <bruno@clisp.org>
26904
26905         * modules/readlink: New file.
26906         * modules/xreadlink: Depend on it.
26907         * MODULES.html.sh (func_all_modules): Add readlink.
26908
26909 2003-06-25  Bruno Haible  <bruno@clisp.org>
26910
26911         * m4/readlink.m4: New file.
26912
26913 2003-06-25  Bruno Haible  <bruno@clisp.org>
26914
26915         * lib/readlink.c: New file.
26916
26917 2003-06-22  Karl Berry  <karl@gnu.org>
26918
26919         * config/srclist.txt: update mkinstalldirs from automake.
26920         * config/mkinstalldirs: update.
26921
26922 2003-06-22  Bruno Haible  <bruno@clisp.org>
26923
26924         Portability to mingw32.
26925         * m4/ssize_t.m4: New file, from GNU gettext.
26926         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26927         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26928
26929 2003-06-22  Bruno Haible  <bruno@clisp.org>
26930
26931         * modules/safe-read: Add m4/ssize_t.m4.
26932         * modules/xreadlink: Add m4/ssize_t.m4.
26933
26934 2003-06-20  Bruno Haible  <bruno@clisp.org>
26935
26936         Assume C89, so PARAMS isn't needed.
26937         * lib/unicodeio.h (PARAMS): Remove.
26938         * lib/unicodeio.c: Don't use PARAMS.
26939
26940 2003-06-18  Karl Berry  <karl@gnu.org>
26941
26942         * config/config.{guess,sub}: update from prep.
26943
26944 2003-06-18  Jim Meyering  <jim@meyering.net>
26945
26946         Merge changes from coreutils.
26947         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26948         Remove explicit declarations of xmalloc and realloc.
26949         Include xalloc.h.
26950         (read_utmp): Remove anachronistic cast of xmalloc.
26951
26952 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26953
26954         Assume C89, so PARAMS isn't needed.
26955         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26956         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26957         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26958         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26959         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26960         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26961         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26962         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26963         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26964         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26965         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26966         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26967         no longer needed. Anyway, config.h should always be included before any
26968         other file.
26969
26970 2003-06-11  Simon Josefsson  <jas@extundo.com>
26971
26972         * modules/sysexits: New file.
26973         * MODULES.html.sh (func_all_modules): Add sysexits.
26974
26975 2003-06-11  Simon Josefsson  <jas@extundo.com>
26976
26977         * lib/sysexit_.h: New file.
26978
26979 2003-06-11  Derek Price  <derek@ximbiot.com>
26980
26981         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26982         necessary.
26983
26984 2003-06-11  Bruno Haible  <bruno@clisp.org>
26985
26986         * m4/sysexits.m4: New file.
26987
26988 2003-06-10  Simon Josefsson  <jas@extundo.com>
26989
26990         * lib/argp.h: New file, from glibc.
26991         * lib/argp-ba.c: New file, from glibc.
26992         * lib/argp-eexst.c: New file, from glibc.
26993         * lib/argp-fmtstream.c: New file, from glibc.
26994         * lib/argp-fmtstream.h: New file, from glibc.
26995         * lib/argp-fs-xinl.c: New file, from glibc.
26996         * lib/argp-help.c: New file, from glibc.
26997         * lib/argp-namefrob.h: New file, from glibc.
26998         * lib/argp-parse.c: New file, from glibc.
26999         * lib/argp-pv.c: New file, from glibc.
27000         * lib/argp-pvh.c: New file, from glibc.
27001         * lib/argp-xinl.c: New file, from glibc.
27002
27003 2003-06-10  Simon Josefsson  <jas@extundo.com>
27004
27005         * modules/strchrnul: New file.
27006
27007 2003-06-10  Simon Josefsson  <jas@extundo.com>
27008
27009         * modules/argp: New file.
27010
27011 2003-06-10  Simon Josefsson  <jas@extundo.com>
27012
27013         * m4/strchrnul.m4: New file.
27014
27015 2003-06-10  Simon Josefsson  <jas@extundo.com>
27016
27017         * lib/strchrnul.h: New file.
27018         * lib/strchrnul.c: New file.
27019
27020 2003-06-10  Bruno Haible  <bruno@clisp.org>
27021
27022         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
27023
27024 2003-06-07  Karl Berry  <karl@gnu.org>
27025
27026         * config/config.{guess,sub}: update from prep.
27027
27028 2003-06-07  Jim Meyering  <jim@meyering.net>
27029
27030         * modules/strtod: Use $(...) notation, not @...@ for
27031         AC_REPLACE'd variables.
27032         * modules/localcharset: Likewise.
27033
27034 2003-06-07  Jim Meyering  <jim@meyering.net>
27035
27036         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
27037         in place of my name in the copyright comment.
27038         Remove definition and uses of __P.
27039
27040         From coreutils.
27041         * lib/stat.c: Don't declare xmalloc explicitly.
27042         Instead, include "xalloc.h".
27043         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
27044         xrealloc, and xcalloc return values.
27045         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
27046         Improve comment.
27047         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
27048
27049 2003-06-07  Bruno Haible  <bruno@clisp.org>
27050
27051         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
27052         avoid AC_CONFIG_LINKS.
27053         * modules/fnmatch (Makefile.am): Use explicit creation rule for
27054         fnmatch.h, to avoid AC_CONFIG_LINKS.
27055         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
27056
27057 2003-06-07  Bruno Haible  <bruno@clisp.org>
27058
27059         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
27060         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
27061         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
27062         directory.
27063         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
27064         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
27065         directory.
27066
27067 2003-06-06  Jim Meyering  <jim@meyering.net>
27068
27069         Merge from coreutils.
27070         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
27071         Consolidate declarations and initializations of *_base* locals.
27072
27073         Merge from coreutils.
27074         This avoids a core dump on systems without GNU putenv,
27075         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
27076         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
27077         (unsetenv): New static function, from GNU libc.
27078         (rpl_putenv): Use it.
27079
27080         * lib/modechange.c: Remove trailing blanks.
27081
27082         Merge from coreutils.
27083         * lib/fsusage.c: Remove declaration of statfs.
27084         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
27085
27086         * lib/posixtm.c: Include <stdbool.h> unconditionally.
27087
27088 2003-06-06  Jim Meyering  <jim@meyering.net>
27089
27090         * lib/stdbool_.h: Renamed from stdbool.h.in.
27091
27092 2003-06-06  Jim Meyering  <jim@meyering.net>
27093             Bruno Haible  <bruno@clisp.org>
27094
27095         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
27096         Adjust Makefile.am snippet not to redirect directly to target.
27097         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
27098
27099 2003-06-05  Paul Eggert  <eggert@twinsun.com>
27100
27101         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
27102         mismatch, look in future quarters as well as past.  This fixes a
27103         bug when processing fall-backwards gaps immediately after a long
27104         period of daylight-saving time.
27105
27106         * lib/mktime.c: Assume freestanding C89 or better.
27107         (HAVE_LIMITS_H): Remove.  Assume it's 1.
27108         (__P): Remove; not used.
27109         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
27110         (mktime, not_equal_tm, print_tm, check_result,
27111         main): Use prototypes.  Use const * where appropriate.
27112         (main): Fix typo in testing code that uncovered by above changes.
27113         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
27114
27115 2003-06-04  Paul Eggert  <eggert@twinsun.com>
27116
27117         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
27118         locale.h, localeconv.  This merges changes from coreutils.
27119
27120         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
27121         It can be removed after the next Autoconf is released.
27122         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
27123         needed.
27124
27125 2003-06-04  Paul Eggert  <eggert@twinsun.com>
27126
27127         * lib/mktime.c: Fix Debian bug 177940
27128         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
27129         (localtime_offset): Now long int, not time_t, because we want it
27130         to be guaranteed to be signed.  All uses changed.
27131         (__mktime_internal): If overflow would occur when adding offset,
27132         don't add it.
27133
27134         Merge 'human' changes from coreutils.  Rewrite to support
27135         locale-specific notations like thousands separators.
27136         * lib/human.c: Simplify authorship notice.
27137         Include human.h immediately after config.h.
27138         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
27139         <limits.h>: Do not include, since human.h does.
27140         (SIZE_MAX, UINTMAX_MAX): New macros.
27141         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
27142         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
27143         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
27144         (power_letter): Renamed from suffixes.
27145         (generate_suffix_backwards): Remove.
27146         (adjust_value): Now takes int style (because of human.h changes)
27147         and long double value (for greater precision on some platforms).
27148         (group_number): New function.
27149         (human_readable): Use it.  Use integer options, not enum.
27150         Put the options before the sizes in the arg list.
27151         Support all the new options.
27152         The old human_readable function has been removed;
27153         use inttostr.h instead.
27154         (human_readable, default_block_size, humblock):
27155         Use uintmax_t, not int, for block sizes.
27156         (human_readable_inexact, block_size_types): Remove.
27157         (block_size_opts): New constant.
27158         (human_options): Renamed from human_block_size, with new signature
27159         that allows block sizes up to UINTMAX_MAX.  All callers changed.
27160         * lib/human.h: Add copyright and authorship notice.
27161         Include <limits.h> and <stdbool.h> unconditionally.
27162         (PARAMS): Remove.  All uses removed.
27163         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
27164         (enum human_inexact_style): Remove tag; now a nameless enum.
27165         (human_floor, human_ceiling, human_round_to_even): Now have
27166         values 2, 0, 1 rather than -1, 1, 0.
27167         (human_group_digits, human_suppress_point_zero, human_autoscale,
27168         human_base_1024, human_SI, human_B): New constants.
27169         (human_readable_inexact, human_block_size): Remove.
27170         (human_readable): Size args are now uintmax_t, not int.
27171         (human_options): New decl.
27172
27173         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
27174         unnecessary now that we assume C89 or better.  This change
27175         imported from coreutils.
27176
27177         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27178         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
27179         in the 2003-05-30 sync from glibc.
27180
27181         .h files should stand alone, but we shouldn't include <sys/types.h>
27182         if we can get away with just <stddef.h>.
27183
27184         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
27185         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
27186         rather than <sys/types.h>, as we merely need size_t.
27187         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
27188         to get size_t.
27189         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
27190         Include <stdio.h>, to get FILE.
27191         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
27192         memcasecmp.h has included <stddef.h> and all we need is size_t.
27193         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
27194         our interface, instead of including <sys/types.h>
27195
27196 2003-06-04  Paul Eggert  <eggert@twinsun.com>
27197
27198         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
27199         now, as glibc mktime is buggy on non-glibc systems.
27200
27201 2003-06-03  Karl Berry  <karl@gnu.org>
27202
27203         * config/config.sub: update from prep.
27204
27205 2003-06-02  Paul Eggert  <eggert@twinsun.com>
27206
27207         [from coreutils]
27208         Fix some minor time-related bugs with POSIX time arguments.
27209         Some valid time stamps were being rejected (notably -1, and
27210         time stamps before 1900 on 64-bit hosts).  And some invalid
27211         time stamps were being accepted, e.g. September 31.
27212
27213         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
27214         that we can return (time_t) -1 successfully.
27215         * lib/posixtm.c: Likewise.
27216         [HAVE_STDBOOL_H]: Include <stdbool.h>.
27217         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
27218         (t): Remove static var.
27219         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
27220         of static var.  All uses changed.
27221         (year): Do not reject years before 1900; they can occur with
27222         64-bit time_t.
27223         (posix_time_parse): Do not check for out-of-range components;
27224         that is now the caller's responsibility, since our checks were
27225         only approximations.
27226         (posixtime): Use mktime to check for out-of-range components,
27227         since it knows them exactly.
27228         If mktime returns (time_t) -1, check whether an error actually occurred
27229         by invoking localtime on -1.
27230         (main) [TEST_POSIXTIME]: Check for input data errors, and report
27231         posixtime failures better.
27232         Improve the test data (in comments only).
27233
27234 2003-06-02  Karl Berry  <karl@gnu.org>
27235
27236         * config/mkinstalldirs (version): new variable.
27237         (--version): new option.
27238         (usage): improve message.
27239
27240 2003-05-30  Karl Berry  <karl@gnu.org>
27241
27242         * lib/mktime.c: update from libc.
27243
27244 2003-05-30  Bruno Haible  <bruno@clisp.org>
27245
27246         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
27247         * config/config.rpath: Upgrade to gettext-0.12.1.
27248
27249 2003-05-30  Bruno Haible  <bruno@clisp.org>
27250
27251         * m4/gettext.m4: Upgrade to gettext-0.12.1.
27252         * m4/nls.m4: New file, from gettext-0.12.1.
27253         * m4/po.m4: New file, from gettext-0.12.1.
27254         * m4/progtest.m4: Upgrade to gettext-0.12.1.
27255
27256 2003-05-30  Bruno Haible  <bruno@clisp.org>
27257
27258         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
27259         * lib/localcharset.h: Likewise.
27260         * lib/localcharset.c: Likewise.
27261
27262 2003-05-29  Karl Berry  <karl@gnu.org>
27263
27264         * config/config.rpath: update from gettext.
27265
27266 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27267
27268         Assume the headers required for C89 freestanding compilers.
27269         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
27270         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
27271         * m4/human.m4 (gl_HUMAN): Likewise.
27272         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
27273         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
27274         * m4/userspec.m4 (gl_USERSPEC): Likewise.
27275         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
27276         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
27277         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
27278
27279 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27280
27281         Assume the headers required for C89 freestanding compilers.
27282         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
27283         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
27284         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
27285         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
27286         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
27287         define, since <limits.h> is guaranteed to do that.
27288         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
27289         * lib/exclude.c: Include <stdbool.h> unconditionally.
27290         * lib/tempname.c: Include <stddef.h> unconditionally.
27291         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
27292         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
27293         <stddef.h> does that.
27294         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27295         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
27296         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
27297         needed.
27298         * lib/xstrtol.c: Likewise.
27299         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
27300         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
27301
27302         * lib/addext.c (addext): Use assignment rather than cast, to avoid
27303         warnings on some platforms.
27304
27305         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27306         arbitrarily.
27307
27308 2003-05-26  Jim Meyering  <jim@meyering.net>
27309
27310         Merge in a change from coreutils:
27311         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
27312         that is guaranteed to be `no'.  Use `no_such_member' to indicate
27313         that condition, rather than `-1' which is slightly misleading.
27314         Change the name of the cache variable to have the gl_ prefix.
27315         Prompted by a patch from Richard Dawe for DJGPP.
27316
27317 2003-05-24  Karl Berry  <karl@gnu.org>
27318
27319         * config/config.guess: update from prep.
27320
27321 2003-05-22  Karl Berry  <karl@gnu.org>
27322
27323         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
27324
27325 2003-05-20  Karl Berry  <karl@gnu.org>
27326
27327         * config/config.guess: update from prep.
27328
27329 2003-05-18  Karl Berry  <karl@gnu.org>
27330
27331         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
27332         might actually be set by the user.
27333
27334         * config/depcomp, install-sh, mdate-sh: update from automake.
27335
27336 2003-05-17  Bruno Haible  <bruno@clisp.org>
27337
27338         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
27339         invalid expansion for AC_EGREP_CPP.
27340         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
27341         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
27342         Suggested by Akim Demaille <akim@epita.fr> in
27343         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
27344
27345 2003-05-12  Jim Meyering  <jim@meyering.net>
27346
27347         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
27348         the space-padded-by-default conversion specifiers, %e, %k, %l.
27349
27350 2003-05-12  Bruno Haible  <bruno@clisp.org>
27351
27352         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
27353         the string is longer than 4 KB.
27354
27355 2003-05-11  Karl Berry  <karl@gnu.org>
27356
27357         * config/config.{guess,sub}: update from prep.
27358
27359 2003-05-09  Bruno Haible  <bruno@clisp.org>
27360
27361         * modules/error: Add m4/strerror_r.m4 to file list.
27362
27363 2003-05-03  Bruno Haible  <bruno@clisp.org>
27364
27365         Upgrade to Unicode-4.0.
27366         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
27367         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
27368         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
27369         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
27370         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
27371         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
27372         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
27373         Change width of U+E0100..U+E01EF from 1 to 0.
27374
27375 2003-04-25  Jim Meyering  <jim@meyering.net>
27376
27377         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
27378         of type size_t, not int.
27379
27380 2003-04-25  Bruno Haible  <bruno@clisp.org>
27381
27382         * lib/copy-file.c: Include <stddef.h>, for size_t.
27383
27384 2003-04-21  Paul Eggert  <eggert@twinsun.com>
27385
27386         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
27387         code which expansion is under static control.  Patch imported from
27388         Akim Demaille's patch to Bison; see
27389         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
27390
27391 2003-04-14  Bruno Haible  <bruno@clisp.org>
27392
27393         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
27394
27395 2003-04-11  Jim Meyering  <jim@meyering.net>
27396
27397         Merge changes from Coreutils.
27398
27399         2003-03-22  Jim Meyering  <jim@meyering.net>
27400
27401         * lib/strftime.c (widen): Cast alloca return value to proper type.
27402
27403         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
27404
27405         From GNU libc.
27406         * lib/strftime.c (my_strftime): Handle very large width
27407         specifications for numeric values correctly.  Improve checks for
27408         overflow.
27409
27410         2003-01-19  Jim Meyering  <jim@meyering.net>
27411
27412         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
27413         definitions.
27414         (nl_get_alt_digit) [! defined my_strftime]: Define.
27415         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
27416         _nl_get_alt_digit and _nl_get_walt_digit.
27417
27418         * lib/strftime.c (my_strftime): Merge in locale-related changes from
27419         libc. These changes have no effect outside of _LIBC.
27420
27421 2003-04-10  Bruno Haible  <bruno@clisp.org>
27422
27423         * modules/findprog: New file.
27424         * MODULES.html.sh (func_all_modules): Add it.
27425
27426 2003-04-10  Bruno Haible  <bruno@clisp.org>
27427
27428         * m4/findprog.m4: New file.
27429         * m4/eaccess.m4: New file.
27430
27431 2003-04-10  Bruno Haible  <bruno@clisp.org>
27432
27433         * lib/findprog.h: New file, from GNU gettext.
27434         * lib/findprog.c: New file, from GNU gettext.
27435
27436 2003-04-05  Jim Meyering  <jim@meyering.net>
27437
27438         Merge changes from Coreutils.
27439
27440         * lib/exclude.h (PARAMS): Remove definition and uses.
27441         * lib/exclude.c: Remove uses of `PARAMS'.
27442
27443         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
27444         Add test-cases for DOS filenames. Declare program_name.
27445         (main): Set up program_name.  Patch by Rich Dawe.
27446
27447         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
27448         error from mntctl.
27449         Use mntctl's return value to drive the entry-processing loop, since
27450         we can't rely on the value of the vmt_length member in the last
27451         entry.  On some systems doing so could result in exhausting
27452         virtual memory.  Based in part on a patch from Mike Jetzer.
27453
27454 2003-04-04  Bruno Haible  <bruno@clisp.org>
27455
27456         * modules/linebreak: New file.
27457         * MODULES.html.sh (func_all_modules): Add it.
27458
27459 2003-04-04  Bruno Haible  <bruno@clisp.org>
27460
27461         * m4/linebreak.m4: New file.
27462
27463 2003-04-04  Bruno Haible  <bruno@clisp.org>
27464
27465         * lib/linebreak.h: New file, from GNU gettext.
27466         * lib/linebreak.c: New file, from GNU gettext with slight
27467         modifications.
27468         * lib/lbrkprop.h: New file, from GNU gettext.
27469
27470 2003-04-03  Bruno Haible  <bruno@clisp.org>
27471
27472         * modules/utf8-ucs4: New file.
27473         * modules/utf16-ucs4: New file.
27474         * modules/ucs4-utf8: New file.
27475         * modules/ucs4-utf16: New file.
27476         * MODULES.html.sh (func_all_modules): Add them.
27477
27478 2003-04-03  Bruno Haible  <bruno@clisp.org>
27479
27480         * m4/utf-ucs4.m4: New file.
27481         * m4/ucs4-utf.m4: New file.
27482
27483 2003-04-03  Bruno Haible  <bruno@clisp.org>
27484
27485         * lib/utf8-ucs4.h: New file, from GNU gettext.
27486         * lib/utf16-ucs4.h: New file, from GNU gettext.
27487         * lib/ucs4-utf8.h: New file, from GNU gettext.
27488         * lib/ucs4-utf16.h: New file, from GNU gettext.
27489
27490 2003-04-02  Bruno Haible  <bruno@clisp.org>
27491
27492         * modules/binary-io: New file.
27493         * MODULES.html.sh (func_all_modules): Add it.
27494
27495 2003-04-02  Bruno Haible  <bruno@clisp.org>
27496
27497         * lib/binary-io.h: New file, from GNU gettext.
27498
27499 2003-04-01  Bruno Haible  <bruno@clisp.org>
27500
27501         * modules/pathname: New file.
27502         * MODULES.html.sh (func_all_modules): Add it.
27503
27504 2003-04-01  Bruno Haible  <bruno@clisp.org>
27505
27506         * lib/pathname.h: New file, from GNU gettext.
27507         * lib/concatpath.c: New file, from GNU gettext.
27508
27509 2003-03-30  Bruno Haible  <bruno@clisp.org>
27510
27511         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
27512
27513 2003-03-30  Bruno Haible  <bruno@clisp.org>
27514
27515         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
27516         function chown() doesn't exist.
27517
27518 2003-03-28  Bruno Haible  <bruno@clisp.org>
27519
27520         * modules/copy-file: New file.
27521         * MODULES.html.sh (func_all_modules): Add it.
27522
27523 2003-03-28  Bruno Haible  <bruno@clisp.org>
27524
27525         * m4/copy-file.m4: New file.
27526
27527 2003-03-28  Bruno Haible  <bruno@clisp.org>
27528
27529         * lib/copy-file.h: New file, from GNU gettext.
27530         * lib/copy-file.c: New file, from GNU gettext.
27531
27532 2003-03-18  Jim Meyering  <jim@meyering.net>
27533
27534         * lib/quote.c (quote_n): Fix typo in comment.
27535
27536 2003-03-18  Bruno Haible  <bruno@clisp.org>
27537
27538         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
27539         checking.
27540         * m4/onceonly_2_57.m4: Likewise.
27541
27542 2003-03-17  Bruno Haible  <bruno@clisp.org>
27543
27544         * m4/onceonly.m4: Require autoconf 2.54 or newer.
27545         (m4_quote): Remove macro.
27546         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
27547
27548 2003-03-14  Jim Meyering  <jim@meyering.net>
27549
27550         Merge changes from Coreutils.
27551         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
27552         to be const, in order to avoid warnings.
27553         (obstack_room): Likewise.
27554         (obstack_empty_p): Likewise.
27555
27556 2003-03-14  Bruno Haible  <bruno@clisp.org>
27557
27558         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
27559         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
27560
27561 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27562
27563         Merge changes from Bison.
27564         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
27565         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
27566         when compiling Bison 1.875's `bitset bset = obstack_alloc
27567         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
27568         * lib/hash.c: Include <stdbool.h> unconditionally.
27569
27570 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27571
27572         * m4/onceonly.m4 (m4_quote): New macro.
27573         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
27574         Quote AC_FOREACH variable-expansions properly.
27575
27576 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27577
27578         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
27579
27580 2003-03-09  Paul Eggert  <eggert@twinsun.com>
27581
27582         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
27583         Reported by Bruce Becker; see:
27584         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
27585
27586 2003-03-03  Paul Eggert  <eggert@twinsun.com>
27587             Bruno Haible  <bruno@clisp.org>
27588
27589         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
27590         Reported by John Hughes, see
27591         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
27592
27593 2003-02-20  Bruno Haible  <bruno@clisp.org>
27594
27595         * MODULES.html.sh (func_all_modules): Add poll.
27596
27597 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27598
27599         * modules/poll: New file.
27600
27601 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27602
27603         * lib/poll_.h: New file.
27604         * lib/poll.c: New file.
27605
27606 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27607
27608         * m4/poll.m4: New file.
27609
27610 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27611
27612         * modules/mathl: New file.
27613
27614 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27615
27616         * lib/mathl.h: New file.
27617         * lib/acosl.c: New file.
27618         * lib/asinl.c: New file.
27619         * lib/atanl.c: New file.
27620         * lib/ceill.c: New file.
27621         * lib/cosl.c: New file.
27622         * lib/expl.c: New file.
27623         * lib/floorl.c: New file.
27624         * lib/frexpl.c: New file.
27625         * lib/ldexpl.c: New file.
27626         * lib/logl.c: New file.
27627         * lib/sincosl.c: New file.
27628         * lib/sinl.c: New file.
27629         * lib/sqrtl.c: New file.
27630         * lib/tanl.c: New file.
27631         * lib/trigl.c: New file.
27632         * lib/trigl.h: New file.
27633
27634 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27635
27636         * m4/mathl.m4: New file.
27637
27638 2003-02-18  Bruno Haible  <bruno@clisp.org>
27639
27640         * MODULES.html.sh (func_all_modules): Add mathl.
27641
27642 2003-02-17  Bruno Haible  <bruno@clisp.org>
27643
27644         * modules/mkdtemp: New module.
27645         * MODULES.html.sh (func_all_modules): Add it.
27646
27647 2003-02-17  Bruno Haible  <bruno@clisp.org>
27648
27649         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
27650
27651 2003-02-17  Bruno Haible  <bruno@clisp.org>
27652
27653         * lib/mkdtemp.h: New file, from GNU gettext.
27654         * lib/mkdtemp.c: New file, from GNU gettext.
27655
27656 2003-02-02  Jim Meyering  <jim@meyering.net>
27657
27658         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
27659         e.g. glibc-2.2.93.
27660
27661 2003-01-31  Bruno Haible  <bruno@clisp.org>
27662
27663         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
27664         'rpl_rename'.
27665         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
27666         'rpl_strnlen'.
27667         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
27668         'rpl_strtod'.
27669         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
27670         'rpl_utime'.
27671
27672 2003-01-31  Bruno Haible  <bruno@clisp.org>
27673
27674         * lib/rename.c: #undef rename before defining rpl_rename.
27675         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
27676
27677 2003-01-30  Bruno Haible  <bruno@clisp.org>
27678
27679         * modules/vasnprintf, modules/vasprintf: New modules.
27680         * MODULES.html.sh (func_all_modules): Add them.
27681
27682 2003-01-30  Bruno Haible  <bruno@clisp.org>
27683
27684         * m4/signed.m4: New file, from GNU gettext.
27685         * m4/longdouble.m4: New file, from GNU gettext.
27686         * m4/wchar_t.m4: New file, from GNU gettext.
27687         * m4/wint_t.m4: New file, from GNU gettext.
27688         * m4/vasnprintf.m4: New file.
27689         * m4/vasprintf.m4: New file.
27690
27691 2003-01-30  Bruno Haible  <bruno@clisp.org>
27692
27693         * lib/printf-args.h: New file, from GNU gettext.
27694         * lib/printf-args.c: New file, from GNU gettext.
27695         * lib/printf-parse.h: New file, from GNU gettext.
27696         * lib/printf-parse.c: New file, from GNU gettext.
27697         * lib/vasnprintf.h: New file, from GNU gettext.
27698         * lib/vasnprintf.c: New file, from GNU gettext.
27699         * lib/asnprintf.c: New file, from GNU gettext.
27700         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27701         * lib/vasprintf.c: New file, from GNU gettext.
27702         * lib/asprintf.c: New file, from GNU gettext.
27703
27704 2003-01-29  Bruno Haible  <bruno@clisp.org>
27705
27706         * modules/stpncpy: New module.
27707         * MODULES.html.sh (func_all_modules): Add it.
27708
27709 2003-01-29  Bruno Haible  <bruno@clisp.org>
27710
27711         * m4/stpncpy.m4: New file.
27712
27713 2003-01-29  Bruno Haible  <bruno@clisp.org>
27714
27715         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27716         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27717
27718 2003-01-28  Bruno Haible  <bruno@clisp.org>
27719
27720         * modules/c-ctype: New module.
27721         * MODULES.html.sh (func_all_modules): Add it.
27722
27723 2003-01-28  Bruno Haible  <bruno@clisp.org>
27724
27725         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27726         Paul Eggert.
27727         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27728         Paul Eggert.
27729
27730 2003-01-27  Bruno Haible  <bruno@clisp.org>
27731
27732         * modules/xsetenv: New module.
27733         * MODULES.html.sh (func_all_modules): Add it.
27734
27735 2003-01-27  Bruno Haible  <bruno@clisp.org>
27736
27737         * lib/xsetenv.h: New file, from GNU gettext.
27738         * lib/xsetenv.c: New file, from GNU gettext.
27739
27740 2003-01-23  Jim Meyering  <jim@meyering.net>
27741
27742         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27743         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27744
27745 2003-01-23  Bruno Haible  <bruno@clisp.org>
27746
27747         * modules/minmax: New module.
27748         * MODULES.html.sh (func_all_modules): Add it.
27749
27750 2003-01-23  Bruno Haible  <bruno@clisp.org>
27751
27752         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27753         Eggert.
27754
27755 2003-01-22  Bruno Haible  <bruno@clisp.org>
27756
27757         * modules/exit: New module.
27758         * MODULES.html.sh (func_all_modules): Add it.
27759
27760 2003-01-22  Bruno Haible  <bruno@clisp.org>
27761
27762         * lib/exit.h: New file, from GNU gettext.
27763
27764 2003-01-19  Bruno Haible  <bruno@clisp.org>
27765
27766         * gnulib-tool: Recognize option --extract-maintainer.
27767         (func_get_maintainer): New function.
27768         * modules/*: Add Maintainer entry.
27769
27770 2003-01-16  Jim Meyering  <jim@meyering.net>
27771
27772         * m4/regex.m4: The `regex' struct is both input and output.
27773         Initialize it before each use.  Patch by Tim Waugh.
27774
27775 2003-01-16  Bruno Haible  <bruno@clisp.org>
27776
27777         * MODULES.html.sh: Add a table of contents. Add the module name as
27778         leftmost column. Add hyperlinks.
27779
27780 2003-01-15  Bruno Haible  <bruno@clisp.org>
27781
27782         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27783
27784 2003-01-15  Bruno Haible  <bruno@clisp.org>
27785
27786         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27787         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27788         suffix.
27789
27790 2003-01-15  Bruno Haible  <bruno@clisp.org>
27791
27792         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27793
27794 2003-01-15  Bruno Haible  <bruno@clisp.org>
27795
27796         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27797         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27798
27799 2003-01-14  Jim Meyering  <jim@meyering.net>
27800
27801         * lib/same.c (same_name): Tweak a comment.
27802
27803 2003-01-14  Bruno Haible  <bruno@clisp.org>
27804
27805         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27806         when a string comparison is sufficient.
27807
27808 2003-01-14  Bruno Haible  <bruno@clisp.org>
27809
27810         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27811         'unsigned int'.
27812
27813 2003-01-14  Bruno Haible  <bruno@clisp.org>
27814
27815         * lib/hash-pjw.c: Add comment about low quality of this function.
27816
27817 2003-01-13  Bruno Haible  <bruno@clisp.org>
27818
27819         * modules/stpcpy: Distribute lib/stpcpy.h.
27820         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27821
27822 2003-01-13  Bruno Haible  <bruno@clisp.org>
27823
27824         * modules/*: Add a description.
27825         * modules/strpbrk: Fix Makefile.am snippet.
27826         * modules/strtoimax: Fix dependencies.
27827         * modules/strtoumax: Likewise.
27828
27829 2003-01-13  Bruno Haible  <bruno@clisp.org>
27830
27831         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27832         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27833         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27834
27835 2003-01-13  Bruno Haible  <bruno@clisp.org>
27836
27837         * gnulib-tool (func_create_testdir): Store config/* files in the main
27838         directory.
27839         * config.rpath: Move to ...
27840         * config/config.rpath: ... here.
27841         * modules/gettext: Contains config/config.rpath, not config.rpath.
27842         * modules/iconv: Likewise.
27843
27844 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27845
27846         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27847         to avoid collisions with libcurses and libreadline.
27848
27849         * m4/getstr.m4: Remove.
27850         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27851
27852 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27853
27854         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27855         to avoid collisions with libcurses and libreadline.
27856
27857         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27858         * lib/getstr.h, getstr.c: Remove.
27859         * lib/getline.c: Include "getline.h", to check interface.
27860         Move body of old getstr.c here: this defines MIN_CHUNK and
27861         declares getdelim2, which is renamed from getstr.
27862         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27863
27864         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27865         All uses changed.
27866         * lib/linebuffer.h: Likewise.
27867         (readline): Remove backward-compatibility macro.
27868
27869 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27870
27871         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27872         to avoid collisions with libcurses and libreadline.
27873         * getstr: Remove.
27874         * MODULES.html.sh: Remove getstr.
27875         * modules/getline: Depend on unlocked-io, not getstr.
27876
27877 2003-01-12  Jim Meyering  <jim@meyering.net>
27878
27879         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27880
27881 2003-01-10  Bruno Haible  <bruno@clisp.org>
27882
27883         * modules/alloca: Change Makefile.am requirements. Simplify Include
27884         requirements. Add lib/alloca_.h to file list.
27885
27886 2003-01-10  Bruno Haible  <bruno@clisp.org>
27887
27888         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27889
27890 2003-01-10  Bruno Haible  <bruno@clisp.org>
27891
27892         * lib/alloca_.h: New file.
27893         * lib/getdate.y: Unconditionally include alloca.h.
27894         * lib/makepath.c: Likewise.
27895         * lib/setenv.c: Likewise.
27896         * lib/userspec.c: Likewise.
27897
27898 2003-01-09  Karl Berry  <karl@gnu.org>
27899
27900         * MODULES.html.sh: include `dirname $0` in PATH, to find
27901         gnulib-tool.
27902
27903 2003-01-09  Bruno Haible  <bruno@clisp.org>
27904
27905         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27906         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27907
27908 2003-01-09  Bruno Haible  <bruno@clisp.org>
27909
27910         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27911
27912 2003-01-09  Bruno Haible  <bruno@clisp.org>
27913
27914         * lib/stdbool.h.in: New file.
27915
27916 2003-01-09  Bruno Haible  <bruno@clisp.org>
27917
27918         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27919         * MODULES.html.sh: Likewise.
27920
27921 2003-01-08  Jim Meyering  <jim@meyering.net>
27922
27923         * lib/full-write.c: Undefine and define-away `const' after inclusion
27924         of errno.h, not before.  Suggestion from Bruno Haible.
27925
27926 2003-01-08  Bruno Haible  <bruno@clisp.org>
27927
27928         * modules/full-read: Depend on full-write.
27929
27930 2003-01-08  Bruno Haible  <bruno@clisp.org>
27931
27932         * lib/safe-read.c: Include specification header first, to ensure its
27933         selfcontainedness.
27934         * lib/full-write.c: Likewise.
27935
27936 2003-01-07  Jim Meyering  <jim@meyering.net>
27937
27938         * lib/full-write.c: Rework so that it may serve to define full_read,
27939         too.
27940         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27941
27942 2003-01-07  Bruno Haible  <bruno@clisp.org>
27943
27944         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27945         <inttypes.h>.
27946         * lib/xstrtol.h: Likewise.
27947         * lib/xstrtoimax.c: Likewise.
27948         * lib/xstrtoumax.c: Likewise.
27949         * lib/human.h: Likewise.
27950
27951         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27952         on systems that have <inttypes.h> but not <stdint.h>.
27953
27954 2003-01-07  Bruno Haible  <bruno@clisp.org>
27955
27956         * MODULES.html.sh: Add copyright notice.
27957         (missed_files): Omit CVS directory entries.
27958         (func_module): Make it work with sed-3.02.
27959         * MODULES.txt: Remove file.
27960
27961 2003-01-06  Jim Meyering  <jim@meyering.net>
27962
27963         * lib/version-etc.c: Update year in translatable copyright string.
27964
27965 2003-01-03  Karl Berry  <karl@gnu.org>
27966
27967         * config/config.{guess,sub}: update from prep.
27968
27969 2003-01-02  Karl Berry  <karl@gnu.org>
27970
27971         * doc/COPYING.DOC: belatedly updated to 1.2.
27972
27973 2003-01-01  Karl Berry  <karl@gnu.org>
27974
27975         * gnulib-tool (func_verify_module): report module name $module in
27976         error message, not $1.
27977         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27978         be created, only if it doesn't exist.
27979         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27980
27981 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27982
27983         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27984
27985 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27986
27987         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27988         memcmp if strcoll doesn't work.
27989
27990 2002-12-31  Bruno Haible  <bruno@clisp.org>
27991
27992         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27993         nonempty.
27994
27995 2002-12-31  Bruno Haible  <bruno@clisp.org>
27996
27997         * lib/memcoll.c (STRCOLL): New macro.
27998         (memcoll): Use it.
27999
28000 2002-12-31  Bruno Haible  <bruno@clisp.org>
28001
28002         * lib/localcharset.h: New file.
28003         * lib/localcharset.c: Include it.
28004         * lib/unicodeio.c: Likewise.
28005
28006 2002-12-31  Bruno Haible  <bruno@clisp.org>
28007
28008         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
28009         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
28010
28011 2002-12-31  Bruno Haible  <bruno@clisp.org>
28012
28013         * lib/getline.h: Include <stddef.h>, for size_t.
28014
28015         * lib/unicodeio.h: Include <stddef.h>, for size_t.
28016         * lib/unicodeio.c: Don't include <stddef.h>.
28017
28018 2002-12-31  Bruno Haible  <bruno@clisp.org>
28019
28020         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
28021         HAVE_TM_ZONE.
28022
28023 2002-12-24  Karl Berry  <karl@gnu.org>
28024
28025         * config/config.guess: update from prep.
28026
28027 2002-12-24  Bruno Haible  <bruno@clisp.org>
28028
28029         General infrasructure.
28030         * m4/README: Rewritten.
28031         * m4/onceonly.m4: New file.
28032         * m4/onceonly_2_57.m4: New file.
28033
28034         Module atexit.
28035         * m4/atexit.m4: New file.
28036
28037         Module strtod.
28038         * m4/strtod.m4: New file.
28039
28040         Module strtol.
28041         * m4/strtol.m4: New file.
28042
28043         Module strtoul.
28044         * m4/strtoul.m4: New file.
28045
28046         Module memchr.
28047         * m4/memchr.m4: New file.
28048
28049         Module memcmp.
28050         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
28051         (jm_FUNC_MEMCMP): Invoke it.
28052
28053         Module memcpy.
28054         * m4/memcpy.m4: New file.
28055
28056         Module memmove.
28057         * m4/memmove.m4: New file.
28058
28059         Module memset.
28060         * m4/memset.m4: New file.
28061
28062         Module strcspn.
28063         * m4/strcspn.m4: New file.
28064
28065         Module strpbrk.
28066         * m4/strpbrk.m4: New file.
28067
28068         Module strstr.
28069         * m4/strstr.m4: New file.
28070
28071         Module strerror.
28072         * m4/strerror.m4: New file.
28073
28074         Module mktime.
28075         * m4/mktime.m4: Renamed from jm-mktime.m4.
28076         (gl_PREREQ_MKTIME): New macro.
28077         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
28078
28079         Module malloc.
28080         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
28081         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
28082         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
28083
28084         Module realloc.
28085         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
28086         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
28087         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
28088
28089         Module strftime.
28090         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
28091         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
28092         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
28093         gl_TM_GMTOFF.
28094         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
28095
28096         Module xalloc.
28097         * m4/xalloc.m4: New file.
28098
28099         Module alloca.
28100         * m4/alloca.m4: New file.
28101
28102         Module putenv.
28103         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
28104         (jm_FUNC_PUTENV): Invoke it.
28105
28106         Module setenv.
28107         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
28108         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
28109         when invoked twice.
28110         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
28111         gt_FUNC_SETENV.
28112
28113         Module memrchr.
28114         * m4/memrchr.m4: New file.
28115
28116         Module stpcpy.
28117         * m4/stpcpy.m4: New file.
28118
28119         Module strcase.
28120         * m4/strcase.m4: New file.
28121
28122         Module strdup.
28123         * m4/strdup.m4: New file.
28124
28125         Module strnlen.
28126         * m4/strnlen.m4: New file.
28127
28128         Module strndup.
28129         * m4/strndup.m4: New file.
28130
28131         Module xstrtod.
28132         * m4/xstrtod.m4: New file.
28133
28134         Module xstrtol.
28135         * m4/xstrtol.m4: New file.
28136
28137         Module getdate.
28138         * m4/getdate.m4: New file.
28139
28140         Module unlocked-io.
28141         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
28142         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
28143         * m4/jm-glibc-io.m4n: Remove file.
28144
28145         Module long-options.
28146         * m4/long-options.m4: New file.
28147
28148         Module md5.
28149         * m4/md5.m4: New file.
28150
28151         Module sha.
28152         * m4/sha.m4: New file.
28153
28154         Module getstr.
28155         * m4/getstr.m4: New file.
28156
28157         Module getline.
28158         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
28159         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
28160         <sys/types.h>, for size_t. Use the function name gnu_getline, not
28161         simply getline. Infoke gl_PREREQ_GETLINE.
28162
28163         Module obstack.
28164         * m4/obstack.m4: New file.
28165
28166         Module hash.
28167         * m4/hash.m4: New file.
28168
28169         Module readtokens.
28170         * m4/readtokens.m4: New file.
28171
28172         Module strverscmp.
28173         * m4/strverscmp.m4: New file.
28174
28175         Module stdbool.
28176         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
28177         OSF/1.
28178
28179         Module strtoll.
28180         * m4/strtoll.m4: New file.
28181
28182         Module strtoull.
28183         * m4/strtoull.m4: New file.
28184
28185         Module strtoimax.
28186         * m4/strtoimax.m4: New file.
28187
28188         Module strtoumax.
28189         * m4/strtoumax.m4: New file.
28190
28191         Module xstrtoimax.
28192         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
28193         jm_AC_PREREQ_XSTRTOIMAX.
28194         Moved the strtol prerequisites to strtol.m4.
28195         Moved the strtoll prerequisites to strtoll.m4.
28196         Moved the strtoimax prerequisites to strtoimax.m4.
28197
28198         Module xstrtoumax.
28199         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
28200         jm_AC_PREREQ_XSTRTOUMAX.
28201         Moved the strtoul prerequisites to strtoul.m4.
28202         Moved the strtoull prerequisites to strtoull.m4.
28203         Moved the strtoumax prerequisites to strtoumax.m4.
28204
28205         Module chown.
28206         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
28207         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
28208
28209         Module dup2.
28210         * m4/dup2.m4: New file.
28211
28212         Module ftruncate.
28213         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
28214         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
28215
28216         Module getgroups.
28217         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
28218         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
28219
28220         Module gettimeofday.
28221         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
28222         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
28223         gl_PREREQ_GETTIMEOFDAY.
28224
28225         Module mkdir.
28226         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
28227         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
28228
28229         Module mkstemp.
28230         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
28231         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
28232         jm_AC_TYPE_UINTMAX_T.
28233         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
28234
28235         Module stat.
28236         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
28237         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
28238
28239         Module lstat.
28240         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
28241         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
28242
28243         Module timespec.
28244         * m4/timespec.m4 (gl_TIMESPEC): New macro.
28245         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
28246         * m4/st_mtim.m4: Indentation.
28247
28248         Module nanosleep.
28249         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
28250         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
28251         gl_PREREQ_NANOSLEEP.
28252
28253         Module regex.
28254         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
28255         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
28256         (gl_REGEX): New macro.
28257
28258         Module rename.
28259         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
28260         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
28261
28262         Module rmdir.
28263         * m4/rmdir.m4: New file.
28264
28265         Module utime.
28266         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
28267         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
28268         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
28269
28270         Module dirname.
28271         * m4/dirname.m4: New file.
28272
28273         Module getopt.
28274         * m4/getopt.m4: New file.
28275
28276         Module unistd-safer.
28277         * m4/unistd-safer.m4: New file.
28278
28279         Module fnmatch.
28280         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
28281         declaration.
28282         (gl_PREREQ_FNMATCH_EXTRA): New macro.
28283         (gl_FUNC_FNMATCH_POSIX): New macro.
28284         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
28285         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
28286         simply fnmatch.
28287
28288         Module exclude.
28289         * m4/exclude.m4: New file.
28290
28291         Module human.
28292         * m4/human.m4: New file.
28293
28294         Module acl.
28295         * m4/acl.m4: Nop.
28296
28297         Module backupfile.
28298         * m4/backupfile.m4: New file.
28299         * m4/d-ino.m4: Indentation.
28300
28301         Module fsusage.
28302         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
28303         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
28304         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
28305
28306         Module dirfd.
28307         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
28308         requirements.
28309
28310         Module euidaccess.
28311         * m4/euidaccess.m4: New file.
28312
28313         Module file-type.
28314         * m4/file-type.m4: New file.
28315
28316         Module fileblocks.
28317         * m4/fileblocks.m4: New file.
28318
28319         Module filemode.
28320         * m4/filemode.m4: New file.
28321
28322         Module isdir.
28323         * m4/isdir.m4: New file.
28324
28325         Module lchown.
28326         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
28327         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
28328
28329         Module makepath.
28330         * m4/makepath.m4: New file.
28331
28332         Module modechange.
28333         * m4/modechange.m4: New file.
28334
28335         Module mountlist.
28336         * m4/mountlist.m4: New file.
28337         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
28338         Indentation.
28339
28340         Module path-concat.
28341         * m4/path-concat.m4: New file.
28342
28343         Module pathmax.
28344         * m4/pathmax.m4: New file.
28345
28346         Module same.
28347         * m4/same.m4: New file.
28348
28349         Module save-cwd.
28350         * m4/save-cwd.m4: New file.
28351
28352         Module savedir.
28353         * m4/savedir.m4: New file.
28354
28355         Module xgetcwd.
28356         * m4/xgetcwd.m4: New file.
28357         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
28358
28359         Module xreadlink.
28360         * m4/xreadlink.m4: New file.
28361
28362         Module safe-read.
28363         * m4/safe-read.m4: New file.
28364
28365         Module safe-write.
28366         * m4/safe-write.m4: New file.
28367
28368         Module closeout.
28369         * m4/closeout.m4: New file.
28370
28371         Module stdio-safer.
28372         * m4/stdio-safer.m4: New file.
28373
28374         Module getpass.
28375         * m4/getpass.m4: New file.
28376
28377         Module getugroups.
28378         * m4/getugroups.m4: New file.
28379
28380         Module group-member.
28381         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
28382         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
28383
28384         Module idcache.
28385         * m4/idcache.m4: New file.
28386
28387         Module userspec.
28388         * m4/userspec.m4: New file.
28389
28390         Module gettime.
28391         * m4/clock_time.m4: New file.
28392         * m4/gettime.m4: New file.
28393
28394         Module settime.
28395         * m4/settime.m4: New file.
28396
28397         Module posixtm.
28398         * m4/posixtm.m4: New file.
28399
28400         Module gethostname.
28401         * m4/gethostname.m4: New file.
28402
28403         Module canon-host.
28404         * m4/canon-host.m4: New file.
28405
28406         Module gettext.
28407         * m4/codeset.m4: New file, from gettext-0.11.5.
28408         * m4/gettext.m4: New file, from gettext-0.11.5.
28409         * m4/glibc21.m4: New file, from gettext-0.11.5.
28410         * m4/iconv.m4: New file, from gettext-0.11.5.
28411         * m4/intdiv0.m4: New file, from gettext-0.11.5.
28412         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
28413         * m4/inttypes.m4: New file, from gettext-0.11.5.
28414         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
28415         * m4/isc-posix.m4: New file, from gettext-0.11.5.
28416         * m4/lcmessage.m4: New file, from gettext-0.11.5.
28417         * m4/lib-ld.m4: New file, from gettext-0.11.5.
28418         * m4/lib-link.m4: New file, from gettext-0.11.5.
28419         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
28420         * m4/progtest.m4: New file, from gettext-0.11.5.
28421         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
28422         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
28423         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
28424
28425         Module localcharset.
28426         * m4/localcharset.m4: New file.
28427
28428         Module hard-locale.
28429         * m4/hard-locale.m4: New file.
28430
28431         Module mbswidth.
28432         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
28433         onceonly macros.
28434         * m4/mbrtowc.m4: Add comment.
28435
28436         Module memcasecmp.
28437         * m4/memcasecmp.m4: New file.
28438
28439         Module memcoll.
28440         * m4/memcoll.m4: New file.
28441
28442         Module unicodeio.
28443         * m4/unicodeio.m4: New file.
28444
28445         Module rpmatch.
28446         * m4/rpmatch.m4: New file.
28447
28448         Module yesno.
28449         * m4/yesno.m4: New file.
28450
28451         Module exitfail.
28452         * m4/exitfail.m4: New file.
28453
28454         Module c-stack.
28455         * m4/c-stack.m4 (gl_C_STACK): New macro.
28456         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
28457
28458         Module error.
28459         * m4/error.m4 (gl_ERROR): New macro.
28460         (jm_PREREQ_ERROR): Use onceonly macros.
28461
28462         Module fatal.
28463         * m4/fatal.m4: New file.
28464
28465         Module getloadavg.
28466         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
28467         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
28468
28469         Module getpagesize.
28470         * m4/getpagesize.m4: New file.
28471
28472         Module getusershell.
28473         * m4/getusershell.m4: New file.
28474
28475         Module physmem.
28476         * m4/physmem.m4: New file.
28477
28478         Module posixver.
28479         * m4/posixver.m4: New file.
28480
28481         Module quotearg.
28482         * m4/quotearg.m4: New file.
28483
28484         Module quote.
28485         * m4/quote.m4: New file.
28486
28487         Module readutmp.
28488         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
28489
28490         Module sig2str.
28491         * m4/sig2str.m4: New file.
28492
28493         Other.
28494         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
28495         ulonglong.m4.
28496         * m4/intmax_t.m4: New file.
28497         * m4/d-type.m4: Indentation.
28498         * m4/jm-macros.m4: Update.
28499         * m4/prereq.m4 (jm_PREREQ): Update.
28500         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
28501         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
28502         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
28503         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
28504         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
28505         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
28506         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
28507         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
28508         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
28509         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
28510         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
28511         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
28512         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
28513         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
28514         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
28515         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
28516         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
28517         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
28518         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
28519
28520 2002-12-24  Bruno Haible  <bruno@clisp.org>
28521
28522         * MODULES.txt: Update according to m4/ changes.
28523
28524         Module gettext.
28525         * config.rpath: New file, from gettext-0.11.5.
28526
28527         * modules/*: New module descriptions.
28528         * gnulib-tool: New file.
28529         * MODULES.html.sh: New file.
28530
28531 2002-12-21  Karl Berry  <karl@gnu.org>
28532
28533         * doc/fdl.texi: update to version 1.2.
28534
28535 2002-12-19  Karl Berry  <karl@gnu.org>
28536
28537         * config/config.guess: update from prep.
28538
28539 2002-12-18  Bruno Haible  <bruno@clisp.org>
28540
28541         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
28542         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
28543
28544 2002-12-17  Bruno Haible  <bruno@clisp.org>
28545
28546         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
28547         stdlib.h, string.h.
28548
28549 2002-12-17  Bruno Haible  <bruno@clisp.org>
28550
28551         * lib/canon-host.c (strdup): Remove unused declaration.
28552
28553         * lib/fsusage.c: Include full_read.h.
28554         (get_fs_usage): Use full_read instead of safe_read.
28555
28556         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
28557
28558 2002-12-12  Karl Berry  <karl@gnu.org>
28559
28560         * config/config.guess: update from prep.
28561
28562 2002-12-11  Bruno Haible  <bruno@clisp.org>
28563
28564         * m4/setenv.m4: New file, from gettext-0.11.5.
28565
28566 2002-12-11  Bruno Haible  <bruno@clisp.org>
28567
28568         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
28569         not unsetenv().
28570         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
28571         modifications:
28572
28573         2002-12-11  Bruno Haible  <bruno@clisp.org>
28574
28575                 * setenv.c (alloca): Fall back to malloc.
28576                 (freea): New macro.
28577                 (setenv): Use freea() to free memory allocated with alloca().
28578
28579         2002-11-13  Bruno Haible  <bruno@clisp.org>
28580
28581                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
28582                 function declarations.
28583                 * unsetenv.c (unsetenv): Likewise.
28584
28585         2002-03-04  Bruno Haible  <bruno@clisp.org>
28586
28587                 Portability to AIX 4.3.3.
28588                 * unsetenv.c: New file, extracted from setenv.c.
28589                 * setenv.c: Move the unsetenv() function to unsetenv.c.
28590
28591         2001-12-20  Bruno Haible  <bruno@clisp.org>
28592
28593                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
28594                 use malloc instead. For SunOS 4.
28595
28596         2001-12-11  Bruno Haible  <bruno@clisp.org>
28597
28598                 * setenv.c: Declare alloca.
28599                 (compar_fn_t): New typedef.
28600                 (KNOWN_VALUE, STORE_VALUE): Use it.
28601
28602         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
28603         setenv.h.
28604
28605 2002-12-10  Paul Eggert  <eggert@twinsun.com>
28606
28607         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
28608         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
28609         Choose values that are less likely to collide with system fnmatch
28610         options.
28611         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
28612         defined (e.g., a pure POSIX system).
28613         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
28614         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
28615
28616 2002-12-06  Paul Eggert  <eggert@twinsun.com>
28617
28618         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
28619         a pain in practice to deal with generated m4 files.  This change
28620         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
28621
28622         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
28623         and jm-glibc-io.m4, as they are no longer a special case.
28624         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
28625         kludge and the auto-generation stuff.  Check only whether the
28626         functions are declared, not whether they exist, since older hosts
28627         that don't declare the functions can't use the optimization anyway.
28628
28629 2002-12-06  Jim Meyering  <jim@meyering.net>
28630
28631         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
28632
28633         Merge in changes from libc's misc/error.c, in preparation
28634         for the merge of gnulib's changes back into libc.
28635
28636         * lib/error.c (_): Define only if not already defined.
28637         Move definition to follow all #include directives.
28638         Include unlocked-io.h only if !_LIBC.
28639         [_LIBC]: Include <libio/libioP.h>.
28640         [USE_IN_LIBIO]: Include <libio/iolibio.h>
28641         (fflush): Tweak definition to use INTUSE.
28642         (putc): Define.
28643
28644 2002-12-05  Paul Eggert  <eggert@twinsun.com>
28645
28646         * lib/alloca.c [defined emacs]: Include "lisp.h".
28647         (xalloc_die) [defined emacs]: New macro.
28648         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
28649         [! defined emacs]: Include <xalloc.h>.
28650         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
28651         (pointer): Typedef to POINTER_TYPE *.
28652         (malloc): Remove decl; we now always use xmalloc.
28653         (alloca): Use old-style definition, since Emacs needs this.
28654         Check for arithmetic overflow when computing combined size.
28655
28656 2002-12-04  Paul Eggert  <eggert@twinsun.com>
28657
28658         Do not generate unlocked-io.h automatically, since it's easier to
28659         maintain it by hand.
28660
28661         * lib/unlocked-io.h: New file, from GNU diffutils,
28662         but with proper copyright notice and attribution.
28663         * lib/gen-uio: Remove.
28664         * lib/Makefile.am: Add copyright notice.
28665         (libfetish_a_SOURCES): Add unlocked-io.h.
28666         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
28667         (DISTCLEANFILES, io_functions): Remove macros.
28668         (EXTRA_DIST): Remove gen_uio.
28669         (unlocked-io.h): Remove rule.
28670
28671 2002-12-04  Jim Meyering  <jim@meyering.net>
28672
28673         Reflect the fact that stat.c and lstat.c are no longer generated.
28674         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
28675         (DISTCLEANFILES): Likewise.
28676         (EXTRA_DIST): Likewise.
28677         (all_local): Don't depend on stat.c or lstat.c.
28678         (stat.c, lstat.c): Remove rules.
28679         (EXTRA_DIST): Remove xstat.in.
28680
28681         * lib/xstat.in: Remove file.  Contents moved into stat.c.
28682         * lib/stat.c: New file.  Contents mostly from xstat.in.
28683         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
28684         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
28685
28686         * lib/safe-read.c: Rework so that it may serve to define safe_write,
28687         too.
28688         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
28689
28690 2002-12-03  Jim Meyering  <jim@meyering.net>
28691
28692         * lib/safe-read.c, safe-write.c: Change variable names and comments,
28693         but not semantics, to minimize the differences between these two files.
28694         (safe_read): Change comment to mention SAFE_READ_ERROR.
28695
28696         * lib/safe-read.c (IS_EINTR): Define.
28697         (safe_read): Use IS_EINTR in place of in-function cpp directives.
28698
28699 2002-12-02  Jim Meyering  <jim@meyering.net>
28700
28701         * lib/safe-read.c (EINTR): Define.
28702         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28703         (INT_MAX): Provide fallback.
28704         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28705
28706         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28707
28708 2002-12-02  Bruno Haible  <bruno@clisp.org>
28709
28710         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28711         Define, taken from safe-read.c.
28712         (INT_MAX): Provide fallback.
28713         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28714         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28715
28716         * lib/safe-read.c (EINTR): Remove definition.
28717         (safe_read): Don't use EINTR if it is absent.
28718
28719 2002-12-01  Jim Meyering  <jim@meyering.net>
28720
28721         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28722         zero.
28723         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28724
28725 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28726
28727         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28728         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28729         with `if (! (value < limit)) abort ();', for readability.
28730
28731 2002-11-26  Karl Berry  <karl@gnu.org>
28732
28733         * lib/strdup.c: copy from libc again, with jim's ok.
28734         * lib/.cppi-disable: re-add strdup.c
28735
28736 2002-11-25  Karl Berry  <karl@gnu.org>
28737
28738         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28739         instead of "strtol.c".
28740
28741 2002-11-25  Karl Berry  <karl@gnu.org>
28742
28743         * config/install-sh: update from automake for variable quoting, $0 in
28744         error msgs, etc.
28745
28746         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28747         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28748         entry.
28749
28750 2002-11-25  Jim Meyering  <jim@meyering.net>
28751
28752         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28753
28754 2002-11-24  Karl Berry  <karl@gnu.org>
28755
28756         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28757         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28758
28759 2002-11-24  Jim Meyering  <jim@meyering.net>
28760
28761         Update from coreutils:
28762
28763         * lib/mktime.c: Merge in changes from libc.
28764
28765         Avoid a link-time failure on some Linux systems.
28766         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28767         (otherwise).
28768         (__mon_yday): Declare with the STATIC attribute.
28769         (__mktime_internal): Likewise.
28770         Based on a report from Greg Schafer.
28771
28772 2002-11-23  Jim Meyering  <jim@meyering.net>
28773
28774         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28775         Use `unsigned', not `int', as type of index.
28776
28777         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28778
28779         * lib/fsusage.c: Remove unneeded parentheses around operands of
28780         `defined'.
28781
28782 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28783
28784         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28785         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28786         so that we can be included first.
28787         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28788         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28789         No need to include stddef.h or sys/types.h any more.
28790         Surround local include files with "", not "<>".
28791         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28792         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28793         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28794         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28795         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28796         (ISPRINT): Remove; no longer needed now that we assume C89.
28797
28798         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28799         Preserve errno.
28800
28801         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28802         quotearg_char): Use SIZE_MAX rather than
28803         (size_t) -1 when we are talking about "infinity".
28804
28805         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28806
28807 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28808
28809         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28810         hint that one should use `if (! x) abort ();' rather than `assert
28811         (x);', and anyway it's one less thing to worry about configuring.
28812         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28813         hash_rehash, hash_insert): Use abort rather than assert.
28814
28815 2002-11-22  Bruno Haible  <bruno@clisp.org>
28816
28817         * lib/safe-read.h: Assume C89. Add comments.
28818         (safe_read): Change return type to size_t.
28819         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28820         byte counts > SSIZE_MAX correctly.
28821         * lib/safe-write.h: New file.
28822         * lib/safe-write.c: New file.
28823         * lib/full-read.h: New file.
28824         * lib/full-read.c: New file.
28825         * lib/full-write.h: Assume C89. Add comments.
28826         * lib/full-write.c: Include safe-write.h.
28827         (full_write): Rewritten to use safe_write.
28828         Suggested by Jim Meyering and Paul Eggert.
28829
28830 2002-11-21  Jim Meyering  <jim@meyering.net>
28831
28832         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28833
28834         Merge in changes from the coreutils.
28835
28836         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28837         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28838         <stdint.h>.
28839         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28840         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28841         int.  Work more efficiently if X is the same width as uintmax_t.
28842         Do not compare X to -1, to avoid bogus compiler warning.
28843         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28844         Don't assume that f_frsize and f_bsize are the same type.
28845
28846         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28847         warning on FreeBSD.
28848
28849         * lib/makepath.c (make_path): Restore umask *before* creating the final
28850         component.
28851         (make_path): Minor reformatting.
28852
28853         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28854         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28855         HAVE_MALLOC/HAVE_REALLOC.
28856
28857         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28858         dummy ones.  At least on GNU/Linux systems, `auto' means something
28859         else.
28860         From Michael Stone.
28861
28862 2002-11-21  Bruno Haible  <bruno@clisp.org>
28863
28864         Remove case insensitive option matching.
28865         * lib/argmatch.h (argcasematch): Remove declaration.
28866         (ARGCASEMATCH): Remove macro.
28867         (__xargmatch_internal): Remove case_sensitive argument.
28868         (XARGMATCH): Update.
28869         (XARGCASEMATCH): Remove macro.
28870         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28871         case_sensitive argument.
28872         (argcasematch): Remove function.
28873         (__xargmatch_internal): Remove case_sensitive argument.
28874         (main): Use XARGMATCH instead of XARGCASEMATCH.
28875
28876         * lib/xmalloc.c: Change compile-time error message. Add comment about
28877         required autoconf version.
28878
28879 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28880
28881         Merge argmatch cleanups from Bison.  Assume C89.
28882
28883         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28884         Include stdlib.h, for EXIT_FAILURE.
28885         Always include <string.h>, since we assume C89.
28886         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28887         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28888         Include <stddef.h> instead, since it's all we need for size_t.
28889         (PARAMS): Remove.  All uses removed.
28890         (ARRAY_CARDINALITY): Do not bother to #undef.
28891         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28892         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28893         Remove unnecessary parentheses.
28894         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28895         Insert necessary parentheses.
28896         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28897         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28898
28899 2002-11-19  Bruno Haible  <bruno@clisp.org>
28900
28901         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28902         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28903
28904         * lib/mbswidth.h (PARAMS): Remove macro.
28905         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28906         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28907
28908         * lib/gcd.h (PARAMS): Remove macro.
28909         (gcd): Use ANSI C function declarations.
28910         * lib/gcd.c (gcd): Likewise.
28911
28912 2002-11-15  Bruno Haible  <bruno@clisp.org>
28913
28914         * lib/strcspn.c: Include <stddef.h>.
28915         (strcspn): Use ANSI C function declaration. Change return type to
28916         size_t. Use NULL.
28917         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28918         (strpbrk): Use NULL.
28919         * lib/strpbrk.h (PARAMS): Remove macro.
28920         (strpbrk): Use ANSI C function declaration.
28921         * lib/strstr.c: Don't include <sys/types.h>.
28922         * lib/strstr.h (PARAMS): Remove macro.
28923         (strstr): Use ANSI C function declarations.
28924
28925 2002-11-14  Karl Berry  <karl@gnu.org>
28926
28927         * config/mkinstalldirs: `do' on separate line, instead of
28928         `for var; do'.
28929
28930 2002-11-06  Bruno Haible  <bruno@clisp.org>
28931
28932         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28933         * lib/gcd.c (gcd): Likewise.
28934
28935 2002-11-05  Bruno Haible  <bruno@clisp.org>
28936
28937         * lib/gcd.h: New file, from gettext-0.11.5.
28938         * lib/gcd.c: New file, from gettext-0.11.5.
28939
28940 2002-11-05  Bruno Haible  <bruno@clisp.org>
28941
28942         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28943         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28944         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28945         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28946
28947         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28948         <libintl.h>.
28949         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28950         <libintl.h>.
28951
28952         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28953         * lib/human.c: Include gettext.h instead of <libintl.h>.
28954         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28955         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28956         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28957         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28958         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28959         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28960         (textdomain): Remove definition.
28961         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28962
28963         * lib/long-options.c: Remove include of <libintl.h> and definition of
28964         _.
28965         * lib/same.c: Remove include of <libintl.h> and definition of _.
28966
28967 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28968
28969         * lib/config.charset: A few additions for Solaris.
28970
28971 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28972
28973         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28974         * lib/localcharset.c (locale_charset): Declare as extern "C".
28975
28976 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28977
28978         * lib/config.charset: msdos in uk_UA uses CP1125.
28979
28980 2002-11-04  Bruno Haible  <bruno@clisp.org>
28981
28982         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28983         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28984         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28985         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28986         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28987
28988 2002-11-04  Bruno Haible  <bruno@clisp.org>
28989
28990         * lib/localcharset.c (locale_charset): Don't return an empty string.
28991
28992 2002-11-04  Bruno Haible  <bruno@clisp.org>
28993
28994         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28995         aliases.
28996
28997 2002-11-04  Bruno Haible  <bruno@clisp.org>
28998
28999         * lib/config.charset: Update for newest glibc. Add canonical names
29000         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
29001
29002 2002-11-04  Bruno Haible  <bruno@clisp.org>
29003
29004         * lib/config.charset: Add support for NetBSD.
29005
29006 2002-11-04  Bruno Haible  <bruno@clisp.org>
29007
29008         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
29009
29010 2002-11-01  Bruno Haible  <bruno@clisp.org>
29011
29012         * configure.in: Add AC_CONFIG_AUX_DIR call.
29013         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
29014         test/Makefile.
29015         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
29016
29017 2002-09-28  Karl Berry  <karl@gnu.org>
29018
29019         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
29020         installed automake until the next release, since changes have been
29021         made.
29022
29023 2002-09-25  Karl Berry  <karl@gnu.org>
29024
29025         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
29026         * lib/getopt*: copy from libc/posix.
29027         * lib/gettext.h: copy from gettext.
29028         * lib/.cppi-disable: add strdup.c, gettext.h.
29029
29030 2002-09-25  Karl Berry  <karl@gnu.org>
29031
29032         * config/srclist.txt: enable gettext.h check.
29033         * config/config.{guess,sub}: update from prep.
29034         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
29035                 from automake 1.6.3.
29036         See srclist*.
29037
29038 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
29039
29040         * regex.c (PATFETCH): Remove the translating fetch.
29041         (PATFETCH_RAW): Rename to PATFETCH.
29042         (set_image_of_range): New fun.
29043         (SET_RANGE_TABLE_WORK_AREA): Use it.
29044         (regex_compile): Don't translate the pattern chars so eagerly.
29045         Only do it when inserting an `exactn' bytecode or when handling
29046         a char-range.
29047         (mutually_exclusive_p): Avoid empty statement.
29048
29049 2002-07-06  Jim Meyering  <meyering@lucent.com>
29050
29051         * m4/README: Don't mention Makefile.am.in.
29052         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
29053
29054 2002-07-01  Jim Meyering  <meyering@lucent.com>
29055
29056         * lib/c-stack.c: Include sys/time.h.
29057         From Volker Borchert.
29058
29059 2002-06-26  Paul Eggert  <eggert@twinsun.com>
29060
29061         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
29062
29063 2002-06-26  Paul Eggert  <eggert@twinsun.com>
29064
29065         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
29066         New macro.  Use it uniformly instead of
29067         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
29068         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
29069         reported by Vin Shelton.
29070
29071 2002-06-22  Paul Eggert  <eggert@twinsun.com>
29072
29073         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
29074         Do not assume SA_SIGINFO behavior.
29075         Bug reported by Jim Meyering on NetBSD 1.5.2.
29076
29077 2002-06-22  Jim Meyering  <meyering@lucent.com>
29078
29079         * m4/c-stack.m4: New file, from diffutils-2.8.2.
29080         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
29081
29082         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
29083         now that configure.ac uses AC_GNU_SOURCE.
29084         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
29085         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
29086
29087         Update to latest tools.  Suggestions from Paul Eggert.
29088         * m4/stdbool.m4: New file, from diffutils-2.8.2.
29089         * m4/gnu-source.m4: Update from diffutils-2.8.2.
29090         * m4/fnmatch.m4: Likewise.
29091         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
29092         to AC_HEADER_STDBOOL
29093
29094 2002-06-22  Jim Meyering  <meyering@lucent.com>
29095
29096         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
29097         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
29098
29099 2002-06-22  Jim Meyering  <meyering@lucent.com>
29100
29101         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
29102
29103         * lib/exitfail.c, exitfail.h: Likewise.
29104         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
29105
29106         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
29107         of fnmatch.h.
29108         (EXTRA_DIST): Add fnmatch_loop.c.
29109         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
29110
29111         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
29112         * lib/fnmatch.c: Update from diffutils-2.8.2.
29113         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
29114         * lib/fnmatch.h: Remove file.
29115
29116 2002-06-21  Jim Meyering  <meyering@lucent.com>
29117
29118         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
29119         * m4/mbrtowc.m4: Likewise.
29120
29121         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
29122         * m4/mbswidth.m4: Reflect name change:
29123         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
29124         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
29125
29126         * m4/lib-link.m4: Update from gettext-0.11.2.
29127         * m4/gettext.m4: Likewise.
29128
29129         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
29130         From Alfred M. Szmidt.
29131
29132 2002-06-18  Paul Eggert  <eggert@twinsun.com>
29133
29134         * lib/file-type.h: Report an error if neither S_ISREG nor
29135         S_IFREG is defined, instead of using a test specific to glibc
29136         2.2.  This should be safe, since POSIX requires S_ISREG and
29137         Unix Version 7 had S_IFREG.  We don't need to check for
29138         <sys/types.h> since we don't use any symbols that it defines.
29139
29140 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
29141
29142         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
29143         $@-t, so that each temporary file name is unique and valid in the first
29144         8 characters, for operation under DOS.
29145
29146 2002-06-15  Paul Eggert  <eggert@twinsun.com>
29147
29148         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
29149
29150 2002-06-15  Jim Meyering  <meyering@lucent.com>
29151
29152         Work even with DJGPP 2.03, which lacks support for symlinks.
29153         From Richard Dawe.
29154         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
29155         is defined.
29156         * lib/lchown.c (S_ISLNK): Likewise.
29157
29158 2002-06-15  Jim Meyering  <meyering@lucent.com>
29159
29160         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
29161         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
29162         have been included before this file.
29163
29164 2002-06-14  Jim Meyering  <meyering@lucent.com>
29165
29166         * lib/file-type.h: Use the version from diffutils-2.8.2.
29167         * lib/file-type.c: Likewise.
29168
29169 2002-06-07  Jim Meyering  <meyering@lucent.com>
29170
29171         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
29172         They're needed at least for NetBSD 1.5.2.
29173         ($statxfs_includes): Include those same headers.
29174         ($statxfs_includes): Include sys/vfs.h if available.
29175         ($statxfs_includes): Likewise for sys/statvfs.h.
29176         Check for the following members in both structs statfs and statvfs:
29177         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
29178
29179 2002-06-01  Jim Meyering  <meyering@lucent.com>
29180
29181         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
29182         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
29183
29184 2002-05-28  Jim Meyering  <meyering@lucent.com>
29185
29186         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
29187         Reported by Volker Borchert.
29188
29189 2002-05-27  Jim Meyering  <meyering@lucent.com>
29190
29191         Fix a problem seen only on nonconforming systems whereby ls.c's
29192         use of localtime, and then of gettimeofday would cause trouble:
29193         the localtime call used to initialize rpl_gettimeofday's save
29194         mechanism would clobber ls's current local time information so
29195         that in any long listing the first file would always be listed
29196         with date 1970-01-01.  Analysis by Volker Borchert.
29197
29198         * lib/gettimeofday.c (localtime): Undefine.
29199         (rpl_localtime): New function.
29200
29201 2002-05-27  Jim Meyering  <meyering@lucent.com>
29202
29203         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
29204         localtime.
29205
29206         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
29207         use the replacement function; it wouldn't resolve at link time.
29208         Reported by Volker Borchert.
29209
29210 2002-05-22  Jim Meyering  <meyering@lucent.com>
29211
29212         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
29213         file-type.h.
29214         * lib/file-type.h: New file.
29215         * lib/file-type.c (file_type): New file/function.  Extracted from
29216         diffutils.
29217
29218 2002-04-30  Jim Meyering  <meyering@lucent.com>
29219
29220         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
29221
29222 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29223
29224         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
29225
29226 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29227
29228         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
29229         Do not check for alloca.h (no longer used) or stdbool.h (was never
29230         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
29231
29232 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29233
29234         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
29235
29236 2002-04-29  Jim Meyering  <meyering@lucent.com>
29237
29238         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
29239         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
29240         Use AC_FUNC_STRNLEN here instead.
29241
29242         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
29243         With autoconf-2.53a, it's part of AC_PROG_CC.
29244
29245 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29246
29247         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
29248         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
29249
29250 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29251
29252         * lib/sig2str.h, lib/sig2str.c: New files.
29253         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
29254
29255 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29256
29257         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
29258         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
29259         of 127, since 64 is the largest conceivable number for ancient
29260         nonstandard hosts.
29261         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
29262
29263 2002-04-28  Jim Meyering  <meyering@lucent.com>
29264
29265         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
29266
29267 2002-04-24  Jim Meyering  <meyering@lucent.com>
29268
29269         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
29270         (jm_PREREQ): Use it.
29271
29272         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
29273         mach/mach.h fcntl.h.
29274         Check for this function: setlocale.
29275
29276 2002-04-24  Jim Meyering  <meyering@lucent.com>
29277
29278         * lib/gettext.h: New file, from Gettext.
29279         * lib/Makefile.am (INCLUDES): Remove -I../intl.
29280         (libfetish_a_SOURCES): Add gettext.h.
29281
29282 2002-04-16  Jim Meyering  <meyering@lucent.com>
29283
29284         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
29285         ut_pid, ut_id, ut_exit.
29286
29287 2002-04-16  Jim Meyering  <meyering@lucent.com>
29288
29289         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
29290         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
29291         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
29292
29293 2002-04-12  Jim Meyering  <meyering@lucent.com>
29294
29295         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
29296         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
29297         existence of the getmntinfo function.  Needed for Darwin 5.3.
29298
29299         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
29300         This is necessary at least on Darwin 5.3.
29301
29302         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
29303         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
29304         strnlen.o in the library, and that makes some versions of ranlib
29305         object.
29306
29307 2002-04-12  Jim Meyering  <meyering@lucent.com>
29308
29309         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
29310
29311 2002-04-09  Jim Meyering  <meyering@lucent.com>
29312
29313         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
29314         to be more precise.  Rather than saying we're checking whether the
29315         function `works', say what we're testing.
29316         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
29317         Reported by Bruno Haible.
29318
29319 2002-03-10  Jim Meyering  <meyering@lucent.com>
29320
29321         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
29322         Suggestion from Santiago Vila.
29323
29324 2002-03-08  Jim Meyering  <meyering@lucent.com>
29325
29326         * lib/rename.c: Mention that this wrapper is needed also on
29327         mips-dec-ultrix4.4 systems.
29328
29329 2002-03-02  Jim Meyering  <meyering@lucent.com>
29330
29331         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
29332         not HAVE_CLOCK_SETTIME.
29333
29334 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29335
29336         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
29337         Check for clock_settime.
29338
29339 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29340
29341         * lib/nanosleep.h: Rename to....
29342         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
29343
29344         * lib/gettime.c: New file.
29345         * lib/settime.c: New file.
29346         * lib/stime.c: Remove.
29347
29348         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
29349         timespec.h.  Remove nanosleep.h.
29350
29351 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29352
29353         * m4/acl.m4: New file.
29354         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
29355         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
29356
29357 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29358
29359         * lib/acl.c, lib/acl.h: New files.
29360         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
29361
29362 2002-02-24  Jim Meyering  <meyering@lucent.com>
29363
29364         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
29365         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
29366         cause trouble.  Reported by Nelson Beebe.
29367
29368 2002-02-23  Paul Eggert  <eggert@twinsun.com>
29369
29370         * lib/path-concat.c (xpath_concat): Reorder code to pacify
29371         compilers that don't know that xalloc_die never returns.
29372
29373 2002-02-20  Jim Meyering  <meyering@lucent.com>
29374
29375         * lib/getdate.c: Regenerate using bison-1.33.
29376
29377 2002-02-17  Jim Meyering  <meyering@lucent.com>
29378
29379         * config/config.guess (main): Don't use `head -1'; it's no longer
29380         portable. Use `sed 1q' instead.
29381
29382 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
29383
29384         * m4/codeset.m4: Upgrade to gettext-0.11.
29385         * m4/gettext.m4: Upgrade to gettext-0.11.
29386         * m4/glibc21.m4: Upgrade to gettext-0.11.
29387         * m4/iconv.m4: Upgrade to gettext-0.11.
29388         * m4/isc-posix.m4: Upgrade to gettext-0.11.
29389         * m4/lcmessage.m4: Upgrade to gettext-0.11.
29390         * m4/lib-ld.m4: New file, from gettext-0.11.
29391         * m4/lib-link.m4: New file, from gettext-0.11.
29392         * m4/lib-prefix.m4: New file, from gettext-0.11.
29393         * m4/progtest.m4: Upgrade to gettext-0.11.
29394
29395 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29396
29397         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
29398         (jm_PREREQ): Use it.
29399
29400 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29401
29402         * lib/posixver.c, lib/posixver.h: New files.
29403         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29404
29405 2002-02-02  Paul Eggert  <eggert@twinsun.com>
29406             Bruno Haible  <bruno@clisp.org>
29407
29408         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
29409         (fwrite_success_callback): New declaration.
29410         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
29411         print_unicode_char. Call failure callback instead of error.
29412         (fwrite_success_callback): New function.
29413         (exit_failure_callback): New function.
29414         (fallback_failure_callback): New function.
29415         (print_unicode_char): Call unicode_to_mb.
29416
29417 2002-01-26  Jim Meyering  <meyering@lucent.com>
29418
29419         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
29420         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
29421
29422 2002-01-26  Jim Meyering  <meyering@lucent.com>
29423
29424         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
29425
29426 2002-01-22  Paul Eggert  <eggert@twinsun.com>
29427
29428         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
29429
29430 2002-01-22  Jim Meyering  <meyering@lucent.com>
29431
29432         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
29433         Otherwise, some versions of automake would omit the rule that makes
29434         Makefile from Makefile.in.
29435
29436 2002-01-21  Paul Eggert  <eggert@twinsun.com>
29437
29438         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
29439         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29440         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
29441         (memcoll): Set errno to zero if there is no error.
29442
29443         * lib/quotearg.c (quotearg_buffer_restyled):
29444         Fix bug with quoting buffers containing NUL when backslashing escapes.
29445         This bug was exposed by the other changes in this patch.
29446         (quotearg_n_options): New arg ARGSIZE.
29447         All callers changed.
29448         (quoting_options_from_style): New function.
29449         (quotearg_n_style): Use it.
29450         (quotearg_n_style_mem): New function.
29451
29452         * lib/quotearg.h (quotearg_n_style_mem): New function.
29453
29454 2002-01-19  Jim Meyering  <meyering@lucent.com>
29455
29456         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
29457         Remove useless quotes: DF_PROG="df".
29458         * m4/strnlen.m4: New file.
29459
29460 2002-01-16  Paul Eggert  <eggert@twinsun.com>
29461
29462         * lib/backupfile.c (ISDIGIT): Comment fix.
29463         * lib/getdate.y (ISDIGIT): Likewise.
29464         * lib/posixtm.c (ISDIGIT, year): Likewise.
29465         * lib/strverscmp.c (ISDIGIT): Likewise.
29466         * lib/userspec.c (ISDIGIT): Likewise.
29467
29468 2002-01-16  Jim Meyering  <meyering@lucent.com>
29469
29470         * lib/getdate.y: Add three semicolons, each just before a closing
29471         brace. Bison (as of version 1.31) no longer papers over that mistake.
29472
29473 2002-01-05  Jim Meyering  <meyering@lucent.com>
29474
29475         * lib/version-etc.c (version_etc_copyright): Update copyright year.
29476
29477 2001-12-19  Paul Eggert  <eggert@twinsun.com>
29478
29479         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
29480         not silently exit merely because the output buffer happens to
29481         have nothing pending.
29482
29483 2001-12-18  Paul Eggert  <eggert@twinsun.com>
29484
29485         See the big note in ../ChangeLog.
29486         * lib/human.c (suffixes): Prefer K to k for 1024.
29487         (generate_suffix_backwards): New function.
29488         (human_readable_inexact): Use it.
29489         * lib/xstrtol.c (__xstrtol): If there is no number but there
29490         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
29491         Accept 'K' as well as 'k'.
29492
29493 2001-12-15  Jim Meyering  <meyering@lucent.com>
29494
29495         * lib/regex.h (__restrict_arr): Update from libc.
29496
29497         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
29498         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
29499         (STREQ): Define.
29500
29501 2001-12-14  Jim Meyering  <meyering@lucent.com>
29502
29503         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
29504         Suggestion from Bruno Haible.
29505
29506 2001-12-10  Jim Meyering  <meyering@lucent.com>
29507
29508         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
29509         xrealloc, Instead, include "xalloc.h".
29510         (initbuffer): Don't cast xmalloc return value to char*.
29511         (readline): Reword comment.
29512         Don't cast xrealloc return value to char*
29513         Return NULL, not 0.
29514
29515 2001-12-09  Jim Meyering  <meyering@lucent.com>
29516
29517         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
29518         about `signed and unsigned type in conditional expression'.
29519         * lib/posixtm.c (posix_time_parse): Likewise.
29520
29521         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
29522
29523         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
29524         to avoid a pedantic warning.
29525
29526         * lib/getstr.c: Don't include assert.h.
29527         (getstr): Remove warning-evoking assertions.
29528         Return -1 if offset parameter is out of bounds.
29529         Change the type of a local from int to size_t.
29530
29531         * lib/strftime.c (my_strftime_localtime_r): Include this function
29532         definition in the `#if ! HAVE_TM_GMTOFF' block.
29533
29534         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
29535         Include xalloc.h instead.
29536
29537 2001-12-02  Jim Meyering  <meyering@lucent.com>
29538
29539         * lib/tempname.c: Don't declare getenv, thus reverting the change of
29540         2001-11-18.  It's no longer necessary, now that stdlib.h is always
29541         included.
29542
29543         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
29544         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
29545
29546 2001-11-30  Akim Demaille  <akim@epita.fr>
29547
29548         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
29549         before being defined.
29550
29551 2001-11-27  Paul Eggert  <eggert@twinsun.com>
29552
29553         * lib/quotearg.h (quotearg_n, quotearg_n_style):
29554         First arg is int, not unsigned.
29555         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
29556         (SIZE_MAX, UINT_MAX): New macros.
29557         (quotearg_n_options): Abort if N is negative.
29558         Avoid overflow check on hosts where size_t is 64 bits and int
29559         is 32 bits, as overflow is impossible there.
29560         Fix off-by-one typo that caused unnecessary reallocation.
29561
29562 2001-11-27  Jim Meyering  <meyering@lucent.com>
29563
29564         * lib/tempname.c: Merge with version from libc.
29565         * lib/regex.c: Likewise.
29566
29567         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
29568         systems for which STDC_HEADERS is 0, it was not included, resulting in
29569         a warning about an integer-to-pointer conversion problem with getenv.
29570         Reported by Volker Borchert.
29571
29572 2001-11-26  Jim Meyering  <meyering@lucent.com>
29573
29574         * lib/gtod.h: Remove file.
29575         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
29576         * lib/gettimeofday.c: Don't include gtod.h.
29577         (GTOD_init): Remove function.
29578         (rpl_gettimeofday): Do its job here instead, rather than aborting.
29579         Suggestion from Volker Borchert.
29580
29581 2001-11-23  Jim Meyering  <meyering@lucent.com>
29582
29583         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
29584         it.
29585         * lib/hash.c (struct hash_table): Define it here instead.
29586
29587 2001-11-22  Jim Meyering  <meyering@lucent.com>
29588
29589         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
29590
29591 2001-11-20  Jim Meyering  <meyering@lucent.com>
29592
29593         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
29594         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
29595
29596 2001-11-19  Jim Meyering  <meyering@lucent.com>
29597
29598         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
29599         directory.  Use "conftestXXXXXX" as the template.
29600         Suggestion from Paul Eggert.
29601
29602         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
29603         immediately, so the test doesn't mistakenly hit the max-open-files
29604         limit.
29605
29606 2001-11-18  Paul Eggert  <eggert@twinsun.com>
29607
29608         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
29609         (TEMPORARIES): New macro.
29610         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
29611         removes an artificial limitation (e.g. HP-UX 10.20, where
29612         TMP_MAX is 17576).
29613
29614 2001-11-18  Jim Meyering  <meyering@lucent.com>
29615
29616         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
29617
29618 2001-11-18  Jim Meyering  <meyering@lucent.com>
29619
29620         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
29621         on SunOS 4.
29622
29623         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
29624         files will be created before anything else.
29625
29626 2001-11-17  Paul Eggert  <eggert@twinsun.com>
29627
29628         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
29629         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
29630
29631 2001-11-17  Jim Meyering  <meyering@lucent.com>
29632
29633         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
29634         Prompted by a report from Bob Proulx.
29635
29636         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
29637         Instead, require UTILS_FUNC_MKSTEMP.
29638
29639 2001-11-17  Jim Meyering  <meyering@lucent.com>
29640
29641         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
29642         Now, that's done as part of AC_FUNC_STRTOD.
29643
29644 2001-11-17  Jim Meyering  <meyering@lucent.com>
29645
29646         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
29647         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
29648         rather than group writable.  Patch by Juan F. Codagnone.
29649
29650         * lib/readtokens.c: Remove explicit declarations of xmalloc and
29651         xrealloc, Instead, include "xalloc.h".
29652
29653         * lib/mountlist.c: Include unlocked-io.h after all system headers.
29654         Remove explicit declarations of xmalloc, xrealloc,
29655         and xstrdup.  Instead, include "xalloc.h".
29656
29657         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
29658         unlocked-io.h.
29659         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
29660         Likewise.
29661         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
29662
29663         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
29664         Reported by Padraig Brady.
29665
29666         * lib/mkstemp.c: #undef mkstemp.
29667         Include config.h.
29668         (rpl_mkstemp): Rename from mkstemp.
29669         Protoize.
29670
29671 2001-11-16  Jim Meyering  <meyering@lucent.com>
29672
29673         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
29674         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
29675         determine the amount of total physical memory, use pstat_getstatic.
29676         HPUX-11 doesn't define _SC_PHYS_PAGES.
29677         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
29678         If sysconf couldn't be used to determine the amount of available
29679         physical memory, use both pstat_getstatic and pstat_getdynamic.
29680         Based on a patch from Bob Proulx.
29681
29682 2001-11-10  Jim Meyering  <meyering@lucent.com>
29683
29684         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
29685         (jm_PREREQ): Use it.
29686
29687 2001-11-09  Jim Meyering  <meyering@lucent.com>
29688
29689         * m4/jm-macros.m4: Require autoconf-2.52f.
29690         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
29691         Use these AC_-prefixed names, not the AM_-prefixed ones.
29692
29693         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
29694
29695 2001-11-05  Jim Meyering  <meyering@lucent.com>
29696
29697         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
29698
29699 2001-11-04  Jim Meyering  <meyering@lucent.com>
29700
29701         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29702         $DEFS.
29703
29704 2001-11-03  Jim Meyering  <meyering@lucent.com>
29705
29706         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29707         of AC_DEFUN.
29708
29709         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29710         know the name of the variable in the macro definition.
29711
29712 2001-11-03  Jim Meyering  <meyering@lucent.com>
29713
29714         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29715         in argmatch_to_argument call.
29716
29717         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29718         argument.
29719
29720         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29721         e.g., a fault due to an attempt to free a NULL pointer.
29722
29723 2001-11-01  Jim Meyering  <meyering@lucent.com>
29724
29725         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29726         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29727
29728 2001-11-01  Jim Meyering  <meyering@lucent.com>
29729
29730         * lib/dirfd.c, lib/dirfd.h: New files.
29731         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29732
29733         * lib/hash.c (hash_print) [TESTING]: Clean up.
29734
29735 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29736
29737         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29738         to avoid a warning if -Wall.
29739
29740 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29741
29742         * README: New file
29743         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29744         (per RMS's instructions, this is now the canonical source)
29745         * lgpl/, gpl/: New directories.
29746
29747 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29748
29749         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29750
29751 2001-10-21  Jim Meyering  <meyering@lucent.com>
29752
29753         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29754         this code would end up calling gettext even in packages built
29755         with --disable-nls.
29756         * lib/getopt.c (_): Likewise.
29757         * lib/regex.c (_): Likewise.
29758
29759 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29760
29761         * m4/error.m4 (jm_PREREQ_ERROR):
29762         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29763         AC_FUNC_STRERROR_R does that.
29764         Check for strerror declaration.
29765
29766         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29767         are supposed to have them these days.
29768         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29769         Merge changes from latest Autoconf CVS.
29770         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29771         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29772         POSIX decided to standardize on the int flavor of strerror_r.
29773
29774 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29775
29776         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29777         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29778         Use strerror_r that is only a macro, even if it is not a function.
29779         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29780         (private_strerror): Use prototypes, not old-style function definition.
29781         (print_errno_message): New function.
29782         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29783         char*-flavored one.
29784         (error_tail, error, error_at_line): Use it.
29785
29786 2001-10-11  Jim Meyering  <meyering@lucent.com>
29787
29788         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29789         and quote_n (1, ... to avoid clobbering a buffer.
29790
29791 2001-10-05  Jim Meyering  <meyering@lucent.com>
29792
29793         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29794         hash-pjw.h.
29795         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29796         * lib/hash-pjw.h: New file.
29797
29798 2001-09-30  Jim Meyering  <meyering@lucent.com>
29799
29800         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29801         `struct fsstat' has the `f_fstypename' member.
29802         Use that to define FS_TYPE, which is now used to make
29803         the getfsstat link test tighter.
29804
29805 2001-09-30  Jim Meyering  <meyering@lucent.com>
29806
29807         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29808         Include <sys/ucred.h>, for Apple Darwin.
29809         Include sys/mount.h and sys/fs_types.h only if available.
29810         (FS_TYPE): Define.
29811         (read_filesystem_list): Use FS_TYPE.
29812
29813 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29814
29815         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29816         a boolean context.
29817
29818 2001-09-29  Jim Meyering  <meyering@lucent.com>
29819
29820         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29821         [one-argument getmntent function]): Include stdio.h before mntent.h.
29822         SunOS 4.1.x needs it for the declaration of `FILE'.
29823         Patch by Volker Borchert.
29824
29825         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29826         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29827         sys/fs_types.h, and make the link-test for getfsstat guard #include
29828         directives with appropriate #if HAVE_*_H tests so that we can
29829         detect getfsstat on Apple Darwin1.3.7 systems.
29830         Reported by Nelson Beebe.
29831         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29832
29833 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29834
29835         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29836         #defines strtoimax.  Also treat the other strto* functions
29837         like strtoimax.
29838
29839         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29840         Check for strtoul and strtoumax,
29841         as those declarations are made even in the signed case.
29842         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29843         Likewise, for strtol and strtoimax.
29844
29845 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29846
29847         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29848         #defines strtoimax.  Also treat the other strto* functions
29849         like strtoimax.
29850
29851         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29852         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29853         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29854
29855 2001-09-26  Jim Meyering  <meyering@lucent.com>
29856
29857         Most macros in unlocked-io.h had the wrong number of arguments.
29858         * lib/gen-uio: New script.
29859         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29860         * lib/unlocked-io.hin: Remove file.
29861         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29862         rather than trying to embed it here.
29863         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29864         Reported by Padraig Brady.
29865
29866 2001-09-25  Volker Borchert  <bt@teknon.de>
29867
29868         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29869         `result'.
29870
29871 2001-09-24  Jim Meyering  <meyering@lucent.com>
29872
29873         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29874
29875 2001-09-23  Jim Meyering  <meyering@lucent.com>
29876
29877         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29878         instead of the mere test for existence of mntent.h.  The latter
29879         would get a false-positive on AIX 3.4 systems.
29880         In the outer getmntent if-block, don't die if neither of the getmntent
29881         tests succeeds.  Instead, just fall through and continue with the
29882         remaining tests.
29883
29884 2001-09-23  Jim Meyering  <meyering@lucent.com>
29885
29886         * lib/mountlist.c: Remove useless parentheses in #if directives.
29887         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29888         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29889
29890 2001-09-22  Jim Meyering  <meyering@lucent.com>
29891
29892         * m4/gettext.m4: New file.  From gettext.
29893         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29894         * m4/progtest.m4: Likewise
29895         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29896         * m4/glibc21.m4: Likewise.
29897
29898         * m4/libintl.m4: Remove.  No longer used.
29899
29900 2001-09-22  Jim Meyering  <meyering@lucent.com>
29901
29902         * lib/localcharset.c: Update from latest gettext.
29903         * lib/config.charset: Likewise.
29904
29905 2001-09-20  Jim Meyering  <meyering@lucent.com>
29906
29907         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29908         strtoimax.
29909         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29910         strtoumax.
29911
29912 2001-09-20  Jim Meyering  <meyering@lucent.com>
29913
29914         * lib/xstrtol.c (strtoimax): Guard declaration with
29915         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29916         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29917         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29918         (strtoumax): Likewise, for completeness (it wasn't necessary).
29919
29920 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29921
29922         * lib/strtoimax.c (HAVE_LONG_LONG):
29923         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29924         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29925         to work around bug in IBM C compiler.
29926
29927 2001-09-17  Jim Meyering  <meyering@lucent.com>
29928
29929         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29930         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29931         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29932         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29933         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29934         whenever the right hand side need not be expanded by the shell.
29935
29936 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29937
29938         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29939         library.  It's not correct, as some older glibcs are buggy.
29940         fnmatch wasn't fixed until glibc 2.2.
29941
29942         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29943         special shell magic here.
29944
29945 2001-09-16  Jim Meyering  <meyering@lucent.com>
29946
29947         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29948         * m4/jm-macros.m4: Require it.
29949
29950 2001-09-16  Jim Meyering  <meyering@lucent.com>
29951
29952         * lib/mkdir.c: New file.
29953
29954 2001-09-15  Jim Meyering  <meyering@lucent.com>
29955
29956         * m4/jm-macros.m4: Check for help2man.
29957
29958 2001-09-11  Jim Meyering  <meyering@lucent.com>
29959
29960         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29961         The body, by Paul Eggert, was moved here from configure.in.
29962         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29963
29964 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29965
29966         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29967         (jm_PREREQ): Use it.
29968
29969 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29970
29971         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29972         Use ssize_t, not int, to store result of readlink.
29973         Check for ssize_t overflow as well as size_t overflow,
29974         as POSIX says the result of readlink is implementation-defined
29975         when ssize_t overflows.
29976         Remove unnecessary cast to char*.
29977         Use free+malloc instead of realloc, as the storage doesn't need
29978         to be preserved and it's clearer and can be more efficient that way.
29979         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29980         * lib/xreadlink.h (xreadlink): Update prototype.
29981
29982 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29983
29984         * lib/xgetcwd.c: Revert some of the previous change; intead,
29985         fix the HAVE_GETCWD_NULL code to behave more like the
29986         !HAVE_GETCWD_NULL code used to.
29987
29988         Include "xalloc.h".
29989         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29990         invoke xalloc_die.
29991
29992 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29993
29994         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29995         sys/param.h, as pathmax.h includes them.
29996
29997 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29998
29999         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
30000         (jm_PREREQ_XGETCWD): New macro.
30001
30002         * m4/getcwd.m4: New file.
30003
30004 2001-09-03  Paul Eggert  <eggert@twinsun.com>
30005
30006         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
30007         like the HAVE_GETCWD_NULL code.
30008         Include pathmax.h if not HAVE_GETCWD.
30009         Do not include xalloc.h.
30010         (INITIAL_BUFFER_SIZE): New symbol.
30011         Do not use xmalloc / xrealloc, since the caller is responsible for
30012         handling errors.  Preserve errno around `free' during failure.
30013         Do not overrun buffer when using getwd.
30014
30015 2001-09-03  Paul Eggert  <eggert@twinsun.com>
30016
30017         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
30018         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
30019         getcwd (NULL, 0).
30020
30021 2001-09-03  Paul Eggert  <eggert@twinsun.com>
30022
30023         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
30024         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
30025         spotted by Jim Meyering.
30026
30027 2001-09-03  Jim Meyering  <meyering@lucent.com>
30028
30029         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
30030         failure.
30031
30032 2001-09-02  Jim Meyering  <meyering@lucent.com>
30033
30034         * lib/error.c: Update from GNU libc.
30035
30036 2001-09-01  Jim Meyering  <meyering@lucent.com>
30037
30038         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
30039         Used by df.
30040
30041 2001-09-01  Jim Meyering  <meyering@lucent.com>
30042
30043         * lib/xreadlink.c: New file.
30044         * lib/xreadlink.h: New file.
30045         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
30046         xreadlink.h.
30047
30048         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
30049         doesn't conflict with sparc Solaris 7's definition in
30050         /usr/include/sys/int_types.h.
30051
30052         * lib/exclude.c: Use `""', not `<>' to #include non-system header
30053         files.
30054         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
30055         and strncasecmp as r-values.  Unixware didn't have declarations.
30056
30057 2001-08-31  Paul Eggert  <eggert@twinsun.com>
30058
30059         * lib/xstrtol.h: Add copyright notice.
30060         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
30061         LONGINT_INVALID_SUFFIX_CHAR.
30062
30063 2001-08-31  Paul Eggert  <eggert@twinsun.com>
30064
30065         * lib/xstrtol.c (strtoimax): New decl.
30066
30067 2001-08-31  Paul Eggert  <eggert@twinsun.com>
30068
30069         * lib/xgetcwd.c: Don't include pathmax.h.
30070         Include stdlib.h and unistd.h if available.
30071         Include xalloc.h.
30072         (xmalloc, xstrdup, free): Remove decls.
30073         (xgetcwd): Don't assume sizes fit in unsigned.
30074         Check for overflow when computing sizes.
30075         Simplify reallocation code.
30076
30077 2001-08-31  Paul Eggert  <eggert@twinsun.com>
30078
30079         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
30080         a directory's st_size can have an arbitrary value, so the old
30081         usage could waste an arbitrary amount of memory.  All uses
30082         changed.
30083         * lib/savedir.h: Update prototype.
30084
30085 2001-08-31  Paul Eggert  <eggert@twinsun.com>
30086
30087         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
30088
30089         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
30090         old strtoimax.c.
30091
30092         Also, make the following further changes to make this file's
30093         configuration more similar to that of strtol.c:
30094         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
30095         (strtoumax, uintmax_t, strtoull, strtol): Remove.
30096         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
30097         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
30098         changed to signed values.
30099
30100         And make the following changes as well:
30101         Fix copyright notice, as 1999 was missing.
30102         (verify): New macro.
30103         (strtoimax): Check sizes at compile-time, not run-time.
30104         Prefer strtol to strtoll if both work.
30105         (main): Remove; it was not that useful and was a pain to maintain.
30106
30107         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
30108
30109 2001-08-31  Jim Meyering  <meyering@lucent.com>
30110
30111         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
30112         Use an initial, malloc'd, buffer of length 128 rather than
30113         a statically allocated one of length 1024.
30114
30115 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30116
30117         Simplify code, partly by assuming autoconf 2.52 semantics.
30118
30119         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
30120
30121         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
30122         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
30123         All uses removed.
30124         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
30125         Move AC_REQUIRE to next-to-top level, to avoid confusion.
30126         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
30127         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
30128         jm_AC_HEADER_INTTYPES_H.
30129         * m4/jm-macros.m4 (jm_MACROS): Likewise.
30130
30131         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
30132
30133         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
30134         Quote first arg of AC_DEFUN.
30135         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
30136         since they are needed to parse the include file even if we need
30137         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
30138         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
30139         but with opposite signedness.
30140
30141 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30142
30143         Merge 'exclude' changes from tar 1.13.22.
30144         This fixes one or two unlikely storage allocation overflow bugs,
30145         but doesn't change user-visible behavior otherwise.
30146
30147 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30148
30149         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
30150         (jm_PREREQ_EXCLUDE): New macro.
30151
30152 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30153
30154         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
30155         tm to be declared.
30156
30157 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30158
30159         * lib/hash.c: Remove '2001' from copyright notice.
30160
30161 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30162
30163         * lib/full-write.h: New file.
30164         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
30165         * lib/full-write.c: Correct credits, as cccp.c no longer
30166         exists and anyway it was so heavily changed from the old cccp
30167         code as to be unrecognizable.  Include full-write.h.
30168         (full_write) Return size_t, with short writes meaning failure.
30169         All callers changed.  This fixes a bug with large buffers
30170         on 64-bit hosts.
30171         * lib/utime.c: Include full-write.h.
30172
30173 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30174
30175         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
30176         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
30177         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
30178         Include if available.
30179         (<xalloc.h>): Include
30180         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
30181         (verify): New macro.  Use it to verify that EXCLUDE macros do not
30182         collide with FNM macros.
30183         (struct patopts): New struct.
30184         (struct exclude): Use it, as exclude patterns now come with options.
30185         (new_exclude): Support above changes.
30186         (new_exclude, add_exclude_file):
30187         Initial size must now be a power of two to simplify overflow checking.
30188         (free_exclude, fnmatch_no_wildcards): New function.
30189         (excluded_filename): No longer requires options arg, as the options
30190         are determined by add_exclude.  Now returns bool, not int.
30191         (excluded_filename, add_exclude):
30192         Add support for the fancy new exclusion options.
30193         (add_exclude, add_exclude_file): Now takes int options arg.
30194         Check for arithmetic overflow when computing sizes.
30195         (add_exclude_file): xrealloc might modify errno, so don't
30196         realloc until after errno might be used.
30197
30198         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
30199         New macros.
30200         (free_exclude): New decl.
30201         (add_exclude, add_exclude_file): Now takes int options arg.
30202         (excluded_filename): No longer requires options arg, as the options
30203         are determined by add_exclude.  Now returns bool, not int.
30204
30205 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30206
30207         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
30208
30209 2001-08-27  Jim Meyering  <meyering@lucent.com>
30210
30211         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
30212
30213         * lib/version-etc.c (N_): Remove definition.
30214         Revert most of last change.
30215         Instead, simply don't mark the `Copyright...' string for translation.
30216         Based on advice from Paul Eggert.
30217
30218         * lib/strtoxmax.c: Tweak comment.
30219
30220 2001-08-26  Jim Meyering  <meyering@lucent.com>
30221
30222         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
30223
30224         * m4/xstrtoimax.m4: New file.
30225         * m4/xstrtoumax.m4: Add comments explaining why we
30226         AC_REPLACE_FUNCS(strtol).
30227
30228 2001-08-26  Jim Meyering  <meyering@lucent.com>
30229
30230         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
30231         of copyright with `%s' so translators don't get an untranslated
30232         message in 2002.
30233         (COPYRIGHT_YEAR): Define.
30234         (version_etc): Use fprintf rather than fputs.
30235         Suggestion from Ulrich Drepper.
30236
30237         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
30238
30239         * lib/strtoll.c: New file, from GNU libc.
30240         * lib/xstrtoimax.c: New file.
30241
30242         * lib/xstrtol.h: Add xstrtoimax.
30243         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
30244         * lib/strtoimax.c: New file.  Likewise, but first define
30245         STRTOUXMAX_SIGNED.
30246
30247         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
30248         ...
30249         * lib/strtoxmax.c: ... then renamed to this.
30250
30251 2001-08-18  Paul Eggert  <eggert@twinsun.com>
30252
30253         * m4/inttypes.m4: Add AC_PREREQ(2.13).
30254         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
30255         (jm_AC_TYPE_INTMAX_T): New macro.
30256         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
30257
30258         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
30259
30260         * m4/longlong.m4: Renamed from ulonglong.m4.
30261         * m4/inttypes.m4: Renamed from inttypes_h.m4.
30262         * m4/uintmax_t.m4: Removed.
30263
30264 2001-08-13  Paul Eggert  <eggert@twinsun.com>
30265
30266         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
30267         Port to Solaris 8, where 'sed' requires a space after the 'r'
30268         command, and where sh dislikes "$/".  Clean up the spacing a bit.
30269         Redirect output to $tmp just once.
30270
30271 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
30272
30273         * lib/addext.c (<errno.h>): Include.
30274         (errno): Declare if not defined.
30275         (addext): Work correctly when pathconf returns -1 and leaves
30276         errno alone because there is no limit.  Also, work even if
30277         pathconf returns a value greater than SIZE_MAX.
30278
30279 2001-08-12  Jim Meyering  <meyering@lucent.com>
30280
30281         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
30282         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
30283         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
30284         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
30285         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
30286         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
30287         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
30288         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
30289         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
30290         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
30291         utime.m4, utimes.m4, xstrtoumax.m4:
30292         Quote the first argument in each use of AC_DEFUN.
30293
30294 2001-08-12  Jim Meyering  <meyering@lucent.com>
30295
30296         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
30297         Simply `return getcwd (NULL, 0);'.
30298         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
30299         Use 1300 as initial value for length, not PATH_MAX.
30300
30301         * lib/pathmax.h: Clean up cpp syntax.
30302
30303 2001-08-12  Jim Meyering  <meyering@lucent.com>
30304
30305         * lib/gettimeofday.c: New file.
30306         * lib/gtod.h: New file.
30307         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
30308
30309 2001-08-05  Jim Meyering  <meyering@lucent.com>
30310
30311         * m4/jm-macros.m4: Require autoconf-2.52.
30312
30313 2001-08-04  Jim Meyering  <meyering@lucent.com>
30314
30315         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
30316         stmt, to get in sync with glibc.
30317
30318 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30319
30320         The following changes are from gettext 0.10.39 as maintained by
30321         Bruno Haible.
30322
30323         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
30324         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
30325         with inverted sense.  All uses changed.
30326
30327         * lib/mbswidth.c: Don't include <limits.h>.
30328         Include <stdlib.h> and <string.h> unconditionally.
30329         (iswcntrl, mbsinit, ISCNTRL): New macros.
30330         (mbsnwidth): Use K&R style function declarations.
30331         Don't bother checking for MB_LEN_MAX == 1, since the compiler
30332         can optimize it when MB_CUR_MAX == 1.
30333         The width of control characters is zero, not 1.
30334
30335 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30336
30337         The following changes are from gettext 0.10.39 as maintained by
30338         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
30339
30340         * m4/codeset.m4: Upgrade to serial AM1.
30341         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
30342         all uses changed.  Quote first arg of AC_DEFUN.
30343         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
30344
30345         * m4/iconv.m4: Upgrade to serial AM2.
30346         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
30347         Add --with-libconv-prefix.
30348         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
30349         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
30350         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
30351         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
30352         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
30353
30354         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
30355         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
30356         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
30357         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
30358         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
30359         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
30360         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
30361         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
30362         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
30363
30364         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
30365         string.h any more.
30366
30367         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
30368         not the default value.
30369
30370         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
30371         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
30372         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
30373         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
30374         Also check for iswcntrl, used for wcwidth fallback.
30375         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
30376         to Autoconf 2.13.
30377
30378 2001-08-03  Jim Meyering  <meyering@lucent.com>
30379
30380         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
30381         as it was in the original.  Reported by Paul Eggert.
30382
30383 2001-07-16  Jim Meyering  <meyering@lucent.com>
30384
30385         * m4/gettimeofday.m4: New file.
30386         Prompted by a report from Bernhard Baehr.
30387
30388 2001-07-15  Jim Meyering  <meyering@lucent.com>
30389
30390         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
30391         stuff. Now it's in ../Makefile.cfg.
30392
30393 2001-07-15  Jim Meyering  <meyering@lucent.com>
30394
30395         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
30396         (BUILT_SOURCES): Add unlocked-io.h.
30397         (io_functions): Define.
30398         (unlocked-io.h): New rule.
30399         (DISTCLEANFILES): Add unlocked-io.h.
30400         (all-local): Depend on unlocked-io.h, to ensure it is created.
30401
30402         * lib/unlocked-io.hin: New file
30403
30404         * lib/regex.c: Update from glibc.
30405
30406 2001-07-05  Jim Meyering  <meyering@lucent.com>
30407
30408         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
30409         recommendation.
30410         (libfetish_a_SOURCES): Put all .h files here instead.
30411         Remove a thus-exposed (better checks in automake) duplicate and
30412         two unnecessary .h files.
30413
30414 2001-07-04  Jim Meyering  <meyering@lucent.com>
30415
30416         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
30417         that generates jm-glibc-io.m4 so that it doesn't trigger any make
30418         distcheck failure.
30419
30420 2001-07-02  Jim Meyering  <meyering@lucent.com>
30421
30422         The following changes were prompted by suggestions from Bruno Haible.
30423
30424         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
30425         is now generated.
30426         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
30427         definition of EXTRA_DIST.
30428         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
30429         ensure that the generated file is created/updated whenever the list
30430         of $(unlocked_functions) is changed.
30431         (jm-glibc-io.m4): New rule.
30432         (unlocked-io.h): New rule -- currently unused.
30433
30434 2001-06-24  Jim Meyering  <meyering@lucent.com>
30435
30436         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
30437         unmatched right bracket, rather than kludging it with an extra,
30438         falsely-matching quote in a comment.  Patch by Akim Demaille.
30439
30440 2001-06-11  Jim Meyering  <meyering@lucent.com>
30441
30442         * lib/regex.c: Update from GNU libc.
30443
30444 2001-05-27  Jim Meyering  <meyering@lucent.com>
30445
30446         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
30447         Check for ut_type in struct utmp.
30448
30449 2001-05-27  Jim Meyering  <meyering@lucent.com>
30450
30451         * lib/readutmp.h (UT_TYPE): Define.
30452
30453 2001-05-24  Jim Meyering  <meyering@lucent.com>
30454
30455         * lib/argmatch.c: Include "quote.h".
30456         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
30457         quote function.  Reported by Göran Uddeborg.
30458
30459 2001-05-22  Jim Meyering  <meyering@lucent.com>
30460
30461         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
30462         now that we use the package-supplied version unconditionally.
30463         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
30464
30465 2001-05-21  Jim Meyering  <meyering@lucent.com>
30466
30467         * m4/regex.m4: Change a couple backticks to single quotes to avoid
30468         shell syntax errors.
30469
30470 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30471
30472         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
30473
30474 2001-05-20  Paul Eggert  <eggert@twinsun.com>
30475
30476         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
30477         Don't bother to check library strftime, since
30478         we'll be using our own my_strftime function anyway.
30479         Define my_strftime instead of strftime.
30480
30481 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
30482
30483         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
30484         which is not yet declared.
30485
30486 2001-05-15  Jim Meyering  <meyering@lucent.com>
30487
30488         * m4/regex.m4: Use proper quoting so brackets appear in the test
30489         program.
30490         Reported by, and with help from, Bruno Haible.
30491
30492 2001-05-13  Jim Meyering  <meyering@lucent.com>
30493
30494         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
30495         undefined.
30496
30497 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30498
30499         dirname code cleanup.  base_name now behaves more compatibly
30500         with POSIX basename when given file names that have trailing
30501         slashes, and similarly for dir_name.  Add new primitives
30502         base_len and dir_len.  Put the directory-name-related decls
30503         into dirname.h.
30504
30505         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
30506         * lib/backupfile.c (base_name): Likewise.
30507         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
30508         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
30509         * lib/makepath.c (strip_trailing_slashes): Likewise.
30510         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
30511         ISSLASH): Likewise.
30512         * lib/rename.c (strip_trailing_slashes): Likewise.
30513         * lib/same.c (base_name): Likewise.
30514         * lib/stripslash.c (ISSLASH): Likewise.
30515
30516         * lib/addext.c: Include <dirname.h> after size_t is defined.
30517         * lib/backupfile.c: Likewise.
30518
30519         * lib/addext.c (addext): Use base_len to trim redundant
30520         trailing slashes instead of doing it ourselves.
30521         But do not trim the last slash if it is not redundant.
30522
30523         * lib/backupfile.c (find_backup_file_name,
30524         max_backup_version): Use base_len instead of rolling it ourselves.
30525         Handle the case of "" and (on DOS) "C:" correctly.
30526
30527         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
30528         needed. Include <string.h>, <dirname.h>.
30529         (base_name): Allow file names ending in slashes, other than names
30530         that are all slashes.  In this case, return the basename followed
30531         by the slashes.  This is more general, and can be used in places
30532         where the original base_name purposely had an assertion failure.
30533         (base_len): New function.
30534
30535         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
30536         Do not include <assert.h>; no longer needed.
30537         Include xalloc.h.
30538         (memrchr): Remove decl.
30539         (dir_name_r): Remove.
30540         (dir_len): Renamed from dirlen.  All callers changed.
30541         Rewrite in terms of base_name, for simplicity and consistency.
30542         (dir_name): Never return NULL.  All callers changed.
30543         Do not include <stdlib.h> in test program; no longer needed.
30544         return 0; is fine for test program.
30545
30546         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
30547         New macros.
30548         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
30549
30550         * lib/path-concat.c (path_concat): Use base_len to compute
30551         base length, not strlen; this means we cannot rely on memcpy
30552         to null-terminate.
30553
30554         * lib/same.c (STREQ): Remove.
30555         (same_name): Handle the case where the basename ends in trailing '/'.
30556
30557         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
30558         a slash was stripped.  Do not strip the last slash after a
30559         file system prefix.
30560
30561 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30562
30563         * lib/Makefile.am (libfetish_a_SOURCES):
30564         Add strftime.c, since we now compile it on all hosts.
30565
30566         * lib/strftime.c (my_strftime):
30567         Define to nstrftime if emacs, but only if my_strftime is not defined.
30568         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
30569         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
30570         Add one more extra argument: a nanoseconds value.
30571         All uses changed.
30572         (ns): New macro.
30573         (my_strftime function): Add %N format.
30574         (emacs_strftimeu): Renamed from emacs_strftime,
30575         with extra ut argument.
30576
30577 2001-05-09  Paul Eggert  <eggert@twinsun.com>
30578
30579         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
30580
30581 2001-04-21  Jim Meyering  <meyering@lucent.com>
30582
30583         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
30584         doesn't interfere.
30585
30586 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30587
30588         * m4/ftruncate.m4: Check for chsize.
30589         Link with ftruncate.o unconditionally if ftruncate is missing.
30590         This was required when cross-compiling to i586-mingw32msvc.
30591
30592 2001-04-08  Jim Meyering  <meyering@lucent.com>
30593
30594         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
30595         recomputed; that's necessary when the offset spans a DST transition.
30596         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
30597
30598 2001-04-02  Jim Meyering  <meyering@lucent.com>
30599
30600         * lib/regex.h, regex.c: Update from GNU libc.
30601
30602 2001-03-24  Jim Meyering  <meyering@lucent.com>
30603
30604         * m4/jm-macros.m4: Require autoconf-2.49d.
30605
30606 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
30607
30608         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
30609
30610 2001-03-19  Paul Eggert  <eggert@twinsun.com>
30611
30612         * lib/version-etc.c (version_etc_copyright): Update to 2001.
30613
30614 2001-03-17  Jim Meyering  <meyering@lucent.com>
30615
30616         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
30617         now that the version in autoconf is equivalent.
30618         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
30619
30620         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
30621         Suggestion from Akim Demaille.
30622
30623         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
30624         (jm_PREREQ_TEMPNAME): New function.
30625
30626 2001-03-16  Paul Eggert  <eggert@twinsun.com>
30627
30628         * lib/tempname.c (uint64_t): Define to uintmax_t if
30629         not defined, and if UINT64_MAX is not defined.
30630         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
30631         Reported by John David Anglin.
30632
30633 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
30634
30635         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
30636         resolve alias if codeset is empty.
30637         * lib/config.charset (BeOS): Use wildcard syntax.
30638
30639 2001-03-13  Jim Meyering  <meyering@lucent.com>
30640
30641         * lib/path-concat.c (path_concat)
30642         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
30643         concatenating e.g., `C:' and `foo'.
30644         From Bruno Haible.
30645
30646 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30647
30648         * lib/localcharset.c (locale_charset): Don't use
30649         setlocale(LC_CTYPE,NULL). Don't return NULL.
30650         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
30651
30652 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30653
30654         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
30655         support for DOS/DJGPP.
30656
30657 2001-03-01  Paul Eggert  <eggert@twinsun.com>
30658
30659         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
30660         lacks mkstemp.  Compile our own tempname.c if we compile our own
30661         mkstemp.c, as mkstemp relies on tempname.
30662
30663 2001-03-01  Jim Meyering  <meyering@lucent.com>
30664
30665         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
30666         AH_VERBATIM really does output its argument verbatim.
30667
30668 2001-02-28  Paul Eggert  <eggert@twinsun.com>
30669
30670         * lib/Makefile.am (libfetish_a_SOURCES):
30671         Add dup-safer.c, fopen-safer.c.
30672         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
30673
30674         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
30675         * lib/unistd-safer.h: New files.
30676
30677 2001-02-25  Paul Eggert  <eggert@twinsun.com>
30678
30679         The mkstemp replacement is taken from glibc 2.2.2, with some
30680         portability fixes for use outside glibc, as follows:
30681
30682         * lib/tempname.c (struct_stat64): New macro.
30683         (direxists, __gen_tempname): Use it.
30684         This avoids a portability problem with Solaris 8.
30685
30686         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
30687         (<stddef.h>, <stdint.h>, <string.h>):
30688         Include only if STDC_HEADERS || _LIBC.
30689         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
30690         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
30691         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
30692         (__set_errno): Define this macro if <errno.h> doesn't.
30693         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
30694         Define these macros if <stdio.h> doesn't.
30695         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
30696         Define these macros if <sys/stat.h>
30697         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
30698         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
30699         __xstat64): Define if not _LIBC.
30700         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30701         (__gen_tempname): Invoke gettimeofday only if
30702         HAVE_GETTIMEOFDAY || _LIBC;
30703         otherwise, fall back on plain "time".
30704         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30705
30706         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30707
30708         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30709
30710 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30711
30712         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30713
30714 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30715
30716         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30717         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30718         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30719         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30720
30721 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30722
30723         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30724         Remove workaround macros for hosts that have mbrtowc but not
30725         mbstate_t, as we now insist on proper declarations for both
30726         before using mbrtowc.
30727
30728 2001-02-17  Jim Meyering  <meyering@lucent.com>
30729
30730         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30731         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30732         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30733         UnixWare 7.1.1.
30734
30735         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30736         rather than AC_CACHE_VAL.
30737
30738 2001-02-17  Jim Meyering  <meyering@lucent.com>
30739
30740         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30741         around included file name.
30742
30743         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30744
30745         * lib/strftime.c: Update from GNU libc (the only changes were to
30746         comments).
30747
30748 2001-02-17  Jim Meyering  <meyering@lucent.com>
30749
30750         * lib/regex.c: Update from libc.
30751
30752 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30753
30754         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30755         clash.
30756
30757 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30758
30759         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30760         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30761         Reported by Mark Hounschell via Paul Eggert.
30762
30763 2001-02-07  Jim Meyering  <meyering@lucent.com>
30764
30765         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30766
30767 2001-02-05  Jim Meyering  <meyering@lucent.com>
30768
30769         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30770         it includes the patch required for `large file' support with at least
30771         HP-UX's 10.20 /bin/cc.
30772
30773 2001-02-03  Jim Meyering  <meyering@lucent.com>
30774
30775         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30776         AS_IF, now that it works once again (mysteriously).
30777         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30778
30779 2001-01-30  Jim Meyering  <meyering@lucent.com>
30780
30781         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30782         * m4/chown.m4: Rename conftestchown to conftest.chown.
30783         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30784         s/conftestdir2/conftest.d2/.
30785         * m4/utimes.m4: s/conftestdata/conftest.data/
30786         Inspired by Pavel Roskin's change in autoconf.
30787
30788 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30789
30790         * lib/config.charset: Update for FreeBSD 4.2.
30791
30792 2001-01-27  Jim Meyering  <meyering@lucent.com>
30793
30794         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30795         a use of AS_IF.
30796         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30797
30798 2001-01-26  Jim Meyering  <meyering@lucent.com>
30799
30800         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30801         quotearg.c includes it.
30802
30803 2001-01-26  Jim Meyering  <meyering@lucent.com>
30804
30805         * lib/quotearg.c: Include stddef.h.
30806         * lib/quote.c: Include stddef.h.
30807         Reported by Axel Kittenberger.
30808
30809         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30810         line in double quotes so that it evokes a better diagnostic.
30811         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30812         Reported by Axel Kittenberger.
30813
30814 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30815
30816         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30817         as if it was a `charset'.
30818
30819 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30820
30821         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30822         has const.
30823
30824 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30825
30826         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30827         to avoid a warning.  Add back 'const' to inptr.
30828
30829 2001-01-20  Jim Meyering  <meyering@lucent.com>
30830
30831         Be sure that headers are checked before used in code compiled
30832         for the type checks.
30833         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30834         In place of that, invoke jm_CHECK_ALL_TYPES.
30835         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30836         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30837         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30838         The check for ssize_t was mistakenly run before the test for unistd.h.
30839
30840         The configure-time check for stdbool.h was missing.
30841         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30842         (jm_PREREQ_HASH): New function.
30843
30844 2001-01-17  Jim Meyering  <meyering@lucent.com>
30845
30846         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30847         for autoconf-2.49c.
30848         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30849
30850 2001-01-16  Jim Meyering  <meyering@lucent.com>
30851
30852         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30853         From Bruno Haible.
30854
30855 2001-01-14  Jim Meyering  <meyering@lucent.com>
30856
30857         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30858         foo and bar.  Create conftestdir/ in the script, not in the C code.
30859         Remove directories in the script, not in the C code.
30860         Remove conftestdir{,2} before trying to create the directory.
30861         Make the entire configure script fail if the mkdir fails.
30862
30863 2001-01-14  Jim Meyering  <meyering@lucent.com>
30864
30865         * lib/rename.c: New file.  From Volker Borchert.
30866         Include stdlib.h, string.h or strings.h, and xalloc.h.
30867         Use strip_trailing_slashes rather than open-coding it.
30868
30869 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30870
30871         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30872
30873 2001-01-03  Jim Meyering  <meyering@lucent.com>
30874
30875         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30876         of local `inptr' to avoid warning with some system declarations of
30877         iconv.
30878
30879 2001-01-02  Volker Borchert  <bt@teknon.de>
30880
30881         * m4/rename.m4: New file.
30882         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30883
30884 2001-01-01  Jim Meyering  <meyering@lucent.com>
30885
30886         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30887         even on systems with utmpx.h.  It's necessary for the declaration of
30888         utmp's ut_user member.  Reported by Andreas Jaeger.
30889
30890         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30891         available. They are required for the declarations of getgrgid and
30892         getpwuid resp.
30893         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30894         Reported by Andreas Jaeger.
30895
30896 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30897
30898         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30899         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30900         so `make install' also works in VPATH builds.
30901
30902 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30903
30904         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30905         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30906         can be used in subdirectories.
30907
30908 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30909
30910         * lib/modechange.c: Do not assume that mode_t uses the
30911         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30912         the other-execute bit of FOO even if S_IXOTH != 1.
30913
30914         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30915         WOTH, XOTH, ALLM): New macros.
30916         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30917          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30918         Use them.
30919         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30920         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30921         (mode_compile):
30922         No need to use uintmax_t; unsigned long is long enough.
30923         Don't bother to get suffix since we don't use it.
30924
30925 2000-12-26  Jim Meyering  <meyering@lucent.com>
30926
30927         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30928         better with autoheader.
30929
30930 2000-12-24  Jim Meyering  <meyering@lucent.com>
30931
30932         * lib/hash.c (is_prime): Return explicit boolean values.
30933         (hash_get_first): Return NULL to appease Irix5.6's 89.
30934         Reported by Nelson Beebe.
30935
30936 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30937
30938         * lib/localcharset.c (locale_charset): Add support for Win32.
30939
30940 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30941
30942         * lib/physmem.h, lib/physmem.c: New files.
30943
30944         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30945         (noinst_HEADERS): Add physmem.h.
30946
30947         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30948         't' for compatibility with Solaris 8 sort.
30949
30950 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30951
30952         * lib/config.charset: Add support for BeOS.
30953
30954 2000-12-17  Jim Meyering  <meyering@lucent.com>
30955
30956         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30957         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30958
30959 2000-12-16  Jim Meyering  <meyering@lucent.com>
30960
30961         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30962         N and M) would have treated it like `chown N:N FILE'.
30963
30964         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30965
30966 2000-12-16  Jim Meyering  <meyering@lucent.com>
30967
30968         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30969         SHELLS_FILE to a file name that's useful on djgpp systems.
30970         Include stdlib.h.
30971         (ADDITIONAL_DEFAULT_SHELLS): Define.
30972         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30973         Based mostly on a patch from Prashant TR.
30974
30975 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30976
30977         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30978         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30979         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30980
30981 2000-12-08  Andreas Schwab  <schwab@suse.de>
30982
30983         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30984         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30985
30986 2000-12-07  Jim Meyering  <meyering@lucent.com>
30987
30988         * lib/stripslash.c (ISSLASH): Define.
30989         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30990         `/'.
30991         From Prashant TR.
30992
30993         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30994         (dir_name_r): Declare this function as static.
30995         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30996         manifest itself on a name containing a mix of slashes and
30997         backslashes.
30998         Make this function work with names starting with a DOS-style
30999         drive letter and colon prefix.
31000         (dir_name): Append `.' if necessary.
31001         Based mostly on patches from Prashant TR and Eli Zaretskii.
31002
31003         * lib/dirname.h (dir_name_r): Remove prototype.
31004
31005 2000-12-06  Paul Eggert  <eggert@twinsun.com>
31006
31007         * m4/off_t-format.m4: Remove this file.
31008         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
31009
31010 2000-12-06  Jim Meyering  <meyering@lucent.com>
31011
31012         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
31013         replacement strtoull, we may well need the replacement strtoul, too.
31014         Check for declarations of strtoul and strtoull.
31015         Check for strtol.  Mainly as a cue to cause automake to include
31016         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
31017         Check for limits.h -- strtol.c needs it.
31018
31019 2000-12-05  Jim Meyering  <meyering@lucent.com>
31020
31021         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
31022
31023 2000-12-04  Jim Meyering  <meyering@lucent.com>
31024
31025         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
31026         Also include memory.h, stdlib.h, unistd.h if appropriate.
31027         Reported by Andreas Jaeger (conflicting declaration of malloc).
31028
31029 2000-12-02  Jim Meyering  <meyering@lucent.com>
31030
31031         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
31032         * m4/jm-macros.m4 (jm_MACROS): require it.
31033
31034 2000-12-02  Jim Meyering  <meyering@lucent.com>
31035
31036         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
31037
31038 2000-12-01  Paul Eggert  <eggert@twinsun.com>
31039
31040         * lib/memrchr.c: Include <config.h> before any system include file.
31041
31042 2000-11-30  Jim Meyering  <meyering@lucent.com>
31043
31044         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
31045
31046 2000-11-30  Jim Meyering  <meyering@lucent.com>
31047
31048         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
31049
31050 2000-11-29  Paul Eggert  <eggert@twinsun.com>
31051
31052         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
31053
31054 2000-11-26  Jim Meyering  <meyering@lucent.com>
31055
31056         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
31057
31058 2000-11-22  Paul Eggert  <eggert@twinsun.com>
31059
31060         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
31061         size of (size_t) -1; it's not portable.
31062
31063 2000-11-17  Jim Meyering  <meyering@lucent.com>
31064
31065         * lib/strstr.c: Update from GNU libc.
31066
31067 2000-11-17  Akim Demaille  <akim@epita.fr>
31068
31069         * lib/obstack.h: Formatting changes.
31070         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
31071         prevent type checking.
31072         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
31073         cast the value to (void *): assigning a `foo *' to a `void *'
31074         variable is valid.
31075         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
31076
31077 2000-11-16  Jim Meyering  <meyering@lucent.com>
31078
31079         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
31080
31081 2000-11-11  Jim Meyering  <meyering@lucent.com>
31082
31083         * lib/error.c: Add a couple #includes, merging from GNU libc version.
31084
31085 2000-11-10  Jim Meyering  <meyering@lucent.com>
31086
31087         * lib/obstack.h: Update from GNU libc.
31088         * lib/obstack.c: Likewise.
31089
31090 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
31091
31092         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
31093
31094 2000-11-06  Paul Eggert  <eggert@twinsun.com>
31095
31096         * lib/getusershell.c (setusershell): Use rewind rather than
31097         fseek/fseeko, to avoid configuration hassles with fseeko.
31098         Don't bother opening SHELLS_FILE if shellstream is NULL;
31099         it's not necessary.
31100
31101 2000-11-05  Jim Meyering  <meyering@lucent.com>
31102
31103         * lib/makepath.h (make_dir): Declare.
31104         * lib/makepath.c (make_dir): Remove `static' attribute.
31105         Tweak a comment.
31106
31107 2000-11-04  Jim Meyering  <meyering@lucent.com>
31108
31109         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
31110
31111 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
31112
31113         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
31114         last one in a bucket, advance to the next bucket.
31115
31116 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
31117
31118         * lib/fnmatch.c: Do not comment out all the code if we are using
31119         the GNU C library, because in some cases we are replacing buggy
31120         code in the GNU C library itself.
31121
31122 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
31123
31124         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
31125         (regex_compile): Catch bogus \(\1\).
31126
31127 2000-10-30  Paul Eggert  <eggert@twinsun.com>
31128
31129         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
31130         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
31131         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
31132
31133 2000-10-30  Paul Eggert  <eggert@twinsun.com>
31134
31135         * lib/error.h, getline.h, modechange.h:
31136         Remove "2000" from Copyright line, as the file hasn't been
31137         changed this year other than in the copyright notice.
31138
31139         * lib/xalloc.h: Add "2000" to Copyright line, as this file
31140         was changed this year.
31141
31142 2000-10-29  Jim Meyering  <meyering@lucent.com>
31143
31144         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
31145         renaming.
31146         * m4/ls-mntd-fs.m4: Likewise
31147
31148 2000-10-29  Jim Meyering  <meyering@lucent.com>
31149
31150         * lib/xstat.in: Fix grammar in comment.
31151
31152 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
31153
31154         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
31155         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
31156         doesn't define __restrict_arr.
31157
31158 2000-10-28  Jim Meyering  <meyering@lucent.com>
31159
31160         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
31161         (jm_PREREQ_MEMCHR): New function.
31162
31163 2000-10-28  Jim Meyering  <meyering@lucent.com>
31164
31165         * lib/memchr.c: Update from libc.
31166         Adjust for portability:
31167         [HAVE_STDLIB_H]: Include stdlib.h.
31168         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
31169         Undef __memchr, too.
31170         [!weak_alias]: Define __memchr to memchr.
31171
31172         * lib/regex.c: Update from libc.
31173         * lib/regex.h: Likewise.
31174         * lib/getopt1.c: Likewise.
31175         * lib/memcmp.c: Likewise.
31176
31177         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
31178         Avoid using fseek, when possible -- it's broken by design.
31179         Patch by Ulrich Drepper.
31180
31181 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
31182
31183         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
31184         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
31185         Giving in to popular pressure to shut up the compiler with casts.
31186
31187 2000-10-26  Jim Meyering  <meyering@lucent.com>
31188
31189         * lib/strftime.c: Update from libc.
31190
31191 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
31192
31193         * regex.c: More `unsigned char' -> `re_char' changes.
31194         Also change several `int' into `re_wchar_t'.
31195         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
31196         (PUSH_FAILURE_POINTER): Don't cast any more.
31197         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
31198         We want GCC to complain, since this piece of code makes
31199         re_match non-reentrant, which *should* be fixed.
31200         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
31201         (EXTEND_BUFFER): Use RETALLOC.
31202         (SET_LIST_BIT): Don't cast.
31203         (re_wchar_t): New type.
31204         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
31205         that those two functions will always properly return.
31206         (IMMEDIATE_QUIT_CHECK): Cast to void.
31207         (analyse_first): Use recursion rather than an explicit stack.
31208         (re_compile_fastmap): Can't fail anymore.
31209         (re_search_2): Don't check re_compile_fastmap for failure.
31210         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
31211         Now also sets the new value (passed in a new argument).
31212         (re_match_2_internal): Use it.
31213         Also, use a new var `reg' of type size_t when looping through regs
31214         rather than reuse the inappropriate `mcnt'.
31215
31216 2000-10-25  Jim Meyering  <meyering@lucent.com>
31217
31218         * lib/obstack.c: Update from libc.
31219
31220 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
31221
31222         * regex.c (regex_compile): Change the way of handling a range from
31223         a char less than 256 to a char not less than 256.
31224
31225 2000-10-24  Andrew Innes  <andrewi@gnu.org>
31226
31227         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
31228         NT-Emacs only.
31229         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
31230         so that re_search functions only quit when callers expect them to.
31231
31232 2000-10-23  Jim Meyering  <meyering@lucent.com>
31233
31234         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
31235         wrong.  That set_locale call must not have any side effects.
31236         From Paul Eggert.
31237
31238 2000-10-22  Jim Meyering  <meyering@lucent.com>
31239
31240         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
31241         [CYCLIC]: Remove now-unused definition.
31242
31243         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
31244         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
31245         Suggestion from Ulrich Drepper.
31246
31247 2000-10-21  Jim Meyering  <meyering@lucent.com>
31248
31249         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
31250         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
31251         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
31252
31253 2000-10-21  Jim Meyering  <meyering@lucent.com>
31254
31255         * lib/dirname.c (memrchr): Declare if necessary.
31256         (dir_name): Remove the restriction that there be no
31257         trailing slashes.  Now, this code skips past them, effectively
31258         ignoring them.
31259         [TEST_DIRNAME] (main): New unit tests.
31260
31261         * lib/memrchr.c: New file from GNU libc.
31262         Undef __memrchr, too.
31263         [!weak_alias]: Define __memrchr to memrchr.
31264         Guard weak_alias use with `#ifdef weak_alias'.
31265
31266 2000-10-21  Jim Meyering  <meyering@lucent.com>
31267
31268         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
31269         (dir_name): Use dir_name_r.
31270         * lib/dirname.h (dir_name_r): Declare it.
31271
31272 2000-10-17  Jim Meyering  <meyering@lucent.com>
31273
31274         * lib/quote.h (PARAMS): Define and use.
31275         Reported by Akim Demaille.
31276
31277         * lib/getopt.c: Update from libc.
31278
31279 2000-10-16  Jim Meyering  <meyering@lucent.com>
31280
31281         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
31282         setlocale.
31283         From Jan Fedak.
31284
31285 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
31286
31287         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
31288
31289 2000-09-25  Jim Meyering  <meyering@lucent.com>
31290
31291         * lib/md5.h (rol): Define (from GnuPG).
31292
31293         * lib/sha.c: Give credit (GnuPG) where due.
31294         (M): Use rol rather than open-coding it.
31295         Add a FIXME comment.
31296
31297 2000-09-21  Jim Meyering  <meyering@lucent.com>
31298
31299         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
31300         Reported by Michael Stone.
31301
31302 2000-09-20  Jim Meyering  <meyering@lucent.com>
31303
31304         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
31305         (noinst_HEADERS): Add sha.h.
31306         Based on code from Scott G. Miller and from GnuPG.
31307
31308 2000-09-18  Jim Meyering  <meyering@lucent.com>
31309
31310         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
31311         LIBS. Otherwise, everyone ends up linking with -lelf for some
31312         configurations.
31313         Reported by Mike Stone.
31314
31315 2000-09-15  Jim Meyering  <meyering@lucent.com>
31316
31317         * lib/regex.c: Update from libc.
31318
31319 2000-09-10  Jim Meyering  <meyering@lucent.com>
31320
31321         * lib/getopt.c (_getopt_internal): Update from glibc.
31322
31323 2000-09-09  Jim Meyering  <meyering@lucent.com>
31324
31325         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
31326         think it should be used as a general replacement for isascii.
31327         * lib/fnmatch.c: Likewise.
31328         * lib/mbswidth.c: Likewise
31329         * lib/regex.c: Likewise.
31330
31331         Don't use atoi.
31332         * lib/userspec.c: Include sys/param.h and limits.h.
31333         Include xstrtol.h.
31334         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
31335         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
31336         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
31337         UID, GID.  Check range.
31338
31339 2000-09-06  Jim Meyering  <meyering@lucent.com>
31340
31341         * lib/getopt.c (_getopt_internal): Update from glibc.
31342
31343 2000-08-30  Jim Meyering  <meyering@lucent.com>
31344
31345         * lib/strftime.c: Merge in changes from GNU libc.
31346
31347 2000-08-26  Jim Meyering  <meyering@lucent.com>
31348
31349         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
31350         * m4/fpending.m4: New file.
31351
31352 2000-08-26  Jim Meyering  <meyering@lucent.com>
31353
31354         * lib/closeout.c: Include "__fpending.h".
31355         (close_stdout_status): Return right away if there's nothing to flush.
31356
31357         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
31358         * lib/__fpending.c: New file.
31359         * lib/__fpending.h: New file.
31360
31361 2000-08-20  Jim Meyering  <meyering@lucent.com>
31362
31363         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
31364         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
31365         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
31366
31367 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
31368
31369         Improve fileutils installation on systems where running
31370         programs (like install) can't be unlinked.
31371         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
31372         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
31373
31374 2000-08-07  Paul Eggert  <eggert@twinsun.com>
31375
31376         Standardize on "memory exhausted" instead of "Memory exhausted"
31377         or "virtual memory exhausted".
31378         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
31379         "virtual memory exhausted".
31380         * lib/same.c (same_name): Invoke xalloc_die instead of printing
31381         our own message.
31382         * lib/userspec.c (parse_user_spec): Likewise.
31383         * lib/bumpalloc.h: comment fix
31384         * lib/same.c, userspec.c: Include xalloc.h.
31385
31386         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
31387         not char *const and pointing to a constant array.
31388         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
31389         (xrealloc): Comment fix.
31390
31391         * lib/userspec.c (parse_user_spec):
31392         Don't translate a message until just before returning,
31393         to avoid unnecessary translation.
31394
31395 2000-08-07  Jim Meyering  <meyering@lucent.com>
31396
31397         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
31398         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
31399         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
31400         getgroups.c, gethostname.c, getopt.h, group-member.c,
31401         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
31402         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
31403         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
31404         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
31405         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
31406         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
31407         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
31408         yesno.c: Back out Copyright date changes for each file with no change
31409         this year.  This eases coordination with other programs using the same
31410         source code modules.  From Paul Eggert.
31411
31412 2000-08-06  Paul Eggert  <eggert@twinsun.com>
31413
31414         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
31415         not char, for compatibility with glibc 2.1.3 strftime.c.
31416
31417 2000-08-03  Greg McGary  <greg@mcgary.org>
31418
31419         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
31420         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
31421         (EXTEND_BUFFER): Use them.
31422
31423 2000-08-01  Jim Meyering  <meyering@lucent.com>
31424
31425         * lib/dirname.c (ISSLASH): Define.
31426         (BACKSLASH_IS_PATH_SEPARATOR): Define.
31427         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
31428         both `\' and `/' may be use as path separators.
31429         Based on a patch from Prashant TR.
31430
31431 2000-07-31  Paul Eggert  <eggert@twinsun.com>
31432
31433         * lib/quotearg.c (quotearg_n_options): Don't make the initial
31434         slot vector a constant, since it might get modified.
31435
31436 2000-07-31  Jim Meyering  <meyering@lucent.com>
31437
31438         * lib/xmalloc.c: Use `virtual memory exhausted', not
31439         `Memory exhausted'.
31440         * lib/obstack.c (print_and_abort): Likewise.
31441
31442 2000-07-30  Paul Eggert  <eggert@twinsun.com>
31443
31444         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
31445         buffer, so that the caller can always quote one small
31446         component of a "memory exhausted" message in slot 0.
31447         From a suggestion by Jim Meyering.
31448
31449 2000-07-30  Jim Meyering  <meyering@lucent.com>
31450
31451         * lib/makepath.c (make_path): Quote the other instance, too.
31452
31453         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
31454         (STATIC_BUF_SIZE): Define.
31455         (quotearg_n_options): Use only statically allocated storage when
31456         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
31457         than STATIC_BUF_SIZE.
31458
31459 2000-07-29  Jim Meyering  <meyering@lucent.com>
31460
31461         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
31462         * lib/dirname.c (dir_name): Likewise.
31463
31464         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
31465         `/'.
31466
31467         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
31468         (dir_name): Assert that there are no trailing slashes.
31469
31470 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
31471
31472         * lib/mbswidth.h (mbswidth): Add a flags argument.
31473         (mbswidth): New declaration.
31474         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
31475         * lib/mbswidth.c (mbswidth): Add a flags argument.
31476         (mbsnwidth): New function.
31477
31478 2000-07-24  Jim Meyering  <meyering@lucent.com>
31479
31480         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
31481
31482 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31483
31484         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
31485
31486 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31487
31488         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
31489         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
31490         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
31491         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
31492         invoke multibyte primitives.
31493
31494 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31495
31496         * lib/quotearg.c:
31497         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
31498         so that mbstate_t is always defined.
31499
31500         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
31501         be 1 in at least one GCC installation, and this configuration
31502         error is likely to be common.  Ignoring MB_LEN_MAX hurts
31503         performance on hosts that have mbrtowc but have only unibyte
31504         locales, but I assume these hosts are rare.
31505
31506 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31507
31508         * lib/mbswidth.c (_XOPEN_SOURCE):
31509         Don't define; this causes problems on Solaris 7.
31510         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
31511
31512 2000-07-23  Jim Meyering  <meyering@lucent.com>
31513
31514         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
31515         too: getgrgid, getpwuid, getuid.
31516
31517 2000-07-23  Jim Meyering  <meyering@lucent.com>
31518
31519         * lib/basename.c (base_name): Add an assertion.
31520
31521 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
31522
31523         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
31524         shadow its mbsinit function.
31525
31526 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31527
31528         * lib/mbswidth.h: New file.
31529         * lib/mbswidth.c: New file.
31530         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
31531         (noinst_HEADERS): Add mbswidth.h.
31532
31533 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31534
31535         * lib/config.charset: Add support for FreeBSD. Improve support for
31536         HP-UX and IRIX 6.
31537
31538 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
31539
31540         * m4/mbswidth.m4: New file.
31541         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
31542
31543 2000-07-15  Jim Meyering  <meyering@lucent.com>
31544
31545         * lib/makepath.c: Include quote.h.
31546         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
31547         corresponding argument in a `quote (...)' call.
31548         Give better diagnostics.
31549
31550         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
31551         (noinst_HEADERS): Add quote.h.
31552
31553         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
31554         from tar's src/misc.c.
31555         * lib/quote.h: New file.  Prototypes for same.
31556
31557 2000-07-14  Paul Eggert  <eggert@twinsun.com>
31558
31559         From a suggestion by Bruno Haible.
31560         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
31561         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
31562         to decide whether to define the BeOS workaround macro;
31563         this adjusts to the change to AC_MBSTATE_T.
31564
31565 2000-07-14  Jim Meyering  <meyering@lucent.com>
31566
31567         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
31568         jm_AC_TYPE_UINTMAX_T.
31569
31570 2000-07-13  Paul Eggert  <eggert@twinsun.com>
31571
31572         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
31573
31574         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
31575         quotearg_buffer_restyled): Add support for
31576         clocale_quoting_style.  Undo previous change to
31577         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
31578         and "{RIGHT QUOTATION MARK}" msgids.
31579
31580 2000-07-10  Paul Eggert  <eggert@twinsun.com>
31581
31582         From a suggestion by Bruno Haible.
31583         * m4/mbstate_t.m4 (AC_MBSTATE_T):
31584         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
31585         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
31586         and mbstate_t, to a single-part test that simply defines mbstate_t.
31587         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
31588         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
31589
31590 2000-07-10  Jim Meyering  <meyering@lucent.com>
31591
31592         * m4/strerror_r.m4: Mirror the correction made in autoconf.
31593
31594         * m4/gnu-source.m4: Output to confdefs.h directly.
31595         Suggestion from Akim Demaille.
31596
31597 2000-07-09  Paul Eggert  <eggert@twinsun.com>
31598
31599         The old behavior of quoting `like this' doesn't look good with
31600         newer, ISO-style fonts.  See:
31601         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
31602
31603         Instead, quote "like this" by default.  Let the translator
31604         tailor the locale-specific quoting behavior by providing
31605         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
31606
31607         * lib/quotearg.c (N_): New macro.
31608         (gettext_default): New function.
31609         (quotearg_buffer_restyled): Use
31610         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
31611         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
31612
31613 2000-07-09  Jim Meyering  <meyering@lucent.com>
31614
31615         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
31616         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
31617
31618         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
31619         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
31620
31621 2000-07-09  Jim Meyering  <meyering@lucent.com>
31622
31623         * lib/Most files: Update copyright dates to include 2000.
31624
31625 2000-07-08  Jim Meyering  <meyering@lucent.com>
31626
31627         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
31628         if not defined.
31629         (xgethostname): Remove now-unnecessary #ifdef.
31630         Move declaration of `err' into loop where it's used.
31631
31632 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31633         and Bruno Haible  <haible@clisp.cons.org>
31634
31635         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
31636         only if the test for an object-type mbstate_t fails.  This
31637         prevents us from mistakenly reporting that mbstate_t is a
31638         system object type after we "#define mbstate_t int" to work
31639         around its lack.
31640
31641 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31642         and Bruno Haible  <haible@clisp.cons.org>
31643
31644         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
31645
31646 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31647
31648         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
31649         to strerror_r.
31650         Include <ctype.h> for use of isalpha.
31651
31652 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31653
31654         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
31655         by allocating a larger buffer. Test the gethostname return value for
31656         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
31657         returns an error and ENAMETOOLONG isn't defined.
31658
31659 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31660
31661         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
31662         dimension.
31663
31664 2000-07-04  Jim Meyering  <meyering@lucent.com>
31665
31666         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
31667         of the deprecated AC_CHECKING.
31668
31669 2000-07-04  Jim Meyering  <meyering@lucent.com>
31670
31671         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
31672         Reported by Bruno Haible.
31673
31674 2000-07-04  Jim Meyering  <meyering@lucent.com>
31675
31676         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
31677         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
31678         lacks mbrtowc.
31679
31680 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31681
31682         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
31683         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
31684
31685 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31686         and Bruno Haible  <haible@clisp.cons.org>
31687
31688         * lib/quotearg.c (mbrtowc):
31689         Assign to *pwc, and return 1 only if result is nonzero.
31690         (iswprint): Use ISPRINT when substituting our own mbrtowc.
31691
31692 2000-07-03  Jim Meyering  <meyering@lucent.com>
31693
31694         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
31695
31696 2000-07-03  Jim Meyering  <meyering@lucent.com>
31697
31698         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
31699         This is necessary to get a definition of e.g., UTMP_FILE on
31700         HP-UX 10.20.
31701         From Bob Proulx.
31702
31703 2000-07-02  Jim Meyering  <meyering@lucent.com>
31704
31705         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31706
31707         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31708         AC_LIBOBJ(function_name).
31709         * m4/chown.m4: Likewise.
31710         * m4/fnmatch.m4: Likewise.
31711         * m4/ftruncate.m4: Likewise.
31712         * m4/getgroups.m4: Likewise.
31713         * m4/getline.m4: Likewise.
31714         * m4/group-member.m4: Likewise.
31715         * m4/jm-macros.m4: Likewise.
31716         * m4/lstat.m4: Likewise.
31717         * m4/malloc.m4: Likewise.
31718         * m4/memcmp.m4: Likewise.
31719         * m4/nanosleep.m4: Likewise.
31720         * m4/putenv.m4: Likewise.
31721         * m4/realloc.m4: Likewise.
31722         * m4/regex.m4: Likewise.
31723         * m4/stat.m4: Likewise.
31724         * m4/strftime.m4: Likewise.
31725
31726 2000-07-02  Jim Meyering  <meyering@lucent.com>
31727
31728         * lib/quotearg.c (mbstate_t): Don't define here.
31729
31730 2000-07-02  Jim Meyering  <meyering@lucent.com>
31731
31732         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31733
31734 2000-07-01  Jim Meyering  <meyering@lucent.com>
31735
31736         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31737
31738 2000-07-01  Jim Meyering  <meyering@lucent.com>
31739
31740         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31741         problem.
31742
31743 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31744
31745         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31746         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31747
31748 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31749
31750         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31751         per change in ../m4/ls-mntd-fs.m4.
31752         (read_filesystem_list): Ignore symbolic links.
31753
31754 2000-06-29  Jim Meyering  <meyering@lucent.com>
31755
31756         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31757         for declaration of strcmp.
31758
31759         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31760
31761         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31762         Avoid warning by casting result to `char *' to remove `const'.
31763
31764 2000-06-28  Jim Meyering  <meyering@lucent.com>
31765
31766         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31767         included by quotearg.c, for which we perform this test.  From
31768         Bruno Haible.
31769
31770 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31771
31772         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31773         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31774         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31775
31776 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31777
31778         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31779
31780 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31781
31782         savedir now sets errno on failure and invokes xmalloc to get memory.
31783         Fix a couple of other minor bugs while we're at it.
31784
31785         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31786         (NAMLEN): Remove macro.
31787         (malloc, realloc): Remove decls.
31788         (stpcpy): Likewise.
31789         ("xalloc.h"): Include.
31790         (NAME_SIZE_DEFAULT): New macro.
31791         (savedir): Use xmalloc / xrealloc to allocate memory.
31792         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31793         Skip "" directory entries.
31794         Use strlen to calculate directory entry length, since the old method
31795         is rarely used these days and isn't worth supporting.
31796         Don't use a pointer after freeing it.
31797         Check for integer overflow when calculating allocation size.
31798         Use memcpy to copy entries, instead of stpcpy.
31799         Set errno properly when returning NULL.
31800         Check for readdir error.
31801
31802 2000-06-26  Jim Meyering  <meyering@lucent.com>
31803
31804         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31805
31806 2000-06-25  Jim Meyering  <meyering@lucent.com>
31807
31808         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31809         Linux header bug when _XOPEN_SOURCE is defined to 500.
31810
31811 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31812
31813         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31814         deficiency.
31815
31816 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31817
31818         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31819         Include xalloc.h.
31820         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31821
31822 2000-06-24  Jim Meyering  <meyering@lucent.com>
31823
31824         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31825         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31826         for which strerror does return char*, but which lacks a conveniently
31827         accessible declaration of the function.  If the compile-test says
31828         strerror_r doesn't work, then resort to a `run'-test that works on
31829         BeOS and segfaults on DEC Unix.
31830
31831 2000-06-24  Jim Meyering  <meyering@lucent.com>
31832
31833         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31834
31835 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31836
31837         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31838         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31839
31840 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31841
31842         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31843         (mbrtowc, mbstate_t): Define substitutes if
31844         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31845         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31846         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31847
31848 2000-06-23  Jim Meyering  <meyering@lucent.com>
31849
31850         * m4/afs.m4: Add missing AC_MSG_RESULT.
31851         Reported by Bruno Haible.
31852
31853         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31854         Suggestion from Bruno Haible.
31855
31856 2000-06-23  Jim Meyering  <meyering@lucent.com>
31857
31858         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31859
31860 2000-06-21  Jim Meyering  <meyering@lucent.com>
31861
31862         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31863
31864 2000-06-21  Jim Meyering  <meyering@lucent.com>
31865
31866         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31867         (noinst_HEADERS): Add getstr.h.
31868
31869         * lib/getline.c (getstr): Move into a separate file.
31870         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31871         the following changes: new parameter, delim2; both delim[12]
31872         parameters have type `int', not `char'.  The latter would lose
31873         with 8-bit delimiters.
31874         * lib/getstr.h: New file.
31875
31876 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31877
31878         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31879         than 1024, return a memory chunk of least possible size, instead
31880         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31881         Use free/xmalloc instead of xrealloc to avoid copying for very long
31882         paths.
31883
31884 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31885
31886         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31887         the empty string.
31888
31889 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31890
31891         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31892         address, not strdup.  Include <stdlib.h> and don't declare free().
31893
31894 2000-06-19  Jim Meyering  <meyering@lucent.com>
31895
31896         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31897
31898 2000-06-18  Jim Meyering  <meyering@lucent.com>
31899
31900         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31901
31902         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31903         `checking whether...' message to be consistent with that of the
31904         lstat test.
31905
31906 2000-06-18  Jim Meyering  <meyering@lucent.com>
31907
31908         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31909         Besides, these days every porting target provides a mkdir function.
31910
31911         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31912         needed. (this snippet comes from src/system.h).
31913
31914 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31915
31916         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31917
31918 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31919
31920         * lib/human.c (adjust_value): New function.
31921         (human_readable_inexact): Apply rounding style even when
31922         printing approximate values.
31923
31924 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31925
31926         * lib/human.c (human_readable_inexact): Allow an input block
31927         size that is not a multiple of the output block size, and vice versa.
31928         Reported by Piergiorgio Sartor.
31929
31930 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31931
31932         * lib/getdate.y (get_date): Apply relative times after time
31933         zone indicator, not before.  Reported by Todd A. Jacobs.
31934
31935 2000-06-13  Jim Meyering  <meyering@lucent.com>
31936
31937         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31938
31939         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31940
31941 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31942
31943         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31944
31945 2000-06-12  Jim Meyering  <meyering@lucent.com>
31946
31947         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31948         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31949         optional argument.
31950         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31951         the optional argument, `lib'.
31952
31953 2000-06-08  Jim Meyering  <meyering@lucent.com>
31954
31955         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31956
31957 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31958
31959         Rewrite largefile configuration so that we don't need to run
31960         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31961         AC_CANONICAL_HOST in configure.in -- jmm]
31962
31963         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31964         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31965         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31966         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31967         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31968         All uses changed.
31969         Instead of inspecting the output of getconf, try to compile the
31970         test program without and with the macro definition.
31971         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31972         for getconf.  Instead, check for the needed flags by compiling
31973         test programs.
31974
31975 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31976
31977         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31978
31979 2000-06-04  Jim Meyering  <meyering@lucent.com>
31980
31981         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31982         SunOS 4.1.4 for which gid_t is an unsigned type.
31983
31984 2000-06-03  Jim Meyering  <meyering@lucent.com>
31985
31986         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31987         now that autoconf requires that.
31988
31989         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31990         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31991         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31992
31993 2000-06-03  Jim Meyering  <meyering@lucent.com>
31994
31995         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31996
31997 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31998
31999         * m4/glibc21.m4: New file.
32000         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
32001
32002 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
32003
32004         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
32005         newer, don't install charset.alias.
32006         * lib/config.charset: Change the Linux/glibc rules so they become empty
32007         on glibc-2.1 or newer.
32008
32009 2000-06-02  Jim Meyering  <meyering@lucent.com>
32010
32011         * lib/mountlist.c: Back out last change.  Instead, do this...
32012         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
32013         me_dummy member using the same `ignore'-testing code.
32014         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
32015         fs_type strings.
32016         From Mark D. Roth.
32017
32018 2000-05-29  Jim Meyering  <meyering@lucent.com>
32019
32020         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
32021         mounts with the `ignore' attribute.  Based on a patch from
32022         Mark D. Roth.
32023
32024 2000-05-28  Jim Meyering  <meyering@lucent.com>
32025
32026         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
32027         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32028         * m4/stat.m4: Likewise.
32029         * m4/lstat.m4: Likewise.
32030         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
32031
32032         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
32033         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
32034
32035 2000-05-26  Jim Meyering  <meyering@lucent.com>
32036
32037         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
32038
32039 2000-05-24  Jim Meyering  <meyering@lucent.com>
32040
32041         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
32042         autoconf requires that.
32043         * m4/lib-check.m4: Likewise.
32044         * m4/jm-macros.m4: Likewise.
32045         * m4/strftime.m4: Likewise.
32046
32047         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
32048         AC_CHECK_DECLS, now that autoconf requires that.
32049
32050 2000-05-22  Jim Meyering  <meyering@lucent.com>
32051
32052         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32053         * m4/lstat.m4: Likewise.
32054
32055 2000-05-22  Jim Meyering  <meyering@lucent.com>
32056
32057         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
32058
32059 2000-05-20  Jim Meyering  <meyering@lucent.com>
32060
32061         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
32062         (jm_PREREQ): Use it.
32063
32064 2000-05-18  Jim Meyering  <meyering@lucent.com>
32065
32066         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
32067         back, too, since it may have been modified by allocate_entry.
32068         (hash_delete): Rewrite to use neither the assignment operator
32069         nor the comma operator in an if-expression.
32070
32071 2000-05-15  Paul Eggert  <eggert@twinsun.com>
32072
32073         * lib/closeout.c:
32074         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
32075         Remove; no longer needed.
32076         "quotearg.h": Add include.
32077         (file_name): Do not bother to explicitly initialize to NULL; it's less
32078         efficient on some hosts.
32079         (close_stdout_status): Remove test as to whether stdout was already
32080         closed; it breaks for the case "echo x | sort >&-".
32081         Quote file name colons.
32082         Do not assume that _("write error") lacks format strings.
32083
32084 2000-05-15  Jim Meyering  <meyering@lucent.com>
32085
32086         * lib/version-etc.c (version_etc_copyright): Update the copyright
32087         string used in all --version output.
32088
32089 2000-05-14  Jim Meyering  <meyering@lucent.com>
32090
32091         * lib/closeout.c (close_stdout_set_file_name): New function.
32092         (close_stdout_status): Use new file-scoped global.
32093         Return right away if fstat says the stdout file descriptor is invalid.
32094         * lib/closeout.h (close_stdout_set_file_name): Declare.
32095
32096 2000-05-10  Jim Meyering  <meyering@lucent.com>
32097
32098         * lib/closeout.c [default_exit_status]: New file-scoped variable.
32099         (close_stdout_set_status): New function.
32100         * lib/closeout.h (close_stdout_set_status): Declare.
32101
32102 2000-05-09  Jim Meyering  <meyering@lucent.com>
32103
32104         * m4/gettext.m4: Rename this...
32105         * m4/libintl.m4: ...to this.
32106
32107 2000-05-08  Jim Meyering  <meyering@lucent.com>
32108
32109         * lib/long-options.c: Don't include closeout.h.
32110         (parse_long_options): Don't call close_stdout for --version.
32111
32112 2000-05-06  Paul Eggert  <eggert@twinsun.com>
32113
32114         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
32115         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
32116         2.1.3 bug.  This avoids a clash when files like regex.c define
32117         _GNU_SOURCE.
32118
32119 2000-05-06  Jim Meyering  <meyering@lucent.com>
32120
32121         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
32122         (AC_REPLACE_FUNCS): Add strnlen.
32123
32124         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
32125         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
32126
32127         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
32128         AC_SEARCH_LIBS call for nanosleep.
32129         (LIB_NANOSLEEP): Set and AC_SUBST.
32130
32131 2000-05-06  Jim Meyering  <meyering@lucent.com>
32132
32133         * lib/strnlen.c: Undefine __strnlen and strnlen.
32134         [!weak_alias]: Define __strnlen to strnlen.
32135
32136         * lib/atexit.c: New file, from libiberty.
32137
32138 2000-05-06  Jim Meyering  <meyering@lucent.com>
32139
32140         * lib/closeout.c (close_stdout_status): Also check for errors on the
32141         stderr stream.
32142
32143 2000-05-05  Jim Meyering  <meyering@lucent.com>
32144
32145         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
32146         AC_SEARCH_LIBS call for clock_gettime.
32147         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
32148
32149         * m4/search-libs.m4: Update from autoconf.
32150
32151         su doesn't work on Solaris 2.6.
32152         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
32153         <shadow.h>.  Reported by Dragos Harabor.
32154
32155 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
32156
32157         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
32158         memcpy instead of xmalloc, xrealloc, path_concat.
32159         (locale_charset): Treat empty environment variables as absent.
32160         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
32161
32162 2000-05-04  Jim Meyering  <meyering@lucent.com>
32163
32164         * lib/getopt.c: Update from glibc.
32165         * lib/obstack.c: Likewise.
32166         * lib/obstack.h: Likewise.
32167         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
32168         file
32169
32170         * lib/regex.h: Likewise.
32171         * lib/strndup.c: Likewise.
32172         * lib/strnlen.c: New file, from glibc.
32173
32174 2000-05-03  Jim Meyering  <meyering@lucent.com>
32175
32176         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
32177
32178 2000-05-02  Paul Eggert  <eggert@twinsun.com>
32179
32180         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
32181         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
32182         compile-time test, rather than inspecting host and OS, to
32183         decide whether to define _LARGEFILE_SOURCE.
32184
32185 2000-05-01  Jim Meyering  <meyering@lucent.com>
32186
32187         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
32188
32189         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
32190         Based on a patch from Bruno Haible.
32191
32192 2000-05-01  Jim Meyering  <meyering@lucent.com>
32193
32194         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
32195
32196 2000-04-29  Jim Meyering  <meyering@lucent.com>
32197
32198         * lib/path-concat.c: Declare strdup only if it's not defined.
32199         * lib/canon-host.c: Likewise.
32200
32201 2000-04-28  Jim Meyering  <meyering@lucent.com>
32202
32203         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
32204         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
32205         is included first, then limits.h is included by locale.h by libintl.h.
32206         From John David Anglin.
32207
32208 2000-04-25  Jim Meyering  <meyering@lucent.com>
32209
32210         * lib/makepath.c (S_IRWXUGO): Define.
32211         (make_path): Always perform explicit chmod if MODE specifies any
32212         of the `special' permission bits.  Prompted by a bug report against
32213         install from Mate Wierdl and Joost van Baal.
32214
32215 2000-04-18  Jim Meyering  <meyering@lucent.com>
32216
32217         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
32218         (jm_PREREQ): Use it.
32219
32220 2000-04-18  Jim Meyering  <meyering@lucent.com>
32221
32222         * lib/README: New file.
32223
32224         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
32225         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
32226
32227 2000-04-17  Jim Meyering  <meyering@lucent.com>
32228
32229         Get it right :-)
32230         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
32231         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
32232         Suggestion from Akim Demaille.
32233
32234 2000-04-17  Jim Meyering  <meyering@lucent.com>
32235
32236         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
32237         the definition of it to rpl_strftime also defined-away the system's
32238         declaration.
32239
32240 2000-04-15  Jim Meyering  <meyering@lucent.com>
32241
32242         Use `C' to denote so-called `contiguous' files, the same way
32243         that tar does.
32244         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
32245         (ftypelet): Use S_ISCTG.
32246         From Michael Deutschmann.
32247
32248 2000-04-14  Jim Meyering  <meyering@lucent.com>
32249
32250         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
32251         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
32252         clobbered.
32253
32254 2000-04-14  Jim Meyering  <meyering@lucent.com>
32255
32256         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
32257
32258 2000-04-13  Jim Meyering  <meyering@lucent.com>
32259
32260         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
32261         AH_VERBATIM to insert required #ifndef into config.h.in.
32262         Suggestion from Akim Demaille.
32263
32264 2000-04-12  Jim Meyering  <meyering@lucent.com>
32265
32266         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
32267         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
32268         Christian Krackowizer.
32269
32270         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
32271         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
32272         (AC_SYS_LARGEFILE): Require.
32273         (AM_C_PROTOTYPES): Require.
32274
32275 2000-04-08  Jim Meyering  <meyering@lucent.com>
32276
32277         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
32278         names don't conflict.  Reported by Eli Zaretskii.
32279
32280 2000-04-07  Jim Meyering  <meyering@lucent.com>
32281
32282         * lib/putenv.c: Move inclusion of errno.h so it follows that of
32283         sys/types.h, to work around system header problems on AIX 3.2.5.
32284         From Bruno Haible.
32285
32286 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
32287
32288         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
32289         bug.  Deal with the different error behavior of Irix iconv.
32290
32291 2000-04-05  Paul Eggert  <eggert@twinsun.com>
32292
32293         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
32294         IRIX if the installer said otherwise.
32295
32296 2000-04-05  Jim Meyering  <meyering@lucent.com>
32297
32298         Portability tweaks required for ultrix4.3.
32299         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
32300         (jm_CHECK_DECLS): Add getutent to the list of functions.
32301         (_jm_DECL_HEADERS): Add utmpx.h.
32302         From John David Anglin.
32303
32304         * m4/strftime.m4: Back out the 2000-04-02 change.
32305         Instead of that change, simply undefine putenv in the test program.
32306
32307 2000-04-05  Jim Meyering  <meyering@lucent.com>
32308
32309         Portability tweaks required for ultrix4.3.
32310         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
32311         getutent.
32312         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
32313         * lib/canon-host.c: Declare strdup.
32314         * lib/path-concat.c: Likewise.
32315         From John David Anglin.
32316
32317 2000-04-04  Jim Meyering  <meyering@lucent.com>
32318
32319         Be more DOS 8.3-friendly.
32320         * lib/ref-add.sin: Renamed from ref-add.sed.in.
32321         * lib/ref-del.sin: Renamed from ref-del.sed.in.
32322         * lib/Makefile.am: Reflect renaming.
32323         Reported by Eli Zaretskii.
32324
32325         Use a temporary file name that won't clash with `charset.alias'
32326         in the DOS 8.3 name space.
32327         * lib/Makefile.am (charset_tmp): Define.
32328         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
32329         (uninstall-local): Likewise.
32330         Reported by Eli Zaretskii.
32331
32332 2000-04-03  Jim Meyering  <meyering@lucent.com>
32333
32334         * m4/gettext.m4: Fix typo in comment.
32335
32336         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
32337         textutils/configure.in).  Suggestion from Paul Eggert.
32338         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
32339
32340 2000-04-02  Paul Eggert  <eggert@twinsun.com>
32341
32342         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
32343         variable in the shell rather than using putenv, which isn't
32344         portable.  This avoids the configure-time inter-test dependency
32345         on the potentially-renamed putenv function.
32346
32347 2000-03-30  Paul Eggert  <eggert@twinsun.com>
32348
32349         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
32350         before checking struct stat.st_blksize, so that
32351         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
32352
32353 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32354
32355         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
32356         since strftime.c uses HAVE_STRFTIME to decide whether to use
32357         the underlying strftime.
32358
32359 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32360
32361         * lib/time/strftime.c (my_strftime): Make sure we call the system
32362         strftime, not ourselves, when invoking the underlying strftime.
32363
32364 2000-03-24  Jim Meyering  <meyering@lucent.com>
32365
32366         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
32367         (charset_alias): Define.
32368         (install-exec-local): Factor out common code.
32369         (uninstall-local): Split lines longer than 80.
32370         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
32371         (SUFFIXES): Define.
32372         (.sed.in.sed): New rule.  Don't redirect directly to $@.
32373         (CLEANFILES): Add ref-add.sed and ref-del.sed.
32374
32375 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
32376
32377         * lib/config.charset: Output a line containing "Packages using this
32378         file".
32379         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
32380         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
32381         ref-del.sed): New rules.
32382
32383 2000-03-17  Jim Meyering  <meyering@lucent.com>
32384
32385         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
32386         Otherwise, include <strings.h>
32387
32388 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
32389
32390         * lib/unicodeio.c (utf8_wctomb): New function.
32391         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
32392         format instead of in UCS-4 with platform dependent endianness.
32393
32394 2000-03-10  Jim Meyering  <meyering@lucent.com>
32395
32396         * m4/lib-check.m4: Look for getspnam in -lgen, too.
32397         From Marco Franzen.
32398
32399 2000-03-07  Paul Eggert  <eggert@twinsun.com>
32400
32401         * lib/savedir.c (savedir): Work even if directory size is
32402         negative; this can happen with some screwy NFS configurations.
32403
32404 2000-03-06  Jim Meyering  <meyering@lucent.com>
32405
32406         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
32407         if it's NULL (because we ran out of memory).  From Bruno Haible.
32408
32409 2000-03-05  Jim Meyering  <meyering@lucent.com>
32410
32411         * lib/localcharset.c ("path-concat.h"): Include.
32412         (get_charset_aliases): Use path_concat instead of ANSI string
32413         concatenation.
32414
32415         * lib/unicodeio.h (PARAMS): Define.
32416         Use it to guard prototype.
32417
32418 2000-03-04  Jim Meyering  <meyering@lucent.com>
32419
32420         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
32421         for lib/localcharset.c.
32422
32423 2000-03-04  Jim Meyering  <meyering@lucent.com>
32424
32425         * lib/Makefile.am (install-exec-local): Create $(libdir) before
32426         installing into it.
32427         (uninstall-local): Uncomment this rule so `make distcheck' works
32428         once again.
32429
32430         * lib/unicodeio.c (<errno.h>): Include it.
32431         (errno): Declare if not defined.
32432
32433         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
32434
32435         * lib/config.charset: New version, incorporating remarks from a linux
32436         i18n mailing list.  From Bruno Haible.
32437
32438 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
32439
32440         * m4/codeset.m4: New file.
32441         * m4/iconv.m4: New file.
32442         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
32443
32444 2000-03-03  Jim Meyering  <meyering@lucent.com>
32445
32446         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
32447
32448 2000-03-02  Jim Meyering  <meyering@lucent.com>
32449
32450         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
32451         the messages come out on separate lines.
32452
32453         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
32454         rather than jm_CHECK_DECLARATIONS.
32455         * m4/decl.m4: Remove now-unused file.
32456
32457         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
32458         geteuid.
32459
32460 2000-03-02  Jim Meyering  <meyering@lucent.com>
32461
32462         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
32463
32464 2000-03-01  Jim Meyering  <meyering@lucent.com>
32465
32466         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
32467         * lib/unicodeio.c: Likewise.
32468
32469 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
32470
32471         * lib/config.charset: New file.
32472         * lib/localcharset.c: New file.
32473         * lib/unicodeio.h, lib/unicodeio.c: New files.
32474         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
32475         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
32476         (noinst_HEADERS): Add unicodeio.h.
32477         (all-local, install-exec-local, charset.alias): New targets.
32478
32479 2000-02-28  Paul Eggert  <eggert@twinsun.com>
32480
32481         * lib/quotearg.c (ALERT_CHAR): New macro.
32482         (quotearg_buffer_restyled): Use it.
32483
32484 2000-02-27  Jim Meyering  <meyering@lucent.com>
32485
32486         * m4/check-decl.m4: Add getenv to the list.
32487
32488 2000-02-27  Jim Meyering  <meyering@lucent.com>
32489
32490         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
32491         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
32492
32493         * lib/backupfile.c: Guard inclusion of stdlib.h with
32494         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
32495         Declare malloc if needed.
32496
32497         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
32498         `#ifndef HAVE_DECL..'
32499         now that autoconf always defines the HAVE_DECL_ symbols.
32500         * lib/human.c: Likewise.
32501         * lib/same.c: Likewise.
32502         * lib/strtoumax.c: Likewise.
32503
32504         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
32505         declaration check was not run.
32506         * lib/hash.c: Likewise.
32507         * lib/human.c: Likewise.
32508         * lib/same.c: Likewise.
32509         * lib/strtoumax.c: Likewise.
32510
32511         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
32512         `.', then first look up the entire `.'-containing string as a login
32513         name.
32514
32515 2000-02-23  Jim Meyering  <meyering@lucent.com>
32516
32517         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
32518         in place of my hack.
32519
32520 2000-02-18  Paul Eggert  <eggert@twinsun.com>
32521
32522         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
32523         (textint): New typedef.
32524         (parser_control): Member year changed from int to textint.
32525         All uses changed.
32526         (YYSTYPE): Removed; replaced by %union with int and textint members.
32527         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
32528         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
32529         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
32530         (tSNUMBER, tUNUMBER): Now of type <textintval>.
32531         (date, number, to_year): Use width of number in digits, not its value,
32532         to determine whether it's a 2-digit year, or a 2-digit time.
32533         (yylex): Store number of digits of numeric tokens.
32534         Reported by John Kendall.
32535
32536         (parser_control): Changed from struct parser_control to typedef (for
32537         consistency).  All uses changed.
32538
32539         (tID): Removed; not used.
32540         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
32541
32542 2000-02-14  Paul Eggert  <eggert@twinsun.com>
32543
32544         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
32545         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
32546
32547 2000-02-12  Jim Meyering  <meyering@lucent.com>
32548
32549         * lib/userspec.c (ISDIGIT): Define it.
32550         (isdigit): Remove definition.
32551         (is_number): Use ISDIGIT, not isdigit.
32552         <libintl.h>: Include.
32553         (_ and N_): Define.
32554         (parse_user_spec): Mark translatable strings.
32555
32556 2000-02-10  Jim Meyering  <meyering@lucent.com>
32557
32558         With these changes, nanosleep.[ch] are finally enough like the other
32559         lib/* replacement files to compile on a few more losing systems.
32560
32561         * lib/nanosleep.h: Don't include config.h.
32562         Remove prototype from declaration of nanosleep.
32563         (PARAMS): Remove now-unneeded definition.
32564         * lib/nanosleep.c: #undef nanosleep.
32565         (rpl_nanosleep): Rename from nanosleep.
32566
32567 2000-02-10  Jim Meyering  <meyering@lucent.com>
32568
32569         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
32570         gnu_nanosleep to rpl_nanosleep.
32571
32572 2000-02-09  Jim Meyering  <meyering@lucent.com>
32573
32574         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
32575         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
32576
32577 2000-02-08  Akim Demaille  <akim@epita.fr>
32578
32579         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
32580         `[' and `]' and remove uses of `changequote'.
32581         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32582         (AC_SYS_LARGEFILE): Likewise.
32583         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
32584         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
32585         of changequote.
32586         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
32587         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
32588         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
32589         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
32590
32591 2000-02-05  Jim Meyering  <meyering@lucent.com>
32592
32593         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
32594         Remove explicit use of AC_HEADER_TIME.  It is required by
32595         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
32596         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
32597         in autoconf whereby the expansion of the latter ended up preceding
32598         the expansion of its prerequisite, AC_HEADER_TIME.
32599         Reported by Volker Borchert.
32600
32601 2000-02-03  Jim Meyering  <meyering@lucent.com>
32602
32603         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
32604
32605 2000-02-03  Jim Meyering  <meyering@lucent.com>
32606
32607         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
32608         rather than with `#if HAVE_UTMPNAME'.
32609
32610 2000-02-02  Jim Meyering  <meyering@lucent.com>
32611
32612         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
32613         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
32614         Reported by Eli Zaretskii.
32615
32616 2000-02-01  Jim Meyering  <meyering@lucent.com>
32617
32618         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
32619
32620 2000-01-31  Jim Meyering  <meyering@lucent.com>
32621
32622         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
32623         functions.  Add the time.h and sys/time.h headers along with the
32624         AC_REQUIRE'ment of AC_HEADER_TIME.
32625
32626 2000-01-31  Jim Meyering  <meyering@lucent.com>
32627
32628         * lib/nanosleep.h (nanosleep): Guard declaration with
32629         `#if ! HAVE_DECL_NANOSLEEP'.
32630         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
32631         the declaration in that vendor's sys/timers.h.
32632         Reported by Christian Krackowizer.
32633
32634         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
32635         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
32636         (ISPRINT): Likewise.
32637         Reported by Tom Tromey.
32638
32639 2000-01-30  Jim Meyering  <meyering@lucent.com>
32640
32641         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
32642
32643         * m4/prereq.m4 (utmp_includes): Define.
32644         Check for ut_user and ut_name members in both struct utmpx
32645         and struct utmp.
32646
32647 2000-01-30  Jim Meyering  <meyering@lucent.com>
32648
32649         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
32650         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
32651         header files where only utmpx.ut_user is declared.
32652
32653         * lib/readutmp.h (UT_USER): Define.
32654
32655 2000-01-29  Jim Meyering  <meyering@lucent.com>
32656
32657         * m4/lib-check.m4: New file containing library-related checks from
32658         fileutils and sh-utils (textutils had none).
32659
32660 2000-01-28  Jim Meyering  <meyering@lucent.com>
32661
32662         * m4/perl.m4: Change format of warning message to look more like that
32663         from the missing script.  Suggestion from François Pinard.
32664
32665 2000-01-25  Jim Meyering  <meyering@lucent.com>
32666
32667         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
32668         well as time.h in the compile check.
32669         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
32670         Fix typo in cross-compiling case: s/yes/no/.
32671
32672 2000-01-23  Jim Meyering  <meyering@lucent.com>
32673
32674         * m4/jm-macros.m4: Move df-related tests here from
32675         fileutils/configure.in
32676
32677         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
32678         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
32679
32680         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
32681         s/space/ac_fsusage_space/.
32682         (jm_FILE_SYSTEM_USAGE): Take two parameters.
32683
32684         * m4/ftruncate.m4: New file (derived from part of
32685         fileutils/configure.in).
32686         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
32687         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
32688
32689         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
32690         AC_SUBST these here, rather than just in sh-util/configure.in, so
32691         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
32692         all the same.
32693         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
32694         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
32695         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
32696         (AC_SUBST(POW_LIBM)): Likewise.
32697         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
32698
32699 2000-01-23  Jim Meyering  <meyering@lucent.com>
32700
32701         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32702         obstack.c.
32703
32704 2000-01-22  Jim Meyering  <meyering@lucent.com>
32705
32706         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32707
32708         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32709
32710         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32711         configure.in
32712         (AC_CHECK_HEADERS): Likewise for sh-utils.
32713         (AC_CHECK_HEADERS): Likewise for textutils.
32714         Merge the three lists of headers.
32715
32716         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32717         from fileutils' configure.in.
32718
32719         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32720         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32721         check-decl.m4.
32722
32723         * m4/check-decl.m4: Use #if rather than #ifdef.
32724         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32725         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32726         (_jm_DECL_HEADERS): Define new function.
32727         (jm_CHECK_DECLARATIONS): Require it.
32728
32729 2000-01-22  Jim Meyering  <meyering@lucent.com>
32730
32731         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32732         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32733         Required for some AIX systems.  Reported by Christian Krackowizer.
32734         [TESTING] (main): New function.
32735
32736         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32737         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32738         letters.
32739
32740         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32741         iswprint.
32742
32743         * lib/strverscmp.c (ISDIGIT): Define.
32744         (strverscmp): Use ISDIGIT, not isdigit.
32745
32746 2000-01-19  Jim Meyering  <meyering@lucent.com>
32747
32748         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32749         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32750         defines `struct timespec' in <sys/time.h>
32751
32752         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32753         Thanks to Akim for explaining.
32754
32755 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32756
32757         * lib/nanosleep.c (nanosleep):
32758         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32759         POSIX.1 doesn't require SA_INTERRUPT and some systems
32760         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32761         it's been part of POSIX.1 since day 1 (in 1988).
32762
32763 2000-01-17  Jim Meyering  <meyering@lucent.com>
32764
32765         * lib/interlock: Remove unused file.  Reported by François Pinard.
32766
32767 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32768
32769         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32770         alert, backslash, formfeed, and vertical tab unnecessarily in
32771         shell quoting style.
32772
32773 2000-01-16  Jim Meyering  <meyering@lucent.com>
32774
32775         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32776         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32777         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32778         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32779
32780 2000-01-16  Jim Meyering  <meyering@lucent.com>
32781
32782         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32783         because the latter didn't work.
32784
32785 2000-01-15  Jim Meyering  <meyering@lucent.com>
32786
32787         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32788         (AC_REPLACE_FUNCS): Add memcpy and memset.
32789         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32790         Add strpbrk.
32791         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32792
32793 2000-01-12  Jim Meyering  <meyering@lucent.com>
32794
32795         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32796         (jm_PREREQ): Use it.
32797         (jm_PREREQ_READUTMP): New macro.
32798         (jm_PREREQ): Use it.
32799
32800 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32801
32802         Quote multibyte characters correctly.
32803         * m4/c-bs-a.m4: New file.
32804         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32805         (jm_PREREQ): Use it.
32806
32807 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32808
32809         * m4/uintmax_t.m4: Port to autoconf 2.13.
32810
32811 2000-01-08  Jim Meyering  <meyering@ascend.com>
32812
32813         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32814         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32815
32816 2000-01-04  Jim Meyering  <meyering@ascend.com>
32817
32818         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32819         jm_STRUCT_DIRENT_D_TYPE.
32820         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32821         jm_STRUCT_DIRENT_D_INO.
32822         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32823         jm_STRUCT_UTIMBUF.
32824         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32825         renamings.
32826         * m4/utime.m4: Likewise.
32827
32828         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32829         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32830
32831 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32832
32833         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32834         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32835
32836 2000-01-02  Jim Meyering  <meyering@ascend.com>
32837
32838         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32839         remember if this is necessary.
32840
32841 1999-12-26  Jim Meyering  <meyering@ascend.com>
32842
32843         * m4/jm-macros.m4: Use it here.
32844         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32845
32846 1999-12-23  Jim Meyering  <meyering@ascend.com>
32847
32848         * m4/jm-macros.m4: Check for clock_gettime (moved from
32849         fileutils/configure.in)
32850         Check for gettimeofday.
32851
32852 1999-12-20  Jim Meyering  <meyering@ascend.com>
32853
32854         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32855         autoconf-2.14a-1999-12-20.
32856
32857 1999-12-19  Jim Meyering  <meyering@ascend.com>
32858
32859         * m4/lstat-slash.m4: New file.
32860         * m4/jm-macros.m4: Use the new macro:
32861         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32862
32863 1999-12-07  Jim Meyering  <meyering@ascend.com>
32864
32865         * m4/perl.m4: Require that File::Compare be available, too.
32866         Too many systems seem to lack it.
32867
32868         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32869         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32870
32871 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32872
32873         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32874         problem with the QNX 4.25 shell, which doesn't propagate exit
32875         status of failed commands inside shell assignments.
32876
32877 1999-11-17  Jim Meyering  <meyering@ascend.com>
32878
32879         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32880
32881 1999-11-07  Jim Meyering  <meyering@ascend.com>
32882
32883         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32884
32885 1999-11-06  Jim Meyering  <meyering@ascend.com>
32886
32887         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32888         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32889
32890 1999-11-05  Jim Meyering  <meyering@ascend.com>
32891
32892         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32893         configure.in of textutils, fileutils, and sh-utils into this one
32894         (shared between those packages) file.
32895         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32896         AC_STRUCT_ST_BLKSIZE.
32897
32898 1999-11-03  Jim Meyering  <meyering@ascend.com>
32899
32900         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32901         of AC_CHECK_TYPE checks includes unistd.h.
32902         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32903         Suggestion from Akim Demaille.
32904
32905 1999-10-30  Jim Meyering  <meyering@ascend.com>
32906
32907         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32908         m4-quoted string.
32909         * m4/ls-mntd-fs.m4: Likewise.
32910         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32911         * m4/jm-winsz1.m4: Likewise.
32912
32913         * m4/const.m4: Remove file, since the fix made it into the experimental
32914         version of autoconf.
32915         * m4/mktime.m4: Likewise.
32916
32917         * m4/check-type.m4: Remove file, now that the latest version of
32918         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32919
32920         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32921         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32922         AC_CHECK_TYPE.
32923
32924 1999-10-04  Jim Meyering  <meyering@ascend.com>
32925
32926         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32927
32928 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32929
32930         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32931         2.95.1 bug with HP-UX 10.20.
32932
32933 1999-09-17  Jim Meyering  <meyering@ascend.com>
32934
32935         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32936         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32937         due to missing strdup (against sh-utils-2.0).
32938
32939 1999-08-29  Jim Meyering  <meyering@ascend.com>
32940
32941         * m4/jm-macros.m4: Require jm_BISON.
32942         * m4/bison.m4: New file.
32943
32944 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32945
32946         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32947         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32948
32949 1999-08-05  Jim Meyering  <meyering@ascend.com>
32950
32951         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32952         to avoid conflicts with `conftest' on 8+3 filesystems.
32953         Suggestion from Eli Zaretskii.
32954
32955 1999-08-04  Jim Meyering  <meyering@ascend.com>
32956
32957         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32958         fileutils and sh-utils (textutils's getline test was inadequate).
32959         (AM_FUNC_GETLINE): Run this test.
32960         (AC_CHECK_FUNCS): Check for getdelim.
32961         Reported by Bob Proulx.
32962
32963 1999-08-02  Jim Meyering  <meyering@ascend.com>
32964
32965         * m4/jm-macros.m4: Add a comment.
32966
32967 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32968
32969         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32970         <inttypes.h> defines strtoumax as a macro (and not as a
32971         function).
32972
32973 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32974
32975         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32976         that we can shift, multiply and divide unsigned long long
32977         values; Ultrix cc can't do it.
32978
32979 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32980
32981         * m4/mktime.m4: New file, which is a preview of what should appear
32982         in the next public autoconf release.
32983
32984 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32985
32986         * m4/lfs.m4: Remove this file.
32987         * m4/largefile.m4: New file.  It contains the old contents of
32988         lfs.m4, except that all names with prefix AC_LFS have been
32989         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32990         compatible with future autoconf versions.  Also, some minor m4
32991         quoting problems have been fixed.
32992
32993 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32994
32995         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32996         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32997         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32998         and simplify the shell code.
32999
33000 1999-08-01  Jim Meyering  <meyering@ascend.com>
33001
33002         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
33003         m4.
33004
33005 1999-07-20  Jim Meyering  <meyering@ascend.com>
33006
33007         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
33008
33009 1999-07-15  Jim Meyering  <meyering@ascend.com>
33010
33011         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
33012
33013 1999-05-22  Jim Meyering  <meyering@ascend.com>
33014
33015         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
33016
33017 1999-05-20  Jim Meyering  <meyering@ascend.com>
33018
33019         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
33020         Add a colon after each `then' in case $4 is empty.
33021
33022 1999-05-16  Jim Meyering  <meyering@ascend.com>
33023
33024         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
33025
33026 1999-05-10  Jim Meyering  <meyering@ascend.com>
33027
33028         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
33029
33030         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
33031         AC_FUNC_MKTIME.
33032
33033 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
33034
33035         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
33036
33037 1999-05-04  Paul Eggert  <eggert@twinsun.com>
33038
33039         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
33040         not CPPFLAGS, so that linking works correctly in IRIX.
33041
33042 1999-04-30  Paul Eggert  <eggert@twinsun.com>
33043
33044         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
33045
33046 1999-04-20  Paul Eggert  <eggert@twinsun.com>
33047
33048         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
33049         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
33050         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
33051         jm_AC_TYPE_UNSIGNED_LONG_LONG.
33052         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
33053
33054         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
33055
33056 1999-04-20  Jim Meyering  <meyering@ascend.com>
33057
33058         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
33059         AC_REPLACE xstroull if necessary.  From Paul Eggert.
33060         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
33061
33062 1999-04-18  Jim Meyering  <meyering@ascend.com>
33063
33064         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
33065         * m4/jm-macros.m4: Use it.
33066
33067 1999-04-06  Jim Meyering  <meyering@ascend.com>
33068
33069         * m4/strftime.m4: Remove test for %f.
33070
33071 1999-03-29  Jim Meyering  <meyering@ascend.com>
33072
33073         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
33074         superset of the AC_TYPE_* checks in the textutils, fileutils,
33075         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
33076         AC_TYPE_PID_T.
33077
33078 1999-03-28  Jim Meyering  <meyering@ascend.com>
33079
33080         * m4/jm-macros.m4: Define GNU_PACKAGE here.
33081         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
33082         replaced e.g., in the *.sh files of the sh-utils.
33083
33084 1999-03-20  Jim Meyering  <meyering@ascend.com>
33085
33086         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
33087         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
33088         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
33089
33090 1999-03-19  Jim Meyering  <meyering@ascend.com>
33091
33092         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
33093
33094 1999-03-12  Jim Meyering  <meyering@ascend.com>
33095
33096         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
33097
33098 1999-03-07  Jim Meyering  <meyering@ascend.com>
33099
33100         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
33101         declared.
33102
33103 1999-02-17  Jim Meyering  <meyering@ascend.com>
33104
33105         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
33106         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
33107
33108 1999-02-07  Jim Meyering  <meyering@ascend.com>
33109
33110         * m4/group-member.m4: New file -- extracted from sh-utils'
33111         configure.in.
33112
33113         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
33114         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
33115
33116 1999-02-06  Jim Meyering  <meyering@ascend.com>
33117
33118         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
33119         * m4/fnmatch.m4: Likewise.
33120         * m4/getgroups.m4: Likewise.
33121         * m4/lstat.m4: Likewise.
33122         * m4/malloc.m4: Likewise.
33123         * m4/putenv.m4: Likewise.
33124         * m4/realloc.m4: Likewise.
33125         * m4/regex.m4: Likewise.
33126         * m4/stat.m4: Likewise.
33127         * m4/strftime.m4: Likewise.
33128         Suggestion from Alain Magloire.
33129
33130         * m4/chown.m4: Use `.$ac_objext', not `.o'.
33131         * m4/fnmatch.m4: Likewise.
33132         * m4/getgroups.m4: Likewise.
33133         * m4/getline.m4: Likewise.
33134         * m4/lstat.m4: Likewise.
33135         * m4/malloc.m4: Likewise.
33136         * m4/memcmp.m4: Likewise.
33137         * m4/putenv.m4: Likewise.
33138         * m4/realloc.m4: Likewise.
33139         * m4/regex.m4: Likewise.
33140         * m4/stat.m4: Likewise.
33141         * m4/strftime.m4: Likewise.
33142         Suggestion from Alain Magloire.
33143
33144         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
33145         an argument.
33146
33147         * m4/regex.m4: Add a run-time Test for proper operation of
33148         re_compile_pattern.
33149
33150 1999-01-31  Jim Meyering  <meyering@ascend.com>
33151
33152         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
33153
33154 1999-01-30  Jim Meyering  <meyering@ascend.com>
33155
33156         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
33157
33158         * m4/jm-mktime.m4: Make this a wrapper around the official
33159         AM_FUNC_MKTIME rather than my private copy, now that the official one
33160         is up to date.
33161         * m4/mktime.m4: Remove file.
33162
33163         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
33164         * m4/uptime.m4: Likewise.
33165         * m4/uintmax_t.m4: Likewise.
33166
33167 1999-01-28  Jim Meyering  <meyering@ascend.com>
33168
33169         * m4/jm-macros.m4: Use jm_AFS.
33170         * m4/afs.m4: New file (from fileutils' configure.in).
33171
33172         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
33173         * m4/chown.m4: Likewise.
33174         * m4/d-ino.m4: Likewise.
33175         * m4/d-type.m4: Likewise.
33176         * m4/fnmatch.m4: Likewise.
33177         * m4/getgroups.m4: Likewise.
33178         * m4/gettext.m4: Likewise.
33179         * m4/jm-mktime.m4: Likewise.
33180         * m4/jm-winsz2.m4: Likewise.
33181         * m4/lcmessage.m4: Likewise.
33182         * m4/ls-mntd-fs.m4: Likewise.
33183         * m4/malloc.m4: Likewise.
33184         * m4/memcmp.m4: Likewise.
33185         * m4/putenv.m4: Likewise.
33186         * m4/realloc.m4: Likewise.
33187         * m4/st_mtim.m4: Likewise.
33188         * m4/strftime.m4: Likewise.
33189
33190 1999-01-16  Jim Meyering  <meyering@ascend.com>
33191
33192         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
33193         (ARGMATCH_DIE_DECL): Define.
33194
33195 1999-01-12  Jim Meyering  <meyering@ascend.com>
33196
33197         * m4/Makefile.am.in: Rewrite to avoid using fmt.
33198         Reported by Lars Hecking.
33199
33200 1999-01-10  Jim Meyering  <meyering@ascend.com>
33201
33202         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
33203         gross kludge.
33204         * m4/inttypes_h.m4: Likewise.
33205         * m4/lstat.m4: Likewise.
33206         * m4/malloc.m4: Likewise.
33207         * m4/readdir.m4: Likewise.
33208         * m4/realloc.m4: Likewise.
33209         * m4/st_dm_mode.m4: Likewise.
33210         * m4/stat.m4: Likewise.
33211         * m4/utimbuf.m4: Likewise.
33212         * m4/utimes.m4: Likewise.
33213
33214         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
33215         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
33216         comments in config.h.in are meaningful.
33217
33218         * m4/jm-macros.m4: Require autoconf-2.13 here.
33219
33220         * m4/regex.m4: By default, don't use the included regex.c on systems
33221         with glibc 2.  Suggestion from Uli Drepper.
33222
33223 1999-01-02  Jim Meyering  <meyering@ascend.com>
33224
33225         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
33226
33227 1998-12-18  Jim Meyering  <meyering@ascend.com>
33228
33229         * m4/Makefile.am.in (Makefile.am): Simplify rule.
33230         Based on a suggestion from Lars Hecking.
33231
33232 1998-11-16  Paul Eggert  <eggert@twinsun.com>
33233
33234         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
33235
33236 1998-11-16  Jim Meyering  <meyering@ascend.com>
33237
33238         * m4/lfs.m4: Double-quote the `uname...` expression.
33239
33240 1998-11-14  Jim Meyering  <meyering@ascend.com>
33241
33242         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
33243         * m4/stat.m4: Likewise.
33244
33245 1998-11-03  Jim Meyering  <meyering@ascend.com>
33246
33247         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
33248         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
33249
33250 1998-10-18  Jim Meyering  <meyering@ascend.com>
33251
33252         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
33253
33254 1998-10-17  Jim Meyering  <meyering@ascend.com>
33255
33256         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
33257         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
33258         calls for those previously hard-coded headers.  Instead, take a new
33259         parameter.
33260         (jm_CHECK_DECLARATIONS): Reflect interface change.
33261         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
33262         (jm_CHECK_DECL_LOCALTIME_R): New macro.
33263
33264         * m4/mktime.m4: Test for spring-forward gap before long-running test.
33265
33266 1998-10-14  Jim Meyering  <meyering@ascend.com>
33267
33268         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
33269         instead of "TZ=America/Vancouver".  From Paul Eggert.
33270
33271 1998-10-11  Jim Meyering  <meyering@ascend.com>
33272
33273         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
33274         This adds a test for a recently added compatibility fix for mktime.c.
33275         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
33276
33277 1998-09-27  Jim Meyering  <meyering@ascend.com>
33278
33279         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
33280
33281         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
33282         ../configure.in, including a change from Gordon Matzigkeit to allow
33283         cross-compiling for the Hurd.
33284
33285         * m4/glibc.m4: New file/macro to test for the GNU C Library
33286         versions 1 and 2.  From Gordon Matzigkeit.
33287         Indent.
33288
33289 1998-09-21  Jim Meyering  <meyering@ascend.com>
33290
33291         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
33292
33293 1998-08-18  Paul Eggert  <eggert@twinsun.com>
33294
33295         Port nanosecond-resolution times to UnixWare 2.1.2 and
33296         pedantic Solaris 2.6.
33297
33298         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
33299         AC_STRUCT_ST_MTIM.
33300         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
33301         Generate name of ns member, instead of just 1 or undef.
33302         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
33303
33304 1998-08-15  Jim Meyering  <meyering@ascend.com>
33305
33306         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
33307         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
33308         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
33309         instead of jm_TYPE_SSIZE_T.
33310
33311 1998-08-12  Jim Meyering  <meyering@ascend.com>
33312
33313         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
33314
33315 1998-08-02  Jim Meyering  <meyering@ascend.com>
33316
33317         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
33318         in acconfig.h manually.
33319
33320 1998-07-31  Paul Eggert  <eggert@twinsun.com>
33321
33322         * m4/st_mtim.m4: New file.
33323
33324 1998-07-28  Jim Meyering  <meyering@ascend.com>
33325
33326         * m4/utimes.m4: Undef stat.
33327
33328 1998-07-25  Jim Meyering  <meyering@ascend.com>
33329
33330         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
33331         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
33332
33333 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
33334
33335         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
33336         uid and gid actually remain unchanged.
33337
33338 1998-07-07  Jim Meyering  <meyering@ascend.com>
33339
33340         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
33341
33342 1998-07-04  Jim Meyering  <meyering@ascend.com>
33343
33344         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
33345         to prove that this macro can be used in packages without regex.c.
33346
33347 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
33348
33349         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
33350         is to be used.
33351
33352 1998-07-03  Jim Meyering  <meyering@ascend.com>
33353
33354         * m4/gettext.m4: Add -lintl if it's found to be necessary.
33355
33356         * m4/gettext.m4: New file -- from gettext-0.10.35.
33357         * m4/lcmessage.m4: Likewise.
33358         * m4/progtest.m4: Likewise.
33359
33360         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
33361         * m4/jm-macros.m4: Require the new macro.
33362
33363 1998-06-29  Jim Meyering  <meyering@ascend.com>
33364
33365         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
33366         for the definition of NGROUPS (used in a system header included
33367         by sys/mount.h).
33368
33369 1998-06-28  Jim Meyering  <meyering@ascend.com>
33370
33371         * m4/ls-mntd-fs.m4: New file.
33372         * m4/fstypename.m4: New file.
33373
33374         * m4/jm-macros.m4: Require the new macro.
33375         * m4/jm-glibc-io.m4: New file.
33376
33377 1998-05-19  Jim Meyering  <meyering@ascend.com>
33378
33379         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
33380         * m4/lchown.m4: New file.
33381
33382         * m4/Makefile.am.in: New file.
33383         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
33384
33385 1998-05-14  Jim Meyering  <meyering@ascend.com>
33386
33387         * m4/Makefile.am (EXTRA_DIST): Add them.
33388         * m4/jm-macros.m4: New file.
33389         * m4/utimbuf.m4: New file.
33390
33391 1998-05-12  Jim Meyering  <meyering@ascend.com>
33392
33393         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
33394
33395 1998-05-11  Jim Meyering  <meyering@ascend.com>
33396
33397         * m4/isc-posix.m4: New file.
33398
33399 1998-05-10  Jim Meyering  <meyering@ascend.com>
33400
33401         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
33402
33403 1998-05-09  Jim Meyering  <meyering@ascend.com>
33404
33405         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
33406         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
33407         with automake.
33408
33409         * m4/ssize_t.m4: New file.
33410         * m4/mktime.m4: Remove file -- the new automake has this now.
33411
33412 1998-04-26  Jim Meyering  <meyering@ascend.com>
33413
33414         * m4/assert.m4: New file.
33415         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
33416
33417 1998-04-05  Jim Meyering  <meyering@ascend.com>
33418
33419         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
33420         (jm_PREREQ): Use it here.
33421
33422 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
33423
33424         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
33425         in acconfig.h.
33426
33427 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
33428
33429         * m4/prereq.m4: New file.
33430         * m4/error.m4: New file.
33431         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
33432
33433 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
33434
33435         * m4/getline.m4: Don't set am_cv_func_working_getline before the
33436         cache-check for the same variable -- that defeated the purpose of
33437         the test; the test program was never run.  This was a problem only
33438         on systems with losing getline functions -- HP-UX 10.20 is one.
33439         Reported by Bjorn Helgaas.
33440
33441 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
33442
33443         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
33444
33445 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
33446
33447         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
33448
33449         * m4/const.m4: New file.  Use an initializer in this declaration
33450         typedef int charset[2]; const charset x;
33451         Reported by Bob Glickstein.
33452
33453 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
33454
33455         * m4/chown.m4: Fix reversed types on -1 args to chown.
33456         From Kaveh Ghazi.
33457
33458 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
33459
33460         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
33461         Add lseek and memchr.
33462
33463         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
33464         T.E.Dickey <dickey@clark.net> said that some older preprocessors
33465         have a 20-character limit on names.
33466
33467 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
33468
33469         * m4/inttypes_h.m4: New file.
33470         * m4/uintmax_t.m4: New file.
33471         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
33472
33473 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
33474   Free Software Foundation, Inc.
33475 Copying and distribution of this file, with or without modification,
33476 are permitted provided the copyright notice and this notice are preserved.