Work around MacOS X wcwidth(0x0301) bug.
[gnulib.git] / ChangeLog
1 2007-07-07  Bruno Haible  <bruno@clisp.org>
2
3         Work around MacOS X wcwidth() bug.
4         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
5         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
6         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
7         original wcwidth in non-UTF-8 locales.
8         * modules/wcwidth (Depends-on): Add localcharset, streq,
9         uniwidth/width.
10         * doc/functions/wcwidth.texi: Update.
11
12 2007-07-07  Bruno Haible  <bruno@clisp.org>
13
14         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
15         (wcwidth): New declaration.
16         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
17         macros.
18         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
19         here. Prepare for creating <wchar.h> unconditionally.
20         * modules/wchar (Depends-on): Add link-warning.
21         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
22         REPLACE_WCWIDTH, and GL_LINK_WARNING.
23         * lib/wcwidth.h: Remove file.
24         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
25         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
26         * modules/wcwidth (Files): Remove lib/wcwidth.h.
27         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
28         (Include): Replace wcwidth.h with <wchar.h>.
29         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
30         * lib/mbchar.h: Don't include wcwidth.h.
31         * lib/mbswidth.c: Likewise.
32         * NEWS: Mention the change.
33
34 2007-07-07  Bruno Haible  <bruno@clisp.org>
35
36         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
37         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
38         definition with an external declaration.
39         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
40         defined as a function. Remove AC_C_INLINE requirement.
41         * modules/wcwidth (Files): Add lib/wcwidth.c.
42         (Makefile.am): Remove redundant statement.
43
44 2007-07-07  Bruno Haible  <bruno@clisp.org>
45
46         * MODULES.html.sh (Unicode string functions): Add the new modules.
47
48         * tests/uniwidth/test-u32-strwidth.c: New file.
49         * modules/uniwidth/u32-strwidth-tests: New file.
50
51         * lib/uniwidth/u32-strwidth.c: New file.
52         * modules/uniwidth/u32-strwidth: New file.
53
54         * tests/uniwidth/test-u16-strwidth.c: New file.
55         * modules/uniwidth/u16-strwidth-tests: New file.
56
57         * lib/uniwidth/u16-strwidth.c: New file.
58         * modules/uniwidth/u16-strwidth: New file.
59
60         * tests/uniwidth/test-u8-strwidth.c: New file.
61         * modules/uniwidth/u8-strwidth-tests: New file.
62
63         * lib/uniwidth/u8-strwidth.c: New file.
64         * modules/uniwidth/u8-strwidth: New file.
65
66         * tests/uniwidth/test-u32-width.c: New file.
67         * modules/uniwidth/u32-width-tests: New file.
68
69         * lib/uniwidth/u32-width.c: New file.
70         * modules/uniwidth/u32-width: New file.
71
72         * tests/uniwidth/test-u16-width.c: New file.
73         * modules/uniwidth/u16-width-tests: New file.
74
75         * lib/uniwidth/u16-width.c: New file.
76         * modules/uniwidth/u16-width: New file.
77
78         * tests/uniwidth/test-u8-width.c: New file.
79         * modules/uniwidth/u8-width-tests: New file.
80
81         * lib/uniwidth/u8-width.c: New file.
82         * modules/uniwidth/u8-width: New file.
83
84         * tests/uniwidth/test-uc_width.c: New file.
85         * modules/uniwidth/width-tests: New file.
86
87         * lib/uniwidth/width.c: New file, from GNU libiconv.
88         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
89         * modules/uniwidth/width: New file.
90
91         * lib/uniwidth.h: New file, from GNU libiconv.
92         * modules/uniwidth/base: New file.
93
94 2007-07-07  Bruno Haible  <bruno@clisp.org>
95
96         * lib/uniname.h: New file, from GNU gettext.
97         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
98         * lib/uniname/uninames.h: New file, from GNU gettext.
99         * lib/uniname/uniname.c: New file, from GNU gettext.
100         * tests/uniname/test-uninames.sh: New file.
101         * tests/uniname/test-uninames.c: New file, from GNU gettext.
102         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
103         * modules/uniname/base: New file.
104         * modules/uniname/uniname: New file.
105         * modules/uniname/uniname-tests: New file.
106         * MODULES.html.sh (Unicode string functions): Add the new modules.
107
108 2007-07-06  Bruno Haible  <bruno@clisp.org>
109
110         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
111
112 2007-07-06  Bruno Haible  <bruno@clisp.org>
113
114         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
115         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
116         includes <cygwin/sys_time.h> which includes <sys/select.h> which
117         include <sys/time.h>.
118         Reported by Eric Blake.
119
120 2007-07-06  Eric Blake  <ebb9@byu.net>
121
122         Fix testing canonicalize on cygwin.
123         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
124         Revert patch from 2007-06-19.
125         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
126         canonicalize module is also in use.
127         * tests/test-canonicalize.c: New file.
128         * tests/test-canonicalize.sh: Likewise.
129         * modules/canonicalize-tests: Likewise.
130
131 2007-07-06  Jim Meyering  <jim@meyering.net>
132
133         * lib/getugroups.c (getugroups): Detect getgrent failure.
134         Adjust comment to reflect reality: this function may return -1.
135
136 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
137
138         * build-aux/bootstrap (TP_URL,get_translations): Update to use
139         the new TP address.
140         (usage): Fix typo
141         (gnulib_mk): New variable.
142
143 2007-07-05  Jim Meyering  <jim@meyering.net>
144
145         Don't let endgrent clobber errno, no matter how improbable.
146         * lib/getugroups.c (getugroups): Save and restore errno around
147         endgrent call.
148
149         Close the group DB even when failing with 2^31 or more members.
150         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
151
152 2007-07-04  Jim Meyering  <jim@meyering.net>
153
154         * lib/getugroups.h: New file.
155         * lib/getugroups.c: Include "getugroups.h".
156         Remove uses of "register" keyword.
157         Move local variable, "cp", down into scope where used.
158         Give "username" parameter the "const" attribute.
159         * modules/getugroups (Files): Add lib/getugroups.h
160
161 2007-07-04  Karl Berry  <karl@gnu.org>
162
163         * MODULES.html.sh (func_all_modules): Complete rename of
164         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
165
166 2007-07-02  Bruno Haible  <bruno@clisp.org>
167
168         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
169         mode, when inttypes.h comes from gnulib.
170         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
171
172 2007-07-02  Simon Josefsson  <simon@josefsson.org>
173
174         * NEWS: Mention lgpl module name change.
175
176         * modules/lgpl-2.1: Renamed from lgpl.
177
178         * NEWS: Mention gpl module name change.
179
180         * modules/gpl-3.0: New file, based on gpl-2.0.
181
182         * modules/gpl-2.0: Renamed from gpl.
183
184         * modules/gpl: Fix filename, doc/gpl.texi is now found at
185         doc/gpl-2.0.texi.
186
187 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
188
189         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
190         #define __STDC_LIMIT_MACROS temporarily while including
191         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
192         Problem reported by Joel E. Denny in
193         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
194
195 2007-07-01  Bruno Haible  <bruno@clisp.org>
196
197         * lib/unistdio.h: New file.
198         * lib/unistdio/u-asnprintf.h: New file.
199         * lib/unistdio/u-asprintf.h: New file.
200         * lib/unistdio/u-printf-args.c: New file.
201         * lib/unistdio/u-printf-args.h: New file.
202         * lib/unistdio/u-printf-parse.h: New file.
203         * lib/unistdio/u-snprintf.h: New file.
204         * lib/unistdio/u-sprintf.h: New file.
205         * lib/unistdio/u-vasprintf.h: New file.
206         * lib/unistdio/u-vsnprintf.h: New file.
207         * lib/unistdio/u-vsprintf.h: New file.
208         * lib/unistdio/ulc-asnprintf.c: New file.
209         * lib/unistdio/ulc-asprintf.c: New file.
210         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
211         * lib/unistdio/ulc-printf-parse.c: New file.
212         * lib/unistdio/ulc-snprintf.c: New file.
213         * lib/unistdio/ulc-sprintf.c: New file.
214         * lib/unistdio/ulc-vasnprintf.c: New file.
215         * lib/unistdio/ulc-vasprintf.c: New file.
216         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
217         * lib/unistdio/ulc-vsnprintf.c: New file.
218         * lib/unistdio/ulc-vsprintf.c: New file.
219         * lib/unistdio/u8-asnprintf.c: New file.
220         * lib/unistdio/u8-asprintf.c: New file.
221         * lib/unistdio/u8-printf-parse.c: New file.
222         * lib/unistdio/u8-snprintf.c: New file.
223         * lib/unistdio/u8-sprintf.c: New file.
224         * lib/unistdio/u8-vasnprintf.c: New file.
225         * lib/unistdio/u8-vasprintf.c: New file.
226         * lib/unistdio/u8-vsnprintf.c: New file.
227         * lib/unistdio/u8-vsprintf.c: New file.
228         * lib/unistdio/u8-u8-asnprintf.c: New file.
229         * lib/unistdio/u8-u8-asprintf.c: New file.
230         * lib/unistdio/u8-u8-snprintf.c: New file.
231         * lib/unistdio/u8-u8-sprintf.c: New file.
232         * lib/unistdio/u8-u8-vasnprintf.c: New file.
233         * lib/unistdio/u8-u8-vasprintf.c: New file.
234         * lib/unistdio/u8-u8-vsnprintf.c: New file.
235         * lib/unistdio/u8-u8-vsprintf.c: New file.
236         * lib/unistdio/u16-asnprintf.c: New file.
237         * lib/unistdio/u16-asprintf.c: New file.
238         * lib/unistdio/u16-printf-parse.c: New file.
239         * lib/unistdio/u16-snprintf.c: New file.
240         * lib/unistdio/u16-sprintf.c: New file.
241         * lib/unistdio/u16-vasnprintf.c: New file.
242         * lib/unistdio/u16-vasprintf.c: New file.
243         * lib/unistdio/u16-vsnprintf.c: New file.
244         * lib/unistdio/u16-vsprintf.c: New file.
245         * lib/unistdio/u16-u16-asnprintf.c: New file.
246         * lib/unistdio/u16-u16-asprintf.c: New file.
247         * lib/unistdio/u16-u16-snprintf.c: New file.
248         * lib/unistdio/u16-u16-sprintf.c: New file.
249         * lib/unistdio/u16-u16-vasnprintf.c: New file.
250         * lib/unistdio/u16-u16-vasprintf.c: New file.
251         * lib/unistdio/u16-u16-vsnprintf.c: New file.
252         * lib/unistdio/u16-u16-vsprintf.c: New file.
253         * lib/unistdio/u32-asnprintf.c: New file.
254         * lib/unistdio/u32-asprintf.c: New file.
255         * lib/unistdio/u32-printf-parse.c: New file.
256         * lib/unistdio/u32-snprintf.c: New file.
257         * lib/unistdio/u32-sprintf.c: New file.
258         * lib/unistdio/u32-vasnprintf.c: New file.
259         * lib/unistdio/u32-vasprintf.c: New file.
260         * lib/unistdio/u32-vsnprintf.c: New file.
261         * lib/unistdio/u32-vsprintf.c: New file.
262         * lib/unistdio/u32-u32-asnprintf.c: New file.
263         * lib/unistdio/u32-u32-asprintf.c: New file.
264         * lib/unistdio/u32-u32-snprintf.c: New file.
265         * lib/unistdio/u32-u32-sprintf.c: New file.
266         * lib/unistdio/u32-u32-vasnprintf.c: New file.
267         * lib/unistdio/u32-u32-vasprintf.c: New file.
268         * lib/unistdio/u32-u32-vsnprintf.c: New file.
269         * lib/unistdio/u32-u32-vsprintf.c: New file.
270         * tests/unistdio/test-ulc-asnprintf1.c: New file.
271         * tests/unistdio/test-ulc-asnprintf1.h: New file.
272         * tests/unistdio/test-ulc-printf1.h: New file.
273         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
274         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
275         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
276         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
277         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
278         * tests/unistdio/test-ulc-vasprintf1.c: New file.
279         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
280         * tests/unistdio/test-ulc-vsprintf1.c: New file.
281         * tests/unistdio/test-u8-asnprintf1.c: New file.
282         * tests/unistdio/test-u8-asnprintf1.h: New file.
283         * tests/unistdio/test-u8-printf1.h: New file.
284         * tests/unistdio/test-u8-vasnprintf1.c: New file.
285         * tests/unistdio/test-u8-vasnprintf2.c: New file.
286         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
287         * tests/unistdio/test-u8-vasnprintf3.c: New file.
288         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
289         * tests/unistdio/test-u8-vasprintf1.c: New file.
290         * tests/unistdio/test-u8-vsnprintf1.c: New file.
291         * tests/unistdio/test-u8-vsprintf1.c: New file.
292         * tests/unistdio/test-u16-asnprintf1.c: New file.
293         * tests/unistdio/test-u16-asnprintf1.h: New file.
294         * tests/unistdio/test-u16-printf1.h: New file.
295         * tests/unistdio/test-u16-vasnprintf1.c: New file.
296         * tests/unistdio/test-u16-vasnprintf2.c: New file.
297         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
298         * tests/unistdio/test-u16-vasnprintf3.c: New file.
299         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
300         * tests/unistdio/test-u16-vasprintf1.c: New file.
301         * tests/unistdio/test-u16-vsnprintf1.c: New file.
302         * tests/unistdio/test-u16-vsprintf1.c: New file.
303         * tests/unistdio/test-u32-asnprintf1.c: New file.
304         * tests/unistdio/test-u32-asnprintf1.h: New file.
305         * tests/unistdio/test-u32-printf1.h: New file.
306         * tests/unistdio/test-u32-vasnprintf1.c: New file.
307         * tests/unistdio/test-u32-vasnprintf2.c: New file.
308         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
309         * tests/unistdio/test-u32-vasnprintf3.c: New file.
310         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
311         * tests/unistdio/test-u32-vasprintf1.c: New file.
312         * tests/unistdio/test-u32-vsnprintf1.c: New file.
313         * tests/unistdio/test-u32-vsprintf1.c: New file.
314         * modules/unistdio/base: New file.
315         * modules/unistdio/u-printf-args: New file.
316         * modules/unistdio/ulc-asnprintf: New file.
317         * modules/unistdio/ulc-asprintf: New file.
318         * modules/unistdio/ulc-fprintf: New file.
319         * modules/unistdio/ulc-printf-parse: New file.
320         * modules/unistdio/ulc-snprintf: New file.
321         * modules/unistdio/ulc-sprintf: New file.
322         * modules/unistdio/ulc-vasnprintf: New file.
323         * modules/unistdio/ulc-vasprintf: New file.
324         * modules/unistdio/ulc-vfprintf: New file.
325         * modules/unistdio/ulc-vsnprintf: New file.
326         * modules/unistdio/ulc-vsprintf: New file.
327         * modules/unistdio/u8-asnprintf: New file.
328         * modules/unistdio/u8-asprintf: New file.
329         * modules/unistdio/u8-printf-parse: New file.
330         * modules/unistdio/u8-snprintf: New file.
331         * modules/unistdio/u8-sprintf: New file.
332         * modules/unistdio/u8-vasnprintf: New file.
333         * modules/unistdio/u8-vasprintf: New file.
334         * modules/unistdio/u8-vsnprintf: New file.
335         * modules/unistdio/u8-vsprintf: New file.
336         * modules/unistdio/u8-u8-asnprintf: New file.
337         * modules/unistdio/u8-u8-asprintf: New file.
338         * modules/unistdio/u8-u8-snprintf: New file.
339         * modules/unistdio/u8-u8-sprintf: New file.
340         * modules/unistdio/u8-u8-vasnprintf: New file.
341         * modules/unistdio/u8-u8-vasprintf: New file.
342         * modules/unistdio/u8-u8-vsnprintf: New file.
343         * modules/unistdio/u8-u8-vsprintf: New file.
344         * modules/unistdio/u16-asnprintf: New file.
345         * modules/unistdio/u16-asprintf: New file.
346         * modules/unistdio/u16-printf-parse: New file.
347         * modules/unistdio/u16-snprintf: New file.
348         * modules/unistdio/u16-sprintf: New file.
349         * modules/unistdio/u16-vasnprintf: New file.
350         * modules/unistdio/u16-vasprintf: New file.
351         * modules/unistdio/u16-vsnprintf: New file.
352         * modules/unistdio/u16-vsprintf: New file.
353         * modules/unistdio/u16-u16-asnprintf: New file.
354         * modules/unistdio/u16-u16-asprintf: New file.
355         * modules/unistdio/u16-u16-snprintf: New file.
356         * modules/unistdio/u16-u16-sprintf: New file.
357         * modules/unistdio/u16-u16-vasnprintf: New file.
358         * modules/unistdio/u16-u16-vasprintf: New file.
359         * modules/unistdio/u16-u16-vsnprintf: New file.
360         * modules/unistdio/u16-u16-vsprintf: New file.
361         * modules/unistdio/u32-asnprintf: New file.
362         * modules/unistdio/u32-asprintf: New file.
363         * modules/unistdio/u32-printf-parse: New file.
364         * modules/unistdio/u32-snprintf: New file.
365         * modules/unistdio/u32-sprintf: New file.
366         * modules/unistdio/u32-vasnprintf: New file.
367         * modules/unistdio/u32-vasprintf: New file.
368         * modules/unistdio/u32-vsnprintf: New file.
369         * modules/unistdio/u32-vsprintf: New file.
370         * modules/unistdio/u32-u32-asnprintf: New file.
371         * modules/unistdio/u32-u32-asprintf: New file.
372         * modules/unistdio/u32-u32-snprintf: New file.
373         * modules/unistdio/u32-u32-sprintf: New file.
374         * modules/unistdio/u32-u32-vasnprintf: New file.
375         * modules/unistdio/u32-u32-vasprintf: New file.
376         * modules/unistdio/u32-u32-vsnprintf: New file.
377         * modules/unistdio/u32-u32-vsprintf: New file.
378         * modules/unistdio/ulc-asnprintf-tests: New file.
379         * modules/unistdio/ulc-vasnprintf-tests: New file.
380         * modules/unistdio/ulc-vasprintf-tests: New file.
381         * modules/unistdio/ulc-vsnprintf-tests: New file.
382         * modules/unistdio/ulc-vsprintf-tests: New file.
383         * modules/unistdio/u8-asnprintf-tests: New file.
384         * modules/unistdio/u8-vasnprintf-tests: New file.
385         * modules/unistdio/u8-vasprintf-tests: New file.
386         * modules/unistdio/u8-vsnprintf-tests: New file.
387         * modules/unistdio/u8-vsprintf-tests: New file.
388         * modules/unistdio/u16-asnprintf-tests: New file.
389         * modules/unistdio/u16-vasnprintf-tests: New file.
390         * modules/unistdio/u16-vasprintf-tests: New file.
391         * modules/unistdio/u16-vsnprintf-tests: New file.
392         * modules/unistdio/u16-vsprintf-tests: New file.
393         * modules/unistdio/u32-asnprintf-tests: New file.
394         * modules/unistdio/u32-vasnprintf-tests: New file.
395         * modules/unistdio/u32-vasprintf-tests: New file.
396         * modules/unistdio/u32-vsnprintf-tests: New file.
397         * modules/unistdio/u32-vsprintf-tests: New file.
398         * MODULES.html.sh (Unicode string functions): Add the new modules.
399
400 2007-07-01  Bruno Haible  <bruno@clisp.org>
401
402         * lib/sprintf.c (sprintf): Limit the available length estimation,
403         to avoid address wraparound.
404         * lib/vsprintf.c (vsprintf): Likewise.
405         * modules/sprintf-posix (Dependencies): Add stdint.
406         * modules/vsprintf-posix (Dependencies): Likewise.
407
408 2007-07-01  Bruno Haible <bruno@clisp.org>
409
410         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
411         Windows PATH as well. Conservative double-quoting. Comments.
412
413 2007-07-01  Bruno Haible <bruno@clisp.org>
414             Eric Blake  <ebb9@byu.net>
415             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
416
417         * gnulib-tool (self_abspathname): Fix algorithm to cope with
418         empty components in $PATH, denoting '.'.
419
420 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
421
422         * gnulib-tool: Fix indentation.
423         (func_create_megatestdir): Likewise.
424         Report by Bruno Haible.
425
426 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
427
428         Sync from Automake.
429         * build-aux/gnupload: Fix shell portability issues with for loops.
430         Report by Karl Berry.
431
432 2007-06-29  Simon Josefsson  <simon@josefsson.org>
433
434         * build-aux/maint.mk (POURL): Use translationproject.org.
435
436 2007-06-27  Simon Josefsson  <simon@josefsson.org>
437             Bruno Haible  <bruno@clisp.org>
438
439         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
440         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
441         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
442         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
443         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
444
445 2007-06-27  Bruno Haible  <bruno@clisp.org>
446
447         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
448         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
449
450 2007-06-26  Karl Berry  <karl@gnu.org>
451
452         * MODULES.html.sh: remove xreadlink-with-size.
453
454 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
455
456         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
457         method that I hope also handles the double-include problem noted
458         by Bruno Haible in
459         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
460
461 2007-06-23  Bruno Haible  <bruno@clisp.org>
462
463         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
464         Don't let the 'mostlyclean' target fail if the last subdirectory could
465         not be removed.
466         Reported by Karl Berry.
467
468 2007-06-23  Bruno Haible  <bruno@clisp.org>
469
470         * gnulib-tool (echo): Add a speedier workaround for ksh.
471         * tests/test-echo.sh: Likewise.
472
473 2007-06-23  Bruno Haible  <bruno@clisp.org>
474
475         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
476         * tests/test-echo.sh: Likewise.
477
478 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
479
480         * gnulib-tool (IFS): Initialize early, so we don't set it to
481         empty later.
482         (self_abspathname): Rewrite algorithm to set it, reindent.
483         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
484         (func_create_megatestdir): Merge some sed scripts.
485
486 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
487
488         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
489         exposed by Sun Studio 11 cc on Solaris 8.
490
491 2007-06-22  Bruno Haible  <bruno@clisp.org>
492
493         * gnulib-tool (echo): Ensure the echo primitive does not interpret
494         backslashes.
495         * tests/test-echo.sh: New file.
496
497 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
498
499         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
500         simplify `sed_replace_build_aux' scripts, they are portable but
501         echoing them with `echo' is not.
502         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
503
504 2007-06-21  Karl Berry  <karl@gnu.org>
505
506         * config/srclist.txt: guess we can't handle the licenses via
507         srclist at the moment.
508
509 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
510
511         * MODULES.html.sh: Add include_next.
512         * modules/include_next: New file.
513
514 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
515
516         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
517         INCLUDE_NEXT.
518         (gl_CHECK_NEXT_HEADERS): New macro.
519         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
520         the obsolescent gl_ABSOLUTE_HEADER.
521         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
522         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
523         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
524         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
525         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
526         * m4/math_h.m4 (gl_MATH_H): Likewise.
527         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
528         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
529         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
530         * m4/stdint.m4 (gl_STDINT_H): Likewise.
531         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
532         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
533         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
534         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
535         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
536         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
537         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
538         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
539         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
540         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
541         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
542         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
543         * m4/inttypes.m4 (gl_INTTYPES_H): Define
544         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
545         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
546         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
547         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
548         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
549         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
550         * lib/float_.h: Likewise.
551         * lib/inttypes_.h: Likewise.
552         * lib/math_.h: Likewise.
553         * lib/search_.h: Likewise.
554         * lib/signal_.h: Likewise.
555         * lib/stdint_.h: Likewise.
556         * lib/stdio_.h: Likewise.
557         * lib/stdlib_.h: Likewise.
558         * lib/string_.h: Likewise.
559         * lib/sys_stat_.h: Likewise.
560         * lib/sys_time_.h: Likewise.
561         * lib/time_.h: Likewise.
562         * lib/unistd_.h: Likewise.
563         * lib/wchar_.h: Likewise.
564         * lib/wctype_.h: Likewise.
565         * lib/dirent_.h: Likewise.
566         * lib/iconv_.h: Likewise.
567         * lib/locale_.h: Likewise.
568         * lib/netinet_in_.h: Likewise.
569         * lib/sys_select_.h: Likewise.
570         * lib/sys_socket_.h: Likewise.
571         * lib/sysexits_.h: Likewise.
572         * modules/fcntl (Depends-on): Depend on include_next, not
573         absolute_header.
574         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
575         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
576         * modules/fchdir: Likewise.
577         * modules/float: Likewise.
578         * modules/iconv_open: Likewise.
579         * modules/inttypes: Likewise.
580         * modules/locale: Likewise.
581         * modules/math: Likewise.
582         * modules/netinet_in: Likewise.
583         * modules/search: Likewise.
584         * modules/signal: Likewise.
585         * modules/stdint: Likewise.
586         * modules/stdio: Likewise.
587         * modules/stdlib: Likewise.
588         * modules/string: Likewise.
589         * modules/sys_select: Likewise.
590         * modules/sys_socket: Likewise.
591         * modules/sys_stat: Likewise.
592         * modules/sys_time: Likewise.
593         * modules/sysexits: Likewise.
594         * modules/time: Likewise.
595         * modules/unistd: Likewise.
596         * modules/wchar: Likewise.
597         * modules/wctype: Likewise.
598         * modules/sys_stat: Change maintainer to "all".
599         * modules/unistd: Likewise.
600
601 2007-06-20  Karl Berry  <karl@gnu.org>
602
603         * config/srclist.txt: track www changes in license files.
604
605 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
606
607         * build-aux/bootstrap: Remove stray dot.
608         Make sure build_aux settings are honored when linking
609         gnulib_extra_files.
610
611 2007-06-19  Eric Blake  <ebb9@byu.net>
612
613         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
614         Allow compilation on cygwin.
615
616 2007-06-19  Jim Meyering  <jim@meyering.net>
617
618         xreadlink-with-size: Remove module.  No longer used.
619         Ex-callers now use xreadlink or mreadlink-with-size.
620         * modules/xreadlink-with-size: Remove module.
621         * lib/xreadlink-with-size.c: Remove file.
622         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
623         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
624         just before the function definition *is* accurate.
625
626         Eliminate one way canonicalize_filename_mode could exit.
627         * lib/canonicalize.c (canonicalize_filename_mode):
628         Use mreadlink_with_size, not xreadlink_with_size.
629
630 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
631
632         Detect porting problems to FreeBSD/arm, which has time_t wider than
633         long int.  Original problem reported for GNU diff by Xin Li in
634         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
635         * modules/getdate (Depends-on): Add intprops, verify.
636         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
637         is an integer type no wider than long int.
638
639 2007-06-18  Jim Meyering  <jim@meyering.net>
640
641         New module: mreadlink-with-size.
642         * MODULES.html.sh: Add mreadlink-with-size.
643         * modules/mreadlink-with-size: New module
644         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
645         not xreadlink-with-size.
646         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
647
648 2007-06-16  Bruno Haible  <bruno@clisp.org>
649
650         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
651         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
652         Reported by Gary V. Vaughan <gary@gnu.org>.
653
654 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
655
656         Revamp lchown so that it lives in unistd.h where it belongs.
657         * lib/lchown.h: Remove.
658         * lib/dirchownmod.c: Don't include lib/lchown.h.
659         * lib/fchownat.c: Likewise.
660         * lib/openat.c: Likewise.
661         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
662         does not follow symlinks.
663         (EOPNOTSUPP): Define if not defined.
664         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
665         is defined to 0.
666         (lchown): New decl.
667         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
668         Do not check for lchown decl.
669         Set REPLACE_LCHOWN.
670         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
671         REPLACE_LCHOWN.
672         * modules/chown: Make it clear it follows symlinks.
673         * modules/lchown: Make it clear it doesn't follow symlinks.
674         (Files): Remove lib/lchown.h
675         (Depends-on): Add unistd.
676         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
677         (Include): Include <unistd.h>, not "lchown.h".
678         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
679         REPLACE_LCHOWN.
680
681 2007-06-15  Jim Meyering  <jim@meyering.net>
682
683         Change license (GPL to LGPL) of fsusage and dependents.
684         * modules/fsusage (License): Change to LGPL.
685         * modules/full-read (License): Likewise.
686         * modules/full-write (License): Likewise.
687         * modules/safe-read (License): Likewise.
688         * modules/safe-write (License): Likewise.
689
690 2007-06-14  Ben Pfaff  <blp@gnu.org>
691
692         Missing part of allocsa -> malloca transition.
693         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
694         gl_MALLOCA.
695
696 2007-06-12  Bruno Haible  <bruno@clisp.org>
697
698         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
699         to ia64, x86_64, i386.
700         Reported by Eric Blake.
701
702 2007-06-12  Bruno Haible  <bruno@clisp.org>
703
704         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
705         cross-compiling to x86_64.
706
707 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
708
709         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
710         glitch reported by Ralf Wildenhues in
711         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
712
713         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
714         Vin Shelton.
715
716 2007-06-11  Bruno Haible  <bruno@clisp.org>
717
718         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
719         replacement string.
720         Reported by Eric Blake.
721
722 2007-06-10  Bruno Haible  <bruno@clisp.org>
723
724         Prepare vasnprintf code for use with Unicode strings.
725         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
726         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
727         TYPE_U32_STRING.
728         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
729         a_u32_string variants.
730         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
731         * lib/printf-args.c: Don't include config.h and the specification
732         header if PRINTF_FETCHARGS is already defined.
733         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
734         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
735         TYPE_U16_STRING, TYPE_U32_STRING.
736         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
737         u16_directive, u16_directives, u32_directive, u32_directives): New
738         types.
739         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
740         New declarations.
741         * lib/printf-parse.c: Don't include config.h and the specification
742         header if PRINTF_PARSE is already defined. Eliminate the set of
743         parameters for WIDE_CHAR_VERSION; the user of this file must provide
744         them now. Include c-ctype.h.
745         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
746         directive and CHAR_T_ONLY_ASCII.
747         * lib/vasnprintf.c: Don't include config.h and the specification header
748         if VASNPRINTF is already defined.
749         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
750         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
751         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
752         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
753         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
754         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
755         code accordingly.
756         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
757         pad_ourselves also in this case, with the 'c' and 's' directives, and
758         with a different notion of "width".
759         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
760
761 2007-06-10  Bruno Haible  <bruno@clisp.org>
762
763         * modules/unistr/u32-mbsnlen: New file.
764         * lib/unistr/u32-mbsnlen.c: New file.
765
766         * modules/unistr/u16-mbsnlen: New file.
767         * lib/unistr/u16-mbsnlen.c: New file.
768
769         * modules/unistr/u8-mbsnlen: New file.
770         * lib/unistr/u8-mbsnlen.c: New file.
771
772         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
773         declarations.
774
775 2007-06-10  Bruno Haible  <bruno@clisp.org>
776
777         * lib/string_.h (mbsnlen): New declaration.
778         * lib/mbsnlen.c: New file.
779         * m4/mbsnlen.m4: New file.
780         * modules/mbsnlen: New file.
781         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
782         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
783         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
784
785 2007-06-10  Bruno Haible  <bruno@clisp.org>
786
787         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
788
789 2007-06-10  Bruno Haible  <bruno@clisp.org>
790
791         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
792         * lib/mbuiter.h: Likewise.
793
794 2007-06-10  Bruno Haible  <bruno@clisp.org>
795
796         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
797         declaration.
798
799 2007-06-10  Karl Berry  <karl@gnu.org>
800
801         * config/srclist.txt: remove gettext entries, Bruno prefers
802         to update individually.
803
804 2007-06-10  Bruno Haible  <bruno@clisp.org>
805
806         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
807         'maxlen'. Ensure only length + width bytes are allocated, not
808         length + 1 + width.
809
810 2007-06-09  Bruno Haible  <bruno@clisp.org>
811
812         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
813         (CHAR_T): Remove macro.
814         (VASNPRINTF): Update.
815
816 2007-06-09  Bruno Haible  <bruno@clisp.org>
817
818         * MODULES.html.sh (Unicode string functions): Add the new modules.
819
820         * modules/uniconv/u32-conv-to-enc: New file.
821         * lib/uniconv/u32-conv-to-enc.c: New file.
822         * modules/uniconv/u32-conv-to-enc-tests: New file.
823         * tests/uniconv/test-u32-conv-to-enc.c: New file.
824
825         * modules/uniconv/u16-conv-to-enc: New file.
826         * lib/uniconv/u16-conv-to-enc.c: New file.
827         * lib/uniconv/u-conv-to-enc.h: New file.
828         * modules/uniconv/u16-conv-to-enc-tests: New file.
829         * tests/uniconv/test-u16-conv-to-enc.c: New file.
830
831         * modules/uniconv/u8-conv-to-enc: New file.
832         * lib/uniconv/u8-conv-to-enc.c: New file.
833         * modules/uniconv/u8-conv-to-enc-tests: New file.
834         * tests/uniconv/test-u8-conv-to-enc.c: New file.
835
836         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
837         u32_conv_to_encoding): New declarations.
838
839 2007-06-09  Bruno Haible  <bruno@clisp.org>
840
841         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
842
843 2007-06-09  Bruno Haible  <bruno@clisp.org>
844
845         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
846         * modules/malloca: Renamed from modules/allocsa, updated.
847         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
848         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
849         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
850         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
851         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
852         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
853         * modules/xmalloca: Renamed from modules/xallocsa, updated.
854         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
855         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
856         * modules/c-strcasestr (Depends-on): Update.
857         * lib/c-strcasestr.c: Update.
858         * modules/c-strstr (Depends-on): Update.
859         * lib/c-strstr.c: Update.
860         * modules/canonicalize-lgpl (Depends-on): Update.
861         * lib/canonicalize-lgpl.c: Update.
862         * modules/clean-temp (Depends-on): Update.
863         * lib/clean-temp.c: Update.
864         * modules/csharpcomp (Depends-on): Update.
865         * lib/csharpcomp.c: Update.
866         * modules/csharpexec (Depends-on): Update.
867         * lib/csharpexec.c: Update.
868         * modules/javacomp (Depends-on): Update.
869         * lib/javacomp.c: Update.
870         * modules/javaexec (Depends-on): Update.
871         * lib/javaexec.c: Update.
872         * modules/mbscasestr (Depends-on): Update.
873         * lib/mbscasestr.c: Update.
874         * modules/mbsstr (Depends-on): Update.
875         * lib/mbsstr.c: Update.
876         * modules/setenv (Depends-on): Update.
877         * lib/setenv.c: Update.
878         * modules/strcasestr (Depends-on): Update.
879         * lib/strcasestr.c: Update.
880         * modules/striconveha (Depends-on): Update.
881         * lib/striconveha.c: Update.
882         * modules/relocatable-prog-wrapper (Files): Update.
883         * lib/relocwrapper.c: Update.
884         * build-aux/install-reloc: Update.
885         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
886
887 2007-06-08  Bruno Haible  <bruno@clisp.org>
888
889         Port to uClibc.
890         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
891         * lib/fpurge.c (fpurge): Likewise.
892         * lib/freading.c (freading): Likewise.
893         * lib/fseeko.c (rpl_fseeko): Likewise.
894         * lib/fseterr.c (fseterr): Likewise.
895         * lib/fwriting.c (fwriting): Likewise.
896         * tests/test-fflush.c (main): Avoid a failure on uClibc.
897
898 2007-06-08  Bruno Haible  <bruno@clisp.org>
899
900         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
901         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
902         * modules/gettext (Files): Add m4/intlmacosx.m4.
903
904 2007-06-07  Bruno Haible  <bruno@clisp.org>
905
906         * modules/localename-tests: New file.
907         * tests/test-localename.c: New file.
908
909         New module 'localename'.
910         * lib/localename.h: New file.
911         * lib/localename.c: New file, from GNU gettext.
912         * m4/localename.m4: New file.
913         * modules/localename: New file.
914
915 2007-06-07  Bruno Haible  <bruno@clisp.org>
916
917         Work around the lack of <wchar.h> on some builds of uClibc.
918         * doc/headers/wchar.texi: Update.
919         * lib/wchar_.h: Include <wchar.h> only if it exists.
920         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
921         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
922         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
923         doesn't exist.
924         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
925         * modules/mbfile (Depends-on): Add wchar.
926         * modules/mbiter (Depends-on): Likewise.
927         * modules/mbuiter (Depends-on): Likewise.
928         Reported by Simon Josefsson.
929
930 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
931
932         Work around problem reported by Steven M. Schweda in
933         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
934         Tru64 5.1B with the Compaq compiler environment installed declares
935         an 'isblank' function but does not define it in the C library.
936         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
937         * lib/regex_internal.h (isblank): Likewise.
938         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
939         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
940
941 2007-06-05  Bruno Haible  <bruno@clisp.org>
942
943         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
944         ia64.
945         * modules/printf-safe: New file.
946         * modules/fprintf-posix (Depends-on): Add printf-safe.
947         * modules/printf-posix (Depends-on): Likewise.
948         * modules/snprintf-posix (Depends-on): Likewise.
949         * modules/sprintf-posix (Depends-on): Likewise.
950         * modules/vasnprintf-posix (Depends-on): Likewise.
951         * modules/vasprintf-posix (Depends-on): Likewise.
952         * modules/vfprintf-posix (Depends-on): Likewise.
953         * modules/vprintf-posix (Depends-on): Likewise.
954         * modules/vsnprintf-posix (Depends-on): Likewise.
955         * modules/vsprintf-posix (Depends-on): Likewise.
956         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
957         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
958         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
959         "no" on i386, x86_64, ia64.
960         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
961         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
962         on i386, x86_64, ia64.
963         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
964         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
965         on i386, x86_64, ia64.
966         * tests/test-vasnprintf-posix.c: Include float.h.
967         (LDBL80_WORDS): New macro.
968         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
969         on i386, x86_64, ia64.
970         * tests/test-vasprintf-posix.c: Include float.h.
971         (LDBL80_WORDS): New macro.
972         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
973         on i386, x86_64, ia64.
974         * tests/test-snprintf-posix.c: Include float.h.
975         * tests/test-sprintf-posix.c: Likewise.
976         * tests/test-vsnprintf-posix.c: Likewise.
977         * tests/test-vsprintf-posix.c: Likewise.
978
979 2007-06-05  Bruno Haible  <bruno@clisp.org>
980
981         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
982         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
983         non-IEEE numbers on i386, x86_64, ia64.
984         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
985         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
986         * tests/test-isnanl.h: Include float.h.
987         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
988
989 2007-06-05  Bruno Haible  <bruno@clisp.org>
990
991         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
992         also the %a / %A. Handle the %a / %A code before this extra handling.
993
994 2007-06-05  Bruno Haible  <bruno@clisp.org>
995
996         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
997         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
998
999 2007-06-05  Bruno Haible  <bruno@clisp.org>
1000
1001         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
1002         typo in variable name.
1003
1004 2007-06-05  Eric Blake  <ebb9@byu.net>
1005
1006         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
1007         Reported by Simon Josefsson.
1008
1009 2007-06-04  Bruno Haible  <bruno@clisp.org>
1010
1011         Avoid test failures on some PowerPC platforms.
1012         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
1013         Define differently for PowerPC.
1014         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
1015         Reported by Gary V. Vaughan <gary@gnu.org>.
1016
1017 2007-06-02  Bruno Haible  <bruno@clisp.org>
1018
1019         Fix test-stdint failure on FreeBSD/ia64.
1020         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
1021         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
1022         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
1023         * doc/headers/stdint.texi: Update.
1024
1025 2007-06-01  Bruno Haible  <bruno@clisp.org>
1026
1027         * tests/test-binary-io.c (main): Pass a third argument to open().
1028         Reported by Gary V. Vaughan <gary@gnu.org>.
1029
1030 2007-06-01  Bruno Haible  <bruno@clisp.org>
1031
1032         * doc/functions/frexpl.texi: Update for mingw.
1033
1034 2007-06-01  Bruno Haible  <bruno@clisp.org>
1035
1036         * tests/test-lseek.c (main): Disable test of errno for invalid third
1037         argument.
1038         * doc/functions/lseek.texi: Update.
1039         Reported by Gary V. Vaughan <gary@gnu.org>.
1040
1041 2007-05-28  Bruno Haible  <bruno@clisp.org>
1042
1043         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
1044
1045 2007-05-31  Eric Blake  <ebb9@byu.net>
1046
1047         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
1048         cross compiling.
1049
1050 2007-05-30  Eric Blake  <ebb9@byu.net>
1051         and Bruno Haible  <bruno@clisp.org>
1052
1053         Work around mingw test failures exposed by m4-1.4.9b.
1054         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
1055         * tests/test-unistd.c: Disable uid_t and git_t tests for the
1056         moment.
1057
1058 2007-05-30  Bruno Haible  <bruno@clisp.org>
1059
1060         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
1061         assuming that they are closed. Needed on HP-UX 11.
1062
1063 2007-05-29  Bruno Haible  <bruno@clisp.org>
1064
1065         Fix a problem with #include_next.
1066         * lib/dirent_.h: Split the double-inclusion guard.
1067         * lib/fcntl_.h: Likewise.
1068         * lib/float_.h: Likewise.
1069         * lib/iconv_.h: Likewise.
1070         * lib/inttypes_.h: Likewise.
1071         * lib/locale_.h: Likewise.
1072         * lib/math_.h: Likewise.
1073         * lib/netinet_in_.h: Likewise.
1074         * lib/search_.h: Likewise.
1075         * lib/signal_.h: Likewise.
1076         * lib/stdint_.h: Likewise.
1077         * lib/stdio_.h: Likewise.
1078         * lib/stdlib_.h: Likewise.
1079         * lib/string_.h: Likewise.
1080         * lib/sys_select_.h: Likewise.
1081         * lib/sys_socket_.h: Likewise.
1082         * lib/sys_stat_.h: Likewise.
1083         * lib/sys_time_.h: Likewise.
1084         * lib/sysexits_.h: Likewise.
1085         * lib/time_.h: Likewise.
1086         * lib/unistd_.h: Likewise.
1087         * lib/wchar_.h: Likewise.
1088         * lib/wctype_.h: Likewise.
1089
1090 2007-05-29  Bruno Haible  <bruno@clisp.org>
1091
1092         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1093         for the moment.
1094
1095 2007-05-29  Bruno Haible  <bruno@clisp.org>
1096
1097         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1098         invocation.
1099         Reported by Eric Blake.
1100
1101 2007-05-29  Bruno Haible  <bruno@clisp.org>
1102
1103         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1104         compiling case.
1105
1106 2007-05-29  Eric Blake  <ebb9@byu.net>
1107             Bruno Haible  <bruno@clisp.org>
1108
1109         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1110         cross compiles.
1111
1112 2007-05-28  Eric Blake  <ebb9@byu.net>
1113
1114         * modules/closein-tests (test_closein_LDADD): Support test on
1115         cygwin with libtool.
1116
1117 2007-05-28  Bruno Haible  <bruno@clisp.org>
1118
1119         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1120         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1121         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1122         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1123         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1124         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1125         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1126         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1127         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1128
1129 2007-05-28  Eric Blake  <ebb9@byu.net>
1130
1131         Unconditionally include <config.h> in unit tests.
1132         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1133         * tests/test-allocsa.c, tests/test-arcfour.c,
1134         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1135         tests/test-array_list.c, tests/test-array_oset.c,
1136         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1137         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1138         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1139         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1140         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1141         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1142         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1143         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1144         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1145         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1146         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1147         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1148         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1149         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1150         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1151         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1152         test-md5.c, test-memmem.c, test-printf-posix.c,
1153         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1154         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1155         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1156         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1157         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1158         test-vasnprintf-posix2.c, test-vasnprintf.c,
1159         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1160         test-vfprintf-posix.c, test-vprintf-posix.c,
1161         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1162         test-xvasprintf.c: Likewise.
1163
1164 2007-05-28  Bruno Haible  <bruno@clisp.org>
1165
1166         * gnulib-tool (func_import): Remember the --with-tests command-line
1167         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1168         Reported by Eric Blake.
1169
1170 2007-05-28  Bruno Haible  <bruno@clisp.org>
1171
1172         * modules/ftell-tests: New file.
1173         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1174         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1175
1176         * lib/ftell.c: New file.
1177         * modules/ftell: New file.
1178         * m4/ftell.m4: New file.
1179         * doc/functions/ftell.texi: Update.
1180         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1181         REPLACE_FTELL.
1182         * lib/stdio_.h (rpl_ftell): New declaration.
1183         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1184         REPLACE_FTELL.
1185
1186 2007-05-28  Eric Blake  <ebb9@byu.net>
1187
1188         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1189
1190 2007-05-28  Bruno Haible  <bruno@clisp.org>
1191
1192         * modules/fseek-tests: New file.
1193         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1194         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1195
1196         * lib/fseek.c: New file.
1197         * modules/fseek: New file.
1198         * m4/fseek.m4: New file.
1199         * doc/functions/fseek.texi: Update.
1200         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1201         REPLACE_FSEEK.
1202         * lib/stdio_.h (rpl_fseek): New declaration.
1203         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1204         REPLACE_FSEEK.
1205
1206 2007-05-28  Bruno Haible  <bruno@clisp.org>
1207
1208         * lib/stdio_.h (fflush): More comments.
1209
1210 2007-05-28  Bruno Haible  <bruno@clisp.org>
1211
1212         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1213         runtime test.
1214
1215 2007-05-28  Eric Blake  <ebb9@byu.net>
1216
1217         Improve lseek module.
1218         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1219         * lib/unistd_.h (lseek): Scale back link warning message.
1220         * tests/test-lseek.c: Beef up test.
1221         * tests/test-lseek.sh: Exercise more facets of lseek.
1222         Reported by Bruno Haible.
1223
1224 2007-05-28  Bruno Haible  <bruno@clisp.org>
1225
1226         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1227         to define.
1228
1229 2007-05-27  Bruno Haible  <bruno@clisp.org>
1230
1231         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1232
1233 2007-05-27  Bruno Haible  <bruno@clisp.org>
1234
1235         * modules/openmp: New file.
1236         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1237         Noah Misch.
1238
1239 2007-05-26  Bruno Haible  <bruno@clisp.org>
1240
1241         * modules/chdir-long (Depends-on): Add fchdir.
1242         * modules/chdir-safer (Depends-on): Likewise.
1243         * modules/fts (Depends-on): Likewise.
1244         * modules/fts-lgpl (Depends-on): Likewise.
1245         * modules/openat (Depends-on): Likewise.
1246         * modules/savewd (Depends-on): Likewise.
1247
1248 2007-05-24  Eric Blake  <ebb9@byu.net>
1249
1250         Fix lseek on mingw.
1251         * modules/lseek: New module.
1252         * m4/lseek.m4: New file.
1253         * lib/lseek.c: New file.
1254         * modules/lseek-tests: New file.
1255         * tests/test-lseek.c: New file.
1256         * tests/test-lseek.sh: New file.
1257         * MODULES.html.sh: Document lseek module.
1258         * modules/fflush (Depends-on): Add lseek, fseeko.
1259         * modules/fseeko (Depends-on): Likewise.
1260         * modules/ftello (Depends-on): Likewise.
1261         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1262         broken.
1263         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1264         broken.
1265         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1266         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1267         * lib/ftello.c (rpl_ftello): Likewise.
1268         * tests/test-fseeko.c (main): Test this.
1269         * tests/test-fseeko.sh: Likewise.
1270         * tests/test-ftello.c (main): Likewise.
1271         * tests/test-ftello.sh: Likewise.
1272         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1273         implies replacing fseek.
1274         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1275         HAVE_FTELLO.
1276         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1277         * modules/unistd (Makefile.am): Likewise.
1278         * lib/unistd_.h (lseek): Declare a replacement.
1279         * doc/functions/lseek.texi (lseek): Document this fix.
1280         * doc/functions/fseek.texi (fseek): Likewise.
1281         * doc/functions/ftell.texi (ftell): Likewise.
1282
1283 2007-05-24  Bruno Haible  <bruno@clisp.org>
1284
1285         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1286         in the printed representation of a NaN.
1287         * tests/test-vasprintf-posix.c (test_function): Likewise.
1288         * tests/test-snprintf-posix.h (test_function): Likewise.
1289         * tests/test-sprintf-posix.h (test_function): Likewise.
1290         Reported by Eric Blake.
1291
1292 2007-05-23  Eric Blake  <ebb9@byu.net>
1293
1294         Fix fseeko/ftello on cygwin 1.5.24.
1295         * doc/functions/fseeko.texi (fseeko): Document the fix.
1296         * doc/functions/ftello.texi (ftello): Document the fix.
1297         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1298         * doc/functions/stdout.text (stdout): New file.
1299         * doc/functions/stderr.text (stderr): New file.
1300         * doc/gnulib.texi (Function Substitutes): Use new files.
1301         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1302         prior to 1.7.0.
1303         * tests/test-ftello.c (main): Likewise for ftello.
1304         * tests/test-fseeko.sh: New file.
1305         * tests/test-ftello.sh: New file.
1306         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1307         with seekable stdin.
1308         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1309         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1310         (gl_REPLACE_FSEEKO): New macro.
1311         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1312         * modules/fseeko (Files): Distribute fseeko.c.
1313         * modules/ftello (Files): Distribute ftello.c.
1314         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1315         mode.
1316         * lib/ftello.c (rpl_ftello): New file.
1317         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1318         fseeko, ftello.
1319         (gl_STDIN_LARGE_OFFSET): New macro.
1320         * modules/stdio (Makefile.am): Perform the replacement.
1321         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1322
1323 2007-05-23  Bruno Haible  <bruno@clisp.org>
1324
1325         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1326         GNULIB_POSIXCHECK is defined.
1327
1328 2007-05-21  Bruno Haible  <bruno@clisp.org>
1329
1330         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1331         Check also the output for NaN arguments. When cross-compiling, guess
1332         no on IRIX.
1333         * lib/vasnprintf.c: Update comments.
1334         * tests/test-vasnprintf-posix.c (strisnan): New function.
1335         (test_function): Use it.
1336         * tests/test-vasprintf-posix.c (strisnan): New function.
1337         (test_function): Use it.
1338         * tests/test-snprintf-posix.h (strisnan): New function.
1339         (test_function): Use it.
1340         * tests/test-sprintf-posix.h (strisnan): New function.
1341         (test_function): Use it.
1342         Reported by Eric Blake.
1343
1344 2007-05-20  Bruno Haible  <bruno@clisp.org>
1345
1346         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1347         numbers that fails on BeOS.
1348         * doc/functions/frexpl.texi: Update.
1349
1350 2007-05-20  Jim Meyering  <jim@meyering.net>
1351
1352         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
1353         forced upon us by glibc-2.6.
1354
1355 2007-05-20  Bruno Haible  <bruno@clisp.org>
1356
1357         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
1358         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
1359         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
1360         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
1361         NEED_PRINTF_INFINITE.
1362         (is_infinitel): New function.
1363         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
1364         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
1365         gl_PREREQ_VASNPRINTF_INFINITE.
1366         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
1367         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1368         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
1369         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
1370         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
1371         gl_PREREQ_VASNPRINTF_INFINITE.
1372         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1373         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1374         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1375         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1376         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1377         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1378         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1379         * doc/functions/fprintf.texi: Update.
1380         * doc/functions/printf.texi: Update.
1381         * doc/functions/snprintf.texi: Update.
1382         * doc/functions/sprintf.texi: Update.
1383         * doc/functions/vfprintf.texi: Update.
1384         * doc/functions/vprintf.texi: Update.
1385         * doc/functions/vsnprintf.texi: Update.
1386         * doc/functions/vsprintf.texi: Update.
1387
1388 2007-05-20  Bruno Haible  <bruno@clisp.org>
1389
1390         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
1391         was not found in libc.
1392         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
1393
1394 2007-05-20  Bruno Haible  <bruno@clisp.org>
1395
1396         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1397         printed as "-nan" instead of "nan".
1398         * tests/test-vasprintf-posix.c (test_function): Likewise.
1399         * tests/test-snprintf-posix.h (test_function): Likewise.
1400         * tests/test-sprintf-posix.h (test_function): Likewise.
1401         Needed for HP-UX 11.
1402
1403 2007-05-20  Jim Meyering  <jim@meyering.net>
1404
1405         Fix buggy test for the fchownat-deref bug.
1406         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
1407         symlink required for the run-test.  Without it, this test would
1408         always declare that fchownat doesn't work, and client code would
1409         unnecessarily use the replacement function with fixed libc.
1410         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
1411         Reported by Greg Schafer.
1412
1413 2007-05-19  Bruno Haible  <bruno@clisp.org>
1414
1415         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
1416         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
1417         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
1418         Needed for IRIX 6.5 and Solaris 2.5.1.
1419
1420 2007-05-19  Bruno Haible  <bruno@clisp.org>
1421
1422         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
1423         (test_function): Skip tests involving -0.0 on platforms where
1424         -0.0 = 0.0.
1425         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
1426         (test_function): Skip tests involving -0.0 on platforms where
1427         -0.0 = 0.0.
1428         * tests/test-snprintf-posix.h (have_minus_zero): New function.
1429         (test_function): Skip tests involving -0.0 on platforms where
1430         -0.0 = 0.0.
1431         * tests/test-sprintf-posix.h (have_minus_zero): New function.
1432         (test_function): Skip tests involving -0.0 on platforms where
1433         -0.0 = 0.0.
1434         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
1435         tests.
1436         * tests/test-printf-posix.h (test_function): Likewise.
1437         * tests/test-printf-posix.output: Remove all -0.0 related results.
1438         Needed for IRIX 6.5.
1439
1440 2007-05-19  Bruno Haible  <bruno@clisp.org>
1441
1442         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1443         printed as "nan0x7fffffff" instead of "nan".
1444         * tests/test-vasprintf-posix.c (test_function): Likewise.
1445         * tests/test-snprintf-posix.h (test_function): Likewise.
1446         * tests/test-sprintf-posix.h (test_function): Likewise.
1447         * tests/test-fprintf-posix.h (NaN): Remove macro.
1448         (test_function): Remove all NaN related tests.
1449         * tests/test-printf-posix.h (NaN): Remove macro.
1450         (test_function): Remove all NaN related tests.
1451         * tests/test-printf-posix.output: Remove all NaN related results.
1452         Needed for IRIX 6.5.
1453
1454 2007-05-19  Bruno Haible  <bruno@clisp.org>
1455
1456         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
1457         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
1458
1459 2007-05-19  Bruno Haible  <bruno@clisp.org>
1460
1461         * lib/float_.h: New file.
1462         * m4/float_h.m4: New file.
1463         * modules/float: New file.
1464         * modules/isnanl (Dependencies): Add float.
1465         * modules/isnanl-nolibm (Dependencies): Likewise.
1466         * modules/mathl (Dependencies): Likewise.
1467         * modules/printf-frexpl (Dependencies): Likewise.
1468         * modules/signbit (Dependencies): Likewise.
1469         * modules/vasnprintf (Dependencies): Likewise.
1470         * doc/headers/float.texi: Update.
1471
1472 2007-05-19  Jim Meyering  <jim@meyering.net>
1473
1474         * lib/utimens.c (gl_futimens): Rename from futimens,
1475         now that glibc-2.6 declares futimens.
1476         * lib/utimens.h: Likewise.
1477
1478 2007-05-19  Bruno Haible  <bruno@clisp.org>
1479
1480         Avoid test failures on mingw.
1481         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
1482         * tests/test-printf-posix.sh: Likewise.
1483         * tests/test-vfprintf-posix.sh: Likewise.
1484         * tests/test-vprintf-posix.sh: Likewise.
1485
1486 2007-05-19  Bruno Haible  <bruno@clisp.org>
1487
1488         Fix *printf result for NaN, Inf, -0.0 on mingw.
1489         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
1490         * lib/vasnprintf.c: Include math.h and isnan.h.
1491         (is_infinite_or_zero): New function.
1492         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
1493         values in the %f, %F, %e, %E, %g, %G directives.
1494         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
1495         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1496         gl_PRINTF_INFINITE and test its result. Invoke
1497         gl_PREREQ_VASNPRINTF_INFINITE.
1498         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1499         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1500         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1501         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1502         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1503         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1504         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1505         * doc/functions/fprintf.texi: Update.
1506         * doc/functions/printf.texi: Update.
1507         * doc/functions/snprintf.texi: Update.
1508         * doc/functions/sprintf.texi: Update.
1509         * doc/functions/vfprintf.texi: Update.
1510         * doc/functions/vprintf.texi: Update.
1511         * doc/functions/vsnprintf.texi: Update.
1512         * doc/functions/vsprintf.texi: Update.
1513
1514 2007-05-19  Bruno Haible  <bruno@clisp.org>
1515
1516         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
1517         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
1518         Instead of multiplying with 10^k, set extra_zeroes to k.
1519         (scale10_round_long_double): Remove function.
1520
1521 2007-05-18  Bruno Haible  <bruno@clisp.org>
1522
1523         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
1524         introduced on 2007-05-06.
1525
1526 2007-05-18  Bruno Haible  <bruno@clisp.org>
1527
1528         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
1529         %g directives.
1530         * tests/test-vasprintf-posix.c (test_function): Likewise.
1531         * tests/test-snprintf-posix.h (test_function): Likewise.
1532         * tests/test-sprintf-posix.h (test_function): Likewise.
1533
1534 2007-05-18  Bruno Haible  <bruno@clisp.org>
1535
1536         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
1537         (strmatch): New function.
1538         (test_function): Test the %f directive on numbers of various exponents.
1539         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
1540         (strmatch): New function.
1541         (test_function): Test the %f directive on numbers of various exponents.
1542         * tests/test-snprintf-posix.h (strmatch): New function.
1543         (test_function): Test the %f directive on numbers of various exponents.
1544         * tests/test-sprintf-posix.h (strmatch): New function.
1545         (test_function): Test the %f directive on numbers of various exponents.
1546         * tests/test-snprintf-posix.c (SIZEOF): New macro.
1547         * tests/test-sprintf-posix.c (SIZEOF): New macro.
1548         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
1549         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
1550
1551 2007-05-18  Bruno Haible  <bruno@clisp.org>
1552
1553         Add support for 'long double' number output.
1554         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
1555         * lib/vasnprintf.c: Include math.h and float+.h.
1556         (mp_limb_t): New type.
1557         (GMP_LIMB_BITS): New macro.
1558         (mp_twolimb_t): New type.
1559         (GMP_TWOLIMB_BITS): New macro.
1560         (mpn_t): New type.
1561         (multiply, divide, convert_to_decimal, decode_long_double,
1562         scale10_round_long_double, scale10_round_decimal_long_double,
1563         floorlog10l): New functions.
1564         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
1565         for the %f, %F, %e, %E, %g, %G directives.
1566         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
1567         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1568         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
1569         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
1570         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1571         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1572         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1573         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1574         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1575         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1576         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1577         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
1578         * modules/snprintf-posix (Depends-on): Likewise.
1579         * modules/sprintf-posix (Depends-on): Likewise.
1580         * modules/vasnprintf-posix (Depends-on): Likewise.
1581         * modules/vasprintf-posix (Depends-on): Likewise.
1582         * modules/vfprintf-posix (Depends-on): Likewise.
1583         * modules/vsnprintf-posix (Depends-on): Likewise.
1584         * modules/vsprintf-posix (Depends-on): Likewise.
1585         * modules/vasnprintf (Files): Add lib/float+.h.
1586         * doc/functions/fprintf.texi: Update.
1587         * doc/functions/printf.texi: Update.
1588         * doc/functions/snprintf.texi: Update.
1589         * doc/functions/sprintf.texi: Update.
1590         * doc/functions/vfprintf.texi: Update.
1591         * doc/functions/vprintf.texi: Update.
1592         * doc/functions/vsnprintf.texi: Update.
1593         * doc/functions/vsprintf.texi: Update.
1594
1595 2007-05-18  Bruno Haible  <bruno@clisp.org>
1596
1597         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
1598
1599 2007-05-18  Bruno Haible  <bruno@clisp.org>
1600
1601         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
1602         for printing 64-bit integers. Needed for mingw.
1603
1604 2007-05-18  Bruno Haible  <bruno@clisp.org>
1605
1606         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1607         gl_FUNC_FREXPL_WORKS.
1608         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
1609
1610 2007-05-18  Bruno Haible  <bruno@clisp.org>
1611
1612         * modules/frexpl-nolibm-tests: New file.
1613
1614         * modules/frexpl-nolibm: New file.
1615         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
1616
1617 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
1618
1619         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
1620         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1621         GCC 4.2, which otherwise issues a lot of warnings.
1622         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
1623         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
1624         Likewise.
1625         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
1626         * modules/iconv_open (iconv.h): Likewise.
1627         * modules/locale (locale.h): Likewise.
1628         * modules/netinet_in (netinet/in.h): Likewise.
1629         * modules/sys_select (sys_select.h): Likewise.
1630         * modules/sys_socket (sys/socket.h): Likewise.
1631         * modules/sys_stat (sys/stat.h): Likewise.
1632         * modules/sysexits (sysexits.h): Likewise.
1633         * modules/unistd (unistd.h): Likewise.
1634
1635 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1636
1637         * modules/closein-tests (Makefile.am): Distribute
1638         `test-closein.sh'.
1639
1640 2007-05-17  Bruno Haible  <bruno@clisp.org>
1641
1642         * tests/test-printf-posix.output: Renamed from
1643         tests/test-fprintf-posix.out.
1644         * modules/fprintf-posix-tests: Update.
1645         * modules/printf-posix-tests: Update.
1646         * modules/vfprintf-posix-tests: Update.
1647         * modules/vprintf-posix-tests: Update.
1648         * tests/test-fprintf-posix.sh: Update.
1649         * tests/test-printf-posix.sh: Update.
1650         * tests/test-vfprintf-posix.sh: Update.
1651         * tests/test-vprintf-posix.sh: Update.
1652         Reported by Ralf Wildenhues.
1653
1654 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
1655
1656         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
1657         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1658         GCC 4.2, which otherwise issues a lot of warnings.
1659         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
1660         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
1661         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
1662         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
1663         it should no longer be needed.
1664         * lib/string_.h: Likewise.
1665         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
1666         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
1667         * modules/inttypes (inttypes.h): Likewise.
1668         * modules/math (math.h): Likewise.
1669         * modules/search (search.h): Likewise.
1670         * modules/signal (signal.h): Likewise.
1671         * modules/stdint (stdint.h): Likewise.
1672         * modules/stdio (stdio.h): Likewise.
1673         * modules/stdlib (stdlib.h): Likewise.
1674         * modules/string (string.h): Likewise.
1675         * modules/sys_time (sys/time.h): Likewise.
1676         * modules/time (time.h): Likewise.
1677         * modules/wchar (wchar.h): Likewise.
1678         * modules/wctype (wtype.h): Likewise.
1679
1680 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
1681
1682         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
1683
1684 2007-05-13  Bruno Haible  <bruno@clisp.org>
1685
1686         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
1687         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1688         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
1689         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1690         (gl_PREREQ_STRTOK_R): Don't require it here.
1691
1692 2007-05-13  Bruno Haible  <bruno@clisp.org>
1693
1694         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
1695         when used in C++ mode.
1696
1697 2007-05-12  Bruno Haible  <bruno@clisp.org>
1698
1699         * lib/linebuffer.h: Tweak doc.
1700         * lib/linebuffer.c: Likewise.
1701
1702 2007-05-12  James Youngman  <jay@gnu.org>
1703
1704         * lib/linebuffer.c (readlinebuffer_delim): New function,
1705         like readlinebuffer, but use a caller-specified delimiter.
1706         (readlinebuffer): Just call readlinebuffer_delim with '\n'
1707         as the delimiter.
1708         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
1709
1710 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1711
1712         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
1713         * modules/openat (Files): Remove openat-die.c.
1714         (Depends-on): Add openat-die.
1715         * modules/openat-die: New module.
1716
1717 2007-05-06  Bruno Haible  <bruno@clisp.org>
1718
1719         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
1720         Update with info about Cygwin.
1721         * doc/functions/fprintf.texi: Update.
1722         * doc/functions/printf.texi: Update.
1723         * doc/functions/snprintf.texi: Update.
1724         * doc/functions/sprintf.texi: Update.
1725         * doc/functions/vfprintf.texi: Update.
1726         * doc/functions/vprintf.texi: Update.
1727         * doc/functions/vsnprintf.texi: Update.
1728         * doc/functions/vsprintf.texi: Update.
1729         Reported by Eric Blake.
1730
1731 2007-05-06  Bruno Haible  <bruno@clisp.org>
1732
1733         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
1734         padding ourselves for the floating-point directives.
1735         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
1736         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
1737         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1738         gl_PRINTF_FLAG_ZERO and test its result. Invoke
1739         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
1740         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1741         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1742         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1743         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1744         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1745         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1746         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1747         * tests/test-snprintf-posix.h (test_function): Also check the width
1748         and some flags in the %f directive.
1749         * tests/test-sprintf-posix.h (test_function): Likewise.
1750         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1751         * tests/test-vasprintf-posix.c (test_function): Likewise.
1752         * doc/functions/fprintf.texi: Update.
1753         * doc/functions/printf.texi: Update.
1754         * doc/functions/snprintf.texi: Update.
1755         * doc/functions/sprintf.texi: Update.
1756         * doc/functions/vfprintf.texi: Update.
1757         * doc/functions/vprintf.texi: Update.
1758         * doc/functions/vsnprintf.texi: Update.
1759         * doc/functions/vsprintf.texi: Update.
1760
1761 2007-05-06  Bruno Haible  <bruno@clisp.org>
1762
1763         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
1764         pass the ' flag character to sprintf or snprintf.
1765         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
1766         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
1767         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1768         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
1769         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
1770         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1771         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1772         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1773         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1774         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1775         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1776         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1777         * tests/test-snprintf-posix.h (test_function): Also check the grouping
1778         flag.
1779         * tests/test-sprintf-posix.h (test_function): Likewise.
1780         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1781         * tests/test-vasprintf-posix.c (test_function): Likewise.
1782         * doc/functions/fprintf.texi: Update.
1783         * doc/functions/printf.texi: Update.
1784         * doc/functions/snprintf.texi: Update.
1785         * doc/functions/sprintf.texi: Update.
1786         * doc/functions/vfprintf.texi: Update.
1787         * doc/functions/vprintf.texi: Update.
1788         * doc/functions/vsnprintf.texi: Update.
1789         * doc/functions/vsprintf.texi: Update.
1790
1791 2007-05-01  Bruno Haible  <bruno@clisp.org>
1792
1793         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
1794
1795 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
1796
1797         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
1798         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
1799
1800 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
1801
1802         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
1803         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
1804         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
1805
1806 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
1807
1808         * lib/argp-help.c (struct hol_entry): New member `ord'.
1809         (HOL_ENTRY_PTRCMP): Use ord for comparison
1810         (hol_sort): Initialize ord.
1811
1812 2007-05-01  Bruno Haible  <bruno@clisp.org>
1813
1814         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
1815         Reported by Eric Blake.
1816         * doc/gnulib.texi (Function Substitutes): Update.
1817
1818 2007-05-01  Bruno Haible  <bruno@clisp.org>
1819
1820         * doc/functions.texi: Remove file, now redundant through
1821         doc/functions/*.texi.
1822
1823 2007-05-01  Bruno Haible  <bruno@clisp.org>
1824
1825         * modules/argp (Depends-on): Add sleep.
1826
1827 2007-05-01  Bruno Haible  <bruno@clisp.org>
1828
1829         * modules/sleep-tests: New file.
1830         * tests/test-sleep.c: New file.
1831
1832         * modules/sleep: New file.
1833         * lib/sleep.c: New file.
1834         * m4/sleep.m4: New file.
1835         * lib/unistd_.h (sleep): New declaration.
1836         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
1837         HAVE_SLEEP.
1838         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
1839         * doc/functions/sleep.texi: Document the sleep module.
1840
1841 2007-05-01  Bruno Haible  <bruno@clisp.org>
1842
1843         * lib/sigprocmask.h: Remove file.
1844         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
1845         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
1846         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
1847         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
1848         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
1849         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
1850         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
1851         HAVE_SIGSET_T as a shell variable.
1852         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
1853         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
1854         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
1855         (Depends-on): Add signal. Remove verify.
1856         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
1857         (Include): Mention <signal.h> instead of sigprocmask.h.
1858         * NEWS: Mention the change.
1859         * lib/fatal-signal.c: Don't include sigprocmask.h.
1860
1861 2007-05-01  Bruno Haible  <bruno@clisp.org>
1862
1863         * modules/signal: New file.
1864         * lib/signal_.h: New file.
1865         * m4/signal_h.m4: New file.
1866
1867 2007-05-01  Bruno Haible  <bruno@clisp.org>
1868
1869         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
1870         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
1871         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
1872         HAVE_WCTYPE_CTMP_BUG into wctype.h.
1873
1874 2007-05-01  Bruno Haible  <bruno@clisp.org>
1875
1876         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
1877         configure time.
1878         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
1879         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
1880         * modules/sys_stat (Makefile.am): Substitute their values into
1881         sys/stat.h.
1882
1883 2007-05-01  Bruno Haible  <bruno@clisp.org>
1884
1885         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
1886         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
1887         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
1888
1889 2007-05-01  Bruno Haible  <bruno@clisp.org>
1890
1891         * doc/header/assert.texi: Undo last change: don't mention the gnulib
1892         'assert' module here.
1893
1894 2007-05-01  Bruno Haible  <bruno@clisp.org>
1895
1896         * doc/functions/*.texi: New files.
1897         * doc/functions/google-ranking.txt: New file.
1898         * doc/gnulib.texi (Function Substitutes): New chapter.
1899         (ctime, inet_ntoa): Remove sections.
1900         * doc/ctime.texi: Remove file.
1901         * doc/inet_ntoa.texi: Remove file.
1902         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
1903         dependencies.
1904         (%.info): New rule, specifying a --reference-limit.
1905
1906 2007-05-01  Bruno Haible  <bruno@clisp.org>
1907
1908         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
1909
1910 2007-05-01  Bruno Haible  <bruno@clisp.org>
1911
1912         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
1913         the portability of 'mkdir' to mingw systems.
1914
1915 2007-05-01  Bruno Haible  <bruno@clisp.org>
1916
1917         * doc/headers/google-ranking.txt: New file.
1918
1919 2007-04-30  Eric Blake  <ebb9@byu.net>
1920
1921         Prefer fseeko to fseek.
1922         * modules/getpass (Depends-on): Add fseeko.
1923         * lib/getpass.c (getpass): Use fseeko, not fseek.
1924
1925 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
1926
1927         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
1928         assumes the sorting is stable, while most qsort implementations
1929         are not.  Use argument addresses to ensure they never compare as
1930         equal.
1931
1932         * tests/test-argp-2.sh (usage-indent test): Fix output
1933         (func_compare): Restore diff options
1934         * tests/test-argp.c: Restore #include "progname.h"
1935
1936 2007-04-29  Bruno Haible  <bruno@clisp.org>
1937
1938         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
1939         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1940         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
1941         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1942         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
1943         (configure.ac): Define CHECK_SNPRINTF_POSIX.
1944         (TESTS, check_PROGRAMS): Add test-snprintf.
1945         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
1946         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
1947         (TESTS, check_PROGRAMS): Add test-vsnprintf.
1948         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
1949         assertions that fail on HP-UX, OSF/1, or IRIX.
1950         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
1951
1952 2007-04-29  Bruno Haible  <bruno@clisp.org>
1953
1954         * MODULES.html.sh (posix_functions): Remove 'contents'.
1955
1956 2007-04-29  Karl Berry  <karl@gnu.org>
1957
1958         * config/srclist.txt (gendocs_template_min): new entry.
1959
1960 2007-04-29  Bruno Haible  <bruno@clisp.org>
1961
1962         Work around fpurge bug on BSD systems.
1963         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
1964         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
1965         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
1966         fpurge to rpl_fpurge if the system already has this function.
1967         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
1968         the case where the system already has this function. Correct invariants
1969         on BSD systems.
1970         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
1971         BSD systems.
1972
1973 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
1974
1975         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
1976         proposed by Sven Verdoolaege.
1977
1978         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
1979         options.
1980         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
1981         (usage and help tests): Update
1982
1983 2007-04-29  Bruno Haible  <bruno@clisp.org>
1984
1985         * tests/test-fflush.c (main): Use a file of size 17, not 10.
1986         Print more information in case of failure. Disable a test on BeOS.
1987
1988 2007-04-29  Bruno Haible  <bruno@clisp.org>
1989
1990         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
1991         This helps debugging on systems on which no gdb is available.
1992
1993 2007-04-29  Bruno Haible  <bruno@clisp.org>
1994
1995         * lib/freading.h: Improve comments.
1996         * lib/fwriting.h: Likewise.
1997         * tests/test-freading.c (main): Don't check freading immediately after
1998         repositioning. Needed for glibc.
1999
2000 2007-04-29  Bruno Haible  <bruno@clisp.org>
2001
2002         * lib/freading.c (freading): Trivial simplification.
2003
2004 2007-04-28  Bruno Haible  <bruno@clisp.org>
2005
2006         * tests/test-fwriting.c (main): Also test the interaction between
2007         fflush and fwriting.
2008         * modules/fwriting-tests (Depends-on): Add fflush.
2009
2010         * tests/test-freading.c (main): Also test the interaction between
2011         fflush and freading.
2012         * modules/freading-tests (Depends-on): Add fflush.
2013
2014 2007-04-28  Bruno Haible  <bruno@clisp.org>
2015
2016         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
2017         fseeko and ftello.
2018         Suggested by Eric Blake.
2019
2020 2007-04-28  Jim Meyering  <jim@meyering.net>
2021
2022         Avoid false-negative in gl_STDINT_H's C99 conformance test.
2023         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
2024         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
2025
2026 2007-04-27  Eric Blake  <ebb9@byu.net>
2027
2028         * doc/headers/assert.texi (assert.h): Document assert module use.
2029
2030 2007-04-27  Bruno Haible  <bruno@clisp.org>
2031
2032         * doc/headers/*.texi: New files.
2033         * doc/gnulib.texi (Header File Substitutes): New chapter.
2034         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
2035         dependencies.
2036         (standards.info ,standards.html, standards.dvi): Update dependencies.
2037         (mostlyclean, clean): New targets.
2038
2039 2007-04-27  Bruno Haible  <bruno@clisp.org>
2040
2041         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
2042         * modules/sysexits (Files, Makefile.am): Update.
2043
2044         * lib/sys_socket_.h: Renamed from lib/socket_.h.
2045         * modules/sys_socket (Files, Makefile.am): Update.
2046
2047         * lib/sys_stat_.h: Renamed from lib/stat_.h.
2048         * modules/sys_stat (Files, Makefile.am): Update.
2049
2050 2007-04-27  Eric Blake  <ebb9@byu.net>
2051
2052         * lib/freading.h: Improve comments.
2053         * lib/fwriting.h: Likewise.
2054         * lib/fflush.c: Likewise.
2055
2056         Fix closein for mingw.
2057         * modules/closein-tests: Add tests for closein.
2058         * tests/test-closein.c: New file.
2059         * tests/test-closein.sh: Likewise.
2060         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
2061         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
2062
2063 2007-04-27  Bruno Haible  <bruno@clisp.org>
2064
2065         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2066         version is < 6.
2067         * lib/math_.h [__DECC]: Likewise.
2068         * lib/stdio_.h [__DECC]: Likewise.
2069         * lib/stdlib_.h [__DECC]: Likewise.
2070         * lib/string_.h [__DECC]: Likewise.
2071         * lib/time_.h [__DECC]: Likewise.
2072         * lib/wchar_.h [__DECC]: Likewise.
2073         * lib/wctype_.h [__DECC]: Likewise.
2074
2075 2007-04-27  Bruno Haible  <bruno@clisp.org>
2076
2077         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2078
2079 2007-04-27  Bruno Haible  <bruno@clisp.org>
2080
2081         * lib/fflush.c: Add comments.
2082         * modules/fpurge-tests (Depends-on): Add fflush.
2083         * modules/freadable-tests (Depends-on): Likewise.
2084         * modules/fwritable-tests (Depends-on): Likewise.
2085
2086 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2087
2088         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2089         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2090         Report by Bruno Haible <bruno@clisp.org>.
2091
2092 2007-04-26  Eric Blake  <ebb9@byu.net>
2093
2094         Fix fflush on mingw.
2095         * modules/fflush (Depends-on): Add freading.
2096         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2097         but unread data.
2098
2099 2007-04-26  Eric Blake  <ebb9@byu.net>
2100         and Bruno Haible  <bruno@clisp.org>
2101
2102         Implement freading and fwriting.
2103         * lib/freading.c: New file.
2104         * lib/freading.h: Likewise.
2105         * m4/freading.m4: Likewise.
2106         * modules/freading: Likewise.
2107         * modules/freading-tests: Likewise.
2108         * tests/test-freading.c: Likewise.
2109         * lib/fwriting.c: New file.
2110         * lib/fwriting.h: Likewise.
2111         * m4/fwriting.m4: Likewise.
2112         * modules/fwriting: Likewise.
2113         * modules/fwriting-tests: Likewise.
2114         * tests/test-fwriting.c: Likewise.
2115         * MODULES.html.sh (File stream based Input/Output): Mention them.
2116
2117 2007-04-26  Bruno Haible  <bruno@clisp.org>
2118
2119         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2120         'long' when we assume it.
2121         Suggested by Eric Blake.
2122
2123 2007-04-26  Bruno Haible  <bruno@clisp.org>
2124
2125         Ensure fseeko, ftello are declared on glibc systems.
2126         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2127         * modules/fseeko (configure.ac-early): Likewise.
2128         * modules/ftello (configure.ac-early): Likewise.
2129         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2130         AC_FUNC_FSEEKO for this.
2131         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2132         (gl_CHECK_FSEEKO): Remove macro.
2133
2134 2007-04-26  Bruno Haible  <bruno@clisp.org>
2135
2136         * tests/test-fflush.c (main): Also check the ftell result after
2137         fflush and fseek/fseeko.
2138         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2139         file descriptor position cache in the stream.
2140         * lib/fseeko.c (rpl_fseeko): Likewise.
2141
2142 2007-04-26  Bruno Haible  <bruno@clisp.org>
2143
2144         * modules/fflush-tests (Depends-on): Add fseeko.
2145
2146 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2147             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2148
2149         * lib/argz_.h: ensure error_t definition is obtained in same
2150         mechanism system argz.h would have.
2151         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2152         argz facilities are known bad.  Err on the side of caution if
2153         cross-compiling.
2154
2155 2007-04-25  Eric Blake  <ebb9@byu.net>
2156
2157         * lib/fpurge.c (includes): Use stdlib.h for free.
2158         * tests/test-fflush.c (main): Also test fflush-fseeko.
2159
2160 2007-04-25  Bruno Haible  <bruno@clisp.org>
2161
2162         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2163         * lib/fseeko.c: New file.
2164         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2165         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2166         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2167         gl_FUNC_FSEEKO.
2168         (gl_FUNC_FSEEKO): Invoke it.
2169         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2170         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2171         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2172
2173 2007-04-25  Bruno Haible  <bruno@clisp.org>
2174
2175         * modules/fflush (Depends-on): Add ftello.
2176
2177 2007-04-25  Bruno Haible  <bruno@clisp.org>
2178
2179         * modules/ftello-tests: New file.
2180         * tests/test-ftello.c: New file.
2181
2182         * modules/ftello: New file.
2183         * m4/ftello.m4: New file.
2184         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2185         HAVE_FTELLO.
2186         * lib/stdio_.h (ftello): New declaration.
2187         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2188         HAVE_FTELLO.
2189
2190 2007-04-25  Bruno Haible  <bruno@clisp.org>
2191
2192         * modules/fseeko-tests: New file.
2193         * tests/test-fseeko.c: New file.
2194
2195         * modules/fseeko: New file.
2196         * m4/fseeko.m4: New file.
2197         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2198         HAVE_FSEEKO.
2199         * lib/stdio_.h (fseeko): New declaration.
2200         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2201         HAVE_FSEEKO.
2202
2203 2007-04-25  Bruno Haible  <bruno@clisp.org>
2204
2205         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2206
2207 2007-04-25  Bruno Haible  <bruno@clisp.org>
2208
2209         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2210         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2211         * tests/test-unistd.c: Likewise.
2212         * tests/test-fcntl.c: Likewise.
2213
2214 2007-04-23  Eric Blake  <ebb9@byu.net>
2215
2216         * lib/fflush.c: Fix missing include.
2217         Reported by Bruno Haible.
2218
2219 2007-04-23  Bruno Haible  <bruno@clisp.org>
2220
2221         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2222         Reported by Eric Blake.
2223
2224 2007-04-23  Bruno Haible  <bruno@clisp.org>
2225
2226         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2227
2228 2007-04-23  Bruno Haible  <bruno@clisp.org>
2229
2230         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2231
2232 2007-04-23  Bruno Haible  <bruno@clisp.org>
2233
2234         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2235         Needed on HP-UX 11.
2236
2237 2007-04-16  Eric Blake  <ebb9@byu.net>
2238
2239         Make fflush rely on fpurge.
2240         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2241         open coding all variants.
2242         * modules/fflush (Depends-on): Add fpurge and unistd.
2243         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2244         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2245
2246         Fix --with-tests compilation on cygwin.
2247         * modules/argmatch-tests (Makefile.am): List gnulib library first
2248         in LDADD.
2249         * modules/argp-tests (Makefile.am): Likewise.
2250         * modules/array-list-tests (Makefile.am): Likewise.
2251         * modules/array-oset-tests (Makefile.am): Likewise.
2252         * modules/avltree-list-tests (Makefile.am): Likewise.
2253         * modules/avltree-oset-tests (Makefile.am): Likewise.
2254         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2255         * modules/carray-list-tests (Makefile.am): Likewise.
2256         * modules/dirname-tests (Makefile.am): Likewise.
2257         * modules/frexp-tests (Makefile.am): Likewise.
2258         * modules/isnanl-tests (Makefile.am): Likewise.
2259         * modules/linked-list-tests (Makefile.am): Likewise.
2260         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2261         * modules/lock-tests (Makefile.am): Likewise.
2262         * modules/rbtree-list-tests (Makefile.am): Likewise.
2263         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2264         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2265         * modules/tls-tests (Makefile.am): Likewise.
2266         * modules/tsearch-tests (Makefile.am): Likewise.
2267         * modules/xvasprintf-tests (Makefile.am): Likewise.
2268
2269         Fix fpurge for cygwin.
2270         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2271         value.
2272         * modules/fpurge-tests (Depends-on): Clean up trash.
2273
2274 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2275
2276         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2277
2278         * m4/autobuild.m4: Re-indent.
2279
2280 2007-04-13  Bruno Haible  <bruno@clisp.org>
2281
2282         * modules/fpurge-tests: New file.
2283         * tests/test-fpurge.c: New file.
2284
2285         * modules/fpurge: New file.
2286         * lib/fpurge.h: New file.
2287         * lib/fpurge.c: New file.
2288         * m4/fpurge.m4: New file.
2289
2290 2007-04-13  Bruno Haible  <bruno@clisp.org>
2291
2292         * modules/fbufmode-tests: New file.
2293         * tests/test-fbufmode.c: New file.
2294
2295         * modules/fbufmode: New file.
2296         * lib/fbufmode.h: New file.
2297         * lib/fbufmode.c: New file.
2298         * m4/fbufmode.m4: New file.
2299
2300 2007-04-13  Bruno Haible  <bruno@clisp.org>
2301
2302         * modules/fwritable-tests: New file.
2303         * tests/test-fwritable.c: New file.
2304
2305         * modules/fwritable: New file.
2306         * lib/fwritable.h: New file.
2307         * lib/fwritable.c: New file.
2308         * m4/fwritable.m4: New file.
2309
2310 2007-04-13  Bruno Haible  <bruno@clisp.org>
2311
2312         * modules/freadable-tests: New file.
2313         * tests/test-freadable.c: New file.
2314
2315         * modules/freadable: New file.
2316         * lib/freadable.h: New file.
2317         * lib/freadable.c: New file.
2318         * m4/freadable.m4: New file.
2319
2320 2007-04-13  Bruno Haible  <bruno@clisp.org>
2321
2322         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2323         MOSTLYCLEANFILES.
2324
2325 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2326
2327         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2328         gzip bootstrap.conf to avoid dragging in i18n machinery.
2329         (gnulib_tool_option): Use it.
2330
2331 2007-04-13  Bruno Haible  <bruno@clisp.org>
2332
2333         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2334         %F directives.
2335         * tests/test-vasprintf-posix.c (test_function): Likewise.
2336         * tests/test-snprintf-posix.h (test_function): Likewise.
2337         * tests/test-sprintf-posix.h (test_function): Likewise.
2338         * tests/test-fprintf-posix.h (test_function): Likewise.
2339         * tests/test-printf-posix.h (test_function): Likewise.
2340         * tests/test-fprintf-posix.out: Likewise.
2341
2342 2007-04-13  Bruno Haible  <bruno@clisp.org>
2343
2344         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2345         * modules/tls-tests (configure.ac): Likewise.
2346         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2347
2348 2007-04-13  Bruno Haible  <bruno@clisp.org>
2349
2350         * lib/tls.c (glthread_tls_get): Fix return type.
2351         Patch by Arto C. Nirkko <anirkko@insel.ch>.
2352
2353 2007-04-12  Eric Blake  <ebb9@byu.net>
2354
2355         * modules/gettime (Depends-on): Remove gettime.
2356         Reported by Dmitry V. Levin.
2357
2358 2007-04-12  Bruno Haible  <bruno@clisp.org>
2359
2360         * modules/fflush (Include): Mention <stdio.h>.
2361         * modules/strtoimax (Include): Mention <inttypes.h>.
2362         * modules/strtoumax (Include): Likewise.
2363
2364 2007-04-12  Eric Blake  <ebb9@byu.net>
2365
2366         * .cvsignore: New file.
2367         * .gitignore: Likewise.
2368
2369 2007-04-12  Bruno Haible  <bruno@clisp.org>
2370
2371         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
2372         not before, since $(LDADD) often contains libgnu.a.
2373         * modules/striconv-tests (test_striconv_LDADD): Likewise.
2374         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
2375         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
2376         Needed on Cygwin.
2377
2378 2007-04-12  Eric Blake  <ebb9@byu.net>
2379
2380         Work around glibc's failure to flush stdin on fclose.
2381         * lib/closein.c (close_stdin): Flush stdin before closing.
2382
2383         Work around glibc's failure to reset seekable stdin on exit.
2384         * modules/closein: New module.
2385         * lib/closein.c: New file.
2386         * lib/closein.h: Likewise.
2387         * m4/closein.m4: Likewise.
2388         * MODULES.html.sh (File stream based Input/Output): Document it.
2389
2390 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2391
2392         * gnulib-tool: Rename generated 'autobuild' script to
2393         'do-autobuild' in --create-megatestdir output.
2394
2395         * doc/gnulib.texi (Build robot for gnulib): Fix.
2396
2397 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2398
2399         * modules/sysexits (Depends-on): Add absolute-header.
2400
2401 2007-04-12  Eric Blake  <ebb9@byu.net>
2402
2403         No need to preserve errno on success.
2404         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
2405         Reported by Bruno Haible.
2406
2407 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2408
2409         * MODULES.html.sh (Support for maintaining and releasing
2410         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
2411
2412 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2413
2414         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
2415
2416 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2417
2418         * modules/autobuild: New module.
2419
2420         * m4/autobuild.m4: New file.
2421
2422 2007-04-11  Bruno Haible  <bruno@clisp.org>
2423
2424         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
2425         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
2426         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
2427         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
2428         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2429         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2430         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2431         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2432         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2433         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2434         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
2435         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2436         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2437         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
2438         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2439         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2440         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
2441         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2442         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2443         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
2444         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2445         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2446         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
2447         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2448         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2449         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
2450         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2451         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2452         Reported by Eric Blake.
2453
2454 2007-04-11  Bruno Haible  <bruno@clisp.org>
2455
2456         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
2457
2458 2007-04-10  Bruno Haible  <bruno@clisp.org>
2459
2460         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
2461         for NaN and Infinity. Needed on FreeBSD 6.1.
2462         * tests/test-vasnprintf-posix.c (test_function): Undo last change
2463         regarding results for "%010a" of Infinity and NaN.
2464         * tests/test-vasprintf-posix.c (test_function): Likewise.
2465         * tests/test-snprintf-posix.h (test_function): Likewise.
2466         * tests/test-sprintf-posix.h (test_function): Likewise.
2467         * tests/test-fprintf-posix.h (test_function): Likewise.
2468         * tests/test-printf-posix.h (test_function): Likewise.
2469         * tests/test-fprintf-posix.out: Likewise.
2470
2471 2007-04-10  Bruno Haible  <bruno@clisp.org>
2472
2473         * modules/locale-tests: New file.
2474         * tests/test-locale.c: New file.
2475
2476         * modules/locale: New file.
2477         * lib/locale_.h: New file.
2478         * m4/locale_h.m4: New file.
2479
2480 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2481             Bruno Haible  <bruno@clisp.org>
2482
2483         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
2484         be determined, test for availability of the copysignf, copysign,
2485         copysignl functions.
2486         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
2487         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
2488         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
2489
2490 2007-04-09  Eric Blake  <ebb9@byu.net>
2491
2492         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
2493         * modules/stdio (Makefile.am): Support fflush.
2494         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
2495         * modules/fflush: New file.
2496         * lib/fflush.c: Likewise.
2497         * m4/fflush.m4: Likewise.
2498         * modules/fflush-tests: New test.
2499         * tests/test-fflush.c: Likewise.
2500         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
2501
2502 2007-04-06  Bruno Haible  <bruno@clisp.org>
2503
2504         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
2505         (VASNPRINTF): Use signbit for faster determination whether to print a
2506         minus sign.
2507         * modules/vasnprintf (Files): Remove lib/float+.h.
2508         * modules/fprintf-posix (Depends-on): Add signbit.
2509         * modules/snprintf-posix (Depends-on): Likewise.
2510         * modules/sprintf-posix (Depends-on): Likewise.
2511         * modules/vasnprintf-posix (Depends-on): Likewise.
2512         * modules/vasprintf-posix (Depends-on): Likewise.
2513         * modules/vfprintf-posix (Depends-on): Likewise.
2514         * modules/vsnprintf-posix (Depends-on): Likewise.
2515         * modules/vsprintf-posix (Depends-on): Likewise.
2516
2517 2007-04-06  Bruno Haible  <bruno@clisp.org>
2518
2519         * tests/test-frexp.c (main): Test also the sign bit of zero results.
2520         * tests/test-frexpl.c (main): Likewise.
2521         * tests/test-ldexpl.c (main): Likewise.
2522         * modules/frexp-tests (Depends-on): Add signbit.
2523         * modules/frexpl-tests (Depdends-on): Likewise.
2524         * modules/ldexpl-tests (Depdends-on): Likewise.
2525
2526 2007-04-06  Bruno Haible  <bruno@clisp.org>
2527
2528         * modules/signbit-tests: New file.
2529         * tests/test-signbit.c: New file.
2530
2531         * modules/signbit: New file.
2532         * lib/signbitf.c: New file.
2533         * lib/signbitd.c: New file.
2534         * lib/signbitl.c: New file.
2535         * m4/signbit.m4: New file.
2536         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
2537         (signbit): New macro.
2538         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
2539         REPLACE_SIGNBIT.
2540         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
2541         REPLACE_FREXPL into math.h.
2542
2543 2007-04-06  Bruno Haible  <bruno@clisp.org>
2544
2545         * modules/isnanf-nolibm-tests: New file.
2546         * tests/test-isnanf.c: New file.
2547
2548         * modules/isnanf-nolibm: New file.
2549         * lib/isnanf.h: New file.
2550         * lib/isnanf.c: New file.
2551         * lib/isnan.c: Consider the USE_FLOAT macro.
2552         * m4/isnanf.m4: New file.
2553
2554 2007-04-06  Bruno Haible  <bruno@clisp.org>
2555
2556         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
2557         (Link): New section.
2558
2559         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
2560
2561 2007-04-06  Bruno Haible  <bruno@clisp.org>
2562
2563         Assume the 'long double' type.
2564         * m4/longdouble.m4: Remove file.
2565         * config/srclist.txt: Don't mention longdouble.m4.
2566         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
2567         * lib/float+.h: Likewise.
2568         * lib/frexp.c: Likewise.
2569         * lib/printf-args.h: Likewise.
2570         * lib/printf-args.c: Likewise.
2571         * lib/printf-frexp.c: Likewise.
2572         * lib/printf-parse.c: Likewise.
2573         * lib/vasnprintf.c: Likewise.
2574         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
2575         * m4/intl.m4: Likewise.
2576         * m4/isnanl.m4: Likewise.
2577         * m4/printf.m4: Likewise.
2578         * m4/printf-frexpl.m4: Likewise.
2579         * m4/vasnprintf.m4: Likewise.
2580         * modules/allocsa (Files): Remove m4/longdouble.m4.
2581         * modules/gettext (Files): Likewise.
2582         * modules/relocatable-prog-wrapper (Files): Likewise.
2583         * modules/vasnprintf (Files): Likewise.
2584         * modules/isnanl (Files): Likewise.
2585         (Include): Simplify.
2586         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
2587         (Include): Simplify.
2588         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
2589         (Include): Simplify.
2590         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
2591         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2592         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
2593         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2594         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2595         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2596         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
2597         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2598         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2599         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2600         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
2601         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2602         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
2603         * tests/test-isnanl.c: Likewise.
2604         * tests/test-snprintf-posix.h: Likewise.
2605         * tests/test-sprintf-posix.h: Likewise.
2606         * tests/test-vasnprintf-posix.c: Likewise.
2607         * tests/test-vasnprintf-posix2.c: Likewise.
2608         * tests/test-vasprintf-posix.c: Likewise.
2609
2610 2007-04-06  Bruno Haible  <bruno@clisp.org>
2611
2612         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
2613         * lib/math_.h [__DECC]: Include the overridden include file through
2614         #include_next, outside the double-inclusion guard.
2615         * lib/stdio_.h [__DECC]: Likewise.
2616         * lib/stdlib_.h [__DECC]: Likewise.
2617         * lib/string_.h [__DECC]: Likewise.
2618         * lib/time_.h [__DECC]: Likewise.
2619         * lib/wchar_.h [__DECC]: Likewise.
2620         * lib/wctype_.h [__DECC]: Likewise.
2621         * lib/inttypes_.h [__DECC]: Likewise.
2622         Reported by Albert Chin <china@thewrittenword.com> in
2623         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
2624
2625 2007-04-04  Eric Blake  <ebb9@byu.net>
2626
2627         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
2628         1.5.x.
2629
2630 2007-04-04  Bruno Haible  <bruno@clisp.org>
2631
2632         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
2633         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
2634
2635 2007-04-04  Bruno Haible  <bruno@clisp.org>
2636
2637         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
2638         results for "%010a" of Infinity and 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         * tests/test-fprintf-posix.h (test_function): Remove these tests.
2643         * tests/test-printf-posix.h (test_function): Likewise.
2644         * tests/test-fprintf-posix.out: Update.
2645         Needed for FreeBSD 6.1.
2646
2647 2007-04-04  Bruno Haible  <bruno@clisp.org>
2648
2649         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
2650         directly used by the gnulib modules nor by gnulib-tool.
2651
2652 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
2653
2654         * DEPENDENCIES: Give overall description of version dependency
2655         desirability.  Use more-typical names for apps.
2656         Add shell, coreutils, diffutils, grep, tar, gzip.
2657
2658 2007-04-04  Simon Josefsson  <simon@josefsson.org>
2659
2660         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
2661
2662 2007-04-04  Karl Berry  <karl@gnu.org>
2663
2664         * MODULES.html.sh (func_module): missing '.
2665
2666 2007-04-03  Bruno Haible  <bruno@clisp.org>
2667
2668         * modules/argmatch-tests (Makefile.am): New variable
2669         test_argmatch_LDADD.
2670         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
2671         * modules/array-list-tests (Makefile.am): New variable
2672         test_array_list_LDADD.
2673         * modules/array-oset-tests (Makefile.am): New variable
2674         test_array_oset_LDADD.
2675         * modules/avltree-list-tests (Makefile.am): New variable
2676         test_avltree_list_LDADD.
2677         * modules/avltree-oset-tests (Makefile.am): New variable
2678         test_avltree_oset_LDADD.
2679         * modules/avltreehash-list-tests (Makefile.am): New variable
2680         test_avltreehash_list_LDADD.
2681         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
2682         test_canonicalize_lgpl_LDADD.
2683         * modules/carray-list-tests (Makefile.am): New variable
2684         test_carray_list_LDADD.
2685         * modules/dirname-tests (Makefile.am): New variable
2686         test_dirname_LDADD.
2687         * modules/linked-list-tests (Makefile.am): New variable
2688         test_linked_list_LDADD.
2689         * modules/linkedhash-list-tests (Makefile.am): New variable
2690         test_linkedhash_list_LDADD.
2691         * modules/rbtree-list-tests (Makefile.am): New variable
2692         test_rbtree_list_LDADD.
2693         * modules/rbtree-oset-tests (Makefile.am): New variable
2694         test_rbtree_oset_LDADD.
2695         * modules/rbtreehash-list-tests (Makefile.am): New variable
2696         test_rbtreehash_list_LDADD.
2697         * modules/xvasprintf-tests (Makefile.am): New variable
2698         test_xvasprintf_LDADD.
2699         Reported by Eric Blake.
2700
2701 2007-04-03  Eric Blake  <ebb9@byu.net>
2702
2703         * DEPENDENCIES: Weaken m4 requirements.
2704
2705 2007-04-03  Bruno Haible  <bruno@clisp.org>
2706
2707         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
2708         * modules/isnanl-tests (configure.ac): Likewise.
2709
2710 2007-04-03  Ben Pfaff  <blp@gnu.org>
2711
2712         * modules/iconv_open: Add $(srcdir)/ to source directory
2713         references in Makefile fragments that call gperf, to fix VPATH
2714         builds.
2715
2716 2007-04-03  Bruno Haible  <bruno@clisp.org>
2717
2718         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
2719         * lib/ldexpl.c: Undo last change.
2720
2721 2007-04-03  Bruno Haible  <bruno@clisp.org>
2722
2723         * modules/printf-frexpl (Depends-on): Undo last change.
2724         (Files): Add m4/ldexpl.m4.
2725
2726 2007-04-03  Bruno Haible  <bruno@clisp.org>
2727
2728         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
2729         * modules/isnanl (Link): New section.
2730
2731         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
2732         * modules/frexp (Link): New section.
2733
2734         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
2735         * modules/frexpl (Link): New section.
2736
2737         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
2738         * modules/ldexpl (Link): New section.
2739
2740 2007-04-03  Bruno Haible  <bruno@clisp.org>
2741
2742         * modules/TEMPLATE-EXTENDED: New file.
2743         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
2744
2745 2007-04-03  Bruno Haible  <bruno@clisp.org>
2746
2747         * DEPENDENCIES: New file.
2748         Suggested by Simon Josefsson.
2749
2750 2007-04-03  Bruno Haible  <bruno@clisp.org>
2751
2752         * doc/gnulib.texi: Escape @.
2753
2754 2007-04-03  James Youngman  <jay@gnu.org>
2755         and Paul Eggert  <eggert@cs.ucla.edu>
2756
2757         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
2758         birthtime on all systems that have birthtime, not just those which
2759         use st_birthtimensec rather than st_birthtim.  Putting zero in
2760         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
2761         that the birth time is not available for files on an NFS mount.
2762
2763 2007-04-03  Simon Josefsson  <simon@josefsson.org>
2764
2765         * modules/memxor: Move back from crypto/, suggested by Bruno.
2766         * modules/crypto/hmac-sha1: Fix memxor dependency.
2767
2768         * modules/crypto/gc: Moved from ../.
2769
2770 2007-04-02  Eric Blake  <ebb9@byu.net>
2771
2772         * lib/ldexpl.c (includes): Avoid libm.
2773
2774         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
2775
2776 2007-04-02  Bruno Haible  <bruno@clisp.org>
2777
2778         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
2779         on IRIX.
2780
2781 2007-04-02  Bruno Haible  <bruno@clisp.org>
2782
2783         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
2784         x86 or x86_64 platforms running MacOS X.
2785         Reported by Ryan Schmidt <@ryandesign.com>.
2786
2787 2007-04-02  Bruno Haible  <bruno@clisp.org>
2788
2789         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
2790         i386.
2791
2792 2007-04-01  Simon Josefsson  <simon@josefsson.org>
2793
2794         * modules/crypto/arcfour: Moved from ../.
2795         * modules/crypto/arcfour-tests: Moved from ../.
2796         * modules/crypto/arctwo: Moved from ../.
2797         * modules/crypto/arctwo-tests: Moved from ../.
2798         * modules/crypto/des: Moved from ../.
2799         * modules/crypto/des-tests: Moved from ../.
2800         * modules/crypto/gc-arcfour: Moved from ../.
2801         * modules/crypto/gc-arcfour-tests: Moved from ../.
2802         * modules/crypto/gc-arctwo: Moved from ../.
2803         * modules/crypto/gc-arctwo-tests: Moved from ../.
2804         * modules/crypto/gc-des: Moved from ../.
2805         * modules/crypto/gc-des-tests: Moved from ../.
2806         * modules/crypto/gc-hmac-md5: Moved from ../.
2807         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
2808         * modules/crypto/gc-hmac-sha1: Moved from ../.
2809         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
2810         * modules/crypto/gc-md2: Moved from ../.
2811         * modules/crypto/gc-md2-tests: Moved from ../.
2812         * modules/crypto/gc-md4: Moved from ../.
2813         * modules/crypto/gc-md4-tests: Moved from ../.
2814         * modules/crypto/gc-md5: Moved from ../.
2815         * modules/crypto/gc-md5-tests: Moved from ../.
2816         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
2817         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
2818         * modules/crypto/gc-random: Moved from ../.
2819         * modules/crypto/gc-rijndael: Moved from ../.
2820         * modules/crypto/gc-rijndael-tests: Moved from ../.
2821         * modules/crypto/gc-sha1: Moved from ../.
2822         * modules/crypto/gc-sha1-tests: Moved from ../.
2823         * modules/crypto/gc-tests: Moved from ../.
2824         * modules/crypto/hmac-md5: Moved from ../.
2825         * modules/crypto/hmac-md5-tests: Moved from ../.
2826         * modules/crypto/hmac-sha1: Moved from ../.
2827         * modules/crypto/hmac-sha1-tests: Moved from ../.
2828         * modules/crypto/md2: Moved from ../.
2829         * modules/crypto/md2-tests: Moved from ../.
2830         * modules/crypto/md4: Moved from ../.
2831         * modules/crypto/md4-tests: Moved from ../.
2832         * modules/crypto/md5: Moved from ../.
2833         * modules/crypto/md5-tests: Moved from ../.
2834         * modules/crypto/memxor: Moved from ../.
2835         * modules/crypto/rijndael: Moved from ../.
2836         * modules/crypto/rijndael-tests: Moved from ../.
2837         * modules/crypto/sha1: Moved from ../.
2838
2839 2007-03-30  James Youngman  <jay@gnu.org>
2840
2841         * tests/test-stat-time.c (prepare_test): use chmod() rather than
2842         rename() to change the ctime of a file (because ctime is unaffected
2843         by rename on jfs2 on AIX 5.1).
2844         (main): Start by doing cleanup, in case a previous run failed leaving
2845         test files behind.
2846
2847 2007-03-31  Bruno Haible  <bruno@clisp.org>
2848
2849         Support old proprietary implementations of iconv.
2850         * modules/iconv_open: New file.
2851         * lib/iconv_.h: New file.
2852         * m4/iconv_h.m4: New file.
2853         * lib/iconv_open.c: New file.
2854         * lib/iconv_open-aix.gperf: New file.
2855         * lib/iconv_open-hpux.gperf: New file.
2856         * lib/iconv_open-irix.gperf: New file.
2857         * lib/iconv_open-osf.gperf: New file.
2858         * m4/iconv_open.m4: New file.
2859         * modules/linebreak (Depends-on): Add iconv_open.
2860         * modules/striconv (Depends-on): Likewise.
2861         * modules/striconveh (Depends-on): Likewise.
2862         * modules/unicodeio (Depends-on): Likewise.
2863         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
2864         (iconv_t)(-1).
2865         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
2866         conversion if cd is (iconv_t)(-1).
2867         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
2868         is not possible.
2869
2870 2007-03-31  Bruno Haible  <bruno@clisp.org>
2871
2872         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2873         work on Solaris either. Protect also second use of "autodetect_jp".
2874
2875 2007-03-31  Bruno Haible  <bruno@clisp.org>
2876
2877         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
2878         the function is not present.
2879
2880 2007-03-31  Bruno Haible  <bruno@clisp.org>
2881
2882         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
2883         the function is not present.
2884
2885 2007-03-31  Bruno Haible  <bruno@clisp.org>
2886
2887         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
2888         a bug in HP-UX iconv_open().
2889
2890 2007-03-31  Bruno Haible  <bruno@clisp.org>
2891
2892         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
2893         (Mathematics <math.h>): New section, add fpieee.
2894         (Input/output <stdio.h>): Add fseterr.
2895         (Mathematics <math.h>): New section, add printf-frexp.
2896         (Container data structures): Add sublist.
2897         (Core language properties): Add fpucw, inline.
2898         (Functions for greatest-width integer types <inttypes.h>): Add
2899         imaxabs, imaxdiv, inttypes.
2900         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
2901         isnanl-nolibm, ldexp.
2902         (Mathematics <math.h>): New section, add printf-frexpl.
2903         (Support for systems lacking POSIX:2001): Add fprintf-posix,
2904         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
2905         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
2906         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
2907         (Unicode string functions): Add unistr/u*-mbtoucr.
2908         (Java): Add javacomp-script, javaexec-script.
2909         (C#): Add csharpcomp-script, csharpexec-script.
2910         (Support for building libraries and executables): Add havelib,
2911         relocatable-*.
2912         (Support for maintaining and releasing projects): Renamed from
2913         'Support for maintaining and release projects'. Add announce-gen.
2914
2915 2007-03-31  Bruno Haible  <bruno@clisp.org>
2916
2917         * README: Talk primarily about git.
2918         (git and CVS): Renamed from CVS.
2919         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
2920         gnulib is available through git.
2921         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
2922
2923 2007-03-30  Bruno Haible  <bruno@clisp.org>
2924
2925         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
2926         * lib/poll_.h: Likewise.
2927         * lib/stat_.h: Likewise.
2928         * lib/sys_time_.h: Likewise.
2929         * lib/sysexit_.h: Likewise.
2930         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
2931         * lib/stdbool_.h: Likewise.
2932         * lib/byteswap_.h: Add double-inclusion guard.
2933
2934 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
2935
2936         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
2937
2938 2007-03-30  Karl Berry  <karl@gnu.org>
2939
2940         * config/srclist-update: double space after USA in the license
2941         substitution, since that's how it's usually (?) written.
2942
2943 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
2944
2945         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
2946         reported by Bruno Haible.
2947
2948 2007-03-29  Bruno Haible  <bruno@clisp.org>
2949
2950         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
2951         a bug in AIX iconv().
2952
2953 2007-03-29  Bruno Haible  <bruno@clisp.org>
2954
2955         * modules/ldexpl-tests: New file.
2956         * tests/test-ldexpl.c: New file.
2957
2958 2007-03-29  Bruno Haible  <bruno@clisp.org>
2959
2960         * lib/ldexpl.c: Include fpucw.h.
2961         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
2962         multiplication.
2963         * modules/ldexpl (Depends-on): Add fpucw.
2964
2965 2007-03-29  Bruno Haible  <bruno@clisp.org>
2966
2967         * modules/ldexpl: New file.
2968         * m4/ldexpl.m4: New file.
2969         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
2970         set.
2971         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
2972         REPLACE_LDEXPL.
2973         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
2974         REPLACE_LDEXPL.
2975         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2976         gl_FUNC_LDEXPL_WORKS.
2977         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
2978         * modules/mathl (Files): Remove lib/ldexpl.c.
2979         (Depends-on): Add ldexpl.
2980
2981 2007-03-29  Bruno Haible  <bruno@clisp.org>
2982
2983         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
2984
2985 2007-03-29  Bruno Haible  <bruno@clisp.org>
2986
2987         * tests/test-striconveh.c (main): Don't assume that a direct conversion
2988         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
2989         and possibly also HP-UX.
2990         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2991         work on AIX, IRIX, HP-UX, OSF/1.
2992         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
2993         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
2994         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
2995         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
2996         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
2997         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
2998
2999 2007-03-29  Bruno Haible  <bruno@clisp.org>
3000
3001         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
3002
3003 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3004
3005         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
3006         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
3007
3008 2007-03-29  Eric Blake  <ebb9@byu.net>
3009
3010         * lib/acl-internal.h: Remove redundant include.
3011         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
3012         Cygwin when a file is locked.
3013
3014 2007-03-29  Bruno Haible  <bruno@clisp.org>
3015
3016         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
3017         file.
3018         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
3019
3020 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3021
3022         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
3023         try to remove a parent directory if the child couldn't be removed
3024         (except for the first rmdir, which could fail because the child
3025         doesn't exist).  Problem reported by Jeff Blaine in
3026         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
3027
3028 2007-03-28  Bruno Haible  <bruno@clisp.org>
3029
3030         * lib/striconveh.c (utf8conv_carefully): New function.
3031         (mem_cd_iconveh_internal): Invoke it.
3032
3033 2007-03-28  Bruno Haible  <bruno@clisp.org>
3034
3035         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
3036         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
3037         input.
3038         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
3039         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
3040         unistr/u8-uctomb.
3041
3042 2007-03-28  Bruno Haible  <bruno@clisp.org>
3043
3044         * modules/unistr/u8-mbtoucr: New file.
3045         * lib/unistr/u8-mbtoucr.c: New file.
3046         * modules/unistr/u16-mbtoucr: New file.
3047         * lib/unistr/u16-mbtoucr.c: New file.
3048         * modules/unistr/u16-mbtoucr: New file.
3049         * lib/unistr/u16-mbtoucr.c: New file.
3050         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
3051
3052 2007-03-27  Simon Josefsson  <simon@josefsson.org>
3053             Bruno Haible  <bruno@clisp.org>
3054
3055         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
3056         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
3057         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
3058
3059         * m4/stdio_h.m4: Add stubs for vasprintf too.
3060
3061         * modules/stdio: Support vasprintf in sed command.
3062
3063         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3064         vasprintf.h.  Add stdio module indicator.
3065
3066         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3067         vasprintf.h.
3068
3069         * lib/vasprintf.h: File removed.
3070
3071         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3072         * lib/vasprintf.c: Ditto.
3073         * lib/xvasprintf.c: Ditto.
3074         * tests/test-vasprintf-posix.c: Ditto.
3075         * tests/test-vasprintf.c: Ditto.
3076
3077 2007-03-27  Bruno Haible  <bruno@clisp.org>
3078
3079         Make vasnprintf multithread-safe.
3080         * lib/vasnprintf.c (decimal_point_char): New function.
3081         (VASNPRINTF): Use it.
3082         Suggested by Simon Josefsson.
3083
3084 2007-03-27  Eric Blake  <ebb9@byu.net>
3085
3086         Support sub-second birthtime on cygwin.
3087         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3088         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3089         (get_stat_birthtime): Also work with st_birthtim.
3090
3091 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3092
3093         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3094         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3095         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3096         (get_stat_birthtime_ns): Simplify compile-time tests.
3097         (get_stat_birthtime): Change the API to look like
3098         get_stat_mtime etc., except return a negative tv_nsec on error.
3099         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3100         Don't check for "spare" fields.
3101         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3102         or for struct stat.st_birthtime, as these tests aren't used.
3103         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3104
3105 2007-03-27  Bruno Haible  <bruno@clisp.org>
3106
3107         * lib/stat-time.h: Include <sys/stat.h>.
3108
3109 2007-03-27  James Youngman  <jay@gnu.org>
3110
3111         * lib/stat-time.h (get_stat_birthtime): New function for
3112           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3113         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3114           and its variants.
3115         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3116         * modules/stat-time-test: New file.
3117         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3118
3119 2007-03-26  Bruno Haible  <bruno@clisp.org>
3120
3121         Better support of signalling NaNs.
3122         * lib/atanl.c: Include isnanl.h.
3123         (atanl): Perform test for NaN at the beginning of the function and
3124         through a call to isnanl.
3125         * lib/cosl.c: Include isnanl.h.
3126         (cosl): Perform test for NaN at the beginning of the function and
3127         through a call to isnanl.
3128         * lib/ldexpl.c: Include isnanl.h.
3129         (ldexpl): Perform test for NaN through a call to isnanl.
3130         * lib/logl.c: Include isnanl.h.
3131         (logl): Perform test for NaN at the beginning of the function and
3132         through a call to isnanl.
3133         * lib/sinl.c: Include isnanl.h.
3134         (sinl): Perform test for NaN at the beginning of the function and
3135         through a call to isnanl.
3136         * lib/sqrtl.c: Include isnanl.h.
3137         (sqrtl): Perform test for NaN at the beginning of the function and
3138         through a call to isnanl.
3139         * lib/tanl.c: Include isnanl.h.
3140         (tanl): Perform test for NaN at the beginning of the function and
3141         through a call to isnanl.
3142         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3143         * modules/mathl (Depends-on): Add isnanl.
3144
3145 2007-03-26  Eric Blake  <ebb9@byu.net>
3146
3147         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3148         regression in logic sense of previous patch.
3149
3150 2007-03-26  Bruno Haible  <bruno@clisp.org>
3151
3152         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3153         unportable shell command "if ! ...".
3154         Reported by Ralf Wildenhues.
3155
3156 2007-03-25  Bruno Haible  <bruno@clisp.org>
3157
3158         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3159         <sysexits.h> file, and only add EX_CONFIG.
3160         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3161         absolute file name and whether it is sufficient. Substitute also
3162         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3163         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3164         ABSOLUTE_SYSEXITS_H into sysexits.h.
3165
3166 2007-03-25  Bruno Haible  <bruno@clisp.org>
3167
3168         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3169         hints is NULL.
3170
3171 2007-03-25  Bruno Haible  <bruno@clisp.org>
3172
3173         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3174         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3175
3176 2007-03-25  Bruno Haible  <bruno@clisp.org>
3177
3178         * lib/vasnprintf.c: Include langinfo.h.
3179         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3180         multithread-safe.
3181         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3182         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3183         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3184         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3185         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3186         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3187         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3188         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3189         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3190         Reported by Simon Josefsson.
3191
3192 2007-03-25  Bruno Haible  <bruno@clisp.org>
3193
3194         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3195         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3196         * modules/vasnprintf (Depends-on): Add stdint.
3197
3198 2007-03-25  Bruno Haible  <bruno@clisp.org>
3199
3200         * modules/fpieee: New file.
3201         * m4/fpieee.m4: New file.
3202         * modules/isnan-nolibm (Depends-on): Add fpieee.
3203         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3204         * modules/isnanl (Depends-on): Add fpieee.
3205
3206 2007-03-25  Bruno Haible  <bruno@clisp.org>
3207
3208         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3209
3210 2007-03-25  Bruno Haible  <bruno@clisp.org>
3211
3212         Avoid test failures on IRIX 6.5.
3213         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3214         (main): Use it.
3215         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3216         macros.
3217         (main): Use them.
3218
3219 2007-03-25  Bruno Haible  <bruno@clisp.org>
3220
3221         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3222         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3223         exists but doesn't work.
3224         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3225         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3226         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3227         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3228
3229 2007-03-25  Bruno Haible  <bruno@clisp.org>
3230
3231         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3232         returns inf. Needed on IRIX 6.5.
3233
3234 2007-03-25  Bruno Haible  <bruno@clisp.org>
3235
3236         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3237         (main): Use isnanl instead of x != x idiom.
3238         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3239
3240         * tests/test-frexp.c: Include isnan.h.
3241         (main): Use isnan instead of x != x idiom.
3242         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3243
3244 2007-03-25  Bruno Haible  <bruno@clisp.org>
3245
3246         * tests/test-frexp.c (NaN): New function/macro.
3247         (main): Use it instead of 0.0 / 0.0.
3248         * tests/test-isnan.c (NaN): New function/macro.
3249         (main): Use it instead of 0.0 / 0.0.
3250         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3251         (test_function): Use it instead of 0.0 / 0.0.
3252         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3253         (test_function): Use it instead of 0.0 / 0.0.
3254         * tests/test-snprintf-posix.h (NaN): New function/macro.
3255         (test_function): Use it instead of 0.0 / 0.0.
3256         * tests/test-sprintf-posix.h (NaN): New function/macro.
3257         (test_function): Use it instead of 0.0 / 0.0.
3258         * tests/test-fprintf-posix.h (NaN): New function/macro.
3259         (test_function): Use it instead of 0.0 / 0.0.
3260         * tests/test-printf-posix.h (NaN): New function/macro.
3261         (test_function): Use it instead of 0.0 / 0.0.
3262
3263         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3264
3265 2007-03-25  Bruno Haible  <bruno@clisp.org>
3266
3267         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3268
3269 2007-03-25  Bruno Haible  <bruno@clisp.org>
3270
3271         * lib/regexec.c (merge_state_with_log): Make static.
3272
3273 2007-03-25  Bruno Haible  <bruno@clisp.org>
3274
3275         * lib/trigl.c (kernel_rem_pio2): Make static.
3276
3277 2007-03-25  Bruno Haible  <bruno@clisp.org>
3278
3279         * lib/sincosl.c (sincosl_table): Make static.
3280
3281 2007-03-25  Bruno Haible  <bruno@clisp.org>
3282
3283         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3284         if the compiler does not support C99.
3285
3286 2007-03-25  Bruno Haible  <bruno@clisp.org>
3287
3288         * modules/time (Makefile.am): Ensure all rule action lines start with a
3289         tab.
3290
3291 2007-03-24  Bruno Haible  <bruno@clisp.org>
3292
3293         * modules/tsearch-tests: New file.
3294         * tests/test-tsearch.sh: New file.
3295         * tests/test-tsearch.c: New file, mostly copied from glibc.
3296
3297         * modules/search-tests: New file.
3298         * tests/test-search.c: New file.
3299
3300         * modules/search: New file.
3301         * lib/search_.h: New file, incorporating lib/tsearch.h.
3302         * m4/search_h.m4: New file.
3303         * lib/tsearch.h: Remove file.
3304         * lib/tsearch.c: Include search.h instead of tsearch.h.
3305         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3306         HAVE_TSEARCH.
3307         * modules/tsearch (Files): Remove lib/tsearch.h.
3308         (Depends-on): Add search.
3309         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3310         (Include): Change tsearch.h into search.h.
3311
3312 2007-03-24  Bruno Haible  <bruno@clisp.org>
3313
3314         * modules/fpucw: New file.
3315         * lib/fpucw.h: New file.
3316         * lib/frexp.c: Include fpucw.h.
3317         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3318         (FUNC): Use them.
3319         * lib/printf-frexp.c: Include fpucw.h.
3320         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3321         (FUNC): Use them.
3322         * lib/vasnprintf.c: Include fpucw.h.
3323         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3324         'long double' calculations.
3325         * tests/test-frexpl.c: Include fpucw.h.
3326         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3327         * tests/test-printf-frexpl.c: Include fpucw.h.
3328         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3329         * modules/frexpl (Depends-on): Add fpucw.
3330         * modules/printf-frexpl (Depends-on): Likewise.
3331         * modules/fprintf-posix (Depends-on): Likewise.
3332         * modules/snprintf-posix (Depends-on): Likewise.
3333         * modules/sprintf-posix (Depends-on): Likewise.
3334         * modules/vasnprintf-posix (Depends-on): Likewise.
3335         * modules/vasprintf-posix (Depends-on): Likewise.
3336         * modules/vfprintf-posix (Depends-on): Likewise.
3337         * modules/vsnprintf-posix (Depends-on): Likewise.
3338         * modules/vsprintf-posix (Depends-on): Likewise.
3339         * modules/frexpl-tests (Depends-on): Likewise.
3340         * modules/printf-frexpl-tests (Depends-on): Likewise.
3341
3342 2007-03-24  Bruno Haible  <bruno@clisp.org>
3343
3344         * lib/float+.h: New file.
3345         * lib/isnan.c: Include float+.h.
3346         (SIZE): New macro.
3347         (FUNC): Compare only SIZE bytes of the value.
3348         * lib/vasnprintf.c: Include float+.h.
3349         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
3350         SIZEOF_LDBL or SIZEOF_DBL bytes.
3351         * modules/isnan-nolibm (Files): Add lib/float+.h.
3352         * modules/isnanl-nolibm (Files): Add lib/float+.h.
3353         * modules/isnanl (Files): Add lib/float+.h.
3354         * modules/vasnprintf (Files): Add lib/float+.h.
3355
3356 2007-03-24  Bruno Haible  <bruno@clisp.org>
3357
3358         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
3359         include isnanl-nolibm.h.
3360
3361 2007-03-24  Bruno Haible  <bruno@clisp.org>
3362
3363         * tests/test-read-file.c (main): Don't produce spurious output for
3364         expected situations. Make the test fail if it encountered unexpected
3365         results.
3366
3367 2007-03-24  Bruno Haible  <bruno@clisp.org>
3368
3369         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
3370         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
3371
3372 2007-03-24  Bruno Haible  <bruno@clisp.org>
3373
3374         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
3375
3376 2007-03-24  Bruno Haible  <bruno@clisp.org>
3377
3378         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
3379         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
3380
3381         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
3382         * modules/utf8-ucs4: Turn into a symbolic link to module
3383         unistr/u8-mbtouc.
3384
3385         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
3386         utf8-ucs4-unsafe.
3387         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
3388         unistr/u8-mbtouc-unsafe.
3389
3390         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
3391         * modules/utf16-ucs4: Turn into a symbolic link to module
3392         unistr/u16-mbtouc.
3393
3394         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
3395         utf16-ucs4-unsafe.
3396         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
3397         unistr/u16-mbtouc-unsafe.
3398
3399         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
3400         * modules/ucs4-utf8: Turn into a symbolic link to module
3401         unistr/u8-ubtomb.
3402
3403         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
3404         * modules/ucs4-utf16: Turn into a symbolic link to module
3405         unistr/u16-ubtomb.
3406
3407 2007-03-24  Bruno Haible  <bruno@clisp.org>
3408
3409         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
3410         Enable the function only if HAVE_INLINE.
3411         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
3412         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3413         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
3414         Enable the function only if HAVE_INLINE.
3415         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
3416         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3417         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
3418         Enable the function only if HAVE_INLINE.
3419         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
3420         Enable the function only if HAVE_INLINE.
3421         * modules/utf8-ucs4: Update.
3422         * modules/utf8-ucs4-unsafe: Update.
3423         * modules/utf16-ucs4: Update.
3424         * modules/utf16-ucs4-unsafe: Update.
3425         * modules/ucs4-utf8: Update.
3426         * modules/ucs4-utf16: Update.
3427
3428 2007-03-24  Bruno Haible  <bruno@clisp.org>
3429
3430         * lib/utf8-ucs4.h: Remove file.
3431         * lib/utf8-ucs4-unsafe.h: Remove file.
3432         * lib/utf16-ucs4.h: Remove file.
3433         * lib/utf16-ucs4-unsafe.h: Remove file.
3434         * lib/ucs4-utf8.h: Remove file.
3435         * lib/ucs4-utf16.h: Remove file.
3436         * lib/unistr.h: Include their previous contents.
3437         * m4/utf-ucs4.m4: Remove file.
3438         * m4/ucs4-utf.m4: Remove file.
3439         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
3440         (Depends-on): Add unistr/base.
3441         (configure.ac): Remove gl_UTF_UCS4.
3442         (Makefile.am): Update.
3443         (Include): Change to unistr.h.
3444         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
3445         (Depends-on): Add unistr/base.
3446         (configure.ac): Remove gl_UTF_UCS4.
3447         (Makefile.am): Update.
3448         (Include): Change to unistr.h.
3449         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
3450         (Depends-on): Add unistr/base.
3451         (configure.ac): Remove gl_UTF_UCS4.
3452         (Makefile.am): Update.
3453         (Include): Change to unistr.h.
3454         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
3455         (Depends-on): Add unistr/base.
3456         (configure.ac): Remove gl_UTF_UCS4.
3457         (Makefile.am): Update.
3458         (Include): Change to unistr.h.
3459         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
3460         (Depends-on): Add unistr/base.
3461         (configure.ac): Remove gl_UCS4_UTF.
3462         (Makefile.am): Update.
3463         (Include): Change to unistr.h.
3464         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
3465         (Depends-on): Add unistr/base.
3466         (configure.ac): Remove gl_UCS4_UTF.
3467         (Makefile.am): Update.
3468         (Include): Change to unistr.h.
3469         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
3470         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
3471         utf8-ucs4-unsafe.h.
3472         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
3473         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
3474         utf16-ucs4-unsafe.h.
3475         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
3476         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
3477         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
3478         * lib/unistr/u8-strchr.c: Likewise.
3479         * lib/unistr/u8-strrchr.c: Likewise.
3480         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
3481         * lib/unistr/u16-strchr.c: Likewise.
3482         * lib/unistr/u16-strrchr.c: Likewise.
3483         * lib/striconveh.c: Update.
3484         * lib/linebreak.c: Update.
3485
3486 2007-03-24  Bruno Haible  <bruno@clisp.org>
3487
3488         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
3489         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
3490
3491 2007-03-22  Bruno Haible  <bruno@clisp.org>
3492
3493         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
3494
3495 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
3496
3497         * MODULES.html.sh (File system functions): New module write-any-file.
3498         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
3499         * m4/write-any-file.m4: New files.
3500
3501 2007-03-23  Eric Blake  <ebb9@byu.net>
3502
3503         * gnulib-tool: Rearrange space-tab sequences, since some editors
3504         like to eat them.
3505
3506 2007-03-23  Eric Blake  <ebb9@byu.net>
3507
3508         * lib/version-etc.c (version_etc_va): Update license wording to
3509         be more concise.  Recommended by Richard Stallman.
3510
3511 2007-03-22  Bruno Haible  <bruno@clisp.org>
3512
3513         * lib/poll.c (MSG_PEEK): New fallback definition.
3514
3515 2007-03-22  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
3518         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
3519         (main): Update.
3520         Fixes a compilation error on BeOS.
3521
3522 2007-03-22  Bruno Haible  <bruno@clisp.org>
3523
3524         * modules/frexpl-tests: New file.
3525         * tests/test-frexpl.c: New file.
3526
3527         * modules/frexpl: New file.
3528         * m4/frexpl.m4: New file.
3529         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
3530         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
3531         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
3532         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
3533         (Depends-on): Add frexpl. Remove isnanl-nolibm.
3534         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
3535
3536 2007-03-22  Bruno Haible  <bruno@clisp.org>
3537
3538         * lib/frexpl.c: Share code with lib/frexp.c.
3539         * modules/mathl (Files): Add lib/frexp.c.
3540         (Depends-on): Add isnanl-nolibm.
3541
3542 2007-03-22  Bruno Haible  <bruno@clisp.org>
3543
3544         * modules/printf-frexp (Files): Add m4/frexp.m4.
3545         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
3546         only if the found frexp function actually works.
3547
3548 2007-03-22  Bruno Haible  <bruno@clisp.org>
3549
3550         * lib/frexp.c: Remove older implementation that uses divisions.
3551
3552 2007-03-21  Bruno Haible  <bruno@clisp.org>
3553
3554         * modules/frexp-tests: New file.
3555         * tests/test-frexp.c: New file.
3556
3557         * modules/frexp: New file.
3558         * lib/frexp.c: New file.
3559         * m4/frexp.m4: New file.
3560         * lib/math_.h (frexp): New declaration.
3561         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
3562         REPLACE_FREXP.
3563         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
3564
3565 2007-03-21  Bruno Haible  <bruno@clisp.org>
3566
3567         * modules/isnanl-tests: New file.
3568         * tests/test-isnanl.c: New file.
3569
3570         * modules/isnanl: New file.
3571         * lib/isnanl.h: New file.
3572         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
3573         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
3574         gl_FUNC_ISNANL_WORKS.
3575         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
3576         New macros.
3577
3578 2007-03-21  Bruno Haible  <bruno@clisp.org>
3579
3580         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
3581         lib/isnanl.h.
3582         (Include): Update.
3583         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
3584         * lib/vasnprintf.c: Update.
3585         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
3586         tests/test-isnanl.h, remove tests/test-isnanl.c.
3587         (Makefile.am): Update.
3588         * tests/test-isnanl-nolibm.c: New file.
3589         * tests/test-isnanl.h: New file.
3590         * tests/test-isnanl.c: Remove file.
3591
3592 2007-03-21  Jim Meyering  <jim@meyering.net>
3593
3594         When trying to open ".", treat ESTALE like EACCES.
3595         * lib/savewd.c (savewd_save): Resort to forking not just upon
3596         failure with EACCES, but also when errno is ESTALE.
3597
3598 2007-03-20  Bruno Haible  <bruno@clisp.org>
3599
3600         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
3601         Needed on AIX 5.1. Reported by Matthew Woehlke.
3602
3603 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3604
3605         Suggestions by Bruno Haible:
3606         * lib/acl-internal.h: Include "gettext.h" rather than rolling
3607         our own.
3608         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
3609         * modules/acl (Depends-on): Add gettext.
3610
3611 2007-03-19  Bruno Haible  <bruno@clisp.org>
3612
3613         * modules/iconvme: Remove file.
3614         * lib/iconvme.h: Remove file.
3615         * lib/iconvme.c: Remove file.
3616         * m4/iconvme.m4: Remove file.
3617
3618 2007-03-19  Bruno Haible  <bruno@clisp.org>
3619
3620         * doc/relocatable-maint.texi: Break long shell script line.
3621         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3622
3623 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3624
3625         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
3626         handle file_has_acl.
3627         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
3628         * lib/acl.c: Move header inclusions and related macro defns into
3629         lib/acl-internal.h.
3630         (S_ISLNK): Remove defn, since that's now done for us.
3631         (file_has_acl): Move to lib/file-has-acl.c.
3632         Call acl_trivial if available.  This is the crucial part of the fix.
3633         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
3634         shared within the library.  Rewrite a bit, partly to make it compatible
3635         with the GNU coding style.
3636         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
3637         Remove unnecessary double-quotes.
3638         Don't test for acl_to_text; the build will catch that.
3639         Replace acl_entries if it doesn't exist and it is needed.
3640         Check for -lsec and acl_trivial (as used on Solaris 10).
3641         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
3642         lib/file-has-acl.c.
3643         (Depends-on): Add sys_stat, for S_ISLNK.
3644
3645 2007-03-19  Ben Pfaff  <blp@gnu.org>
3646
3647         * doc/gnulib.texi: Fix typos.
3648         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3649
3650 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3651
3652         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
3653         If size is zero here, buf must be zero.
3654
3655 2007-03-19  Simon Josefsson  <simon@josefsson.org>
3656
3657         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
3658         <bruno@clisp.org>.
3659
3660 2007-03-18  Bruno Haible  <bruno@clisp.org>
3661
3662         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
3663         Suggested by Eric Blake.
3664
3665 2007-03-18  Ben Pfaff  <blp@gnu.org>
3666
3667         * doc/relocatable.texi: Recommend using as prefix a directory
3668         that does not exist and will never be created.  Based on
3669         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
3670         and others.
3671
3672 2007-03-17  Bruno Haible  <bruno@clisp.org>
3673
3674         * lib/fchownat.c: Include lchown.h.
3675
3676 2007-03-17  Bruno Haible  <bruno@clisp.org>
3677
3678         Fix endless loop when the given allocated size was > INT_MAX.
3679         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
3680         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
3681         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
3682         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
3683         * lib/sprintf.c (sprintf): Likewise.
3684
3685 2007-03-17  Bruno Haible  <bruno@clisp.org>
3686
3687         * tests/test-argp-2.sh (func_compare): Output a context diff.
3688
3689 2007-03-17  Bruno Haible  <bruno@clisp.org>
3690
3691         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
3692         locale's decimal-point character.
3693
3694 2007-03-17  Bruno Haible  <bruno@clisp.org>
3695
3696         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
3697         before comparing it. Needed because on some platforms (e.g. x86) a
3698         'long double' occupies less bytes than sizeof (long double).
3699
3700 2007-03-17  Bruno Haible  <bruno@clisp.org>
3701
3702         * tests/test-crc.c (main): Make printf statements 64-bit clean.
3703         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
3704         * tests/test-getaddrinfo.c (simple): Likewise.
3705         * tests/test-read-file.c (main): Likewise.
3706
3707 2007-03-17  Bruno Haible  <bruno@clisp.org>
3708
3709         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
3710
3711 2007-03-17  Bruno Haible  <bruno@clisp.org>
3712
3713         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
3714         unused variable.
3715
3716 2007-03-17  Bruno Haible  <bruno@clisp.org>
3717
3718         * tests/test-c-strcasecmp.c: Include c-strcase.h.
3719         * tests/test-c-strncasecmp.c: Likewise.
3720
3721 2007-03-17  Bruno Haible  <bruno@clisp.org>
3722
3723         * modules/stdlib (Depends-on): Add unistd.
3724         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
3725         Needed for MacOS X 10.3.
3726
3727 2007-03-17  Bruno Haible  <bruno@clisp.org>
3728
3729         * lib/unistr/u-strdup.h: Include <stdlib.h>.
3730
3731 2007-03-17  Bruno Haible  <bruno@clisp.org>
3732
3733         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
3734
3735 2007-03-17  Bruno Haible  <bruno@clisp.org>
3736
3737         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
3738         to reflect files copied from gnulib (with or without modifications).
3739         Suggested by Jim Meyering.
3740
3741 2007-03-17  Eric Blake  <ebb9@byu.net>
3742
3743         * NEWS: Document stdlib change from 2007-02-18.
3744
3745 2007-03-17  Jim Meyering  <jim@meyering.net>
3746
3747         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
3748         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
3749         someone uses a name containing shell meta-characters.
3750         Reported by Alfred M. Szmidt.
3751
3752         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
3753
3754 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3755
3756         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
3757         and copy gettext configuration files only if configure.ac contains
3758         a use of AM_GNU_GETTEXT_VERSION.
3759
3760 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3761
3762         * build-aux/bootstrap (gnulib_name): New variable.
3763         (gnulib_tool_options): Use it.
3764
3765 2007-03-13  Simon Josefsson  <simon@josefsson.org>
3766
3767         * tests/test-des.c: Use new namespace.
3768
3769 2007-03-15  Bruno Haible  <bruno@clisp.org>
3770
3771         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
3772         Reported by James Youngman <jay@gnu.org>.
3773
3774 2007-03-15  Bruno Haible  <bruno@clisp.org>
3775
3776         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
3777         declared prototype. Needed with cc on OSF/1 5.1.
3778
3779 2007-03-15  Bruno Haible  <bruno@clisp.org>
3780
3781         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
3782         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
3783         (struct gl_list_implementation): Add dispose_fn argument to the
3784         'create_empty', 'create' methods.
3785         (struct gl_list_impl_base): Add field 'dispose_fn'.
3786         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
3787         argument.
3788         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
3789         dispose_fn argument.
3790         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
3791         dispose_fn on the dropped values.
3792         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
3793         dispose_fn argument.
3794         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
3795         dropped values.
3796         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
3797         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3798         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
3799         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3800         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
3801         argument.
3802         (gl_tree_list_free): Call dispose_fn on the dropped values.
3803         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
3804         the dropped values.
3805         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3806         Add dispose_fn argument.
3807         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
3808         Call dispose_fn on the dropped values.
3809         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
3810         Add dispose_fn argument.
3811         (gl_sublist_create): Initialize the 'dispose_fn' field.
3812         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
3813         * tests/test-array_list.c (main): Update.
3814         * tests/test-carray_list.c (main): Update.
3815         * tests/test-avltree_list.c (main): Update.
3816         * tests/test-rbtree_list.c (main): Update.
3817         * tests/test-avltreehash_list.c (main): Update.
3818         * tests/test-rbtreehash_list.c (main): Update.
3819         * tests/test-linked_list.c (main): Update.
3820         * tests/test-linkedhash_list.c (main): Update.
3821         * tests/test-array_oset.c (main): Update.
3822
3823 2007-03-15  Bruno Haible  <bruno@clisp.org>
3824
3825         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
3826         (gl_oset_create_empty): Add dispose_fn argument.
3827         (struct gl_oset_implementation): Add dispose_fn argument to
3828         'create_empty' method.
3829         (struct gl_oset_impl_base): Add dispose_fn field.
3830         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
3831         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
3832         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
3833         values.
3834         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
3835         (gl_tree_oset_free): Call dispose_fn on the dropped values.
3836         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
3837         dropped value.
3838         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
3839         dropped value.
3840         * tests/test-array_oset.c (main): Update.
3841         * tests/test-avltree_oset.c (main): Update.
3842         * tests/test-rbtree_oset.c (main): Update.
3843         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
3844
3845 2007-03-13  Bruno Haible  <bruno@clisp.org>
3846
3847         * tests/test-stdbool.c (i): Update after last patch.
3848
3849 2007-03-12  Bruno Haible  <bruno@clisp.org>
3850
3851         * lib/quotearg.c: Include <wctype.h> early, before the definition of
3852         the iswprint macro. Needed on Solaris 2.5.1.
3853
3854 2007-03-12  Bruno Haible  <bruno@clisp.org>
3855
3856         * tests/test-printf-frexp.c (main): Declare x as volatile.
3857
3858 2007-03-12  Simon Josefsson  <simon@josefsson.org>
3859
3860         * doc/gnulib.texi (Build robot for gnulib): New section.
3861
3862 2007-03-12  Jim Meyering  <jim@meyering.net>
3863
3864         * build-aux/bootstrap: New file.
3865         * build-aux/bootstrap.conf: New file, from coreutils.
3866
3867 2007-03-11  Bruno Haible  <bruno@clisp.org>
3868
3869         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
3870
3871 2007-03-12  Simon Josefsson  <simon@josefsson.org>
3872
3873         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
3874         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
3875         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
3876
3877 2007-03-11  Bruno Haible  <bruno@clisp.org>
3878
3879         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
3880         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
3881
3882 2007-03-11  Bruno Haible  <bruno@clisp.org>
3883
3884         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
3885         formula. Needed for SunPRO C 5.0.
3886
3887 2007-03-11  Bruno Haible  <bruno@clisp.org>
3888
3889         * modules/long-options (Depends-on): Add getopt.
3890
3891 2007-03-11  Bruno Haible  <bruno@clisp.org>
3892
3893         * modules/modechange (Depends-on): Add stdbool.
3894
3895 2007-03-11  Bruno Haible  <bruno@clisp.org>
3896
3897         * modules/i-ring (Depends-on): Add stdbool.
3898
3899 2007-03-11  Bruno Haible  <bruno@clisp.org>
3900
3901         * modules/gc-des (Depends-on): Add stdbool.
3902
3903 2007-03-11  Bruno Haible  <bruno@clisp.org>
3904
3905         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
3906
3907 2007-03-11  Bruno Haible  <bruno@clisp.org>
3908
3909         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
3910
3911 2007-03-11  Bruno Haible  <bruno@clisp.org>
3912
3913         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
3914
3915 2007-03-11  Bruno Haible  <bruno@clisp.org>
3916
3917         * lib/vasnprintf.c (sprintf): Undefine.
3918
3919 2007-03-11  Bruno Haible  <bruno@clisp.org>
3920
3921         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
3922         initializers in SunPRO C and Compaq C compilers.
3923
3924 2007-03-11  Bruno Haible  <bruno@clisp.org>
3925
3926         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
3927         decrementing code ANSI C compliant.
3928
3929 2007-03-11  Bruno Haible  <bruno@clisp.org>
3930
3931         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
3932         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
3933
3934 2007-03-11  Bruno Haible  <bruno@clisp.org>
3935
3936         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
3937         <stdbool.h> substitute doesn't pass.
3938
3939 2007-03-11  Bruno Haible  <bruno@clisp.org>
3940
3941         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
3942
3943 2007-03-11  Bruno Haible  <bruno@clisp.org>
3944
3945         * gnulib-tool (func_create_megatestdir): Create also an autobuild
3946         script, for submission to autobuild.josefsson.org.
3947
3948 2007-03-10  Bruno Haible  <bruno@clisp.org>
3949
3950         * modules/canonicalize-lgpl-tests: New file.
3951         * tests/test-canonicalize-lgpl.sh: New file.
3952         * tests/test-canonicalize-lgpl.c: New file.
3953
3954         * modules/c-strcase-tests: New file.
3955         * tests/test-c-strcase.sh: New file.
3956         * tests/test-c-strcasecmp.c: New file.
3957         * tests/test-c-strncasecmp.c: New file.
3958
3959         * modules/atexit-tests: New file.
3960         * tests/test-atexit.sh: New file.
3961         * tests/test-atexit.c: New file.
3962
3963 2007-03-10  Bruno Haible  <bruno@clisp.org>
3964
3965         * tests/test-binary-io.sh: Use temporary filenames that are not so
3966         likely to clash with those of other tests (in a parallel make).
3967         * tests/test-binary-io.c: Likewise.
3968
3969 2007-03-10  Bruno Haible  <bruno@clisp.org>
3970
3971         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
3972         fallback; use #error instead.
3973         Suggested by Simon Josefsson.
3974
3975 2007-03-10  Bruno Haible  <bruno@clisp.org>
3976
3977         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
3978         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
3979         first and the last.
3980
3981 2007-03-10  Bruno Haible  <bruno@clisp.org>
3982
3983         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
3984
3985 2007-03-10  Bruno Haible  <bruno@clisp.org>
3986
3987         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
3988         "make distcheck".
3989         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
3990         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
3991         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
3992
3993 2007-03-10  Bruno Haible  <bruno@clisp.org>
3994
3995         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
3996         variable.
3997         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
3998         variable.
3999
4000 2007-03-09  Eric Blake  <ebb9@byu.net>
4001         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
4002
4003         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
4004         types are not being provided by gnulib.
4005         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
4006         types are supported.
4007
4008 2007-03-10  Bruno Haible  <bruno@clisp.org>
4009
4010         * lib/stdio_.h (__attribute__): New macro.
4011         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
4012         vsprintf): Specify __attribute__ __format__ for GCC.
4013         Suggested by Eric Blake.
4014
4015 2007-03-09  Bruno Haible  <bruno@clisp.org>
4016
4017         * modules/printf-posix-tests: New file.
4018         * tests/test-printf-posix.sh: New file.
4019         * tests/test-printf-posix.c: New file.
4020
4021         * modules/printf-posix: New file.
4022         * lib/printf.c: New file.
4023         * m4/printf-posix-rpl.m4: New file.
4024         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
4025         REPLACE_PRINTF.
4026         * lib/stdio_.h (printf): New declaration.
4027         (format, __format__, ____printf____, ____scanf____, ____strftime____,
4028         ____strfmon____): New macros.
4029         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
4030         REPLACE_PRINTF.
4031
4032 2007-03-09  Bruno Haible  <bruno@clisp.org>
4033
4034         * tests/test-vasnprintf-posix2.sh: New file.
4035         * tests/test-vasnprintf-posix2.c: New file.
4036         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
4037         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
4038         (Makefile.am): Activate test-vasnprintf-posix2.sh.
4039
4040         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
4041         a locale dependent decimal point, rather than always '.'.
4042
4043 2007-03-09  Eric Blake  <ebb9@byu.net>
4044
4045         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4046         spite of platforms like Tandem/NSK that define it to -1.
4047
4048 2007-03-08  Bruno Haible  <bruno@clisp.org>
4049
4050         * modules/vprintf-posix-tests: New file.
4051         * tests/test-vprintf-posix.sh: New file.
4052         * tests/test-vprintf-posix.c: New file.
4053         * tests/test-printf-posix.h: New file.
4054
4055         * modules/vprintf-posix: New file.
4056         * lib/vprintf.c: New file.
4057         * m4/vprintf-posix.m4: New file.
4058         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
4059         REPLACE_VPRINTF.
4060         * lib/stdio_.h (vprintf): New declaration.
4061         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
4062         REPLACE_VPRINTF.
4063
4064 2007-03-08  Bruno Haible  <bruno@clisp.org>
4065
4066         * modules/fprintf-posix-tests: New file.
4067         * tests/test-fprintf-posix.sh: New file.
4068         * tests/test-fprintf-posix.c: New file.
4069
4070         * modules/fprintf-posix: New file.
4071         * lib/fprintf.c: New file.
4072         * m4/fprintf-posix.m4: New file.
4073         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4074         REPLACE_FPRINTF.
4075         * lib/stdio_.h (fprintf): New declaration.
4076         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4077         REPLACE_FPRINTF.
4078
4079 2007-03-08  Bruno Haible  <bruno@clisp.org>
4080
4081         * modules/vfprintf-posix-tests: New file.
4082         * tests/test-vfprintf-posix.sh: New file.
4083         * tests/test-vfprintf-posix.c: New file.
4084         * tests/test-fprintf-posix.h: New file.
4085         * tests/test-fprintf-posix.out: New file.
4086
4087         * modules/vfprintf-posix: New file.
4088         * lib/vfprintf.c: New file.
4089         * m4/vfprintf-posix.m4: New file.
4090         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4091         REPLACE_VFPRINTF.
4092         * lib/stdio_.h (vfprintf): New declaration.
4093         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4094         REPLACE_VFPRINTF.
4095
4096 2007-03-08  Bruno Haible  <bruno@clisp.org>
4097
4098         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4099
4100 2007-03-08  Bruno Haible  <bruno@clisp.org>
4101
4102         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4103         instead of 'expr' invocations.
4104         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4105         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4106         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4107         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4108         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4109         Suggested by Paul Eggert.
4110
4111 2007-03-08  Bruno Haible  <bruno@clisp.org>
4112
4113         * modules/fseterr-tests: New file.
4114         * tests/test-fseterr.c: New file.
4115
4116         * modules/fseterr: New file.
4117         * lib/fseterr.h: New file.
4118         * lib/fseterr.c: New file.
4119
4120 2007-03-08  Bruno Haible  <bruno@clisp.org>
4121
4122         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4123         * lib/getopt_.h: Likewise.
4124         * lib/mbswidth.h: Likewise.
4125         * lib/setenv.h: Likewise.
4126         * lib/vasnprintf.h: Likewise.
4127         * lib/vasprintf.h: Likewise.
4128         * lib/verror.h: Likewise.
4129         * lib/xsetenv.h: Likewise.
4130         * lib/xvasprintf.h: Likewise.
4131
4132 2007-03-08  Jim Meyering  <jim@meyering.net>
4133
4134         * users.txt: Add parted.
4135
4136         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4137
4138 2007-03-07  Bruno Haible  <bruno@clisp.org>
4139
4140         * m4/printf.m4: Make the shell script snippets copy&pastable.
4141
4142 2007-03-02  Bruno Haible  <bruno@clisp.org>
4143
4144         * lib/netinet_in_.h: New file.
4145         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4146         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4147         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4148         (Depends-on): Add absolute-header.
4149         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4150         into netinet/in.h.
4151
4152 2007-03-03  Bruno Haible  <bruno@clisp.org>
4153
4154         * lib/sys_select_.h: New file.
4155         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4156         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4157         * modules/sys_select (Files): Add lib/sys_select_.h.
4158         (Depends-on): Add absolute-header.
4159         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4160         into sys/select.h.
4161
4162 2007-03-02  Bruno Haible  <bruno@clisp.org>
4163
4164         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4165         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4166         values.
4167         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4168         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4169         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4170         * modules/sys_socket (Depends-on): Add absolute-header.
4171         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4172         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4173         (Include): Remove requirement of inclusion of <sys/types.h>.
4174
4175 2007-03-02  Bruno Haible  <bruno@clisp.org>
4176
4177         * lib/byteswap_.h (bswap_32): Fix formula.
4178
4179 2007-03-06  Bruno Haible  <bruno@clisp.org>
4180
4181         * modules/sprintf-posix-tests: New file.
4182         * tests/test-sprintf-posix.c: New file.
4183
4184         * modules/sprintf-posix: New file.
4185         * lib/sprintf.c: New file.
4186         * m4/sprintf-posix.m4: New file.
4187         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4188         REPLACE_SPRINTF.
4189         * lib/stdio_.h (sprintf): New declaration.
4190         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4191         REPLACE_SPRINTF.
4192
4193 2007-03-06  Bruno Haible  <bruno@clisp.org>
4194
4195         * modules/vsprintf-posix-tests: New file.
4196         * tests/test-vsprintf-posix.c: New file.
4197         * tests/test-sprintf-posix.h: New file.
4198
4199         * modules/vsprintf-posix: New file.
4200         * lib/vsprintf.c: New file.
4201         * m4/vsprintf-posix.m4: New file.
4202         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4203         REPLACE_VSPRINTF.
4204         * lib/stdio_.h (vsprintf): New declaration.
4205         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4206         REPLACE_VSPRINTF.
4207
4208 2007-03-06  Bruno Haible  <bruno@clisp.org>
4209
4210         * modules/vsnprintf (Depend-on): Remove minmax.
4211
4212 2007-03-06  Bruno Haible  <bruno@clisp.org>
4213
4214         * modules/snprintf-posix-tests: New file.
4215         * tests/test-snprintf-posix.c: New file.
4216
4217         * modules/snprintf-posix: New file.
4218         * m4/snprintf-posix.m4: New file.
4219         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4220         gl_FUNC_SNPRINTF.
4221         (gl_FUNC_SNPRINTF): Invoke it.
4222         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4223         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4224         is set.
4225         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4226
4227 2007-03-06  Bruno Haible  <bruno@clisp.org>
4228
4229         * modules/vsnprintf-posix-tests: New file.
4230         * tests/test-vsnprintf-posix.c: New file.
4231         * tests/test-snprintf-posix.h: New file.
4232
4233         * modules/vsnprintf-posix: New file.
4234         * m4/vsnprintf-posix.m4: New file.
4235         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4236         gl_FUNC_VSNPRINTF.
4237         (gl_FUNC_VSNPRINTF): Invoke it.
4238         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4239         * lib/stdio_.h (vsnprintf): Define as a replacement if
4240         REPLACE_VSNPRINTF is set.
4241         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4242
4243 2007-03-06  Bruno Haible  <bruno@clisp.org>
4244
4245         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4246         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4247
4248 2007-03-06  Bruno Haible  <bruno@clisp.org>
4249
4250         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4251         (asinl): Declare also if HAVE_DECL_ASINL is set.
4252         (atanl): Declare also if HAVE_DECL_ATANL is set.
4253         (ceill): Declare also if HAVE_DECL_CEILL is set.
4254         (cosl): Declare also if HAVE_DECL_COSL is set.
4255         (expl): Declare also if HAVE_DECL_EXPL is set.
4256         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4257         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4258         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4259         (logl): Declare also if HAVE_DECL_LOGL is set.
4260         (sinl): Declare also if HAVE_DECL_SINL is set.
4261         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4262         (tanl): Declare also if HAVE_DECL_TANL is set.
4263         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4264         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4265         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4266         declaration of frexpl, ldexpl.
4267         * modules/printf-frexpl (Depends-on): Add math.
4268         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4269
4270 2007-03-05  Bruno Haible  <bruno@clisp.org>
4271
4272         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4273         frexpl and ldexpl are declared.
4274         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4275
4276 2007-03-05  Bruno Haible  <bruno@clisp.org>
4277
4278         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4279         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4280
4281 2007-03-05  Bruno Haible  <bruno@clisp.org>
4282
4283         * lib/stdio_.h: Include <stddef.h>.
4284
4285 2007-03-05  Bruno Haible  <bruno@clisp.org>
4286
4287         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4288
4289 2007-03-05  Bruno Haible  <bruno@clisp.org>
4290
4291         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4292         NetBSD 4, from Ralf Wildenhues.
4293
4294 2007-03-04  Bruno Haible  <bruno@clisp.org>
4295
4296         * lib/vasprintf.h: Update #if logic for the case when the functions
4297         exist but are overridden.
4298
4299 2007-03-04  Bruno Haible  <bruno@clisp.org>
4300
4301         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4302         implementations: glibc-2.4 and MacOS X 10.3.
4303         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4304         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4305         * tests/test-vasprintf-posix.c (test_function): Likewise.
4306
4307 2007-03-04  Bruno Haible  <bruno@clisp.org>
4308
4309         * modules/vasprintf-posix-tests: New file.
4310         * tests/test-vasprintf-posix.c: New file.
4311
4312         * modules/vasprintf-posix: New file.
4313         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4314         defined.
4315         * m4/vasprintf-posix.m4: New file.
4316         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4317         gl_FUNC_VASPRINTF.
4318         (gl_FUNC_VASPRINTF): Invoke it.
4319         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4320         here.
4321         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4322
4323 2007-03-04  Bruno Haible  <bruno@clisp.org>
4324
4325         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4326         REPLACE_GETTIMEOFDAY.
4327         * modules/sys_time (Makefile.am): Likewise.
4328         * m4/sys_time_h.m4: Likewise.
4329         * m4/gettimeofday.m4: Likewise.
4330
4331 2007-03-04  Bruno Haible  <bruno@clisp.org>
4332
4333         * modules/vasnprintf-posix-tests: New file.
4334         * tests/test-vasnprintf-posix.c: New file.
4335
4336         * modules/vasnprintf-posix: New file.
4337         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4338         printf-frexpl.h.
4339         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4340         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4341         REPLACE_VASNPRINTF is defined.
4342         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4343         gl_FUNC_VASNPRINTF.
4344         (gl_FUNC_VASNPRINTF): Invoke it.
4345         * m4/vasnprintf-posix.m4: New file.
4346         * m4/printf.m4: New file.
4347
4348 2007-03-04  Bruno Haible  <bruno@clisp.org>
4349
4350         Compile progreloc.c only if --enable-relocatable is specified.
4351         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
4352         if --enable-relocatable was specified.
4353         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
4354         lib_SOURCES.
4355
4356 2007-03-04  Jim Meyering  <jim@meyering.net>
4357
4358         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
4359         Use it consistently, rather than enumerating errno constants.
4360
4361 2007-03-04  Bruno Haible  <bruno@clisp.org>
4362
4363         * modules/xvasprintf-tests: New file.
4364         * tests/test-xvasprintf.c: New file.
4365
4366         * modules/vasprintf-tests: New file.
4367         * tests/test-vasprintf.c: New file.
4368
4369         * modules/vasnprintf-tests: New file.
4370         * tests/test-vasnprintf.c: New file.
4371
4372         * modules/vsnprintf-tests: New file.
4373         * tests/test-vsnprintf.c: New file.
4374
4375         * modules/snprintf-tests: New file.
4376         * tests/test-snprintf.c: New file.
4377
4378 2007-03-04  Bruno Haible  <bruno@clisp.org>
4379
4380         Compile relocatable.c only if --enable-relocatable is specified.
4381         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
4382         gl_RELOCATABLE_LIBRARY.
4383         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
4384         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
4385         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
4386         gl_RELOCATABLE_LIBRARY.
4387         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
4388         (Makefile.am): Remove lib_SOURCES.
4389         * modules/relocatable-lib-lgpl (configure.ac): Invoke
4390         gl_RELOCATABLE_LIBRARY.
4391         (Makefile.am): Remove lib_SOURCES.
4392         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
4393         always.
4394         * modules/relocatable-prog-wrapper (configure.ac): Invoke
4395         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
4396
4397 2007-03-04  Bruno Haible  <bruno@clisp.org>
4398
4399         * modules/argmatch-tests: New file.
4400         * tests/test-argmatch.c: New file.
4401
4402         * tests/test-allocsa.c (main): Halve the number of loop runs.
4403
4404         * modules/alloca-opt-tests: New file.
4405         * tests/test-alloca-opt.c: New file.
4406
4407 2007-03-04  Jim Meyering  <jim@meyering.net>
4408
4409         Work around difference between Linux ACLs and Solaris 10 ZFS.
4410         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
4411         for EINVAL.
4412
4413 2007-03-03  Bruno Haible  <bruno@clisp.org>
4414
4415         * modules/relocatable-prog (Depends-on): Add back progreloc's
4416         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
4417
4418 2007-03-03  Bruno Haible  <bruno@clisp.org>
4419
4420         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
4421         * modules/relocatable-lib: New file.
4422
4423 2007-03-03  Bruno Haible  <bruno@clisp.org>
4424
4425         * modules/relocatable-prog: Renamed from modules/relocatable.
4426         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
4427
4428 2007-03-03  Bruno Haible  <bruno@clisp.org>
4429
4430         * modules/relocatable-script (Files): Add doc/relocatable.texi,
4431         m4/relocatable-lib.m4.
4432         (Depends-on): Remove 'relocatable'.
4433         (configure.ac): Add gl_RELOCATABLE_NOP.
4434
4435 2007-03-03  Bruno Haible  <bruno@clisp.org>
4436
4437         * modules/relocatable-prog-wrapper: New file.
4438         * modules/relocatable (Depends-on): Add it. Remove all other
4439         dependencies except progname.
4440         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
4441
4442         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
4443         (gl_FUNC_STRERROR): Nop.
4444         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
4445
4446         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
4447         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
4448
4449         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
4450         (gl_FUNC_READLINK): Update.
4451
4452         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
4453
4454 2007-03-03  Bruno Haible  <bruno@clisp.org>
4455
4456         * lib/xreadlink.c: Include <unistd.h> unconditionally.
4457         * modules/xreadlink (Depends-on): Add unistd.
4458         * modules/xreadlink-with-size (Depends-on): Likewise.
4459
4460 2007-03-03  Bruno Haible  <bruno@clisp.org>
4461
4462         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
4463         extracted from gt_FUNC_SETENV.
4464         (gt_FUNC_SETENV): Remove macro.
4465         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
4466         remove gt_FUNC_SETENV.
4467
4468 2007-03-03  Bruno Haible  <bruno@clisp.org>
4469
4470         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4471         ENABLE_RELOCATABLE here.
4472         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
4473
4474 2007-03-03  Bruno Haible  <bruno@clisp.org>
4475
4476         * modules/rbtreehash-list-tests (Depends-on): Add progname.
4477         * tests/test-rbtreehash_list.c: Include progname.h.
4478         (main): Call set_program_name.
4479
4480         * modules/rbtree-oset-tests (Depends-on): Add progname.
4481         * tests/test-rbtree_oset.c: Include progname.h.
4482         (main): Call set_program_name.
4483
4484         * modules/rbtree-list-tests (Depends-on): Add progname.
4485         * tests/test-rbtree_list.c: Include progname.h.
4486         (main): Call set_program_name.
4487
4488         * modules/linked-list-tests (Depends-on): Add progname.
4489         * tests/test-linked_list.c: Include progname.h.
4490         (main): Call set_program_name.
4491
4492 2007-03-03  Bruno Haible  <bruno@clisp.org>
4493
4494         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
4495         All uses of __restrict changed to _Restrict_.
4496         * lib/glob_.h (__restrict): Remove macro.
4497
4498 2007-03-02  Bruno Haible  <bruno@clisp.org>
4499
4500         * modules/gettext (configure.ac): Require gettext infrastructure
4501         from version 0.16.1.
4502
4503 2007-03-02  Bruno Haible  <bruno@clisp.org>
4504
4505         * modules/linkedhash-list-tests (Depends-on): Add progname.
4506         * tests/test-linkedhash_list.c: Include progname.h.
4507         (main): Call set_program_name.
4508
4509         * modules/carray-list-tests (Depends-on): Add progname.
4510         * tests/test-carray_list.c: Include progname.h.
4511         (main): Call set_program_name.
4512
4513         * modules/avltreehash-list-tests (Depends-on): Add progname.
4514         * tests/test-avltreehash_list.c: Include progname.h.
4515         (main): Call set_program_name.
4516
4517         * modules/avltree-oset-tests (Depends-on): Add progname.
4518         * tests/test-avltree_oset.c: Include progname.h.
4519         (main): Call set_program_name.
4520
4521         * modules/avltree-list-tests (Depends-on): Add progname.
4522         * tests/test-avltree_list.c: Include progname.h.
4523         (main): Call set_program_name.
4524
4525         * modules/array-oset-tests (Depends-on): Add progname.
4526         * tests/test-array_oset.c: Include progname.h.
4527         (main): Call set_program_name.
4528
4529         * modules/array-list-tests (Depends-on): Add progname.
4530         * tests/test-array_list.c: Include progname.h.
4531         (main): Call set_program_name.
4532
4533         * modules/argp-tests (Depends-on): Add progname.
4534         * tests/test-argp.c: Include argp.h first. Include progname.h.
4535         (main): Call set_program_name.
4536
4537 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
4538
4539         * doc/gnulib-tool.texi (Initial import): Reword description of
4540         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
4541         limited effect even if defined after the first system include.
4542
4543 2007-03-01  Bruno Haible  <bruno@clisp.org>
4544
4545         * build-aux/config.libpath: Update to libtool-1.5.22.
4546         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
4547
4548 2007-03-01  Bruno Haible  <bruno@clisp.org>
4549
4550         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
4551         foo_CFLAGS.
4552         Reported by Ralf Wildenhues.
4553
4554 2007-03-01  Bruno Haible  <bruno@clisp.org>
4555
4556         * build-aux/install-reloc: Remove object files left over by some
4557         compilers.
4558         Reported by Ralf Wildenhues.
4559
4560 2007-03-01  Bruno Haible  <bruno@clisp.org>
4561
4562         * build-aux/install-reloc: Break long lines.
4563
4564 2007-03-01  Bruno Haible  <bruno@clisp.org>
4565
4566         * doc/relocatable.texi: Document that it may not work on OpenBSD.
4567         Reported by Ralf Wildenhues.
4568
4569 2007-03-01  Bruno Haible  <bruno@clisp.org>
4570
4571         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
4572         include ordering constraints.
4573
4574 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
4575
4576         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
4577         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
4578         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
4579         as another example.
4580         * lib/time_.h: Fix misspelling.
4581         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4582         Require gl_HEADER_TIME_H_DEFAULTS.
4583         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
4584         * m4/time_r.m4 (gl_TIME_R): Likewise.
4585         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
4586
4587 2007-03-01  Bruno Haible  <bruno@clisp.org>
4588
4589         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
4590         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4591
4592 2007-03-01  Jim Meyering  <jim@meyering.net>
4593
4594         * modules/xreadlink (Maintainer): Add my name.
4595         * modules/xreadlink-with-size (Depends-on): Alphabetize.
4596
4597 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
4598             Bruno Haible  <bruno@clisp.org>
4599
4600         * build-aux/install-reloc: Compile also c-ctype.c.
4601         * build-aux/relocatable.sh.in: New file.
4602         * doc/relocatable.texi: New file.
4603         * doc/relocatable-maint.texi: New file.
4604         * doc/gnulib.texi: Include relocatable-maint.texi.
4605         * lib/progreloc.c: Include unistd.h unconditionally.
4606         * lib/relocwrapper.c: Include unistd.h unconditionally.
4607         Include c-ctype.h.
4608         (add_dotbin): Use c_tolower.
4609         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
4610         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
4611         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
4612         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
4613         to m4/relocatable-lib.m4.
4614         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
4615         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
4616         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
4617         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
4618         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
4619         * modules/relocatable: New file.
4620         * modules/relocatable-lib: New file.
4621         * modules/relocatable-script: New file.
4622
4623 2007-02-28  Bruno Haible  <bruno@clisp.org>
4624
4625         Import --enable-relocatable infrastructure.
4626         * build-aux/config.libpath: New file, from GNU gettext.
4627         * build-aux/install-reloc: New file, from GNU gettext.
4628         * build-aux/reloc-ldflags: New file, from GNU gettext.
4629         * lib/relocatable.h: New file, from GNU gettext.
4630         * lib/relocatable.c: New file, from GNU gettext.
4631         * lib/relocwrapper.c: New file, from GNU gettext.
4632         * m4/relocatable.m4: New file, from GNU gettext.
4633
4634 2007-02-28  Bruno Haible  <bruno@clisp.org>
4635
4636         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
4637
4638         * modules/xreadlink: New file, from GNU gettext with modifications.
4639         * lib/xreadlink.c: New file, from GNU gettext.
4640         * lib/xreadlink.h: Add comments.
4641         (xreadlink): New declaration.
4642
4643         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
4644         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
4645         lib/xreadlink-with-size.c.
4646         (configure.ac): Remove gl_XREADLINK invocation.
4647         (Makefile.am): Augment lib_SOURCES.
4648         * m4/xreadlink.m4: Remove file.
4649         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
4650         (xreadlink_with_size): Renamed from xreadink.
4651         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
4652         * modules/canonicalize (Depends-on): Replace xreadlink with
4653         xreadlink-with-size.
4654         * lib/canonicalize.c (canonicalize_filename_mode): Update.
4655
4656 2007-02-25  Jim Meyering  <jim@meyering.net>
4657
4658         * build-aux/announce-gen: When complaining about excess arguments,
4659         list them.
4660
4661 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
4662
4663         * README: Document signed integer overflow situation more
4664         accurately.
4665
4666 2007-02-25  Bruno Haible  <bruno@clisp.org>
4667
4668         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
4669         'a' or 'A' conversion.
4670
4671 2007-02-25  Bruno Haible  <bruno@clisp.org>
4672
4673         * modules/filename: Renamed from modules/pathname.
4674         (Files): Replace lib/pathname.h with lib/filename.h. Replace
4675         lib/concatpath.c with lib/concat-filename.c.
4676         (Makefile.am): Update.
4677         (Include): Replace pathname.h with filename.h.
4678         * lib/filename.h: Renamed from lib/pathname.h.
4679         (concatenated_filename): Renamed from concatenated_pathname.
4680         * lib/concat-filename.c: Renamed from lib/concatpath.c.
4681         (concatenated_filename): Renamed from concatenated_pathname.
4682         * lib/findprog.c: Include filename.h instead of pathname.h.
4683         (find_in_path): Update.
4684         * lib/javacomp.c: Include filename.h instead of pathname.h.
4685         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
4686         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
4687         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
4688         is_oldgcj_14_13_usable, is_javac_usable): Update.
4689         * lib/javaexec.c: Include filename.h instead of pathname.h.
4690         (execute_java_class): Update.
4691         * modules/findprog: Update.
4692         * modules/javacomp: Update.
4693         * modules/javaexec: Update.
4694         * MODULES.html.sh (File system functions): Add 'filename', remove
4695         'pathname'.
4696
4697 2007-02-25  Bruno Haible  <bruno@clisp.org>
4698
4699         * modules/printf-frexpl-tests: New file.
4700         * tests/test-printf-frexpl.c: New file.
4701
4702         * modules/printf-frexpl: New file.
4703         * lib/printf-frexpl.h: New file.
4704         * lib/printf-frexpl.c: New file.
4705         * m4/printf-frexpl.m4: New file.
4706
4707 2007-02-25  Bruno Haible  <bruno@clisp.org>
4708
4709         * modules/printf-frexp-tests: New file.
4710         * tests/test-printf-frexp.c: New file.
4711
4712         * modules/printf-frexp: New file.
4713         * lib/printf-frexp.h: New file.
4714         * lib/printf-frexp.c: New file.
4715         * m4/printf-frexp.m4: New file.
4716
4717 2007-02-25  Bruno Haible  <bruno@clisp.org>
4718
4719         Assume automake >= 1.10 for the tests.
4720         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
4721         * modules/arctwo-tests: Likewise.
4722         * modules/argp-tests: Likewise.
4723         * modules/avltree-list-tests: Likewise.
4724         * modules/avltree-oset-tests: Likewise.
4725         * modules/avltreehash-list-tests: Likewise.
4726         * modules/carray-list-tests: Likewise.
4727         * modules/crc-tests: Likewise.
4728         * modules/des-tests: Likewise.
4729         * modules/gc-arcfour-tests: Likewise.
4730         * modules/gc-arctwo-tests: Likewise.
4731         * modules/gc-des-tests: Likewise.
4732         * modules/gc-hmac-md5-tests: Likewise.
4733         * modules/gc-hmac-sha1-tests: Likewise.
4734         * modules/gc-md2-tests: Likewise.
4735         * modules/gc-md4-tests: Likewise.
4736         * modules/gc-md5-tests: Likewise.
4737         * modules/gc-pbkdf2-sha1-tests: Likewise.
4738         * modules/gc-rijndael-tests: Likewise.
4739         * modules/gc-sha1-tests: Likewise.
4740         * modules/gc-tests: Likewise.
4741         * modules/getaddrinfo-tests: Likewise.
4742         * modules/hmac-md5-tests: Likewise.
4743         * modules/hmac-sha1-tests: Likewise.
4744         * modules/linked-list-tests: Likewise.
4745         * modules/linkedhash-list-tests: Likewise.
4746         * modules/lock-tests: Likewise.
4747         * modules/md2-tests: Likewise.
4748         * modules/md4-tests: Likewise.
4749         * modules/md5-tests: Likewise.
4750         * modules/rbtree-list-tests: Likewise.
4751         * modules/rbtree-oset-tests: Likewise.
4752         * modules/rbtreehash-list-tests: Likewise.
4753         * modules/read-file-tests: Likewise.
4754         * modules/rijndael-tests: Likewise.
4755         * modules/stdint-tests: Likewise.
4756         * modules/tls-tests: Likewise.
4757
4758 2007-02-24  Bruno Haible  <bruno@clisp.org>
4759
4760         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
4761         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
4762         function; instead check whether isnan with a double argument links.
4763         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
4764         function; instead check whether isnan with a 'long double' argument
4765         links.
4766         Reported by Eric Blake <ebb9@byu.net>.
4767
4768 2007-02-24  Bruno Haible  <bruno@clisp.org>
4769
4770         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
4771         defined.
4772         * lib/isnanl.c: Remove all code. Just include isnan.c.
4773         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
4774
4775 2007-02-25  Jim Meyering  <jim@meyering.net>
4776
4777         Avoid conflicting types for 'unsetenv' on FreeBSD.
4778         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
4779         conflicting with FreeBSD's (5.0 and 6.1) function declaration
4780         in stdlib.h.
4781
4782 2007-02-24  Bruno Haible  <bruno@clisp.org>
4783
4784         * modules/isnanl-nolibm-tests: New file.
4785         * tests/test-isnanl.c: New file.
4786
4787         * modules/isnanl-nolibm: New file.
4788         * lib/isnanl.h: New file.
4789         * lib/isnanl.c: New file.
4790         * m4/isnanl.m4: New file.
4791
4792 2007-02-24  Bruno Haible  <bruno@clisp.org>
4793
4794         * modules/isnan-nolibm-tests: New file.
4795         * tests/test-isnan.c: New file.
4796
4797         * modules/isnan-nolibm: New file.
4798         * lib/isnan.h: New file.
4799         * lib/isnan.c: New file.
4800         * m4/isnan.m4: New file.
4801
4802 2007-02-24  Bruno Haible  <bruno@clisp.org>
4803
4804         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
4805         assume that an exponent fits in 20 bits.
4806
4807 2007-02-24  Jim Meyering  <jim@meyering.net>
4808
4809         * m4/regex.m4: Update the description of the configure-time option,
4810         --without-included-regex, to state accurately what the defaults are,
4811         and perhaps to give people an idea why using this option is risky.
4812
4813 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
4814
4815         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
4816         loops on small arguments.  This attempts to avoid the problem
4817         Bruno Haible reported for AIX 4.3.2 in
4818         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
4819
4820 2007-02-23  Bruno Haible  <bruno@clisp.org>
4821
4822         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
4823         Needed for help2man.
4824
4825 2007-02-23  Karl Berry  <karl@gnu.org>
4826
4827         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
4828         exists, foo.h should be cvs-ignored, not committed.
4829
4830 2007-02-23  Eric Blake  <ebb9@byu.net>
4831
4832         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
4833         * lib/stat-time.h (includes): Likewise.
4834         * lib/utimecmp.c (includes): Likewise.
4835         * lib/utimens.h (includes): Likewise.
4836         * lib/getdate.y (includes): Also include "timespec.h" for use
4837         internal to the module.
4838         * modules/utimens (Depends-on): Revert yesterday's patch.
4839         * modules/nanosleep (Depends-on): Add missing dependency.
4840
4841 2007-02-22  Bruno Haible  <bruno@clisp.org>
4842
4843         * lib/glob.c: Don't include getlogin_r.h.
4844
4845 2007-02-22  Jim Meyering  <jim@meyering.net>
4846
4847         * modules/utimens (Depends-on): Add timespec, required for
4848         utimens.h's inclusion of timespec.h.
4849
4850 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
4851
4852         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
4853         long unreadable paths in GNU/Linux.  Problem reported by Andreas
4854         Schwab in
4855         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
4856         I'll try to think of a better way to fix the Solaris problem.
4857
4858         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
4859         like glibc; on Solaris 10, it fails with errno == EINVAL.
4860         POSIX says the behavior is unspecified if the first argument is NULL,
4861         so play it safe and never pass NULL to the system getcwd.
4862
4863 2007-02-21  Jim Meyering  <jim@meyering.net>
4864
4865         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
4866         of gettimeofday.  It would conflict with the one now always
4867         provided via sys_time_.h.  Reported by Matthew Woehlke, as
4868         an IRIX 6.5 build failure.
4869
4870 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
4871
4872         Minor fixups to port to Solaris 10 with Sun C 5.8.
4873         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
4874         * modules/getcwd (Depends-on): Add dirfd.
4875         * lib/putenv.c (putenv): #undef it.
4876         (rpl_putenv): New decl.
4877         (malloc, free): Include <stdlib.h> rather than prototyping separately.
4878
4879 2007-02-20  Bruno Haible  <bruno@clisp.org>
4880
4881         * modules/stdio-tests: New file.
4882         * tests/test-stdio.c: New file.
4883
4884         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
4885         (Depends-on): Add stdio.
4886         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
4887         (Include): Use <stdio.h> instead of vsnprintf.h.
4888         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
4889         HAVE_DECL_VSNPRINTF.
4890         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
4891
4892         * modules/snprintf (Files): Remove lib/snprintf.h.
4893         (Depends-on): Add stdio.
4894         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
4895         (Include): Use <stdio.h> instead of snprintf.h.
4896         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
4897         HAVE_DECL_SNPRINTF.
4898         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
4899         * lib/getaddrinfo.c: Likewise.
4900
4901         * modules/stdio: New file.
4902         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
4903         * lib/snprintf.h: Remove file.
4904         * lib/vsnprintf.h: Remove file.
4905         * lib/.cppi-disable: Remove snprintf.h.
4906         * m4/stdio_h.m4: New file.
4907         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
4908
4909 2007-02-20  Jim Meyering  <jim@meyering.net>
4910
4911         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
4912         used by e.g., mingw.  From Bruno Haible.
4913
4914 2007-02-19  Bruno Haible  <bruno@clisp.org>
4915
4916         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
4917         warnings.
4918         Reported by Ben Pfaff <blp@cs.stanford.edu>.
4919
4920 2007-02-19  Bruno Haible  <bruno@clisp.org>
4921
4922         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
4923         from mingw users.
4924
4925 2007-02-19  Bruno Haible  <bruno@clisp.org>
4926
4927         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
4928         warnings.
4929         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
4930
4931 2007-02-19  Jim Meyering  <jim@meyering.net>
4932
4933         Don't use FD after a successful "fdopendir (fd)".
4934         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
4935         Reset it by calling dirfd on the just-obtained DIR*.
4936
4937         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
4938         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
4939
4940 2007-02-18  Bruno Haible  <bruno@clisp.org>
4941
4942         * lib/readlink.c: Include <unistd.h>.
4943         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
4944         HAVE_READLINK.
4945         * modules/readlink (Depends-on): Add unistd.
4946         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4947         (Include): Add <unistd.h>.
4948
4949         * lib/getlogin_r.h: Remove file.
4950         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
4951         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
4952         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
4953         HAVE_DECL_GETLOGIN_R.
4954         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
4955         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4956         (Include): Use <unistd.h> instead of getlogin_r.h.
4957
4958         * lib/getcwd.h: Remove file.
4959         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
4960         * lib/xgetcwd.c: Likewise.
4961         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
4962         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
4963         * modules/getcwd (Files): Remove lib/getcwd.h.
4964         (Depends-on): Add unistd.
4965         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4966         (Include): Use <unistd.h> instad of getcwd.h.
4967
4968         * lib/ftruncate.c: Include <unistd.h> first.
4969         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
4970         Set HAVE_FTRUNCATE.
4971         * modules/ftruncate (Depends-on): Add unistd.
4972         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4973
4974         * lib/fchdir.c: Include <unistd.h> first.
4975         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
4976         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
4977         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
4978         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4979         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
4980
4981         * lib/dup2.c: Include <unistd.h> first.
4982         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
4983         HAVE_DUP2.
4984         * modules/dup2 (Depends-on): Add unistd.
4985         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4986
4987         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
4988         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
4989         REPLACE_CHOWN. Don't define chown as a macro here.
4990         * modules/chown (Depends-on): Add unistd.
4991         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4992
4993         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
4994         Add definition for GL_LINK_WARNING.
4995         (chown, dup2): New declarations.
4996         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
4997         link warning.
4998         (ftruncate): New declaration.
4999         (getcwd): New declaration, taken from old getcwd.h.
5000         (getlogin_r): New declaration, taken from old getlogin_r.h.
5001         (readlink): New declaration.
5002         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
5003         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
5004         (gl_PREREQ_UNISTD): Remove macro.
5005         (gl_UNISTD_MODULE_INDICATOR): New macro.
5006         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
5007         many new variables. Don't set UNISTD_H.
5008         * modules/unistd (Description): Change.
5009         (Depends-on): Add link-warning.
5010         (configure.ac): Update.
5011         (Makefile.am): Create unistd.h always. Substitute many new variables
5012         into it.
5013
5014 2007-02-18  Bruno Haible  <bruno@clisp.org>
5015
5016         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
5017         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5018         HAVE_GETSUBOPT.
5019         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
5020         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
5021         * lib/getsubopt.h: Remove file.
5022         * modules/getsubopt (Files): Remove lib/getsubopt.h.
5023         (Depends-on): Add stdlib.
5024         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5025         (Includes): Use <stdlib.h> instead of getsubopt.h.
5026         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
5027         Set HAVE_GETSUBOPT.
5028         * lib/getsubopt.c: Don't include getsubopt.h.
5029
5030 2007-02-18  Bruno Haible  <bruno@clisp.org>
5031
5032         * modules/fchdir (Depends-on): Add dup2.
5033
5034 2007-02-18  Bruno Haible  <bruno@clisp.org>
5035
5036         * lib/stdlib_.h: Handle glibc's special invocation convention
5037         specially.
5038
5039 2007-02-18  Bruno Haible  <bruno@clisp.org>
5040
5041         * modules/stdlib-tests: New file.
5042         * tests/test-stdlib.c: New file.
5043
5044         * modules/mkstemp (Files): Remove lib/mkstemp.h.
5045         (Depends-on): Add stdlib.
5046         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5047         (Includes): Use <stdlib.h> instead of mkstemp.h.
5048         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5049         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
5050         * lib/mkstemp.c: Don't include mkstemp.h.
5051         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
5052         * lib/stdlib--.h: Don't include mkstemp.h.
5053
5054         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
5055         (Depends-on): Add stdlib.
5056         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5057         (Includes): Use <stdlib.h> instead of mkdtemp.h.
5058         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5059         HAVE_MKDTEMP.
5060         * lib/mkdtemp.c: Don't include mkdtemp.h.
5061         * lib/clean-temp.c: Don't include mkdtemp.h.
5062
5063         * modules/exit (Files): Remove lib/exit.h.
5064         (Depends-on): Add stdlib.
5065         (Makefile.am): Remove lib_SOURCES.
5066         (Include): Use <stdlib.h> instead of exit.h.
5067         * lib/argmatch.c: Don't include exit.h.
5068         * lib/execute.c: Likewise.
5069         * lib/pagealign_alloc.c: Likewise.
5070         * lib/pipe.c: Likewise.
5071         * lib/wait-process.c: Likewise.
5072         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5073         * lib/exitfail.c: Likewise.
5074         * lib/savewd.c: Likewise.
5075         * lib/xsetenv.c: Likewise.
5076
5077         * modules/stdlib: New file.
5078         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5079         and extra comments about mkstemp().
5080         * lib/exit.h: Remove file.
5081         * lib/mkdtemp.h: Remove file.
5082         * lib/mkstemp.h: Remove file.
5083         * m4/stdlib_h.m4: New file.
5084         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5085
5086 2007-02-18  Bruno Haible  <bruno@clisp.org>
5087
5088         * modules/math-tests: New file.
5089         * tests/test-math.c: New file.
5090
5091         * modules/math: New file.
5092         * modules/mathl (Files): Remove lib/mathl.h.
5093         (Depends-on): Add math.
5094         (Makefile.am): Don't mention mathl.h.
5095         (Include): Use <math.h> instead of mathl.h.
5096         * lib/math_.h: New file.
5097         * lib/mathl.h: Remove file.
5098         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5099         mathl.h.
5100         * lib/asinl.c: Likewise.
5101         * lib/atanl.c: Likewise.
5102         * lib/ceill.c: Likewise.
5103         * lib/cosl.c: Likewise.
5104         * lib/expl.c: Likewise.
5105         * lib/floorl.c: Likewise.
5106         * lib/frexpl.c: Likewise.
5107         * lib/ldexpl.c: Likewise.
5108         * lib/logl.c: Likewise.
5109         * lib/sincosl.c: Likewise.
5110         * lib/sinl.c: Likewise.
5111         * lib/sqrtl.c: Likewise.
5112         * lib/tanl.c: Likewise.
5113         * lib/trigl.c: Likewise.
5114         * m4/math_h.m4: New file.
5115         * MODULES.html.sh (Mathematics): Add math.
5116
5117 2007-02-17  Bruno Haible  <bruno@clisp.org>
5118
5119         * modules/wctype-tests: New file.
5120         * tests/test-wctype.c: New file.
5121
5122         * modules/wchar-tests: New file.
5123         * tests/test-wchar.c: New file.
5124
5125         * modules/unistd-tests: New file.
5126         * tests/test-unistd.c: New file.
5127
5128         * modules/time-tests: New file.
5129         * tests/test-time.c: New file.
5130
5131         * modules/sysexits-tests: New file.
5132         * tests/test-sysexits.c: New file.
5133
5134         * modules/sys_time-tests: New file.
5135         * tests/test-sys_time.c: New file.
5136
5137         * modules/sys_stat-tests: New file.
5138         * tests/test-sys_stat.c: New file.
5139
5140         * modules/sys_socket-tests: New file.
5141         * tests/test-sys_socket.c: New file.
5142
5143         * modules/sys_select-tests: New file.
5144         * tests/test-sys_select.c: New file.
5145
5146         * modules/string-tests: New file.
5147         * tests/test-string.c: New file.
5148
5149         * modules/stdbool-tests: New file.
5150         * tests/test-stdbool.c: New file.
5151
5152         * modules/netinet_in-tests: New file.
5153         * tests/test-netinet_in.c: New file.
5154
5155         * modules/inttypes-tests: New file.
5156         * tests/test-inttypes.c: New file.
5157
5158         * modules/fcntl-tests: New file.
5159         * tests/test-fcntl.c: New file.
5160
5161         * modules/byteswap-tests: New file.
5162         * tests/test-byteswap.c: New file.
5163
5164         * modules/arpa_inet-tests: New file.
5165         * tests/test-arpa_inet.c: New file.
5166
5167 2007-02-17  Bruno Haible  <bruno@clisp.org>
5168
5169         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5170         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5171         if the corresponding module is not enabled. Emit link warnings if
5172         the function is used nevertheless.
5173         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5174         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5175         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5176         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5177         * modules/inttypes (Depends-on): Add link-warning.
5178         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5179         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5180         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5181         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5182         * modules/imaxdiv (configure.ac): Likewise.
5183         * modules/strtoimax (configure.ac): Likewise.
5184         * modules/strtoumax (configure.ac): Likewise.
5185
5186 2007-02-17  Bruno Haible  <bruno@clisp.org>
5187
5188         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5189         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5190         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5191         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5192
5193 2007-02-17  Bruno Haible  <bruno@clisp.org>
5194
5195         * modules/link-warning: New file.
5196         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5197         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5198         * modules/string (Depends-on): Add link-warning.
5199         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5200         string.h.
5201         * MODULES.html.sh (Support for building libraries and executables): Add
5202         link-warning.
5203
5204 2007-02-17  Bruno Haible  <bruno@clisp.org>
5205
5206         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5207         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5208         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5209         long lines.
5210
5211 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5212             Bruno Haible  <bruno@clisp.org>
5213
5214         * modules/tmpfile: New file.
5215         * lib/tmpfile.c: New file.
5216         * m4/tmpfile.m4: New file.
5217         * MODULES.html.sh (func_all_modules): New section "Input/output".
5218
5219 2007-02-15  Bruno Haible  <bruno@clisp.org>
5220
5221         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5222         (supports_delete_on_close): New function.
5223         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5224
5225 2007-02-14  Bruno Haible  <bruno@clisp.org>
5226
5227         * modules/mbspcasecmp-tests: New file.
5228         * tests/test-mbspcasecmp.sh: New file.
5229         * tests/test-mbspcasecmp.c: New file.
5230
5231         New module mbspcasecmp.
5232         * modules/mbspcasecmp: New file.
5233         * lib/mbspcasecmp.c: New file.
5234         * lib/string_.h (strncasecmp): Change warning message.
5235         (mbspcasecmp): New declaration.
5236         * m4/mbspcasecmp.m4: New file.
5237         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5238         GNULIB_MBSPCASECMP.
5239         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5240         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5241
5242 2007-02-14  Bruno Haible  <bruno@clisp.org>
5243
5244         * modules/mbsncasecmp-tests: New file.
5245         * tests/test-mbsncasecmp.sh: New file.
5246         * tests/test-mbsncasecmp.c: New file.
5247
5248         New module mbsncasecmp.
5249         * modules/mbsncasecmp: New file.
5250         * lib/mbsncasecmp.c: New file.
5251         * lib/string_.h (mbsncasecmp): New declaration.
5252         * m4/mbsncasecmp.m4: New file.
5253         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5254         GNULIB_MBSNCASECMP.
5255         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5256         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5257
5258 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5259
5260         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5261         Verify that it doesn't overlap with our flags.
5262         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5263         do not have the desired effect in multibyte locales; instead, use
5264         mbscasecmp.
5265         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5266         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5267         we don't require GNU fnmatch ourselves (if our users require it, they
5268         should do so explicitly).
5269
5270         Fix regex code so it doesn't rely on strcasecmp.
5271         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5272         Otherwise, include gnulib's langinfo.h.
5273         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5274         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5275         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5276         * modules/regex (FILES): Remove m4/codeset.m4.
5277         (Depends-on): Add localcharset.  Remove strcase.
5278
5279 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5280
5281         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5282         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5283
5284 2007-02-13  Bruno Haible  <bruno@clisp.org>
5285
5286         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5287         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5288
5289 2007-02-12  Bruno Haible  <bruno@clisp.org>
5290
5291         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5292         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5293         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5294         time warning rather than a link error.
5295
5296 2007-02-12  Bruno Haible  <bruno@clisp.org>
5297
5298         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5299         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5300         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5301
5302 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5303
5304         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5305         args, not 2.
5306
5307 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5308
5309         New module 'time', so that apps can include <time.h> as per
5310         POSIX and GNU instead of separate include files like time_r.h
5311         and timegm.h.  This implementation tries out a simpler approach
5312         for replacing decls in standard include files (as compared to
5313         the string module), somewhat as an experiment.
5314
5315         * config/srclist.txt: Comment out mktime.c for now.
5316         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5317         since it doesn't apply any more.  Use generic wording instead.
5318         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5319         'time'.
5320         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5321         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5322         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5323         Don't include <sys/types.h>; no longer needed since we assume C89.
5324         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5325         * lib/strftime.c: Likewise.
5326         * lib/time_r.c: Likewise.
5327         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5328         * lib/nanosleep.c: Include <time.h> first, to check interface.
5329         * lib/strptime.c: Likewise.
5330         * lib/time_r.c: Likewise.
5331         * lib/timegm.c: Likewise.
5332         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5333         needed.
5334         * lib/timegm.c: Don't include timegm.h; no longer needed.
5335         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5336         time.h now handles any problems in that area.
5337         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5338         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5339         that time.h defines struct timespec.
5340         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5341         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5342         handles that.
5343         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5344         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5345         needed.  Set REPLACE_LOCALTIME.
5346         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5347         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
5348         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
5349         nanosleep; time_h.m4 now does that.  Don't require
5350         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
5351         module handles this now.
5352         * modules/getdate (Depends-on): Remove timespec.  Add time.
5353         * modules/nanosleep (Depends-on): Likewise.
5354         * modules/stat-time (Depends-on): Likewise.
5355         * modules/nanosleep (Include): Include time.h, not timespec.h.
5356         * modules/strptime (Files): Remove lib/strptime.h.
5357         (Depends-on): Add extensions, time.
5358         (Include): Include time.h, not strptime.h.
5359         * modules/time_r (Files): Remove lib/time_r.h.
5360         (Depends-on): Add time.
5361         (Include): Include time.h, not time_r.h.
5362         * modules/timegm: Likewise.
5363         * modules/timespec (Description): Now does timespec-related decls
5364         of our own, instead of struct timespec itself.
5365         (Depends-on): Add time; remove extensions.
5366         (Maintainer): Add self.
5367         * modules/utimecmp (Depends-on): Add time; remove timespec.
5368         * modules/utimens (Depends-on): Likewise.
5369         * modules/xnanosleep (Depends-on): Likewise.
5370
5371 2007-02-11  Bruno Haible  <bruno@clisp.org>
5372
5373         * lib/c-strstr.c: Include allocsa.h.
5374         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5375         * lib/c-strcasestr.c: Include allocsa.h.
5376         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5377         * lib/strcasestr.c: Include allocsa.h.
5378         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5379         * lib/mbsstr.c: Include allocsa.h.
5380         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5381         allocsa/freesa instead of malloc/free.
5382         * lib/mbscasestr.c: Include allocsa.h.
5383         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5384         allocsa/freesa instead of malloc/free.
5385         * modules/c-strstr (Depends-on): Add allocsa.
5386         * modules/c-strcasestr (Depends-on): Likewise.
5387         * modules/strcasestr (Depends-on): Likewise.
5388         * modules/mbsstr (Depends-on): Likewise.
5389         * modules/mbscasestr (Depends-on): Likewise.
5390
5391 2007-02-11  Bruno Haible  <bruno@clisp.org>
5392
5393         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
5394
5395         * modules/mbsspn-tests: New file.
5396         * tests/test-mbsspn.sh: New file.
5397         * tests/test-mbsspn.c: New file.
5398
5399 2007-02-11  Bruno Haible  <bruno@clisp.org>
5400
5401         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
5402
5403         * modules/mbspbrk-tests: New file.
5404         * tests/test-mbspbrk.sh: New file.
5405         * tests/test-mbspbrk.c: New file.
5406
5407 2007-02-11  Bruno Haible  <bruno@clisp.org>
5408
5409         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
5410         unneeded cast.
5411
5412         * modules/mbscspn-tests: New file.
5413         * tests/test-mbscspn.sh: New file.
5414         * tests/test-mbscspn.c: New file.
5415
5416 2007-02-11  Bruno Haible  <bruno@clisp.org>
5417
5418         * modules/mbscasecmp-tests: New file.
5419         * tests/test-mbscasecmp.sh: New file.
5420         * tests/test-mbscasecmp.c: New file.
5421
5422 2007-02-11  Bruno Haible  <bruno@clisp.org>
5423
5424         Ensure O(n) worst-case complexity of mbscasestr.
5425         * lib/mbscasestr.c: Include stdbool.h.
5426         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5427         functions.
5428         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
5429         the bookkeeping indicates that it's worth it.
5430         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
5431
5432         * modules/mbscasestr-tests: New file.
5433         * tests/test-mbscasestr1.c: New file.
5434         * tests/test-mbscasestr2.sh: New file.
5435         * tests/test-mbscasestr2.c: New file.
5436         * tests/test-mbscasestr3.sh: New file.
5437         * tests/test-mbscasestr3.c: New file.
5438         * tests/test-mbscasestr4.sh: New file.
5439         * tests/test-mbscasestr4.c: New file.
5440         * m4/locale-tr.m4: New file.
5441
5442 2007-02-11  Bruno Haible  <bruno@clisp.org>
5443
5444         Ensure O(n) worst-case complexity of mbsstr.
5445         * lib/mbsstr.c: Include stdbool.h.
5446         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5447         functions.
5448         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
5449         bookkeeping indicates that it's worth it.
5450         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
5451
5452         * modules/mbsstr-tests: New file.
5453         * tests/test-mbsstr1.c: New file.
5454         * tests/test-mbsstr2.sh: New file.
5455         * tests/test-mbsstr2.c: New file.
5456         * tests/test-mbsstr3.sh: New file.
5457         * tests/test-mbsstr3.c: New file.
5458         * m4/locale-fr.m4: New file.
5459
5460 2007-02-11  Bruno Haible  <bruno@clisp.org>
5461
5462         * lib/mbsrchr.c (mbsrchr): Fix bug.
5463
5464         * modules/mbsrchr-tests: New file.
5465         * tests/test-mbsrchr.sh: New file.
5466         * tests/test-mbsrchr.c: New file.
5467
5468 2007-02-11  Bruno Haible  <bruno@clisp.org>
5469
5470         * lib/mbschr.c (mbschr): Fix bug.
5471
5472         * modules/mbschr-tests: New file.
5473         * tests/test-mbschr.sh: New file.
5474         * tests/test-mbschr.c: New file.
5475         * m4/locale-zh.m4: New file.
5476
5477 2007-02-11  Bruno Haible  <bruno@clisp.org>
5478
5479         Support for copying multibyte string iterators.
5480         * lib/mbiter.h: Include <string.h>.
5481         (mbiter_multi_copy): New function.
5482         (mbi_copy): New macro.
5483         * lib/mbuiter.h: Include <string.h>.
5484         (mbuiter_multi_copy): New function.
5485         (mbui_copy): New macro.
5486
5487 2007-02-11  Bruno Haible  <bruno@clisp.org>
5488
5489         New module mbslen.
5490         * modules/mbslen: New file.
5491         * lib/mbslen.c: New file.
5492         * lib/string_.h (mbslen): New declaration.
5493         * m4/mbslen.m4: New file.
5494         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5495         GNULIB_MBSLEN.
5496         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
5497         * MODULES.html.sh (Internationalization functions): Add mbslen.
5498
5499 2007-02-11  Bruno Haible  <bruno@clisp.org>
5500
5501         Ensure O(n) worst-case complexity of strcasestr substitute.
5502         * lib/strcasestr.c: Include stdbool.h.
5503         (knuth_morris_pratt): New function.
5504         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5505         bookkeeping indicates that it's worth it.
5506         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
5507
5508         * modules/strcasestr-tests: New file.
5509         * tests/test-strcasestr.c: New file.
5510
5511 2007-02-11  Bruno Haible  <bruno@clisp.org>
5512
5513         Ensure O(n) worst-case complexity of c_strcasestr.
5514         * lib/c-strcasestr.c: Include stdbool.h, string.h.
5515         (knuth_morris_pratt): New function.
5516         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
5517         the bookkeeping indicates that it's worth it.
5518         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
5519
5520         * modules/c-strcasestr-tests: New file.
5521         * tests/test-c-strcasestr.c: New file.
5522
5523 2007-02-11  Bruno Haible  <bruno@clisp.org>
5524
5525         Ensure O(n) worst-case complexity of c_strstr.
5526         * lib/c-strstr.c: Include stdbool.h, string.h.
5527         (knuth_morris_pratt): New function.
5528         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5529         bookkeeping indicates that it's worth it.
5530         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
5531
5532         * lib/c-strstr.c: Complete rewrite for maintainability.
5533
5534         * modules/c-strstr-tests: New file.
5535         * tests/test-c-strstr.c: New file.
5536
5537 2007-02-11  Bruno Haible  <bruno@clisp.org>
5538
5539         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
5540         5.2.1 and earlier, whereby \055 was treated just like the range
5541         delimiter '-'.
5542         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
5543
5544 2007-02-08  Bruno Haible  <bruno@clisp.org>
5545
5546         * modules/regex (Depends-on): Add stdbool.
5547         Reported by Dalibor Topic <robilad@kaffe.org>.
5548
5549 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5550
5551         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
5552         Prefer returning from main to exiting from it.
5553         Remove unnecessary parens after sizeof.
5554
5555 2007-02-05  Bruno Haible  <bruno@clisp.org>
5556
5557         New module mbssep.
5558         * modules/mbssep: New file.
5559         * lib/mbssep.c: New file.
5560         * lib/string_.h (strsep): Add a conditional link warning.
5561         (mbssep): New declaration.
5562         * m4/mbssep.m4: New file.
5563         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5564         GNULIB_MBSSEP.
5565         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
5566         * MODULES.html.sh (Internationalization functions): Add mbssep.
5567
5568 2007-02-05  Bruno Haible  <bruno@clisp.org>
5569
5570         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
5571         Optimize search in case of 1 delimiter.
5572
5573 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5574
5575         * lib/acl.h: Include sys/types.h before sys/acl.h.
5576
5577 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5578
5579         Merge upstream fix for glibc bugzilla #3957:
5580
5581         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
5582
5583         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
5584         bit for RE_HAT_LISTS_NOT_NEWLINE.
5585         (build_charclass_op): Remove bogus comment.
5586
5587 2007-02-05  Simon Josefsson  <simon@josefsson.org>
5588
5589         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
5590
5591 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5592
5593         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
5594         * lib/memmem.c [!defined _LIBC]: Include config.h.
5595
5596 2007-02-04  Bruno Haible  <bruno@clisp.org>
5597
5598         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
5599         warning message.
5600
5601 2007-02-04  Bruno Haible  <bruno@clisp.org>
5602
5603         New module mbstok_r.
5604         * modules/mbstok_r: New file.
5605         * lib/mbstok_r.c: New file.
5606         * lib/string_.h (strtok_r): Change argument names to match the
5607         comments. Add a conditional link warning.
5608         (mbstok_r): New declaration.
5609         * m4/mbstok_r.m4: New file.
5610         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5611         GNULIB_MBSTOK_R.
5612         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
5613         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
5614
5615 2007-02-04  Bruno Haible  <bruno@clisp.org>
5616
5617         New module mbsspn.
5618         * modules/mbsspn: New file.
5619         * lib/mbsspn.c: New file.
5620         * lib/string_.h (strspn): Add a conditional link warning.
5621         (mbsspn): New declaration.
5622         * m4/mbsspn.m4: New file.
5623         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5624         GNULIB_MBSSPN.
5625         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
5626         * MODULES.html.sh (Internationalization functions): Add mbsspn.
5627
5628 2007-02-04  Bruno Haible  <bruno@clisp.org>
5629
5630         New module mbspbrk.
5631         * modules/mbspbrk: New file.
5632         * lib/mbspbrk.c: New file.
5633         * lib/string_.h (strpbrk): Add a conditional link warning.
5634         (mbspbrk): New declaration.
5635         * m4/mbspbrk.m4: New file.
5636         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5637         GNULIB_MBSPBRK.
5638         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
5639         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
5640
5641 2007-02-04  Bruno Haible  <bruno@clisp.org>
5642
5643         New module mbscspn.
5644         * modules/mbscspn: New file.
5645         * lib/mbscspn.c: New file.
5646         * lib/string_.h (strcspn): Add a conditional link warning.
5647         (mbscspn): New declaration.
5648         * m4/mbscspn.m4: New file.
5649         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5650         GNULIB_MBSCSPN.
5651         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
5652         * MODULES.html.sh (Internationalization functions): Add mbscspn.
5653
5654 2007-02-04  Bruno Haible  <bruno@clisp.org>
5655
5656         New module mbscasestr, reduced goal of strcasestr.
5657         * modules/mbscasestr: New file.
5658         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
5659         (mbscasestr): Renamed from strcasestr.
5660         * lib/strcasestr.c: Don't include mbuiter.h.
5661         (strcasestr): Remove support for multibyte locales.
5662         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
5663         Change the conditional link warning.
5664         (mbscasestr): New declaration.
5665         * m4/mbscasestr.m4: New file.
5666         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
5667         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
5668         REPLACE_STRCASESTR.
5669         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
5670         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5671         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5672         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
5673         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
5674         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5675         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
5676         (Depends-on): Remove mbuiter.
5677         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
5678
5679 2007-02-04  Bruno Haible  <bruno@clisp.org>
5680
5681         Simplify handling of strncasecmp.
5682         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
5683         the conditional link warning.
5684         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5685         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
5686         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
5687         * modules/strcase (configure.ac): Don't invoke
5688         gl_STRING_MODULE_INDICATOR.
5689         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
5690
5691 2007-02-04  Bruno Haible  <bruno@clisp.org>
5692
5693         New module mbscasecmp, reduced goal of strcasecmp.
5694         * modules/mbscasecmp: New file.
5695         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
5696         (mbscasecmp): Renamed from strcasecmp.
5697         * lib/strcasecmp.c: Don't include mbuiter.h.
5698         (strcasecmp): Remove support for multibyte locales.
5699         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
5700         Change the conditional link warning.
5701         (mbscasecmp): New declaration.
5702         * m4/mbscasecmp.m4: New file.
5703         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
5704         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
5705         REPLACE_STRCASECMP.
5706         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
5707         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5708         GNULIB_MBSCASECMP.
5709         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
5710         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
5711         * modules/strcase (Files): Remove m4/mbrtowc.m4.
5712         (Depends-on): Remove mbuiter.
5713         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
5714
5715 2007-02-04  Bruno Haible  <bruno@clisp.org>
5716
5717         New module mbsstr. Remove module strstr.
5718         * modules/mbsstr: New file.
5719         * modules/strstr: Remove file.
5720         * lib/mbsstr.c: Renamed from lib/strstr.c.
5721         (mbsstr): Renamed from strstr.
5722         * lib/string_.h (strstr): Remove declaration. Change the conditional
5723         link warning.
5724         (mbsstr): New declaration.
5725         * m4/mbsstr.m4: New file.
5726         * m4/strstr.m4: Remove file.
5727         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
5728         REPLACE_STRSTR.
5729         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
5730         Don't initialize GNULIB_STRSTR.
5731         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
5732         substitute GNULIB_STRSTR and REPLACE_STRSTR.
5733         * MODULES.html.sh (Internationalization functions): Add mbsstr.
5734         (Support for systems lacking ANSI C 89): Remove strstr.
5735
5736 2007-02-04  Bruno Haible  <bruno@clisp.org>
5737
5738         New module mbsrchr.
5739         * modules/mbsrchr: New file.
5740         * lib/mbsrchr.c: New file.
5741         * lib/string_.h (strrchr): Add a conditional link warning.
5742         (mbsrchr): New declaration.
5743         * m4/mbsrchr.m4: New file.
5744         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5745         GNULIB_MBSRCHR.
5746         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
5747         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
5748
5749 2007-02-04  Bruno Haible  <bruno@clisp.org>
5750
5751         New module mbschr.
5752         * modules/mbschr: New file.
5753         * lib/mbschr.c: New file.
5754         * lib/string_.h (strchr): Add a conditional link warning.
5755         (mbschr): New declaration.
5756         * m4/mbschr.m4: New file.
5757         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5758         GNULIB_MBSCHR.
5759         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
5760         * MODULES.html.sh (Internationalization functions): Add mbschr.
5761
5762 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5763
5764         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
5765
5766         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
5767
5768 2007-02-04  Bruno Haible  <bruno@clisp.org>
5769
5770         New module description section 'configure.ac-early'.
5771         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
5772         (func_get_autoconf_early_snippet): New function.
5773         (func_import, func_create_testdir): Use it. Remove special cases for
5774         modules 'extensions' and 'lock'.
5775         * modules/extensions (configure.ac-early): Require
5776         gl_USE_SYSTEM_EXTENSIONS.
5777         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
5778
5779 2007-02-04  Bruno Haible  <bruno@clisp.org>
5780
5781         Make use of gcj-4.3's -fsource and -ftarget option.
5782         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
5783         and if so try the options -fsource and -ftarget.
5784         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
5785         source_version, ftarget_option, target_version arguments.
5786         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
5787         (is_envjavac_oldgcj_14_14_usable): Renamed from
5788         is_envjavac_gcj_14_14_usable.
5789         (is_envjavac_oldgcj_14_13_usable): Renamed from
5790         is_envjavac_gcj_14_13_usable.
5791         (is_gcj_present): Update.
5792         (is_gcj_43, is_gcj43_usable): New functions.
5793         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
5794         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
5795         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
5796         try the options -fsource and -ftarget.
5797
5798 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
5799
5800         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
5801         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
5802         larger value.
5803
5804 2007-02-03  Jim Meyering  <jim@meyering.net>
5805
5806         Give tools a better chance to allocate space for very large buffers.
5807         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
5808
5809         Make pwd and readlink work also when run with an unreadable parent dir
5810         on systems with openat support.
5811         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
5812         provided getcwd function, even when we have openat support.
5813         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
5814
5815 2007-02-02  Bruno Haible  <bruno@clisp.org>
5816
5817         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5818         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
5819         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
5820         portability problems if one of these functions is only used on specific
5821         platforms.
5822         Reported by Paul Eggert.
5823
5824 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
5825
5826         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
5827         is causing more trouble than it's curing.
5828         * lib/regex_internal.h (__mempcpy): Remove.
5829         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
5830         (and make the code a tad smaller to boot).
5831         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
5832
5833 2007-02-02  Jim Meyering  <jim@meyering.net>
5834
5835         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
5836         section, not in the Makefile.am: one.
5837
5838 2007-02-02  Eric Blake  <ebb9@byu.net>
5839
5840         * lib/strchrnul.c: Always include config.h first.
5841
5842         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
5843         gnulib strstr is not necessary here.
5844
5845 2007-02-02  Simon Josefsson  <simon@josefsson.org>
5846
5847         * m4/socklen.m4: Fix typo.
5848
5849 2007-02-02  Eric Blake  <ebb9@byu.net>
5850
5851         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
5852         * modules/netinet_in (Makefile.am): Likewise.
5853
5854 2007-02-01  Bruno Haible  <bruno@clisp.org>
5855
5856         * lib/string_.h (GL_LINK_WARNING): New macro.
5857         (strcasecmp, strstr, strcasestr): If provided by the system,
5858         conditionally define as a macro that leads to a warning instead of to
5859         an error.
5860         (strncasecmp): Conditionally define as a macro that leads to a warning.
5861
5862 2007-02-01  Karl Berry  <karl@gnu.org>
5863
5864         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
5865
5866 2007-02-01  Bruno Haible  <bruno@clisp.org>
5867
5868         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
5869         renamings.
5870
5871 2007-02-01  Eric Blake  <ebb9@byu.net>
5872
5873         * modules/regex (Depends-on): Revert dependence on mempcpy.
5874         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
5875         module's definition of mempcpy.
5876         Reported by Paul Eggert.
5877
5878 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
5879
5880         * lib/string_.h: If the gnulib module XYZ is not present, undefine
5881         the symbol XYZ before redefining it.  This fixes a problem with
5882         programs that don't use XYZ, when compiled on systems that define
5883         XYZ to something else.
5884
5885 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
5886
5887         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
5888         occurs when "mkdir -m foo" creates a setgid directory that is (1)
5889         writeable to group or other and (2) is intended to have a special
5890         mode bit that is set or cleared.  In such a case, the directory
5891         should be neither group- nor other-writeable until the special
5892         mode bits are right.
5893
5894 2007-01-31  Eric Blake  <ebb9@byu.net>
5895
5896         * modules/mountlist (Depends-on): Add strstr.
5897
5898         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
5899         bug.
5900         * modules/string (Makefile.am): Remove redundant replacement.
5901         * modules/regex (Depends-on): Add mempcpy.
5902
5903 2007-01-31  Bruno Haible  <bruno@clisp.org>
5904
5905         New module description field 'Link'.
5906         * gnulib-tool (func_usage): Document --extract-link-directive.
5907         (sed_extract_prog): Recognize 'Link' directive.
5908         (func_get_link_directive): New function.
5909         (func_import): Show summary of link directives.
5910         Handle --extract-link-directive option.
5911         * modules/acl (Link): New section.
5912         * modules/clock-time (Link): New section.
5913         * modules/euidaccess (Link): New section.
5914         * modules/gettext (Link): New section.
5915         * modules/iconv (Link): New section.
5916         * modules/lock (Link): New section.
5917         * modules/nanosleep (Link): New section.
5918         * modules/readline (Link): New section.
5919
5920 2007-01-27  Bruno Haible  <bruno@clisp.org>
5921
5922         Enforce the use of gnulib modules for unportable <string.h> functions.
5923         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
5924         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
5925         (gl_HEADER_STRING_H_BODY): Require it.
5926         * lib/string_.h: If the gnulib module XYZ is not present, redefine
5927         the symbol XYZ to one that gives a link error.
5928         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
5929         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
5930         * modules/mempcpy (configure.ac): Likewise.
5931         * modules/memrchr (configure.ac): Likewise.
5932         * modules/stpcpy (configure.ac): Likewise.
5933         * modules/stpncpy (configure.ac): Likewise.
5934         * modules/strcase (configure.ac): Likewise.
5935         * modules/strcasestr (configure.ac): Likewise.
5936         * modules/strchrnul (configure.ac): Likewise.
5937         * modules/strdup (configure.ac): Likewise.
5938         * modules/strndup (configure.ac): Likewise.
5939         * modules/strnlen (configure.ac): Likewise.
5940         * modules/strpbrk (configure.ac): Likewise.
5941         * modules/strsep (configure.ac): Likewise.
5942         * modules/strstr (configure.ac): Likewise.
5943         * modules/strtok_r (configure.ac): Likewise.
5944
5945 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
5946
5947         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
5948
5949 2007-01-30  Jim Meyering  <jim@meyering.net>
5950
5951         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
5952
5953 2007-01-29  Bruno Haible  <bruno@clisp.org>
5954
5955         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
5956         * lib/execute.c: Likewise.
5957         * lib/pipe.c: Likewise.
5958         * lib/printf-args.h: Likewise.
5959         * lib/printf-args.c: Likewise.
5960         * lib/printf-parse.c: Likewise.
5961         * lib/vasnprintf.c: Likewise.
5962
5963 2007-01-29  Eric Blake  <ebb9@byu.net>
5964
5965         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
5966         declaration.
5967
5968 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
5969
5970         * lib/strptime.h (strptime): Use 'restrict' for args where
5971         POSIX requires this.
5972         * lib/strptime.c (strptime): Likewise.
5973         Change license notice from LGPL to GPL, since gnulib-tool will
5974         change this as needed.
5975         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
5976         defined.
5977         Include "strptime.h" first, to check interface.
5978         Do not #undef _LIBC and _NL_CURRENT.
5979         Do not include <stdlib.h>; no longer needed.
5980         Include "time_r.h" and declare ptime_locale_status
5981         only if _LIBC is not defined.
5982         (__P): Remove unused macro.
5983         (match_string): Bring back glibc version, but use it only if _LIBC
5984         is defined.
5985         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
5986         Remove unnecessary assertion and abort() call.
5987         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
5988         * m4/strptime.m4: Fix serial number comment.
5989         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
5990         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
5991         (Depends-on): Add time_r.
5992
5993 2007-01-29  Bruno Haible  <bruno@clisp.org>
5994
5995         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5996         strptime.
5997         * modules/strptime (Depends-on): Add stdbool.
5998         * lib/strptime.h: Include <time.h> always. Add comments.
5999
6000 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
6001
6002         * modules/strptime: New file.
6003         * lib/strptime.h: New file.
6004         * lib/strptime.c: New file.
6005         * m4/strptime.m4: New file.
6006
6007 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
6008
6009         * MODULES.html.sh: New module mpsort.
6010         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
6011
6012         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
6013         a circularity problem with HP-UX ia64 reported by Bob Proulx in
6014         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
6015         All uses changed.
6016         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
6017         All uses changed.
6018         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
6019         to _Restrict_.
6020         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
6021         the parameter matches the prototype.
6022
6023 2007-01-28  Jim Meyering  <jim@meyering.net>
6024
6025         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
6026         sys/time.h here, reverting that part of the previous patch:
6027         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
6028
6029 2007-01-28  Bruno Haible  <bruno@clisp.org>
6030
6031         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
6032         value of $(SYS_TIME_H).
6033         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6034         remove it conditionally, too. [added by Jim Meyering]
6035         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
6036         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6037         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
6038         GETTIMEOFDAY_REPLACEMENT to 1.
6039
6040 2007-01-28  Bruno Haible  <bruno@clisp.org>
6041
6042         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
6043         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
6044         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
6045         Set UNISTD_H instead of UNISTD_H2.
6046         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
6047
6048 2007-01-28  Bruno Haible  <bruno@clisp.org>
6049
6050         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
6051         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
6052
6053 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6054
6055         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
6056         (func_create_testdir): Ensure C locale for `grep' and `tr'
6057         character ranges.
6058         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
6059         ACLOCAL_AMFLAGS parsing state machine.
6060
6061 2007-01-27  Bruno Haible  <bruno@clisp.org>
6062
6063         * modules/unistr/base: Update.
6064
6065 2007-01-27  Bruno Haible  <bruno@clisp.org>
6066
6067         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6068         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6069         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6070         modules/unistr/u32-mbtouc.
6071         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6072         * lib/unistr.h: Update.
6073         * lib/linebreak.c: Update.
6074         * modules/unistr/u32-mbtouc: Renamed from
6075         modules/unistr/u32-mbtouc-safe.
6076         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6077         * lib/unistr.h: Update.
6078         * lib/unistr/u32-to-u8.c: Update.
6079         * lib/unistr/u32-to-u16.c: Update.
6080
6081 2007-01-27  Bruno Haible  <bruno@clisp.org>
6082
6083         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6084         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6085         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6086         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6087         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6088         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6089         modules/unistr/u16-mbtouc.
6090         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6091         * lib/unistr.h: Update.
6092         * lib/linebreak.c: Update.
6093         * modules/linebreak: Update.
6094         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6095         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6096         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6097         * modules/unistr/u16-mbtouc: Renamed from
6098         modules/unistr/u16-mbtouc-safe.
6099         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6100         * lib/unistr.h: Update.
6101         * lib/unistr/u16-to-u8.c: Update.
6102         * modules/unistr/u16-to-u8: Update.
6103         * lib/unistr/u16-to-u32.c: Update.
6104         * modules/unistr/u16-to-u32: Update.
6105
6106 2007-01-27  Bruno Haible  <bruno@clisp.org>
6107
6108         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6109         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6110         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6111         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6112         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6113         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6114         modules/unistr/u8-mbtouc.
6115         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6116         * lib/unistr.h: Update.
6117         * lib/striconveh.c: Update.
6118         * modules/striconveh: Update.
6119         * lib/linebreak.c: Update.
6120         * modules/linebreak: Update.
6121         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6122         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6123         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6124         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6125         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6126         * lib/unistr.h: Update.
6127         * lib/striconveh.c: Update.
6128         * modules/striconveh: Update.
6129         * lib/unistr/u8-to-u16.c: Update.
6130         * modules/unistr/u8-to-u16: Update.
6131         * lib/unistr/u8-to-u32.c: Update.
6132         * modules/unistr/u8-to-u32: Update.
6133
6134 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6135
6136         Sync from Libtool.
6137         * lib/argz.c: Do not include strings.h nor memory.h, include
6138         string.h unconditionally.  Patch by Simon Josefsson.
6139
6140 2007-01-27  Bruno Haible  <bruno@clisp.org>
6141
6142         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6143         from gl_HEADER_STRING_H_BODY.
6144         (gl_HEADER_STRING_H_BODY): Require it.
6145         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6146         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6147         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6148         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6149         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6150         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6151         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6152         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6153         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6154         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6155         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6156         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6157         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6158         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6159         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6160
6161 2007-01-27  Bruno Haible  <bruno@clisp.org>
6162
6163         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6164         check_PROGRAMS into noinst_PROGRAMS.
6165         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6166         check_PROGRAMS in this case.
6167         (func_import): Set for_test to false.
6168         (func_create_testdir): Set for_test to true.
6169
6170 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6171             Bruno Haible  <bruno@clisp.org>
6172
6173         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6174         (Depends-on): Add string.
6175         (Includes): Use <string.h> instead of strcasestr.h.
6176         * modules/string (Makefile.am): Also substitute the value of
6177         REPLACE_STRCASESTR.
6178         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6179         assume strcasestr is declared in <string.h> not <strings.h>. Also
6180         set REPLACE_STRCASESTR.
6181         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6182         REPLACE_STRCASESTR.
6183         * lib/strcasestr.h: Remove file.
6184         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6185         * lib/string_.h (strcasestr): New declaration.
6186
6187 2007-01-27  Bruno Haible  <bruno@clisp.org>
6188
6189         * lib/string_.h: Use 'extern'.
6190
6191 2007-01-27  Jim Meyering  <jim@meyering.net>
6192
6193         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6194         of set-but-not-used local, "q".
6195
6196         * lib/mempcpy.c: Include <config.h> before <string.h>.
6197         This fixes a compilation error on HP-UX, due to the system's
6198         "restrict"-using mempcpy prototype.
6199
6200 2007-01-26  Bruno Haible  <bruno@clisp.org>
6201
6202         Small optimization.
6203         * lib/javacomp.c: Include c-strstr.h.
6204          (is_envjavac_gcj): Use c_strstr instead of strstr.
6205         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6206
6207 2007-01-26  Bruno Haible  <bruno@clisp.org>
6208
6209         * MODULES.html.sh (Unicode string functions): Add the new modules.
6210
6211         * modules/uniconv/u32-strconv-to-locale: New file.
6212         * lib/uniconv/u32-strconv-to-locale.c: New file.
6213
6214         * modules/uniconv/u16-strconv-to-locale: New file.
6215         * lib/uniconv/u16-strconv-to-locale.c: New file.
6216
6217         * modules/uniconv/u8-strconv-to-locale: New file.
6218         * lib/uniconv/u8-strconv-to-locale.c: New file.
6219
6220         * modules/uniconv/u32-strconv-from-locale: New file.
6221         * lib/uniconv/u32-strconv-from-locale.c: New file.
6222
6223         * modules/uniconv/u16-strconv-from-locale: New file.
6224         * lib/uniconv/u16-strconv-from-locale.c: New file.
6225
6226         * modules/uniconv/u8-strconv-from-locale: New file.
6227         * lib/uniconv/u8-strconv-from-locale.c: New file.
6228
6229         * modules/uniconv/u32-strconv-to-enc: New file.
6230         * lib/uniconv/u32-strconv-to-enc.c: New file.
6231         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6232         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6233
6234         * modules/uniconv/u16-strconv-to-enc: New file.
6235         * lib/uniconv/u16-strconv-to-enc.c: New file.
6236         * lib/uniconv/u-strconv-to-enc.h: New file.
6237         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6238         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6239
6240         * modules/uniconv/u8-strconv-to-enc: New file.
6241         * lib/uniconv/u8-strconv-to-enc.c: New file.
6242         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6243         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6244
6245         * modules/uniconv/u32-strconv-from-enc: New file.
6246         * lib/uniconv/u32-strconv-from-enc.c: New file.
6247         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6248         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6249
6250         * modules/uniconv/u16-strconv-from-enc: New file.
6251         * lib/uniconv/u16-strconv-from-enc.c: New file.
6252         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6253         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6254
6255         * modules/uniconv/u8-strconv-from-enc: New file.
6256         * lib/uniconv/u8-strconv-from-enc.c: New file.
6257         * lib/uniconv/u-strconv-from-enc.h: New file.
6258         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6259         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6260
6261         * modules/uniconv/u32-conv-from-enc: New file.
6262         * lib/uniconv/u32-conv-from-enc.c: New file.
6263         * modules/uniconv/u32-conv-from-enc-tests: New file.
6264         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6265
6266         * modules/uniconv/u16-conv-from-enc: New file.
6267         * lib/uniconv/u16-conv-from-enc.c: New file.
6268         * lib/uniconv/u-conv-from-enc.h: New file.
6269         * modules/uniconv/u16-conv-from-enc-tests: New file.
6270         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6271
6272         * modules/uniconv/u8-conv-from-enc: New file.
6273         * lib/uniconv/u8-conv-from-enc.c: New file.
6274         * modules/uniconv/u8-conv-from-enc-tests: New file.
6275         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6276
6277         * modules/uniconv/base: New file.
6278         * lib/uniconv.h: New file.
6279
6280 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6281
6282         * doc/gnulib-tool.texi (Initial import): Update to match current
6283         behavior with strdup module.
6284         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6285         * lib/memmem.h: Remove; all uses removed.  This is now done
6286         by <string.h>.
6287         * lib/mempcpy.h: Likewise.
6288         * lib/memrchr.h: Likewise.
6289         * lib/stpcpy.h: Likewise.
6290         * lib/stpncpy.h: Likewise.
6291         * lib/strcase.h: Likewise.
6292         * lib/strchrnul.h: Likewise.
6293         * lib/strdup.h: Likewise.
6294         * lib/strndup.h: Likewise.
6295         * lib/strnlen.h: Likewise.
6296         * lib/strpbrk.h: Likewise.
6297         * lib/strsep.h: Likewise.
6298         * lib/strstr.h: Likewise.
6299         * lib/strtok_r.h: Likewise.
6300         * lib/string_.h: New file.
6301         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6302         Rely on <string.h> instead.
6303         * lib/canon-host.c: Likewise.
6304         * lib/chdir-long.c: Likewise.
6305         * lib/concatpath.c: Likewise.
6306         * lib/exclude.c: Likewise.
6307         * lib/fchdir.c: Likewise.
6308         * lib/getaddrinfo.c: Likewise.
6309         * lib/getcwd.c: Likewise.
6310         * lib/getsubopt.c: Likewise.
6311         * lib/glob.c: Likewise.
6312         * lib/hard-locale.c: Likewise.
6313         * lib/iconvme.c: Likewise.
6314         * lib/javacomp.c: Likewise.
6315         * lib/mempcpy.c: Likewise.
6316         * lib/memrchr.c: Likewise.
6317         * lib/regex_internal.h: Likewise.
6318         * lib/stpncpy.c: Likewise.
6319         * lib/strcasecmp.c: Likewise.
6320         * lib/strchrnul.c: Likewise.
6321         * lib/strdup.c: Likewise.
6322         * lib/striconv.c: Likewise.
6323         * lib/striconveh.c: Likewise.
6324         * lib/striconveha.c: Likewise.
6325         * lib/strncasecmp.c: Likewise.
6326         * lib/strndup.c: Likewise.
6327         * lib/strnlen.c: Likewise.
6328         * lib/strsep.c: Likewise.
6329         * lib/strstr.c: Likewise.
6330         * lib/strtok_r.c: Likewise.
6331         * lib/userspec.c: Likewise.
6332         * lib/w32spawn.h: Likewise.
6333         * lib/xstrndup.c: Likewise.
6334         * lib/mountlist.c (strstr): Remove decl.
6335         * m4/string_h.m4: New file.
6336         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6337         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6338         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6339         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6340         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6341         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6342         Set REPLACE_STRCASECMP if necessary.
6343         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6344         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6345         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6346         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6347         HAVE_DECL_STRDUP if necessary.
6348         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
6349         since gl_FUNC_STRNDUP does that now.
6350         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
6351         Check for decl here...
6352         (gl_PREREQ_STRNLEN): ... not here.
6353         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
6354         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
6355         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
6356         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
6357         necessary.
6358         * modules/string: New file.
6359         * modules/memmem (Files): Remove special-purpose include file.
6360         (Depends-on): Add string.
6361         (Include): Include <string.h>, not the removed file.
6362         * modules/mempcpy: Likewise.
6363         * modules/memrchr: Likewise.
6364         * modules/stpcpy: Likewise.
6365         * modules/stpncpy: Likewise.
6366         * modules/strcase: Likewise.
6367         * modules/strchrnul: Likewise.
6368         * modules/strdup: Likewise.
6369         * modules/strndup: Likewise.
6370         * modules/strnlen: Likewise.
6371         * modules/strpbrk: Likewise.
6372         * modules/strsep: Likewise.
6373         * modules/strstr: Likewise.
6374         * modules/strtok_r: Likewise.
6375         * tests/test-dirname.c: Don't include "strdup.h", since
6376         <string.h> now suffices.
6377         * tests/test-memmem.c: Don't include "memmem.h", since
6378         <string.h> now suffices.
6379
6380 2007-01-25  Bruno Haible  <bruno@clisp.org>
6381
6382         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
6383         *resultp is 0.
6384
6385         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
6386         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
6387         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
6388         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
6389
6390         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
6391         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
6392         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
6393         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
6394         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
6395         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
6396
6397 2007-01-24  Bruno Haible  <bruno@clisp.org>
6398
6399         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
6400         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
6401         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
6402         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
6403         gl_FUNC_FTS_CORE.
6404         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
6405         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
6406         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
6407         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
6408         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
6409         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
6410         gl_FUNC_FCHOWNAT.
6411         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
6412         gl_FUNC_STRFTIME.
6413         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
6414         Reported by Ralf Wildenhues.
6415
6416 2007-01-24  Bruno Haible  <bruno@clisp.org>
6417
6418         Drop AC_REQUIRE calls that are redundant with the module dependencies.
6419         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
6420         gl_GETADDRINFO.
6421         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
6422         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
6423         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
6424
6425 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6426
6427         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
6428         Don't use 'exit'; just return from 'main'.
6429         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
6430
6431         * lib/fnmatch_.h: Readjust white space and comments to match
6432         glibc, to avoid spurious diffs.
6433
6434 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6435
6436         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
6437         2004-12-01 change by Jakub Jelinek, since this code won't compile
6438         if !LIBC.  Problem reported by Bob Proulx.
6439
6440 2007-01-23  Bruno Haible  <bruno@clisp.org>
6441
6442         * lib/striconveh.c: Include c-strcaseeq.h.
6443         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
6444         * modules/striconveh (Depends-on): Add c-strcaseeq.
6445
6446 2007-01-23  Bruno Haible  <bruno@clisp.org>
6447
6448         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
6449
6450         * modules/c-strcaseeq: New file.
6451         * lib/c-strcaseeq.h: New file.
6452
6453         * modules/streq: New file.
6454         * lib/streq.h: New file.
6455
6456 2007-01-23  Bruno Haible  <bruno@clisp.org>
6457
6458         * modules/striconveha-tests: New file.
6459         * tests/test-striconveha.c: New file.
6460
6461         * lib/striconveha.h: Include <stdbool.h>.
6462         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
6463         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
6464         (mem_iconveha_notranslit): Renamed from mem_iconveha.
6465         (mem_iconveha): New function.
6466         (str_iconveha_notranslit): Renamed from str_iconveha.
6467         (str_iconveha): New function.
6468         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
6469         c-strcase.
6470
6471 2007-01-23  Bruno Haible  <bruno@clisp.org>
6472
6473         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
6474         encodings without forgiving before trying any encoding with handler.
6475         (str_iconveha): Try all encodings without forgiving before trying any
6476         encoding with handler.
6477
6478 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6479
6480         Import the following changes from libc.
6481
6482         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6483
6484         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
6485
6486         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6487
6488         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
6489         normal_bracket label.
6490
6491         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
6492
6493         [BZ #361]
6494         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
6495         to normal_bracket after fetching the next character.
6496
6497 2007-01-22  Bruno Haible  <bruno@clisp.org>
6498
6499         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
6500         argument.
6501         * lib/striconveh.c (iconv_carefully_1): New function.
6502         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
6503         argument.
6504         (str_cd_iconveh): Update.
6505         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
6506         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
6507         * tests/test-striconveh.c (MAGIC): New macro.
6508         (new_offsets): New function.
6509         (main): Test call with and without offsets.
6510
6511 2007-01-22  Bruno Haible  <bruno@clisp.org>
6512
6513         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
6514         * modules/sys_select (Makefile.am): Likewise.
6515         * modules/sys_socket (Makefile.am): Likewise.
6516         * modules/sys_time (Makefile.am): Likewise.
6517
6518 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6519
6520         * modules/gettimeofday (License): Change from GPL to LGPL, since
6521         gettimeofday is a library function.
6522
6523 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6524
6525         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
6526
6527 2007-01-21  Bruno Haible  <bruno@clisp.org>
6528
6529         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
6530
6531 2007-01-21  Bruno Haible  <bruno@clisp.org>
6532
6533         * modules/striconveha: New file.
6534         * lib/striconveha.h: New file.
6535         * lib/striconveha.c: New file.
6536         * MODULES.html.sh (Internationalization functions): Add striconveha.
6537         * lib/striconv.c (str_iconv): Optimize the case of an empty input
6538         string.
6539         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
6540
6541 2007-01-21  Bruno Haible  <bruno@clisp.org>
6542
6543         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
6544         * lib/striconveh.c (str_iconveh): Likewise.
6545
6546 2007-01-21  Bruno Haible  <bruno@clisp.org>
6547
6548         * lib/striconveh.h (mem_iconveh): New declaration.
6549         * lib/striconveh.c (mem_iconveh): New function.
6550         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
6551
6552 2007-01-21  Bruno Haible  <bruno@clisp.org>
6553
6554         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
6555
6556         * lib/striconveh.h (mem_cd_iconveh): Change specification.
6557         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
6558         original result buffer.
6559         (str_cd_iconveh): Update.
6560         * tests/test-striconveh.c (main): Update.
6561
6562         * lib/striconv.h (mem_cd_iconv): Change specification.
6563         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
6564         result buffer.
6565         (str_cd_iconv): Update.
6566         * tests/test-striconv.c (main): Update.
6567
6568 2007-01-21  Bruno Haible  <bruno@clisp.org>
6569
6570         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
6571
6572 2007-01-20  Jim Meyering  <jim@meyering.net>
6573
6574         * lib/userspec.c (parse_with_separator): If a user or group string
6575         starts with "+", skip the corresponding name-to-ID look-up, since
6576         such a look-up must fail: user and group names may not include "+".
6577
6578 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
6579
6580         * lib/poll.c: Include sys/time.h and time.h unconditionally,
6581         since we now assume the sys_time module.
6582         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
6583         check for sys/time.h; no longer needed.
6584         * modules/poll (Depends-on): Depend on sys_time.
6585
6586 2007-01-18  Bruno Haible  <bruno@clisp.org>
6587
6588         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
6589         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6590
6591         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
6592         gettimeofday.
6593
6594         * tests/test-gettimeofday.c: Include <time.h>.
6595         (dummy): Remove variable.
6596
6597         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
6598         gl_HEADER_SYS_TIME_H.
6599         (gl_HEADER_SYS_TIME_H): New macro.
6600
6601         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
6602         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6603         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
6604         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
6605         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6606         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
6607         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
6608         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6609         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
6610         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
6611         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6612
6613         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
6614         last change; it caused a compilation error when cross-compiling to
6615         Cygwin.
6616
6617 2007-01-18  Jim Meyering  <jim@meyering.net>
6618
6619         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
6620         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
6621         than the race-prone "test -d sys || mkdir sys".
6622         (configure.ac): Use AC_PROG_MKDIR_P.
6623         * modules/sys_select: Likewise.
6624         * modules/sys_socket: Likewise.
6625         * modules/sys_time: Likewise.
6626
6627 2007-01-18  Eric Blake  <ebb9@byu.net>
6628
6629         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
6630         replace gettimeofday.
6631         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6632         name, to avoid infinite recursion.
6633
6634 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
6635
6636         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
6637         module sys_time.
6638         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
6639         assume timespec.h defines struct timeval.
6640         * lib/settime.c: Likewise.
6641         * lib/utimens.c: Likewise.
6642         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
6643         since we now assume the gettimeofday module.
6644         * lib/tempname.c (__gen_tempname): Likewise.
6645         * lib/gettimeofday.h: Remove.
6646         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
6647         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
6648         Include <time.h>, for 'time()'.
6649         (localtime_buffer_addr): Also use this workaround if
6650         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
6651         to simplify the uses.  All uses changed.
6652         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
6653         that #undef is inside {}, and 'const' follows type name consistently.
6654         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
6655         (gettimeofday): Do not use the maximum possible value for
6656         tv->tv_usec, since that might break usages other than ls.c.
6657         Instead, we'll leave ls.c alone.  This undoes today's patch
6658         by Bruno.  Add a compile-time warning for 1s-clock resolution;
6659         we've never observed the problem but might as well keep the
6660         canary.
6661         * lib/nanosleep.c: Include timespec.h first, for interface check.
6662         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
6663         now assume the sys_time module.
6664         * lib/tempname.c: Likewise.
6665         * lib/timespec.h: Likewise.
6666         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
6667         needed.
6668         * lib/strftime.c: Likewise.
6669         * lib/timespec.h: Likewise.
6670         * lib/posixtm.c: Include posixtm.h first, for interface check.
6671         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
6672         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
6673         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
6674         * lib/sys_time_.h: New file.
6675         * lib/timespec.h (struct timespec): Use long int, not long.
6676         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6677         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
6678         Remove obsolescent call to AC_HEADER_TIME.
6679         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
6680         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6681         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6682         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
6683         Likewise.
6684         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
6685         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
6686         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
6687         into the sys_time module.  Check for gettimeofday just once.
6688         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
6689         for gettimeofday signature to just check the signature.  Merely
6690         compile it, since linking doesn't test signature.  Improve test for
6691         whether gettimeofday.o is actually needed.
6692         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
6693         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
6694         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
6695         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6696         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
6697         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
6698         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
6699         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
6700         than worrying about sys/time.h.
6701         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6702         Don't bother worrying about TIME_WITH_SYS_TIME.
6703         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
6704         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
6705         * m4/sys_time_h.m4: New file.
6706         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
6707         Don't include sys/time.h.  Return from main rather than exiting.
6708         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
6709         all uses changed.
6710         * modules/gethrxtime (Depends-on): Add sys_time.
6711         * modules/gettime (Depends-on): Likewise.
6712         * modules/gettimeofday (Depends-on): Likewise.
6713         * modules/nanosleep (Depends-on): Likewise.
6714         * modules/settime (Depends-on): Likewise.
6715         * modules/tempname (Depends-on): Likewise.
6716         * modules/utimens (Depends-on): Likewise.
6717         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
6718         (Include:) Change back to <sys/time.h>.
6719         (Maintainer:) Add self.
6720         * modules/sys_time: New file.
6721         * modules/tempname (Depends-on): Add gettimeofday.
6722         * tests/test-gettimeofday.c: Include <sys/time.h>
6723         rather than gettimeofday.h.
6724
6725 2007-01-17  Bruno Haible  <bruno@clisp.org>
6726
6727         * gnulib-tool (func_get_license): Revert last patch. Instead, let
6728         the license default to GPL.
6729         (func_create_testdir): Don't complain if a module is LGPL and its
6730         tests module depends on GPLed modules.
6731
6732 2007-01-17  Bruno Haible  <bruno@clisp.org>
6733
6734         * lib/gettimeofday.c (gettimeofday): Add code for the case
6735         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
6736         maximum possible value for tv->tv_usec, rather than the minimum one.
6737
6738 2005-10-08  Martin Lambers  <marlam@marlam.de>
6739 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6740 2007-01-16  Bruno Haible  <bruno@clisp.org>
6741
6742         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
6743         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
6744         gl_FUNC_GETTIMEOFDAY.
6745         (Include): Add gettimeofday.h.
6746         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
6747         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
6748         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
6749         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
6750         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
6751         * lib/gettimeofday.h: New file.
6752         * lib/gettimeofday.c: Include <sys/timeb.h>.
6753         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
6754         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6755         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
6756         fall back on time().
6757
6758         * tests/test-gettimeofday.c: New file.
6759         * modules/gettimeofday-tests: New file.
6760
6761 2007-01-16  Eric Blake  <ebb9@byu.net>
6762
6763         * modules/fnmatch (Depends-on): Depend on wchar.
6764         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
6765         * m4/fnmatch.m4: Likewise.
6766         * modules/mbchar (Makefile.am): Assume <wchar.h>.
6767         * m4/mbchar.m4: Likewise.
6768         * modules/mbswidth (Depends-on): Depend on wchar.
6769         * lib/mbswidth.c: Assume <wchar.h>.
6770         * m4/mbswidth.m4: Likewise.
6771         * modules/quotearg (Depends-on): Depend on wchar.
6772         * lib/quotearg.c: Assume <wchar.h>.
6773         * m4/quotearg.m4: Likewise.
6774         * modules/regex (Depends-on): Depend on wchar.
6775         * lib/regex_internal.h: Assume <wchar.h>.
6776         * m4/regex.m4: Likewise.
6777         * modules/stdint (Depends-on): Depend on wchar.
6778         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
6779         * m4/stdint.m4: Likewise.
6780         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
6781         * modules/strftime (Depends-on): Depend on wchar.
6782         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
6783         * modules/strtol (Depends-on): Depend on wchar.
6784         * lib/strtol.c: Assume <wchar.h>.
6785         * modules/wcwidth (Depends-on): Depend on wchar.
6786         * lib/wcwidth.h: Assume <wchar.h>.
6787         * m4/wcwidth.m4: Likewise.
6788
6789 2007-01-16  Bruno Haible  <bruno@clisp.org>
6790
6791         * modules/csharpexec-script: New, created from...
6792         * modules/csharpexec: ... this.
6793
6794 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
6795
6796         * modules/javaexec-script: New, created from...
6797         * modules/javaexec: ... this.
6798
6799 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6800
6801         * modules/poll (Dependencies): Add sys_select.
6802
6803 2007-01-15  Jim Meyering  <jim@meyering.net>
6804
6805         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
6806         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
6807         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
6808         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
6809
6810 2007-01-15  Bruno Haible  <bruno@clisp.org>
6811
6812         * modules/striconveh: New file.
6813         * lib/striconveh.h: New file.
6814         * lib/striconveh.c: New file.
6815         * MODULES.html.sh (Internationalization functions): Add striconveh.
6816
6817         * modules/striconveh-tests: New file.
6818         * tests/test-striconveh.c: New file.
6819
6820 2007-01-15  Bruno Haible  <bruno@clisp.org>
6821
6822         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
6823         not from GNU libiconv or GNU libc.
6824
6825 2007-01-15  Bruno Haible  <bruno@clisp.org>
6826
6827         * doc/gnulib-intro.texi (Copyright): Explain the different license
6828         terms for module descriptions, autoconf macros, tests, documentation.
6829
6830 2007-01-14  Bruno Haible  <bruno@clisp.org>
6831
6832         * modules/striconv-tests: New file.
6833         * tests/test-striconv.c: New file.
6834
6835 2007-01-14  Bruno Haible  <bruno@clisp.org>
6836
6837         * modules/iconv-tests: New file.
6838         * tests/test-iconv.c: New file.
6839
6840 2007-01-14  Bruno Haible  <bruno@clisp.org>
6841
6842         * gnulib-tool (func_get_license): For test modules, use the license of
6843         the main module.
6844
6845 2007-01-14  Bruno Haible  <bruno@clisp.org>
6846
6847         * modules/iconv (Include): Clarify that <iconv.h> can only be included
6848         if iconv is found to exist.
6849
6850 2007-01-14  Bruno Haible  <bruno@clisp.org>
6851
6852         * modules/c-ctype-tests: New file.
6853         * tests/test-c-ctype.c: New file.
6854
6855 2007-01-14  Bruno Haible  <bruno@clisp.org>
6856
6857         * modules/binary-io-tests: New file.
6858         * tests/test-binary-io.sh: New file.
6859         * tests/test-binary-io.c: New file.
6860
6861 2007-01-14  Bruno Haible  <bruno@clisp.org>
6862
6863         * modules/array-oset-tests: New file.
6864         * tests/test-array_oset.c: New file.
6865
6866 2007-01-14  Bruno Haible  <bruno@clisp.org>
6867
6868         * modules/array-list-tests: New file.
6869         * tests/test-array_list.c: New file.
6870
6871 2007-01-14  Bruno Haible  <bruno@clisp.org>
6872
6873         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
6874         and make.
6875         Reported by Simon Josefsson in
6876         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
6877
6878 2007-01-14  Bruno Haible  <bruno@clisp.org>
6879
6880         * modules/allocsa-tests: New file.
6881         * tests/test-allocsa.c: New file.
6882
6883 2007-01-14  Bruno Haible  <bruno@clisp.org>
6884
6885         * modules/fchdir (Depends-on): Add absolute-header.
6886         * modules/unistd (Depends-on): Likewise.
6887
6888 2006-12-30  Bruno Haible  <bruno@clisp.org>
6889
6890         * modules/fchdir: New file.
6891         * modules/unistd (Files): Add lib/unistd_.h.
6892         (Makefile.am): Generate unistd.h from unistd_.h.
6893         * lib/fchdir.c: New file.
6894         * lib/dirent_.h: New file.
6895         * lib/unistd_.h: New file.
6896         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
6897         * m4/fchdir.m4: New file.
6898         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
6899         (gl_HEADER_UNISTD): Invoke it.
6900         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
6901         function.
6902         * lib/backupfile.c (opendir, closedir): Undefine.
6903         * lib/chown.c (open, close): Undefine.
6904         * lib/clean-temp.c (open, close): Undefine.
6905         * lib/copy-file.c (open, close): Undefine.
6906         * lib/execute.c (open, close): Undefine.
6907         * lib/fsusage.c (open, close): Undefine.
6908         * lib/gc-gnulib.c (open, close): Undefine.
6909         * lib/getcwd.c (opendir, closedir): Undefine.
6910         * lib/glob.c (opendir, closedir): Undefine.
6911         * lib/javacomp.c (open, close): Undefine.
6912         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
6913         * lib/openat-proc.c (open, close): Undefine.
6914         * lib/pagealign_alloc.c (open, close): Undefine.
6915         * lib/pipe.c (open, close): Undefine.
6916         * lib/progreloc.c (open, close): Undefine.
6917         * lib/savedir.c (opendir, closedir): Undefine.
6918         * lib/utime.c (open, close): Undefine.
6919         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
6920
6921 2007-01-10  Bruno Haible  <bruno@clisp.org>
6922
6923         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
6924
6925 2007-01-12  Eric Blake  <ebb9@byu.net>
6926
6927         Provide a robust <wchar.h>.  Further simplifications are now
6928         possible in other modules, but not included here.
6929         * modules/wchar: New module.
6930         * m4/wchar.m4: New file.
6931         * lib/wchar_.h: Likewise.
6932         * modules/mbchar (Depends-on): Depend on wchar, as the first use
6933         of the new module.
6934         * MODULES.html.sh (Extended multibyte and wide character utilities):
6935         New section.
6936
6937 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
6938
6939         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
6940         to a reasonable default for memory allocation.
6941         (xreadlink): Don't allocate a huge buffer, to work around a buggy
6942         file system that reports garbage st_size values for symlinks.
6943         Problem reported by Liyang Hu.
6944
6945 2007-01-11  Simon Josefsson  <simon@josefsson.org>
6946
6947         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
6948         Emacs .#* auto-save files).
6949
6950 2007-01-11  Bruno Haible  <bruno@clisp.org>
6951
6952         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
6953         directory.
6954
6955 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6956
6957         Use @...@ consistently in lib/wctype_.h.
6958         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
6959         on it being set to 1 or 0.
6960         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
6961         go back to AC_SUBSTing it.
6962         * modules/wctype (Makefile.am): Undo previous change.
6963
6964 2007-01-10  Eric Blake  <ebb9@byu.net>
6965
6966         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
6967         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
6968         * modules/wctype (Makefile.am): Likewise.
6969         Reported by Chris McGuire.
6970
6971 2007-01-10  Jim Meyering  <jim@meyering.net>
6972
6973         fts.c: a small readability/maintainability improvement
6974         * lib/fts.c (fts_read): Make this code slightly more readable and
6975         maintainable by hoisting the "sp->fts_cur = p" assignments to
6976         immediately follow the statements that set P.  Derived from
6977         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
6978
6979 2007-01-10  Eric Blake  <ebb9@byu.net>
6980
6981         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
6982         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
6983         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
6984         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
6985         Reported by Chris McGuire.
6986
6987 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6988
6989         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
6990         in sed script.
6991
6992 2007-01-09  Bruno Haible  <bruno@clisp.org>
6993
6994         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
6995         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
6996         variables.
6997         (func_module): Use them.
6998
6999 2007-01-09  Bruno Haible  <bruno@clisp.org>
7000
7001         * modules/unistr/base: New file.
7002         * lib/unistr.h: New file.
7003
7004         * modules/unistr/u8-to-u16: New file.
7005         * lib/unistr/u8-to-u16.c: New file.
7006
7007         * modules/unistr/u8-to-u32: New file.
7008         * lib/unistr/u8-to-u32.c: New file.
7009
7010         * modules/unistr/u16-to-u8: New file.
7011         * lib/unistr/u16-to-u8.c: New file.
7012
7013         * modules/unistr/u16-to-u32: New file.
7014         * lib/unistr/u16-to-u32.c: New file.
7015
7016         * modules/unistr/u32-to-u8: New file.
7017         * lib/unistr/u32-to-u8.c: New file.
7018
7019         * modules/unistr/u32-to-u16: New file.
7020         * lib/unistr/u32-to-u16.c: New file.
7021
7022         * modules/unistr/u8-check: New file.
7023         * modules/unistr/u16-check: New file.
7024         * modules/unistr/u32-check: New file.
7025         * lib/unistr/u8-check.c: New file.
7026         * lib/unistr/u16-check.c: New file.
7027         * lib/unistr/u32-check.c: New file.
7028
7029         * modules/unistr/u8-chr: New file.
7030         * modules/unistr/u16-chr: New file.
7031         * modules/unistr/u32-chr: New file.
7032         * lib/unistr/u8-chr.c: New file.
7033         * lib/unistr/u16-chr.c: New file.
7034         * lib/unistr/u32-chr.c: New file.
7035
7036         * modules/unistr/u8-cmp: New file.
7037         * modules/unistr/u16-cmp: New file.
7038         * modules/unistr/u32-cmp: New file.
7039         * lib/unistr/u8-cmp.c: New file.
7040         * lib/unistr/u16-cmp.c: New file.
7041         * lib/unistr/u32-cmp.c: New file.
7042
7043         * modules/unistr/u8-cpy: New file.
7044         * modules/unistr/u16-cpy: New file.
7045         * modules/unistr/u32-cpy: New file.
7046         * lib/unistr/u8-cpy.c: New file.
7047         * lib/unistr/u16-cpy.c: New file.
7048         * lib/unistr/u32-cpy.c: New file.
7049         * lib/unistr/u-cpy.h: New file.
7050
7051         * modules/unistr/u8-cpy-alloc: New file.
7052         * modules/unistr/u16-cpy-alloc: New file.
7053         * modules/unistr/u32-cpy-alloc: New file.
7054         * lib/unistr/u8-cpy-alloc.c: New file.
7055         * lib/unistr/u16-cpy-alloc.c: New file.
7056         * lib/unistr/u32-cpy-alloc.c: New file.
7057         * lib/unistr/u-cpy-alloc.h: New file.
7058
7059         * modules/unistr/u8-endswith: New file.
7060         * modules/unistr/u16-endswith: New file.
7061         * modules/unistr/u32-endswith: New file.
7062         * lib/unistr/u8-endswith.c: New file.
7063         * lib/unistr/u16-endswith.c: New file.
7064         * lib/unistr/u32-endswith.c: New file.
7065         * lib/unistr/u-endswith.h: New file.
7066
7067         * modules/unistr/u8-mblen: New file.
7068         * modules/unistr/u16-mblen: New file.
7069         * modules/unistr/u32-mblen: New file.
7070         * lib/unistr/u8-mblen.c: New file.
7071         * lib/unistr/u16-mblen.c: New file.
7072         * lib/unistr/u32-mblen.c: New file.
7073
7074         * modules/unistr/u8-mbtouc: New file.
7075         * modules/unistr/u16-mbtouc: New file.
7076         * modules/unistr/u32-mbtouc: New file.
7077         * lib/unistr/u8-mbtouc.c: New file.
7078         * lib/unistr/u16-mbtouc.c: New file.
7079         * lib/unistr/u32-mbtouc.c: New file.
7080
7081         * modules/unistr/u8-mbtouc-safe: New file.
7082         * modules/unistr/u16-mbtouc-safe: New file.
7083         * modules/unistr/u32-mbtouc-safe: New file.
7084         * lib/unistr/u8-mbtouc-safe.c: New file.
7085         * lib/unistr/u16-mbtouc-safe.c: New file.
7086         * lib/unistr/u32-mbtouc-safe.c: New file.
7087
7088         * modules/unistr/u8-move: New file.
7089         * modules/unistr/u16-move: New file.
7090         * modules/unistr/u32-move: New file.
7091         * lib/unistr/u8-move.c: New file.
7092         * lib/unistr/u16-move.c: New file.
7093         * lib/unistr/u32-move.c: New file.
7094         * lib/unistr/u-move.h: New file.
7095
7096         * modules/unistr/u8-next: New file.
7097         * modules/unistr/u16-next: New file.
7098         * modules/unistr/u32-next: New file.
7099         * lib/unistr/u8-next.c: New file.
7100         * lib/unistr/u16-next.c: New file.
7101         * lib/unistr/u32-next.c: New file.
7102
7103         * modules/unistr/u8-prev: New file.
7104         * modules/unistr/u16-prev: New file.
7105         * modules/unistr/u32-prev: New file.
7106         * lib/unistr/u8-prev.c: New file.
7107         * lib/unistr/u16-prev.c: New file.
7108         * lib/unistr/u32-prev.c: New file.
7109
7110         * modules/unistr/u8-set: New file.
7111         * modules/unistr/u16-set: New file.
7112         * modules/unistr/u32-set: New file.
7113         * lib/unistr/u8-set.c: New file.
7114         * lib/unistr/u16-set.c: New file.
7115         * lib/unistr/u32-set.c: New file.
7116         * lib/unistr/u-set.h: New file.
7117
7118         * modules/unistr/u8-startswith: New file.
7119         * modules/unistr/u16-startswith: New file.
7120         * modules/unistr/u32-startswith: New file.
7121         * lib/unistr/u8-startswith.c: New file.
7122         * lib/unistr/u16-startswith.c: New file.
7123         * lib/unistr/u32-startswith.c: New file.
7124         * lib/unistr/u-startswith.h: New file.
7125
7126         * modules/unistr/u8-stpcpy: New file.
7127         * modules/unistr/u16-stpcpy: New file.
7128         * modules/unistr/u32-stpcpy: New file.
7129         * lib/unistr/u8-stpcpy.c: New file.
7130         * lib/unistr/u16-stpcpy.c: New file.
7131         * lib/unistr/u32-stpcpy.c: New file.
7132         * lib/unistr/u-stpcpy.h: New file.
7133
7134         * modules/unistr/u8-stpncpy: New file.
7135         * modules/unistr/u16-stpncpy: New file.
7136         * modules/unistr/u32-stpncpy: New file.
7137         * lib/unistr/u8-stpncpy.c: New file.
7138         * lib/unistr/u16-stpncpy.c: New file.
7139         * lib/unistr/u32-stpncpy.c: New file.
7140         * lib/unistr/u-stpncpy.h: New file.
7141
7142         * modules/unistr/u8-strcat: New file.
7143         * modules/unistr/u16-strcat: New file.
7144         * modules/unistr/u32-strcat: New file.
7145         * lib/unistr/u8-strcat.c: New file.
7146         * lib/unistr/u16-strcat.c: New file.
7147         * lib/unistr/u32-strcat.c: New file.
7148         * lib/unistr/u-strcat.h: New file.
7149
7150         * modules/unistr/u8-strchr: New file.
7151         * modules/unistr/u16-strchr: New file.
7152         * modules/unistr/u32-strchr: New file.
7153         * lib/unistr/u8-strchr.c: New file.
7154         * lib/unistr/u16-strchr.c: New file.
7155         * lib/unistr/u32-strchr.c: New file.
7156
7157         * modules/unistr/u8-strcmp: New file.
7158         * modules/unistr/u16-strcmp: New file.
7159         * modules/unistr/u32-strcmp: New file.
7160         * lib/unistr/u8-strcmp.c: New file.
7161         * lib/unistr/u16-strcmp.c: New file.
7162         * lib/unistr/u32-strcmp.c: New file.
7163
7164         * modules/unistr/u8-strcpy: New file.
7165         * modules/unistr/u16-strcpy: New file.
7166         * modules/unistr/u32-strcpy: New file.
7167         * lib/unistr/u8-strcpy.c: New file.
7168         * lib/unistr/u16-strcpy.c: New file.
7169         * lib/unistr/u32-strcpy.c: New file.
7170         * lib/unistr/u-strcpy.h: New file.
7171
7172         * modules/unistr/u8-strcspn: New file.
7173         * modules/unistr/u16-strcspn: New file.
7174         * modules/unistr/u32-strcspn: New file.
7175         * lib/unistr/u8-strcspn.c: New file.
7176         * lib/unistr/u16-strcspn.c: New file.
7177         * lib/unistr/u32-strcspn.c: New file.
7178         * lib/unistr/u-strcspn.h: New file.
7179
7180         * modules/unistr/u8-strdup: New file.
7181         * modules/unistr/u16-strdup: New file.
7182         * modules/unistr/u32-strdup: New file.
7183         * lib/unistr/u8-strdup.c: New file.
7184         * lib/unistr/u16-strdup.c: New file.
7185         * lib/unistr/u32-strdup.c: New file.
7186         * lib/unistr/u-strdup.h: New file.
7187
7188         * modules/unistr/u8-strlen: New file.
7189         * modules/unistr/u16-strlen: New file.
7190         * modules/unistr/u32-strlen: New file.
7191         * lib/unistr/u8-strlen.c: New file.
7192         * lib/unistr/u16-strlen.c: New file.
7193         * lib/unistr/u32-strlen.c: New file.
7194         * lib/unistr/u-strlen.h: New file.
7195
7196         * modules/unistr/u8-strmblen: New file.
7197         * modules/unistr/u16-strmblen: New file.
7198         * modules/unistr/u32-strmblen: New file.
7199         * lib/unistr/u8-strmblen.c: New file.
7200         * lib/unistr/u16-strmblen.c: New file.
7201         * lib/unistr/u32-strmblen.c: New file.
7202
7203         * modules/unistr/u8-strmbtouc: New file.
7204         * modules/unistr/u16-strmbtouc: New file.
7205         * modules/unistr/u32-strmbtouc: New file.
7206         * lib/unistr/u8-strmbtouc.c: New file.
7207         * lib/unistr/u16-strmbtouc.c: New file.
7208         * lib/unistr/u32-strmbtouc.c: New file.
7209
7210         * modules/unistr/u8-strncat: New file.
7211         * modules/unistr/u16-strncat: New file.
7212         * modules/unistr/u32-strncat: New file.
7213         * lib/unistr/u8-strncat.c: New file.
7214         * lib/unistr/u16-strncat.c: New file.
7215         * lib/unistr/u32-strncat.c: New file.
7216         * lib/unistr/u-strncat.h: New file.
7217
7218         * modules/unistr/u8-strncmp: New file.
7219         * modules/unistr/u16-strncmp: New file.
7220         * modules/unistr/u32-strncmp: New file.
7221         * lib/unistr/u8-strncmp.c: New file.
7222         * lib/unistr/u16-strncmp.c: New file.
7223         * lib/unistr/u32-strncmp.c: New file.
7224
7225         * modules/unistr/u8-strncpy: New file.
7226         * modules/unistr/u16-strncpy: New file.
7227         * modules/unistr/u32-strncpy: New file.
7228         * lib/unistr/u8-strncpy.c: New file.
7229         * lib/unistr/u16-strncpy.c: New file.
7230         * lib/unistr/u32-strncpy.c: New file.
7231         * lib/unistr/u-strncpy.h: New file.
7232
7233         * modules/unistr/u8-strnlen: New file.
7234         * modules/unistr/u16-strnlen: New file.
7235         * modules/unistr/u32-strnlen: New file.
7236         * lib/unistr/u8-strnlen.c: New file.
7237         * lib/unistr/u16-strnlen.c: New file.
7238         * lib/unistr/u32-strnlen.c: New file.
7239         * lib/unistr/u-strnlen.h: New file.
7240
7241         * modules/unistr/u8-strpbrk: New file.
7242         * modules/unistr/u16-strpbrk: New file.
7243         * modules/unistr/u32-strpbrk: New file.
7244         * lib/unistr/u8-strpbrk.c: New file.
7245         * lib/unistr/u16-strpbrk.c: New file.
7246         * lib/unistr/u32-strpbrk.c: New file.
7247         * lib/unistr/u-strpbrk.h: New file.
7248
7249         * modules/unistr/u8-strrchr: New file.
7250         * modules/unistr/u16-strrchr: New file.
7251         * modules/unistr/u32-strrchr: New file.
7252         * lib/unistr/u8-strrchr.c: New file.
7253         * lib/unistr/u16-strrchr.c: New file.
7254         * lib/unistr/u32-strrchr.c: New file.
7255
7256         * modules/unistr/u8-strspn: New file.
7257         * modules/unistr/u16-strspn: New file.
7258         * modules/unistr/u32-strspn: New file.
7259         * lib/unistr/u8-strspn.c: New file.
7260         * lib/unistr/u16-strspn.c: New file.
7261         * lib/unistr/u32-strspn.c: New file.
7262         * lib/unistr/u-strspn.h: New file.
7263
7264         * modules/unistr/u8-strstr: New file.
7265         * modules/unistr/u16-strstr: New file.
7266         * modules/unistr/u32-strstr: New file.
7267         * lib/unistr/u8-strstr.c: New file.
7268         * lib/unistr/u16-strstr.c: New file.
7269         * lib/unistr/u32-strstr.c: New file.
7270         * lib/unistr/u-strstr.h: New file.
7271
7272         * modules/unistr/u8-strtok: New file.
7273         * modules/unistr/u16-strtok: New file.
7274         * modules/unistr/u32-strtok: New file.
7275         * lib/unistr/u8-strtok.c: New file.
7276         * lib/unistr/u16-strtok.c: New file.
7277         * lib/unistr/u32-strtok.c: New file.
7278         * lib/unistr/u-strtok.h: New file.
7279
7280         * modules/unistr/u8-uctomb: New file.
7281         * modules/unistr/u16-uctomb: New file.
7282         * modules/unistr/u32-uctomb: New file.
7283         * lib/unistr/u8-uctomb.c: New file.
7284         * lib/unistr/u16-uctomb.c: New file.
7285         * lib/unistr/u32-uctomb.c: New file.
7286
7287         * MODULES.html.sh (Unicode string functions): Add the new modules.
7288
7289 2007-01-08  Bruno Haible  <bruno@clisp.org>
7290
7291         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7292         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7293         subdirectories.
7294
7295 2007-01-08  Karl Berry  <karl@gnu.org>
7296
7297         * doc/error.texi: mention that main() fns must set program_name
7298         when progname is used.
7299
7300 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7301
7302         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7303         WCTYPE_H is empty, for the benefit of builds from non-distclean
7304         directories.  Problem reported by Eric Blake in
7305         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7306
7307 2007-01-08  Bruno Haible  <bruno@clisp.org>
7308
7309         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7310         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7311         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7312         PROVIDE_CANONICALIZE_FILENAME_MODE.
7313         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7314
7315 2007-01-08  Bruno Haible  <bruno@clisp.org>
7316
7317         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7318         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7319         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7320         * lib/fts.c: Likewise.
7321         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7322
7323 2006-12-25  Bruno Haible  <bruno@clisp.org>
7324
7325         * modules/utf8-ucs4-safe: New file.
7326         * lib/utf8-ucs4-safe.h: New file.
7327         * lib/unistr/utf8-ucs4-safe.c: New file.
7328
7329         * modules/utf16-ucs4-safe: New file.
7330         * lib/utf16-ucs4-safe.h: New file.
7331         * lib/unistr/utf16-ucs4-safe.c: New file.
7332
7333         * MODULES.html.sh (Unicode string functions): Add the new modules.
7334
7335 2007-01-08  Bruno Haible  <bruno@clisp.org>
7336
7337         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7338         (Depends-on): Add unitypes.
7339         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7340         (u8_mbtouc_aux): Move out to separate file.
7341         (u8_mbtouc): Use ucs4_t, uint8_t types.
7342         * lib/unistr/utf8-ucs4.c: New file.
7343
7344         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7345         (Depends-on): Add unitypes.
7346         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7347         (u16_mbtouc_aux): Move out to separate file.
7348         (u16_mbtouc): Use ucs4_t, uint16_t types.
7349         * lib/unistr/utf16-ucs4.c: New file.
7350
7351         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
7352         (Depends-on): Add unitypes.
7353         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
7354         (u8_uctomb_aux): Move out to separate file.
7355         (u8_uctomb): Use ucs4_t, uint8_t types.
7356         * lib/unistr/ucs4-utf8.c: New file.
7357
7358         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
7359         (Depends-on): Add unitypes.
7360         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
7361         (u16_uctomb_aux): Move out to separate file.
7362         (u16_uctomb): Use ucs4_t, uint16_t types.
7363         * lib/unistr/ucs4-utf16.c: New file.
7364
7365 2006-12-25  Bruno Haible  <bruno@clisp.org>
7366
7367         * modules/unitypes: New file.
7368         * lib/unitypes.h: New file.
7369         * MODULES.html.sh (func_all_modules): New section "Unicode string
7370         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
7371         this section. Add unitypes.
7372
7373 2007-01-08  Bruno Haible  <bruno@clisp.org>
7374
7375         Avoid variable names that conflict with those from libtool.
7376         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
7377         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
7378         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
7379         library_names_spec to acl_library_names_spec, hardcode_* to
7380         acl_hardcode_*.
7381         Reported by Ralf Wildenhues.
7382
7383 2007-01-08  Bruno Haible  <bruno@clisp.org>
7384
7385         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
7386         definition.
7387         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
7388         definition.
7389         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
7390         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
7391         definition.
7392         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
7393         definition.
7394         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
7395         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
7396         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
7397         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
7398         definition.
7399         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
7400         definition.
7401         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
7402         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
7403         GC_USE_<algorithm>.
7404         * lib/gc-libgcrypt.c: Likewise.
7405         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
7406         * modules/gc-arctwo (configure.ac): Likewise.
7407         * modules/gc-des (configure.ac): Likewise.
7408         * modules/gc-hmac-md5 (configure.ac): Likewise.
7409         * modules/gc-hmac-sha1 (configure.ac): Likewise.
7410         * modules/gc-md2 (configure.ac): Likewise.
7411         * modules/gc-md4 (configure.ac): Likewise.
7412         * modules/gc-md5 (configure.ac): Likewise.
7413         * modules/gc-random (configure.ac): Likewise.
7414         * modules/gc-rijndael (configure.ac): Likewise.
7415         * modules/gc-sha1 (configure.ac): Likewise.
7416
7417 2007-01-08  Bruno Haible  <bruno@clisp.org>
7418
7419         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
7420         macro definition.
7421         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
7422         definition.
7423         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
7424         definition.
7425         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
7426         * modules/fcntl-safer (configure.ac): Likewise.
7427         * modules/fopen-safer (configure.ac): Likewise.
7428         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
7429         GNULIB_FWRITEERROR macro definition.
7430
7431 2007-01-08  Bruno Haible  <bruno@clisp.org>
7432
7433         * m4/gnulib-common.m4: New file.
7434         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
7435         (func_get_filelist): Add m4/gnulib-common.m4.
7436
7437 2007-01-08  Bruno Haible  <bruno@clisp.org>
7438
7439         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
7440         command.
7441
7442 2007-01-08  Jim Meyering  <jim@meyering.net>
7443
7444         Use a more robust test for a "can't happen" condition.
7445         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
7446         narrowed the st_size value.  Presuming the "can't happen" condition
7447         is true, that narrowing could conceivably convert an invalid st_size
7448         value into a valid one.  Instead, use a change based on Matthew
7449         Woehlke's original patch.
7450
7451         Slight readability improvement: use an assert-like macro
7452         in place of literal "abort ()" uses.
7453         * lib/fts.c (fts_assert): Define.
7454         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
7455         Use this macro instead of a bare 'abort'.
7456
7457 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
7458
7459         Don't worry about using IRIX 5.3's wctype.h broken definitions;
7460         simply work around them.
7461         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
7462         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
7463         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
7464         declaring.
7465         Don't bother to define as macros, since the standard doesn't require it.
7466         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
7467         longer worry about IRIX 5.3.
7468         (HAVE_WCTYPE_CTMP_BUG): Remove.
7469
7470 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7471
7472         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
7473         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
7474         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
7475         Problems reported by Georg Schwarz for IRIX 5.3.
7476
7477         * gnulib-tool (autoconf_minversion): Take the maximum version number
7478         found, not the minimum.  Problem reported by James Youngman.
7479
7480 2007-01-03  Karl Berry  <karl@gnu.org>
7481
7482         * doc/error.texi: new file, explaining interaction with progname.
7483         * doc/gnulib.texi: include it.  Update copyright.
7484
7485 2007-01-03  Simon Josefsson  <simon@josefsson.org>
7486
7487         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
7488         AC_CANONICAL_HOST, to improve autobuild outputs.
7489
7490 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
7491             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7492
7493         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
7494         sockets, server sockets, and other file descriptors.  Count errors
7495         to compute the return value.  Reorder the code a bit to be easier
7496         to follow.  Don't set event bits that were not requested (except
7497         POLLERR and POLLHUP).
7498
7499 2007-01-01  Bruno Haible  <bruno@clisp.org>
7500
7501         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
7502
7503 2007-01-03  Jim Meyering  <jim@meyering.net>
7504
7505         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
7506
7507 2007-01-02  Bruno Haible  <bruno@clisp.org>
7508
7509         * modules/settime (Include): Require timespec.h.
7510         * modules/nanosleep (Include): Likewise.
7511
7512 2007-01-01  Bruno Haible  <bruno@clisp.org>
7513
7514         * gnulib-tool (func_emit_copyright_notice): Bump year.
7515         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
7516
7517 2007-01-01  Bruno Haible  <bruno@clisp.org>
7518
7519         Improve support for OpenBSD.
7520         * build-aux/config.rpath (libname_spec): Export.
7521         (library_names_spec): New variable. Export.
7522         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7523         library_names_spec from the config.rpath output. Locate shared library
7524         through the name pattern in library_names_spec.
7525
7526 2007-01-01  Eric Blake  <ebb9@byu.net>
7527
7528         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
7529
7530 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
7531
7532         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
7533         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
7534         assume the C locale, and avoid an "eval" that could cause trouble.
7535         Problem with SORT reported by Bob Proulx.
7536
7537         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
7538         Define.  Trivial patch from Henning Nielsen Lund, originally
7539         sent to bug-grep@gnu.org today.
7540
7541 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
7542
7543         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
7544         struct stat.  Problem reported by Henning Nielsen Lund.
7545         * lib/acl.c: Include acl.h first, to check interface.  Don't
7546         bother to include sys/types.h and sys/stat.h again.
7547
7548 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
7549
7550         Import the following change from libc; problem reported by
7551         Sven Verdoolaege.
7552
7553         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7554
7555         [BZ #1373]
7556         * lib/argp.h: Remove __NTH for __argp_usage inline function.
7557
7558 2006-12-28  Jim Meyering  <jim@meyering.net>
7559
7560         * build-aux/announce-gen: Do not assume that the package
7561         builds any of tar.gz, tar.bz2, and .xdelta files.
7562         Suggestion from Simon Josefsson.
7563
7564 2006-12-28  Simon Josefsson  <simon@josefsson.org>
7565
7566         * modules/announce-gen: New file.
7567
7568 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
7569
7570         * lib/mbchar.h: Just include <wctype.h>; the wctype module
7571         handles its gotchas now.
7572         * lib/mbswidth.c: Likewise.
7573         * lib/wcwidth.h: Likewise.
7574         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
7575         and iswcntrl; the wctype module does this stuff now.
7576         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7577         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7578         * modules/mbchar (Depends-on): Add wctype.
7579         * modules/mbswidth (Depends-on): Likewise.
7580         * modules/wcwidth (Depends-on): Likewise.
7581
7582 2006-12-27  Eric Blake  <ebb9@byu.net>
7583
7584         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
7585         module uses more than what <wctype.h> is required to provide.
7586
7587 2006-12-26  Eric Blake  <ebb9@byu.net>
7588
7589         * gnulib-tool (sed_extract_prog): Avoid space-tab.
7590
7591 2006-12-26  Eric Blake  <ebb9@byu.net>
7592
7593         * modules/absolute-header: New module.
7594         * modules/fcntl (Depends-on): Depend on it.
7595         * modules/inttypes (Depends-on): Likewise.
7596         * modules/stdint (Depends-on): Likewise.
7597         * modules/sys_stat (Depends-on): Likewise.
7598         * modules/wctype (Depends-on): Likewise.
7599         * MODULES.html.sh (Support for building libraries and
7600         executables): Document it.
7601
7602 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
7603
7604         * gnulib-tool (SED): Remove, undoing previous change.
7605         The problem was that it broke coreutils on Solaris, because
7606         "sed --posix" leaked into a makefile.
7607         (sed): New alias, if 'alias' and GNU sed.
7608
7609 2006-12-24  Jim Meyering  <jim@meyering.net>
7610
7611         Work around an fchownat bug in glibc-2.4:
7612         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
7613         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
7614         in spite of the -P option.
7615         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
7616         New macros.
7617         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
7618         * modules/openat (Files): Add lib/fchownat.c.
7619         * lib/openat.c (fchownat): Don't define here.  Move to...
7620         * lib/fchownat.c: ...this new file.
7621
7622 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
7623
7624         Fix bug reported by Bruno Haible in
7625         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
7626         where quotearg.c didn't compile on Mac OS X 10.2 because it
7627         lacks <wchar.h> and wint_t.
7628         * lib/wctype_.h (__wctype_wint_t): New type.
7629         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
7630         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
7631         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
7632         Arg is now of type __wctype_wint_t, not wint_t.
7633         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
7634         substitute HAVE_WINT_T.
7635         * modules/wctype (Files): Add m4/wint_t.m4.
7636         (wctype.h): Substitute HAVE_WINT_T.
7637
7638 2006-12-23  Bruno Haible  <bruno@clisp.org>
7639
7640         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
7641
7642 2006-12-23  Bruno Haible  <bruno@clisp.org>
7643
7644         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
7645         S_ISLNK.
7646         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
7647         mingw.
7648
7649 2006-12-22  Bruno Haible  <bruno@clisp.org>
7650
7651         * lib/copy-file.c: Include acl.h.
7652         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
7653         Close the file descriptors only after being done with copy_acl.
7654         * modules/copy-file (Depends-on): Add acl.
7655
7656 2006-12-22  Bruno Haible  <bruno@clisp.org>
7657
7658         * gnulib-tool (SED): New variable.
7659         Use $SED instead of sed everywhere.
7660
7661 2006-12-22  Bruno Haible  <bruno@clisp.org>
7662
7663         * modules/no-c++: New file.
7664         * m4/no-c++.m4: New file.
7665         * MODULES.html.sh (Support for building libraries and executables):
7666         Add no-c++.
7667
7668 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
7669
7670         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7671         Include <limits.h>, and use its INT_MAX to rewrite the
7672         j loop so that it does not overflow 'int'.  Problem reported by
7673         Ralf Wildenhues in
7674         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
7675         Play it safe by shifting left by 1 rather than multiplying by 2,
7676         as GCC is less likely to optimize this away when the value
7677         is signed (when it assumes overflow leads to undefined behavior).
7678         Also, don't assume time_t uses two's complement.
7679
7680 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
7681
7682         * MODULES.html.sh: New module wctype.
7683         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
7684         * lib/fnmatch.c: Don't bother to include <wchar.h> before
7685         <wctype.h>, since the new wctype module should fix this.
7686         * lib/quotearg.c: Include <wctype.h> unconditionally, since
7687         the wctype module should arrange for it.
7688         * lib/regex_internal.h: Likewise.
7689         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
7690         since the wctype module should handle this now.
7691         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
7692         * modules/fnmatch (Depends-on): Add wctype.
7693         * modules/quotearg (Depends-on): Likewise.
7694         * modules/regex (Depends-on): Likewise.
7695
7696 2006-12-19  Bruno Haible  <bruno@clisp.org>
7697
7698         * lib/strdup.h [C++]: Wrap definitions in extern "C".
7699         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
7700
7701 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7702
7703         * modules/savewd (Depends-on): Fix dependency on fcntl.
7704
7705 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7706
7707         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
7708         conforms to C99, rather than relying on the user's environment
7709         setting of STDINT_H.
7710
7711 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7712         and Eric Blake  <ebb9@byu.net>
7713
7714         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
7715         This is more consistent with the other defines here.
7716         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
7717         Port to z/OS.  Problem reported by Paul Gilmartin.
7718         Change local vars to use gl_ prefix rather than ac_.
7719         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
7720         with other defines.
7721         * modules/double-slash-root: New module.
7722         * modules/dirname (Files): Remove m4/double-slash-root.m4.
7723         (Depends-on): Add double-slash-root.
7724         * MODULES.html.sh (File system functions): Mention new module.
7725
7726 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
7727
7728         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
7729         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
7730         This is for the benefit of gzip, which doesn't do i18n.
7731
7732 2006-12-12  Jim Meyering  <jim@meyering.net>
7733
7734         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
7735         Reported by Andreas Schwab <schwab@suse.de>.
7736
7737 2006-12-12  Bruno Haible  <bruno@clisp.org>
7738
7739         Merge these changes.
7740         2006-09-05  Bruno Haible  <bruno@clisp.org>
7741         * lib/iconvme.c (iconv_string): No need to save and restore errno when
7742         iconv_alloc succeeded.
7743         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
7744         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
7745         test for " && dest " at the end - dest is always != NULL there. Call
7746         iconv with 4xNULL arguments initially, to reset the state. Call iconv
7747         with 2xNULL arguments, also to flush the state storage. Handle the
7748         IRIX iconv behaviour. Realloc the final result, to throw away unused
7749         memory.
7750
7751 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
7752
7753         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
7754         and fchmodat unconditionally, since glibc 2.4 has them.
7755         Problem reported by Arkadiusz Miskiewicz.
7756
7757 2006-12-10  Bruno Haible  <bruno@clisp.org>
7758
7759         * gnulib-tool (func_import): Show the include files only for those
7760         modules that are copied and specified.
7761         Reported by Karl Berry.
7762
7763 2006-12-08  Jim Meyering  <jim@meyering.net>
7764
7765         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
7766         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
7767
7768         * build-aux/announce-gen: Add two new options, both optional:
7769         --bootstrap-tools=TOOL_LIST
7770               a comma-separated list of tools, e.g.,
7771               autoconf,automake,bison,gnulib
7772         --gnulib-snapshot-date=DATE
7773               if gnulib is in the bootstrap tool list,
7774               then report this as the snapshot date.
7775               If not specified, use the current date/time.
7776               If you specify a date here, be sure it's UTC.
7777
7778 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7779
7780         * tests/test-argp-2.sh: Fix test to match actual output.
7781         (func_compare): Fix sed script to be portable.
7782
7783 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
7784
7785         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
7786         workaround for this case.  It is not autoconfigured now; offhand
7787         it's hard to see how to autoconfigure it.
7788
7789 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
7790
7791         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
7792         a directory that is about to be chowned.  Such a directory's
7793         initial file permissions should permit the owner only and this
7794         should not be changed until after the chown, since the group and
7795         other bits would be incorrect if they granted permission before
7796         the chown.
7797
7798         Fix porting problem for iswctype reported by Georg Schwarz in:
7799         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
7800         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
7801         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
7802         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
7803         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
7804
7805 2006-12-03  Jim Meyering  <jim@meyering.net>
7806
7807         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
7808         p->fts_statp may not yet be defined.
7809         (fts_read): Instead, set it in the caller, once p->fts_statp is
7810         sure to be defined, and corresponds to a top-level directory.
7811         This bug made du -x fail.  Here's the coreutils test case:
7812         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
7813         Reported by Mike Frysinger.
7814
7815 2006-12-01  Jim Meyering  <jim@meyering.net>
7816
7817         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
7818         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
7819         Reported by Simon Josefsson.
7820
7821 2006-11-30  Jim Meyering  <jim@meyering.net>
7822
7823         * m4/warning.m4: Use the all-permissive copyright notice
7824         recommended by RMS (rather than LGPL).
7825         * m4/vararrays.m4: Likewise.
7826         * m4/flexmember.m4: Likewise.
7827
7828 2006-11-29  Bruno Haible  <bruno@clisp.org>
7829
7830         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7831         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
7832         using +=.
7833         Reported by Simon Josefsson <simon@josefsson.org>.
7834
7835 2006-11-28  James Youngman <jay@gnu.org>
7836
7837         * README: Advise users that they might find the bug-gnulib@gnu.org
7838         and autotools-announce@gnu.org mailing lists useful.
7839
7840 2006-11-28  Bruno Haible  <bruno@clisp.org>
7841
7842         * m4/ptrdiff_max.m4: Remove file.
7843
7844 2006-11-21  Bruno Haible  <bruno@clisp.org>
7845
7846         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
7847         _AC_COMPUTE_INT.
7848         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7849         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
7850         _AC_COMPUTE_INT.
7851         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7852         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
7853         _AC_COMPUTE_INT.
7854         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7855
7856 2006-11-28  Jim Meyering  <jim@meyering.net>
7857
7858         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
7859         warning from "gcc -Wshadow" about shadowing the builtin.
7860
7861 2006-11-27  Bruno Haible  <bruno@clisp.org>
7862
7863         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
7864         _AC_COMPUTE_INT.
7865         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7866
7867 2006-11-27  Bruno Haible  <bruno@clisp.org>
7868             Paul Eggert  <eggert@cs.ucla.edu>
7869
7870         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
7871
7872 2006-11-26  Bruno Haible  <bruno@clisp.org>
7873
7874         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7875         noinst_LTLIBRARIES.
7876
7877 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
7878             Bruno Haible  <bruno@clisp.org>
7879
7880         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
7881         if compiling with "gcc -ansi".
7882
7883 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
7884
7885         Fix some incompatibilities with gcc -ansi -pedantic.
7886         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
7887         if compiling pedantically with GCC, unless it's C99 or later.
7888         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
7889         it mishandles gcc -ansi -pedantic as well.
7890         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
7891         if gcc -pedantic.
7892         * lib/regexec.c (check_node_accept_bytes): Don't use auto
7893         initializers for struct if -pedantic, unless it's C99 or later.
7894
7895 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
7896
7897         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
7898         Don't close an fd more than once. Identical atimes indicate
7899         success, not failure.
7900
7901 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
7902
7903         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
7904
7905 2006-11-23  Jim Meyering  <jim@meyering.net>
7906
7907         * build-aux/announce-gen: New file.  From coreutils.
7908
7909 2006-11-22  Jim Meyering  <jim@meyering.net>
7910
7911         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
7912         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
7913         (fts_read): Use a temporary to narrow the overused st_size member
7914         before using it in a switch statement.  Reported by Matthew Woehlke.
7915
7916         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
7917         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
7918
7919 2006-11-20  Bruno Haible  <bruno@clisp.org>
7920
7921         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
7922         changequote instead of pairs of brackets.
7923         Reported by Andreas Schwab <schwab@suse.de>.
7924
7925 2006-11-21  Jim Meyering  <jim@meyering.net>
7926
7927         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
7928         so as to remain compatible with older compilers.
7929         Patch from Michael Deutschmann.
7930
7931 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
7932
7933         * MODULES.html.sh (File system functions): Add openat.
7934
7935         * lib/openat.h (rpl_fstatat): New macro, if
7936         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
7937         (fstatat): Define to rpl_fstatat under the same conditions,
7938         unless COMPILING_FSTATAT.
7939         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
7940         seems to have the bug.
7941         * lib/fstatat.c: New file.
7942         * modules/openat (Files): Add it.
7943
7944 2006-11-20  Bruno Haible  <bruno@clisp.org>
7945
7946         * Makefile: New file.
7947
7948 2006-11-20  Jim Meyering  <jim@meyering.net>
7949
7950         The beginnings of syntax-related checks for gnulib.
7951         * lib/Makefile: New file.
7952         * lib/t-idcache: New script.  Ensure that the two halves of
7953         idcache.c stay in sync.
7954
7955         * lib/idcache.c: Adjust comments in user- and group- portions to
7956         be more accurate, and to be consistent with one another.
7957
7958 2006-11-20  Jim Meyering  <jim@meyering.net>
7959
7960         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
7961         continue using the flexible array member (thus, this module performs
7962         half as many malloc calls), with the addition that...
7963         (getgroup, getuser): Consistently record a non-match via an empty
7964         "name" string, and map an empty string match to a NULL return value.
7965         * modules/idcache (Depends-on): Re-add flexmember.
7966
7967         * lib/idcache.c (getuser): Remove all uses of the register keyword.
7968         (getuidbyname, getgroup, getgidbyname): Likewise.
7969
7970         Use cleaner syntax: NULL rather than 0.
7971         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
7972
7973 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
7974
7975         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
7976         It mishandled the case where the group was missing.
7977         Problem reported by Greg Schafer.
7978         * modules/idcache: Likewise.
7979
7980 2006-11-18  Jim Meyering  <jim@meyering.net>
7981
7982         * check-module (%exempt_header): Add exception for some
7983         conditionally-included headers.
7984
7985         * modules/i-ring (Depends-on): Add verify.
7986         (License): Change to LGPL.
7987
7988 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
7989
7990         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
7991         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
7992         and inttostr.h.  Use snprintf rather than uinttostr, so that
7993         LGPLed code doesn't depend on GPLed.
7994
7995 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
7996
7997         * modules/inline (License): Change from GPL to LGPL.
7998
7999 2006-11-17  Jim Meyering  <jim@meyering.net>
8000
8001         * modules/d-type (License): Switch to LGPL.
8002
8003 2006-11-15  Bruno Haible  <bruno@clisp.org>
8004
8005         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
8006
8007 2006-11-15  Eric Blake  <ebb9@byu.net>
8008
8009         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
8010         the module dependency.
8011
8012 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8013             Bruno Haible  <bruno@clisp.org>
8014
8015         * gnulib-tool (func_create_testdir): Add license consistency check.
8016
8017 2006-11-15  Eric Blake  <ebb9@byu.net>
8018
8019         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
8020         random "(cached)" in configure output.
8021
8022 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8023
8024         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
8025         test for conforming inttypes.h is both announced and cached.
8026
8027         * MODULES.html.sh (seen_modules, seen_files): New variables.
8028         (func_module): Rewrite to use a few less gnulib-tool and sed
8029         invocations.  Avoid a couple of quadratic algorithms for ...
8030         (missed_modules, missed_files): ... these, with ...
8031         (func_append, func_tmpdir): ... these new functions, from
8032         gnulib-tool.  Analogously, install traps for cleanup.
8033
8034         * tests/test-gc.c (main): Remove unused variables.
8035         * tests/test-read-file.c: Include stdlib.h, for 'free'.
8036
8037 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
8038
8039         * modules/inttostr (License): Change to LGPL.
8040
8041 2006-11-14  Eric Blake  <ebb9@byu.net>
8042
8043         * modules/tempname (License): Change to LGPL.
8044
8045 2006-11-14  Eric Blake  <ebb9@byu.net>
8046
8047         * doc/functions.texi (Function Portability): *printf functions on
8048         Cygwin now understand all POSIX size specifiers.
8049
8050 2006-11-14  Bruno Haible  <bruno@clisp.org>
8051
8052         * modules/c-ctype (License): Change to LGPL.
8053
8054 2006-11-12  Bruno Haible  <bruno@clisp.org>
8055
8056         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
8057         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
8058         for GNOME libraries, for which the include files are installed in
8059         subdirectories of $prefix/include.
8060
8061 2006-11-12  Bruno Haible  <bruno@clisp.org>
8062
8063         * m4/lib-link.m4: Require at least autoconf-2.54.
8064         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8065         name to underscores for the --with option.
8066
8067 2006-11-13  Bruno Haible  <bruno@clisp.org>
8068
8069         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8070         the tests directory.
8071         Reported by Ralf Wildenhues.
8072
8073 2006-11-13  Bruno Haible  <bruno@clisp.org>
8074
8075         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8076         (func_emit_initmacro_end): Undo the override here.
8077         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8078         Works around the famous automake error in coreutils.
8079
8080 2006-11-13  Eric Blake  <ebb9@byu.net>
8081
8082         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8083         element, not its node.
8084
8085 2006-11-12  Bruno Haible  <bruno@clisp.org>
8086
8087         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8088         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8089
8090 2006-11-12  Bruno Haible  <bruno@clisp.org>
8091
8092         * gnulib-tool: New option --local-symlink.
8093         (func_usage): Document it.
8094         (lsymbolic): New variable.
8095         (func_import, func_create_testdir): If --symlink was not specified,
8096         test whether --local-symlink was specified and the file comes from
8097         the local_gnulib_dir.
8098
8099 2006-11-12  Bruno Haible  <bruno@clisp.org>
8100
8101         * gnulib-tool (func_ln): New function.
8102         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8103
8104 2006-11-12  Bruno Haible  <bruno@clisp.org>
8105
8106         Finish support for source files in subdirectories.
8107         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8108         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8109         AUTOMAKE_OPTIONS.
8110         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8111
8112 2006-11-12  Bruno Haible  <bruno@clisp.org>
8113
8114         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8115         EXTRA_lib_SOURCES augmentation.
8116         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8117
8118 2006-11-12  Jim Meyering  <jim@meyering.net>
8119
8120         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8121         file descriptors.  This also averts a failure on systems with
8122         native openat support when a traversed directory lacks "x" access.
8123         * lib/fts_.h: Include "i-ring.h"
8124         (struct FTS) [fts_fd_ring]: New member.
8125         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8126         (FCHDIR): Add parentheses.
8127         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8128         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8129         When descending, rather than simply closing the previous
8130         fts_cwd_fd value, push that file descriptor onto the ring.
8131         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8132         (fts_open): Initialize the new fd_ring member.
8133         (fts_close): Clear the ring.
8134         (fts_safe_changedir): When possible, use our new fd_ring to skip
8135         the diropen and fstat and dev/ino comparison that would normally
8136         accompany a virtual `chdir ("..")'.
8137
8138         * modules/fts (Depends-on): Add i-ring.
8139         * modules/i-ring: New module.
8140         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8141         * m4/i-ring.m4: New file.
8142
8143 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8144
8145         * gnulib-tool (func_create_testdir): Fix replacement of
8146         `build-aux' in configure.ac.  Run autotools in gltests
8147         subdirectory.
8148         (func_create_testdir, func_create_megatestdir, test): There is
8149         no need for '--force' in most autotool invocations in a new
8150         tree.  Actually fail the whole test if any of the tools, or the
8151         configure or make stages fail.
8152
8153         Sync from Automake.
8154         * build-aux/gnupload: Revert last change.  Add pointer to upload
8155         instructions of the GNU Maintenance Instructions.
8156         Suggestion by Karl Berry.
8157
8158 2006-11-10  Jim Meyering  <jim@meyering.net>
8159
8160         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8161
8162 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8163
8164         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8165         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8166         (bind_textdomain_codeset) [! ENABLE_NLS]:
8167         Evaluate all the arguments.  That way, callers get compatible behavior
8168         if the arguments have side effects.  Also, it avoids some GCC
8169         diagnostics in some cases; Joel E. Denny reported problems when Bison
8170         was configured with --enable-gcc-warnigs.
8171
8172 2006-11-10  Jim Meyering  <jim@meyering.net>
8173
8174         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8175         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8176         account.
8177
8178 2006-11-10  Jim Meyering  <jim@meyering.net>
8179
8180         * modules/inline: New file/module.
8181         * modules/xalloc (Files): Remove m4/inline.m4.
8182         (Depends-on): Add inline, instead.
8183         * modules/oset: Likewise.
8184         * modules/list: Likewise.
8185
8186 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8187
8188         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8189         Problem reported by Matthew Woehlke.
8190
8191 2006-11-09  Bruno Haible  <bruno@clisp.org>
8192
8193         * lib/tempname.c (gen_tempname): Remove variant that invokes
8194         __gen_tempname.
8195         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8196         __gen_tempname.
8197
8198 2006-11-08  Bruno Haible  <bruno@clisp.org>
8199
8200         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8201         to 'yes' instead of 'cross-compiling'.
8202
8203 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8204
8205         * lib/quotearg.h (quotearg_free): New decl.
8206         * lib/quotearg.c (quotearg_free): New function.
8207         (slot0, nslots, slotvec0, slotvec):
8208         Now file-scope so that quotearg_free can get at them.
8209
8210 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8211
8212         Sync from Automake.
8213         * build-aux/gnupload: Add missing 'gnu' to example URL.
8214         Report by Karl Berry.
8215
8216 2006-11-08  Bruno Haible  <bruno@clisp.org>
8217
8218         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8219         Suggested by Paul Eggert.
8220
8221 2006-11-08  Jim Meyering  <jim@meyering.net>
8222
8223         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8224         It's already included if !_LIBC.
8225         (fts_safe_changedir): Add a comment.
8226
8227 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8228
8229         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8230         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8231         Matthew Woehlke.
8232
8233         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8234         definitions up, to avoid colliding with change below.
8235         (static_inline) [HAVE_INLINE]: New macro.
8236         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8237         Provide extern decls when !HAVE_INLINE.  Do not define unless
8238         static_inline is defined, either by us or by xmalloc.c.  Use
8239         static_inline rather than static inline.
8240         (XCALLOC): Optimize sizeof(T) = 1 case.
8241         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8242
8243 2006-11-07  Bruno Haible  <bruno@clisp.org>
8244
8245         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8246         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8247         AC_C_INLINE.
8248         * modules/xalloc (Files): Add m4/inline.m4.
8249
8250 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8251
8252         * README: Fix typo.
8253         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8254         (Miscellanous Notes): ...from this.
8255
8256 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8257
8258         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8259         Mention that offsetof should be used instead of sizeof.
8260         From Bruno Haible.
8261
8262 2006-11-07  Bruno Haible  <bruno@clisp.org>
8263
8264         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8265
8266 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8267
8268         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8269         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8270         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8271         (gl_tree_add_before, gl_tree_add_after):
8272         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8273         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8274         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8275         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8276         (gl_linked_add_after, gl_linked_add_at): Likewise.
8277         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8278         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8279         (gl_tree_add_before, gl_tree_add_after): Likewise.
8280         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8281         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8282         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8283
8284 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8285
8286         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8287
8288 2006-11-06  Bruno Haible  <bruno@clisp.org>
8289
8290         * m4/inline.m4: New file.
8291         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8292         * modules/list (Files): Add m4/inline.m4.
8293         * modules/oset (Files): Likewise.
8294
8295 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8296
8297         * lib/idcache.c: Include <stddef.h>, for offsetof.
8298         (struct userid.name): Change from char * to a flexible array member.
8299         All uses changed.
8300         * modules/idcache (Depends-on): Add flexmember.
8301
8302         * MODULES.html.sh (Core language properties): New module flexmember.
8303         * modules/flexmember, m4/flexmember.m4: New files.
8304
8305         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8306         inline functions that are identical with the old xnmalloc_inline,
8307         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8308         that we can avoid some unnecessary integer multiplications and
8309         divisions in the common case where the element size is known at
8310         compile time.
8311         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8312         needed.
8313         (xnboundedmalloc): Remove.
8314         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8315         arguments, for consistency with rest of this header.
8316         (xcharalloc): Rewrite using XNMALLOC.
8317         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8318         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8319         versions have been moved to lib/xalloc.h and renamed to be the
8320         non-*_inline versions.
8321         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8322         and xnrealloc functions, since those functions are now inline and
8323         now call us.
8324         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8325         renaming described above.
8326         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8327         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8328         captures the dependency in AC_C_INLINE.
8329
8330         New module canonicalize-lgpl, proposed by Charles Wilson in
8331         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8332         with a few small changes afterwards.
8333         * MODULES.html.sh (File system functions): New module
8334         canonicalize-lgpl.
8335         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8336         and canonicalize_file_name.
8337         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8338         * modules/canonicalize-lgpl: New files.
8339
8340 2006-11-05  Bruno Haible  <bruno@clisp.org>
8341
8342         * gnulib-tool (func_import, func_create_testdir): Create directories
8343         also for files in subdirectories of lib/.
8344
8345 2006-11-05  Bruno Haible  <bruno@clisp.org>
8346
8347         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
8348         ANSI C compliant.
8349
8350 2006-11-03  Bruno Haible  <bruno@clisp.org>
8351
8352         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8353         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
8354         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
8355         (xnboundedmalloc): New inline function.
8356         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
8357         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
8358         xmalloc.
8359         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
8360         xmalloc.
8361         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
8362         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
8363         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
8364         xmalloc.
8365         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8366         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
8367         xmalloc.
8368         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
8369         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8370         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
8371         xmalloc.
8372         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8373         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
8374         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8375         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
8376         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
8377         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
8378         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
8379
8380 2006-11-03  Bruno Haible  <bruno@clisp.org>
8381
8382         * lib/c-ctype.h [C++]: Define functions without name mangling.
8383         * lib/fwriteerror.h [C++]: Likewise.
8384         * lib/gcd.h [C++]: Likewise.
8385         * lib/linebreak.h [C++]: Likewise.
8386
8387 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
8388
8389         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
8390         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
8391         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
8392         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8393         Check for functions and headers just once.
8394         Check for declaration of canonicalize_file_name.
8395         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
8396
8397 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8398
8399         * gnulib-tool (func_import): Fix typo in actioncmd.
8400
8401 2006-11-02  Bruno Haible  <bruno@clisp.org>
8402
8403         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
8404         newline sequence in the Makefile.am snippet as a space, like "make"
8405         does.
8406         Reported by Roger Persson <perrog@gmail.com>.
8407
8408 2006-11-01  Bruno Haible  <bruno@clisp.org>
8409
8410         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
8411         already declared in <string.h>.
8412         * lib/strcase.h (strncasecmp): Don't declare it if yes.
8413
8414 2006-11-01  Bruno Haible  <bruno@clisp.org>
8415
8416         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
8417         * lib/strcase.h: Include <string.h>.
8418         (strcasecmp): Define to rpl_strcasecmp here.
8419
8420 2006-11-01  Bruno Haible  <bruno@clisp.org>
8421
8422         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
8423
8424 2006-11-01  Eric Blake  <ebb9@byu.net>
8425
8426         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
8427
8428         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
8429
8430 2006-10-29  Bruno Haible  <bruno@clisp.org>
8431
8432         Make it compile in C++ mode.
8433         * lib/full-write.c (full_rw): Add a cast.
8434
8435 2006-11-01  Bruno Haible  <bruno@clisp.org>
8436
8437         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
8438         be POSIX compliant.
8439         Reported by Roger Persson <perrog@gmail.com>.
8440
8441 2006-11-01  Eric Blake  <ebb9@byu.net>
8442
8443         * lib/getopt_.h: Fix comments.
8444
8445 2006-10-31  Eric Blake  <ebb9@byu.net>
8446
8447         * modules/tmpdir (Depends-on): Add sys_stat.
8448         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
8449         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
8450         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
8451         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
8452         tempname.
8453
8454 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
8455
8456         Avoid some C++ diagnostics reported by Bruno Haible.
8457         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
8458         xmalloc.
8459         (quotearg_alloc): Use xcharalloc rather than xmalloc.
8460         (struct slotvec): Move to top level.
8461         (quotearg_n_options): Rewrite to avoid xmalloc.
8462         * lib/xalloc.h (xcharalloc): New function.
8463         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
8464         [defined __cplusplus]: Add function template that provides result
8465         type propagation.  This part of the change is from Bruno Haible.
8466
8467 2006-10-29  Bruno Haible  <bruno@clisp.org>
8468
8469         Make it compile in C++ mode.
8470         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
8471         * lib/strnlen1.c (strnlen1): Cast memchr result.
8472         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
8473         * lib/clean-temp.c (string_equals, string_hash): Add casts.
8474         (create_temp_dir): Rename local variable 'template'.
8475         (compile_csharp_using_sscli): Add cast.
8476         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
8477         * lib/findprog.c (find_in_path): Likewise.
8478         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
8479         * lib/wait-process.c (register_slave_subprocess): Likewise.
8480
8481 2006-10-22  Bruno Haible  <bruno@clisp.org>
8482
8483         * modules/tsearch: New file.
8484         * lib/tsearch.h: New file.
8485         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
8486         * m4/tsearch.m4: New file.
8487         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8488
8489 2006-10-29  Eric Blake  <ebb9@byu.net>
8490
8491         * lib/arcfour.c: Assume config.h.
8492         * lib/arctwo.c: Likewise.
8493         * lib/base64.c: Likewise.
8494         * lib/check-version.c: Likewise.
8495         * lib/crc.c: Likewise.
8496         * lib/des.c: Likewise.
8497         * lib/gc-gnulib.c: Likewise.
8498         * lib/gc-libgcrypt.c: Likewise.
8499         * lib/gc-pbkdf2-sha1.c: Likewise.
8500         * lib/getaddrinfo.c: Likewise.
8501         * lib/getdelim.c: Likewise.
8502         * lib/getline.c: Likewise.
8503         * lib/hmac-md5.c: Likewise.
8504         * lib/hmac-sha1.c: Likewise.
8505         * lib/iconvme.c: Likewise.
8506         * lib/md2.c: Likewise.
8507         * lib/md4.c: Likewise.
8508         * lib/memxor.c: Likewise.
8509         * lib/read-file.c: Likewise.
8510         * lib/readline.c: Likewise.
8511         * lib/rijndael-alg-fst.c: Likewise.
8512         * lib/rijndael-api-fst.c: Likewise.
8513         * lib/xgetdomainname.c: Likewise.
8514
8515 2006-10-28  Eric Blake  <ebb9@byu.net>
8516
8517         * lib/xstrndup.c: Assume config.h.
8518
8519 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8520
8521         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
8522         stat-macros.h is now for our own macros, whereas stat_h is for
8523         macros in the <sys/stat.h> name space.
8524         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
8525         (STAT_MACROS_H): Remove.
8526         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
8527         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
8528         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
8529         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
8530         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
8531         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
8532         Move these macros to ...
8533         * lib/stat_.h: here.  Don't include stat-macros.h.
8534         * lib/canonicalize.c: Don't include stat-macros.h.
8535         * lib/chown.c: Likewise.
8536         * lib/euidaccess.c: Likewise.
8537         * lib/file-type.c: Likewise.
8538         * lib/filemode.c: Likewise.
8539         * lib/glob.c: Likewise.
8540         * lib/isapipe.c: Likewise.
8541         * lib/lchown.c: Likewise.
8542         * lib/lstat.c: Likewise.
8543         * lib/mkdir-p.c: Likewise.
8544         * lib/rmdir.c: Likewise.
8545         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
8546         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
8547         unless mkdir isn't declared, to speed up 'configure'.
8548         Always create sys/stat.h, since it's unlikely any real sys/stat.h
8549         would define all the S_* symbols.
8550         * modules/canonicalize (Depends-on):
8551         Depend on sys_stat, not stat-macros.
8552         * modules/chown: Likewise.
8553         * modules/euidaccess: Likewise.
8554         * modules/filemode: Likewise.
8555         * modules/file-type: Likewise.
8556         * modules/glob: Likewise.
8557         * modules/isapipe: Likewise.
8558         * modules/lchown: Likewise.
8559         * modules/lstat: Likewise.
8560         * modules/mkancesdirs: Likewise.
8561         * modules/rmdir: Likewise.
8562         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
8563         * modules/modechange: Likewise.
8564         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
8565         (configure.ac): Remove gl_STAT_MACROS.
8566         * modules/sys_stat (Depends-on): Remove stat-macros.
8567
8568 2006-10-27  Bruno Haible  <bruno@clisp.org>
8569
8570         * m4/signed.m4: Remove file.
8571         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
8572         invocation.
8573         * modules/vasnprintf (Files): Remove m4/signed.m4.
8574
8575 2006-10-27  Bruno Haible  <bruno@clisp.org>
8576
8577         Update to GNU gettext 0.16.
8578         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
8579         m4/inttypes-h.m4, m4/signed.m4.
8580         * m4/gettext.m4: Update to GNU gettext 0.16.
8581         * m4/intl.m4: New file, from GNU gettext.
8582         * m4/intldir.m4: New file, from GNU gettext.
8583         * config/srclist.txt: Update
8584
8585 2006-10-27  Eric Blake  <ebb9@byu.net>
8586
8587         * MODULES.html.sh: Document tempname.
8588         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
8589         dependencies.
8590         (Files): Move lib/tempname.c...
8591         * modules/tempname: ...to this new module.
8592         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
8593         (gl_PREREQ_TEMPNAME): Move...
8594         * m4/tempname.m4: ...to this new file.
8595         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
8596         * modules/sys_stat (Depends-on): Add stat-macros.
8597         * lib/stat_.h (includes): Pick up stat macros.
8598         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
8599         if stat macros are broken.
8600         * lib/tempname.c (includes): No need to include "stat-macros.h".
8601         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
8602         (direxists, __path_search) [!_LIBC]: Don't compile these in
8603         gnulib; the tmpdir module covers that.
8604         * lib/tempname.h: New file.
8605
8606 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
8607
8608         * COPYING: Explain how gnulib-tool converts licence headers.
8609         Almost all wording by Eric Blake.
8610
8611 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
8612
8613         * lib/mbchar.h (is_basic_table): Make read-only.
8614         * lib/mbchar.c (is_basic_table): Likewise.
8615         Reported by John Darrington.
8616
8617 2006-10-25  Bruno Haible  <bruno@clisp.org>
8618
8619         * lib/progname.h (set_program_name): Undefine before defining.
8620
8621 2006-10-25  Bruno Haible  <bruno@clisp.org>
8622
8623         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
8624         false for non-gcc C++ compilers.
8625         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
8626
8627 2006-10-24  Bruno Haible  <bruno@clisp.org>
8628
8629         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
8630         iconv implementations like Irix iconv.
8631
8632 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8633
8634         * modules/vararrays: New file.
8635         * m4/vararrays.m4: New file, taken from diffutils.
8636         * MODULES.html.sh: New module vararrays.
8637
8638 2006-10-24  Karl Berry  <karl@gnu.org>
8639
8640         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
8641         Don't call GNU Unix.
8642
8643 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8644
8645         * users.txt: Add Libtool.
8646
8647         Sync from Libtool:
8648
8649         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8650
8651         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
8652         to gnulib's policy of including config.h unconditionally.
8653
8654 2006-10-24  Bruno Haible  <bruno@clisp.org>
8655
8656         * modules/wcwidth (Files): Add m4/wint_t.m4.
8657         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
8658         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
8659
8660 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8661
8662         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
8663         to pacify GCC with some -W flags enabled.  Problem reported by
8664         Bruno Haible.
8665
8666 2006-10-24  Jim Meyering  <jim@meyering.net>
8667
8668         * MODULES.html.sh: Remove uinttostr.  It's not a module.
8669         Reported by Karl Berry.
8670
8671 2006-10-23  Bruno Haible  <bruno@clisp.org>
8672
8673         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
8674
8675 2006-10-24  Bruno Haible  <bruno@clisp.org>
8676
8677         * lib/gl_list.h: Use C comment style, not C++ comment style.
8678
8679 2006-10-23  Eric Blake  <ebb9@byu.net>
8680
8681         * lib/getaddrinfo.c (includes): Add missing include.
8682
8683 2006-10-23  Bruno Haible  <bruno@clisp.org>
8684             Paul Eggert  <eggert@cs.ucla.edu>
8685
8686         Ability to rename obstack_free.
8687         * lib/obstack.h (__obstack_free): New macro. Declare instead of
8688         obstack_free.
8689         (obstack_free): Invoke the __obstack_free macro.
8690         * lib/obstack.c (obstack_free): Use __obstack_free macro.
8691
8692 2006-10-23  Bruno Haible  <bruno@clisp.org>
8693             Paul Eggert  <eggert@cs.ucla.edu>
8694
8695         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
8696         __argc, __argv from the declaration. (They are defined as macros on
8697         mingw.)
8698
8699 2006-10-22  Bruno Haible  <bruno@clisp.org>
8700
8701         * doc/gnulib-intro.texi: New file.
8702         * doc/gnulib.texi: Include it.
8703
8704 2006-10-21  Bruno Haible  <bruno@clisp.org>
8705
8706         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
8707         "Introduction", "Miscellanous Notes", "Particular Modules".
8708
8709 2006-10-21  Bruno Haible  <bruno@clisp.org>
8710
8711         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8712         Change mostlyclean-local rule to avoid sh syntax error from bash
8713         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
8714
8715 2006-10-23  Jim Meyering  <jim@meyering.net>
8716
8717         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
8718         in place of snprintf.
8719
8720         * modules/inttostr (Files): Add lib/uinttostr.c.
8721         * lib/uinttostr.c (inttostr): New file/function.
8722         * lib/inttostr.h (uinttostr): Declare.
8723         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
8724         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8725         Add uinttostr.
8726         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
8727
8728 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8729
8730         * lib/canonicalize.c (ELOOP): Define if not already defined.
8731         Problem reported by Bruno Haible in
8732         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
8733
8734 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8735
8736         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
8737         Problem reported by Perry Smith and Ville Laurikari.
8738
8739         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
8740         uses.
8741
8742 2006-10-19  Bruno Haible  <bruno@clisp.org>
8743
8744         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
8745         for mingw.
8746
8747 2006-10-19  Bruno Haible  <bruno@clisp.org>
8748
8749         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
8750         Needed for mingw.
8751
8752 2006-10-19  Bruno Haible  <bruno@clisp.org>
8753
8754         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
8755
8756 2006-10-19  Bruno Haible  <bruno@clisp.org>
8757
8758         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
8759         it.
8760
8761 2006-10-19  Bruno Haible  <bruno@clisp.org>
8762
8763         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
8764         invocation.
8765
8766 2006-10-19  Bruno Haible  <bruno@clisp.org>
8767
8768         * gnulib-tool (func_create_testdir): Don't include ftruncate and
8769         mountlist by default.
8770
8771 2006-10-16  Bruno Haible  <bruno@clisp.org>
8772
8773         * lib/c-strstr.c: Include c-strstr.h.
8774
8775 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8776
8777         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
8778         in a slash.
8779
8780 2006-10-18  Bruno Haible  <bruno@clisp.org>
8781
8782         * lib/lock.h [C++]: Wrap definitions in extern "C".
8783
8784 2006-10-18  Bruno Haible  <bruno@clisp.org>
8785
8786         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
8787         gl_LIBOBJS list.
8788
8789 2006-10-18  Bruno Haible  <bruno@clisp.org>
8790
8791         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
8792
8793 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
8794
8795         * lib/xstrtol.h: Include gettext.h.
8796         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
8797         Problem reported by Eric Blake.
8798         * modules/xstrtol (Depends-on): Add gettext-h.
8799
8800 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
8801
8802         * lib/strftime.c (advance): New macro.
8803         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
8804         incomplete type, so you can't add 0 to it.  Problem and patch
8805         reported by Eelco Dolstra for dietlibc.
8806
8807 2006-10-18  Jim Meyering  <jim@meyering.net>
8808
8809         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
8810         type for a local, and rename it: s/up/user_proc/.
8811
8812 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8813
8814         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
8815         READ_UTMP_USER_PROCESS.
8816         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
8817
8818 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
8819
8820         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
8821         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
8822
8823 2006-10-17  Eric Blake  <ebb9@byu.net>
8824
8825         * lib/sigprocmask.c (sigprocmask): Fix typo.
8826
8827         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
8828
8829         * modules/clean-temp (Makefile.am): Don't add to make output...
8830         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
8831         config.h.
8832
8833 2006-10-17  Bruno Haible  <bruno@clisp.org>
8834
8835         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
8836         differently if DEFAULT_TEXT_DOMAIN is set.
8837
8838 2006-10-16  Bruno Haible  <bruno@clisp.org>
8839
8840         * lib/clean-temp.c: Include fwriteerror.h.
8841
8842 2006-10-16  Bruno Haible  <bruno@clisp.org>
8843
8844         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
8845
8846 2006-10-16  Bruno Haible  <bruno@clisp.org>
8847
8848         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
8849         * lib/sigprocmask.h: Include <sys/types.h>.
8850         (sigset_t): Use the system's definition if present.
8851
8852 2006-10-17  Eric Blake  <ebb9@byu.net>
8853
8854         * lib/xvasprintf.c (includes): Assume config.h.
8855         * lib/xasprintf.c (includes): Likewise.
8856
8857 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
8858
8859         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
8860         at least as wide as intmax_t.
8861
8862 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
8863
8864         (Imported from Automake.)
8865         * build-aux/gnupload: Update to version 1.1 of directive file.
8866
8867 2006-10-16  Eric Blake  <ebb9@byu.net>
8868
8869         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
8870         match Automake 1.10a.
8871
8872 2006-10-14  Bruno Haible  <bruno@clisp.org>
8873
8874         * modules/sigprocmask: New file.
8875         * lib/sigprocmask.h: New file.
8876         * lib/sigprocmask.c: New file.
8877         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
8878         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
8879         request sigprocmask.o.
8880         (gl_PREREQ_SIGPROCMASK): New macro.
8881         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
8882         (Depends-on): Add sigprocmask.
8883         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
8884         gt_SIGNALBLOCKING. Test for 'raise' only once.
8885         * lib/fatal-signal.c: Include sigprocmask.h.
8886         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
8887         unblock_fatal_signals): Define always.
8888         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
8889         sigprocmask.
8890
8891 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8892
8893         Sync from Automake.
8894         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
8895         which incorrectly sets the mode of an existing destination
8896         directory.  In some cases the unpatched install-sh could do the
8897         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
8898         system.  We hope this is rare in practice, but it's clearly worth
8899         fixing.  Problem reported by Alex Unleashed in
8900         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
8901         Also, don't bother to check for -m bugs unless we're using -m;
8902         suggested by Stepan Kasal.
8903
8904 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8905
8906         Sync from Automake.
8907         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
8908         `-c' flag, so they appear at the same position as in %FASTDEP%
8909         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
8910         which ignores unknown options only after the first non-option.
8911         Bug report against M4 by Nelson H. F. Beebe.
8912
8913 2006-10-13  Jim Meyering  <jim@meyering.net>
8914
8915         Fix a bug in yesterday's change.
8916         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
8917         p->fts_statp->st_dev would be used uninitialized.
8918         Ensures that we always call fts_stat on the very first entry.
8919         Miklos Szeredi reported that find -xdev stopped working.
8920
8921 2006-10-12  Bruno Haible  <bruno@clisp.org>
8922
8923         * gnulib-tool (func_get_automake_snippet): Append an automatically
8924         computed EXTRA_DIST augmentation.
8925         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
8926         * modules/alloca-opt (Makefile.am): Likewise.
8927         * modules/allocsa (Makefile.am): Likewise.
8928         * modules/arcfour (Makefile.am): Likewise.
8929         * modules/arctwo (Makefile.am): Likewise.
8930         * modules/argmatch (Makefile.am): Likewise.
8931         * modules/argz (Makefile.am): Likewise.
8932         * modules/atexit (Makefile.am): Likewise.
8933         * modules/backupfile (Makefile.am): Likewise.
8934         * modules/byteswap (Makefile.am): Likewise.
8935         * modules/c-strtod (Makefile.am): Likewise.
8936         * modules/c-strtold (Makefile.am): Likewise.
8937         * modules/calloc (Makefile.am): Likewise.
8938         * modules/canon-host (Makefile.am): Likewise.
8939         * modules/canonicalize (Makefile.am): Likewise.
8940         * modules/chdir-long (Makefile.am): Likewise.
8941         * modules/chdir-safer (Makefile.am): Likewise.
8942         * modules/check-version (Makefile.am): Likewise.
8943         * modules/chown (Makefile.am): Likewise.
8944         * modules/cloexec (Makefile.am): Likewise.
8945         * modules/close-stream (Makefile.am): Likewise.
8946         * modules/closeout (Makefile.am): Likewise.
8947         * modules/crc (Makefile.am): Likewise.
8948         * modules/csharpexec (Makefile.am): Likewise.
8949         * modules/cycle-check (Makefile.am): Likewise.
8950         * modules/des (Makefile.am): Likewise.
8951         * modules/dev-ino (Makefile.am): Likewise.
8952         * modules/dirfd (Makefile.am): Likewise.
8953         * modules/dirname (Makefile.am): Likewise.
8954         * modules/dup2 (Makefile.am): Likewise.
8955         * modules/eealloc (Makefile.am): Likewise.
8956         * modules/error (Makefile.am): Likewise.
8957         * modules/euidaccess (Makefile.am): Likewise.
8958         * modules/exclude (Makefile.am): Likewise.
8959         * modules/exitfail (Makefile.am): Likewise.
8960         * modules/fcntl-safer (Makefile.am): Likewise.
8961         * modules/fcntl (Makefile.am): Likewise.
8962         * modules/file-type (Makefile.am): Likewise.
8963         * modules/fileblocks (Makefile.am): Likewise.
8964         * modules/filemode (Makefile.am): Likewise.
8965         * modules/filenamecat (Makefile.am): Likewise.
8966         * modules/fnmatch (Makefile.am): Likewise.
8967         * modules/fopen-safer (Makefile.am): Likewise.
8968         * modules/fpending (Makefile.am): Likewise.
8969         * modules/fprintftime (Makefile.am): Likewise.
8970         * modules/free (Makefile.am): Likewise.
8971         * modules/fsusage (Makefile.am): Likewise.
8972         * modules/ftruncate (Makefile.am): Likewise.
8973         * modules/fts (Makefile.am): Likewise.
8974         * modules/gc-arcfour (Makefile.am): Likewise.
8975         * modules/gc-des (Makefile.am): Likewise.
8976         * modules/gc-hmac-md5 (Makefile.am): Likewise.
8977         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
8978         * modules/gc-md4 (Makefile.am): Likewise.
8979         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
8980         * modules/gc-sha1 (Makefile.am): Likewise.
8981         * modules/gc (Makefile.am): Likewise.
8982         * modules/getaddrinfo (Makefile.am): Likewise.
8983         * modules/getcwd (Makefile.am): Likewise.
8984         * modules/getdelim (Makefile.am): Likewise.
8985         * modules/getdomainname (Makefile.am): Likewise.
8986         * modules/getgroups (Makefile.am): Likewise.
8987         * modules/gethostname (Makefile.am): Likewise.
8988         * modules/gethrxtime (Makefile.am): Likewise.
8989         * modules/getline (Makefile.am): Likewise.
8990         * modules/getloadavg (Makefile.am): Likewise.
8991         * modules/getlogin_r (Makefile.am): Likewise.
8992         * modules/getndelim2 (Makefile.am): Likewise.
8993         * modules/getopt (Makefile.am): Likewise.
8994         * modules/getpagesize (Makefile.am): Likewise.
8995         * modules/getpass-gnu (Makefile.am): Likewise.
8996         * modules/getpass (Makefile.am): Likewise.
8997         * modules/getsubopt (Makefile.am): Likewise.
8998         * modules/gettime (Makefile.am): Likewise.
8999         * modules/gettimeofday (Makefile.am): Likewise.
9000         * modules/getugroups (Makefile.am): Likewise.
9001         * modules/getusershell (Makefile.am): Likewise.
9002         * modules/glob (Makefile.am): Likewise.
9003         * modules/group-member (Makefile.am): Likewise.
9004         * modules/hard-locale (Makefile.am): Likewise.
9005         * modules/hash (Makefile.am): Likewise.
9006         * modules/hmac-md5 (Makefile.am): Likewise.
9007         * modules/hmac-sha1 (Makefile.am): Likewise.
9008         * modules/human (Makefile.am): Likewise.
9009         * modules/idcache (Makefile.am): Likewise.
9010         * modules/imaxabs (Makefile.am): Likewise.
9011         * modules/imaxdiv (Makefile.am): Likewise.
9012         * modules/inet_ntop (Makefile.am): Likewise.
9013         * modules/inet_pton (Makefile.am): Likewise.
9014         * modules/intprops (Makefile.am): Likewise.
9015         * modules/inttostr (Makefile.am): Likewise.
9016         * modules/inttypes (Makefile.am): Likewise.
9017         * modules/isapipe (Makefile.am): Likewise.
9018         * modules/javaversion (Makefile.am): Likewise.
9019         * modules/lchmod (Makefile.am): Likewise.
9020         * modules/lchown (Makefile.am): Likewise.
9021         * modules/localcharset (Makefile.am): Likewise.
9022         * modules/long-options (Makefile.am): Likewise.
9023         * modules/lstat (Makefile.am): Likewise.
9024         * modules/malloc (Makefile.am): Likewise.
9025         * modules/mathl (Makefile.am): Likewise.
9026         * modules/mbchar (Makefile.am): Likewise.
9027         * modules/md2 (Makefile.am): Likewise.
9028         * modules/md4 (Makefile.am): Likewise.
9029         * modules/md5 (Makefile.am): Likewise.
9030         * modules/memcasecmp (Makefile.am): Likewise.
9031         * modules/memchr (Makefile.am): Likewise.
9032         * modules/memcmp (Makefile.am): Likewise.
9033         * modules/memcoll (Makefile.am): Likewise.
9034         * modules/memcpy (Makefile.am): Likewise.
9035         * modules/memmem (Makefile.am): Likewise.
9036         * modules/memmove (Makefile.am): Likewise.
9037         * modules/mempcpy (Makefile.am): Likewise.
9038         * modules/memrchr (Makefile.am): Likewise.
9039         * modules/memset (Makefile.am): Likewise.
9040         * modules/memxor (Makefile.am): Likewise.
9041         * modules/mkancesdirs (Makefile.am): Likewise.
9042         * modules/mkdir-p (Makefile.am): Likewise.
9043         * modules/mkdir (Makefile.am): Likewise.
9044         * modules/mkdtemp (Makefile.am): Likewise.
9045         * modules/mkstemp (Makefile.am): Likewise.
9046         * modules/mktime (Makefile.am): Likewise.
9047         * modules/modechange (Makefile.am): Likewise.
9048         * modules/mountlist (Makefile.am): Likewise.
9049         * modules/nanosleep (Makefile.am): Likewise.
9050         * modules/obstack (Makefile.am): Likewise.
9051         * modules/openat (Makefile.am): Likewise.
9052         * modules/pagealign_alloc (Makefile.am): Likewise.
9053         * modules/pathmax (Makefile.am): Likewise.
9054         * modules/physmem (Makefile.am): Likewise.
9055         * modules/poll (Makefile.am): Likewise.
9056         * modules/posixtm (Makefile.am): Likewise.
9057         * modules/posixver (Makefile.am): Likewise.
9058         * modules/putenv (Makefile.am): Likewise.
9059         * modules/quote (Makefile.am): Likewise.
9060         * modules/quotearg (Makefile.am): Likewise.
9061         * modules/raise (Makefile.am): Likewise.
9062         * modules/read-file (Makefile.am): Likewise.
9063         * modules/readline (Makefile.am): Likewise.
9064         * modules/readlink (Makefile.am): Likewise.
9065         * modules/readtokens (Makefile.am): Likewise.
9066         * modules/readutmp (Makefile.am): Likewise.
9067         * modules/realloc (Makefile.am): Likewise.
9068         * modules/regex (Makefile.am): Likewise.
9069         * modules/rename-dest-slash (Makefile.am): Likewise.
9070         * modules/rename (Makefile.am): Likewise.
9071         * modules/rijndael (Makefile.am): Likewise.
9072         * modules/rmdir (Makefile.am): Likewise.
9073         * modules/rpmatch (Makefile.am): Likewise.
9074         * modules/safe-read (Makefile.am): Likewise.
9075         * modules/safe-write (Makefile.am): Likewise.
9076         * modules/same-inode (Makefile.am): Likewise.
9077         * modules/same (Makefile.am): Likewise.
9078         * modules/save-cwd (Makefile.am): Likewise.
9079         * modules/savedir (Makefile.am): Likewise.
9080         * modules/setenv (Makefile.am): Likewise.
9081         * modules/settime (Makefile.am): Likewise.
9082         * modules/sha1 (Makefile.am): Likewise.
9083         * modules/sig2str (Makefile.am): Likewise.
9084         * modules/snprintf (Makefile.am): Likewise.
9085         * modules/stat-macros (Makefile.am): Likewise.
9086         * modules/stat-time (Makefile.am): Likewise.
9087         * modules/stdbool (Makefile.am): Likewise.
9088         * modules/stdint (Makefile.am): Likewise.
9089         * modules/stdlib-safer (Makefile.am): Likewise.
9090         * modules/stpcpy (Makefile.am): Likewise.
9091         * modules/stpncpy (Makefile.am): Likewise.
9092         * modules/strcase (Makefile.am): Likewise.
9093         * modules/strcasestr (Makefile.am): Likewise.
9094         * modules/strchrnul (Makefile.am): Likewise.
9095         * modules/strcspn (Makefile.am): Likewise.
9096         * modules/strdup (Makefile.am): Likewise.
9097         * modules/strerror (Makefile.am): Likewise.
9098         * modules/strftime (Makefile.am): Likewise.
9099         * modules/strndup (Makefile.am): Likewise.
9100         * modules/strnlen (Makefile.am): Likewise.
9101         * modules/strpbrk (Makefile.am): Likewise.
9102         * modules/strsep (Makefile.am): Likewise.
9103         * modules/strstr (Makefile.am): Likewise.
9104         * modules/strtod (Makefile.am): Likewise.
9105         * modules/strtoimax (Makefile.am): Likewise.
9106         * modules/strtok_r (Makefile.am): Likewise.
9107         * modules/strtol (Makefile.am): Likewise.
9108         * modules/strtoll (Makefile.am): Likewise.
9109         * modules/strtoul (Makefile.am): Likewise.
9110         * modules/strtoull (Makefile.am): Likewise.
9111         * modules/strtoumax (Makefile.am): Likewise.
9112         * modules/strverscmp (Makefile.am): Likewise.
9113         * modules/sys_socket (Makefile.am): Likewise.
9114         * modules/sys_stat (Makefile.am): Likewise.
9115         * modules/sysexits (Makefile.am): Likewise.
9116         * modules/time_r (Makefile.am): Likewise.
9117         * modules/timegm (Makefile.am): Likewise.
9118         * modules/timespec (Makefile.am): Likewise.
9119         * modules/tmpfile-safer (Makefile.am): Likewise.
9120         * modules/trim (Makefile.am): Likewise.
9121         * modules/unistd-safer (Makefile.am): Likewise.
9122         * modules/unlinkdir (Makefile.am): Likewise.
9123         * modules/unlocked-io (Makefile.am): Likewise.
9124         * modules/userspec (Makefile.am): Likewise.
9125         * modules/utime (Makefile.am): Likewise.
9126         * modules/utimecmp (Makefile.am): Likewise.
9127         * modules/utimens (Makefile.am): Likewise.
9128         * modules/vasnprintf (Makefile.am): Likewise.
9129         * modules/vasprintf (Makefile.am): Likewise.
9130         * modules/vsnprintf (Makefile.am): Likewise.
9131         * modules/xalloc (Makefile.am): Likewise.
9132         * modules/xgetcwd (Makefile.am): Likewise.
9133         * modules/xnanosleep (Makefile.am): Likewise.
9134         * modules/xreadlink (Makefile.am): Likewise.
9135         * modules/xstrtod (Makefile.am): Likewise.
9136         * modules/xstrtol (Makefile.am): Likewise.
9137         * modules/xstrtold (Makefile.am): Likewise.
9138         * modules/yesno (Makefile.am): Likewise.
9139         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9140
9141 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9142
9143         * modules/error (Makefile.am): Distribute files through
9144         EXTRA_DIST, not lib_SOURCES.
9145
9146 2006-10-12  Eric Blake  <ebb9@byu.net>
9147
9148         * modules/error (Makefile.am): Distribute files in /lib.
9149         * modules/obstack (Makefile.am): Likewise.
9150
9151 2006-10-12  Bruno Haible  <bruno@clisp.org>
9152
9153         * modules/acl (Makefile.am): Distribute all files in lib/ through
9154         EXTRA_DIST.
9155         * modules/arcfour (Makefile.am): Likewise.
9156         * modules/arctwo (Makefile.am): Likewise.
9157         * modules/argmatch (Makefile.am): Likewise.
9158         * modules/argz (Makefile.am): Likewise.
9159         * modules/atexit (Makefile.am): Likewise.
9160         * modules/backupfile (Makefile.am): Likewise.
9161         * modules/c-strtod (Makefile.am): Likewise.
9162         * modules/c-strtold (Makefile.am): Likewise.
9163         * modules/calloc (Makefile.am): Likewise.
9164         * modules/canon-host (Makefile.am): Likewise.
9165         * modules/canonicalize (Makefile.am): Likewise.
9166         * modules/chdir-long (Makefile.am): Likewise.
9167         * modules/chdir-safer (Makefile.am): Likewise.
9168         * modules/check-version (Makefile.am): Likewise.
9169         * modules/chown (Makefile.am): Likewise.
9170         * modules/cloexec (Makefile.am): Likewise.
9171         * modules/close-stream (Makefile.am): Likewise.
9172         * modules/closeout (Makefile.am): Likewise.
9173         * modules/crc (Makefile.am): Likewise.
9174         * modules/cycle-check (Makefile.am): Likewise.
9175         * modules/des (Makefile.am): Likewise.
9176         * modules/dirfd (Makefile.am): Likewise.
9177         * modules/dirname (Makefile.am): Likewise.
9178         * modules/dup2 (Makefile.am): Likewise.
9179         * modules/euidaccess (Makefile.am): Likewise.
9180         * modules/exclude (Makefile.am): Likewise.
9181         * modules/exitfail (Makefile.am): Likewise.
9182         * modules/fcntl-safer (Makefile.am): Likewise.
9183         * modules/file-type (Makefile.am): Likewise.
9184         * modules/fileblocks (Makefile.am): Likewise.
9185         * modules/filemode (Makefile.am): Likewise.
9186         * modules/filenamecat (Makefile.am): Likewise.
9187         * modules/fnmatch (Makefile.am): Likewise.
9188         * modules/fopen-safer (Makefile.am): Likewise.
9189         * modules/fpending (Makefile.am): Likewise.
9190         * modules/fprintftime (Makefile.am): Likewise.
9191         * modules/free (Makefile.am): Likewise.
9192         * modules/fsusage (Makefile.am): Likewise.
9193         * modules/ftruncate (Makefile.am): Likewise.
9194         * modules/fts (Makefile.am): Likewise.
9195         * modules/gc (Makefile.am): Likewise.
9196         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9197         * modules/getaddrinfo (Makefile.am): Likewise.
9198         * modules/getcwd (Makefile.am): Likewise.
9199         * modules/getdelim (Makefile.am): Likewise.
9200         * modules/getdomainname (Makefile.am): Likewise.
9201         * modules/getgroups (Makefile.am): Likewise.
9202         * modules/gethostname (Makefile.am): Likewise.
9203         * modules/gethrxtime (Makefile.am): Likewise.
9204         * modules/getline (Makefile.am): Likewise.
9205         * modules/getloadavg (Makefile.am): Likewise.
9206         * modules/getlogin_r (Makefile.am): Likewise.
9207         * modules/getopt (Makefile.am): Likewise.
9208         * modules/getpass (Makefile.am): Likewise.
9209         * modules/getpass-gnu (Makefile.am): Likewise.
9210         * modules/getsubopt (Makefile.am): Likewise.
9211         * modules/gettime (Makefile.am): Likewise.
9212         * modules/gettimeofday (Makefile.am): Likewise.
9213         * modules/getugroups (Makefile.am): Likewise.
9214         * modules/getusershell (Makefile.am): Likewise.
9215         * modules/glob (Makefile.am): Likewise.
9216         * modules/group-member (Makefile.am): Likewise.
9217         * modules/hard-locale (Makefile.am): Likewise.
9218         * modules/hash (Makefile.am): Likewise.
9219         * modules/hmac-md5 (Makefile.am): Likewise.
9220         * modules/hmac-sha1 (Makefile.am): Likewise.
9221         * modules/human (Makefile.am): Likewise.
9222         * modules/idcache (Makefile.am): Likewise.
9223         * modules/imaxabs (Makefile.am): Likewise.
9224         * modules/imaxdiv (Makefile.am): Likewise.
9225         * modules/inet_ntop (Makefile.am): Likewise.
9226         * modules/inet_pton (Makefile.am): Likewise.
9227         * modules/inttostr (Makefile.am): Likewise.
9228         * modules/isapipe (Makefile.am): Likewise.
9229         * modules/lchown (Makefile.am): Likewise.
9230         * modules/long-options (Makefile.am): Likewise.
9231         * modules/lstat (Makefile.am): Likewise.
9232         * modules/malloc (Makefile.am): Likewise.
9233         * modules/mathl (Makefile.am): Likewise.
9234         * modules/mbchar (Makefile.am): Likewise.
9235         * modules/md2 (Makefile.am): Likewise.
9236         * modules/md4 (Makefile.am): Likewise.
9237         * modules/md5 (Makefile.am): Likewise.
9238         * modules/memcasecmp (Makefile.am): Likewise.
9239         * modules/memchr (Makefile.am): Likewise.
9240         * modules/memcmp (Makefile.am): Likewise.
9241         * modules/memcoll (Makefile.am): Likewise.
9242         * modules/memcpy (Makefile.am): Likewise.
9243         * modules/memmem (Makefile.am): Likewise.
9244         * modules/memmove (Makefile.am): Likewise.
9245         * modules/mempcpy (Makefile.am): Likewise.
9246         * modules/memrchr (Makefile.am): Likewise.
9247         * modules/memset (Makefile.am): Likewise.
9248         * modules/memxor (Makefile.am): Likewise.
9249         * modules/mkancesdirs (Makefile.am): Likewise.
9250         * modules/mkdir (Makefile.am): Likewise.
9251         * modules/mkdir-p (Makefile.am): Likewise.
9252         * modules/mkdtemp (Makefile.am): Likewise.
9253         * modules/mkstemp (Makefile.am): Likewise.
9254         * modules/mktime (Makefile.am): Likewise.
9255         * modules/modechange (Makefile.am): Likewise.
9256         * modules/mountlist (Makefile.am): Likewise.
9257         * modules/nanosleep (Makefile.am): Likewise.
9258         * modules/openat (Makefile.am): Likewise.
9259         * modules/pagealign_alloc (Makefile.am): Likewise.
9260         * modules/physmem (Makefile.am): Likewise.
9261         * modules/poll (Makefile.am): Likewise.
9262         * modules/posixtm (Makefile.am): Likewise.
9263         * modules/posixver (Makefile.am): Likewise.
9264         * modules/putenv (Makefile.am): Likewise.
9265         * modules/quote (Makefile.am): Likewise.
9266         * modules/quotearg (Makefile.am): Likewise.
9267         * modules/raise (Makefile.am): Likewise.
9268         * modules/read-file (Makefile.am): Likewise.
9269         * modules/readline (Makefile.am): Likewise.
9270         * modules/readlink (Makefile.am): Likewise.
9271         * modules/readtokens (Makefile.am): Likewise.
9272         * modules/readutmp (Makefile.am): Likewise.
9273         * modules/realloc (Makefile.am): Likewise.
9274         * modules/regex (Makefile.am): Likewise.
9275         * modules/rename (Makefile.am): Likewise.
9276         * modules/rename-dest-slash (Makefile.am): Likewise.
9277         * modules/rijndael (Makefile.am): Likewise.
9278         * modules/rmdir (Makefile.am): Likewise.
9279         * modules/rpmatch (Makefile.am): Likewise.
9280         * modules/safe-read (Makefile.am): Likewise.
9281         * modules/safe-write (Makefile.am): Likewise.
9282         * modules/same (Makefile.am): Likewise.
9283         * modules/save-cwd (Makefile.am): Likewise.
9284         * modules/savedir (Makefile.am): Likewise.
9285         * modules/setenv (Makefile.am): Likewise.
9286         * modules/settime (Makefile.am): Likewise.
9287         * modules/sha1 (Makefile.am): Likewise.
9288         * modules/sig2str (Makefile.am): Likewise.
9289         * modules/snprintf (Makefile.am): Likewise.
9290         * modules/stdlib-safer (Makefile.am): Likewise.
9291         * modules/stpcpy (Makefile.am): Likewise.
9292         * modules/stpncpy (Makefile.am): Likewise.
9293         * modules/strcase (Makefile.am): Likewise.
9294         * modules/strcasestr (Makefile.am): Likewise.
9295         * modules/strchrnul (Makefile.am): Likewise.
9296         * modules/strcspn (Makefile.am): Likewise.
9297         * modules/strdup (Makefile.am): Likewise.
9298         * modules/strerror (Makefile.am): Likewise.
9299         * modules/strftime (Makefile.am): Likewise.
9300         * modules/strndup (Makefile.am): Likewise.
9301         * modules/strnlen (Makefile.am): Likewise.
9302         * modules/strpbrk (Makefile.am): Likewise.
9303         * modules/strsep (Makefile.am): Likewise.
9304         * modules/strstr (Makefile.am): Likewise.
9305         * modules/strtod (Makefile.am): Likewise.
9306         * modules/strtoimax (Makefile.am): Likewise.
9307         * modules/strtok_r (Makefile.am): Likewise.
9308         * modules/strtol (Makefile.am): Likewise.
9309         * modules/strtoll (Makefile.am): Likewise.
9310         * modules/strtoul (Makefile.am): Likewise.
9311         * modules/strtoull (Makefile.am): Likewise.
9312         * modules/strtoumax (Makefile.am): Likewise.
9313         * modules/strverscmp (Makefile.am): Likewise.
9314         * modules/time_r (Makefile.am): Likewise.
9315         * modules/timegm (Makefile.am): Likewise.
9316         * modules/tmpfile-safer (Makefile.am): Likewise.
9317         * modules/unistd-safer (Makefile.am): Likewise.
9318         * modules/unlinkdir (Makefile.am): Likewise.
9319         * modules/userspec (Makefile.am): Likewise.
9320         * modules/utime (Makefile.am): Likewise.
9321         * modules/utimecmp (Makefile.am): Likewise.
9322         * modules/utimens (Makefile.am): Likewise.
9323         * modules/vasnprintf (Makefile.am): Likewise.
9324         * modules/vasprintf (Makefile.am): Likewise.
9325         * modules/vsnprintf (Makefile.am): Likewise.
9326         * modules/xalloc (Makefile.am): Likewise.
9327         * modules/xgetcwd (Makefile.am): Likewise.
9328         * modules/xnanosleep (Makefile.am): Likewise.
9329         * modules/xreadlink (Makefile.am): Likewise.
9330         * modules/xstrtod (Makefile.am): Likewise.
9331         * modules/xstrtol (Makefile.am): Likewise.
9332         * modules/xstrtold (Makefile.am): Likewise.
9333         * modules/yesno (Makefile.am): Likewise.
9334
9335 2006-10-12  Jim Meyering  <jim@meyering.net>
9336
9337         * m4/getloadavg.m4: Revert the change below.
9338
9339         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9340         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9341         fail with a symlink, which is what coreutils' ./bootstrap now
9342         creates by default.
9343
9344 2006-10-12  Bruno Haible  <bruno@clisp.org>
9345
9346         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9347         mingw.
9348         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
9349         MSVC and mingw explicitly.
9350
9351 2006-10-11  Simon Josefsson  <jas@extundo.com>
9352             Bruno Haible  <bruno@clisp.org>
9353
9354         Add support for multiple gnulib-tool invocations in the scope of a
9355         single configure.ac file.
9356         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
9357         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
9358         with the same contents as the _LIBADD variable.
9359         (func_emit_initmacro_start, func_emit_initmacro_end,
9360         func_emit_initmacro_done): New functions.
9361         (func_import, func_create_testdir): Invoke them. Allow the identifiers
9362         gl_LIBOBJS and gl_LTLIBOBJS.
9363
9364 2006-10-11  Bruno Haible  <bruno@clisp.org>
9365
9366         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
9367         (func_create_testdir): Don't create po/Makefile.am, don't invoke
9368         autoreconf. Instead, invoke autopoint explicitly but move back the
9369         *.m4 files from gnulib.
9370
9371 2006-10-11  Bruno Haible  <bruno@clisp.org>
9372
9373         * gnulib-tool (func_usage): Make module names after --create-testdir
9374         optional.
9375         (func_create_testdir): If no module was specified, use nearly all
9376         modules.
9377
9378 2006-10-12  Jim Meyering  <jim@meyering.net>
9379
9380         Big performance improvement for fts-based tools that use FTS_NOSTAT.
9381         Avoid spurious inode-mismatch problems on non-POSIX file systems.
9382         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
9383         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
9384         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
9385         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
9386         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
9387         (fts_set_stat_required): New function.
9388         (fts_open): Defer the calls to fts_stat, if possible or requested.
9389         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
9390         into fts_stat itself.
9391         (fts_read): Perform any required (deferred) fts_stat call.
9392         (fts_build): Likewise, for the directory we're about to open and read.
9393         In the readdir loop, carefully decide whether each entry will require
9394         an eventual call to fts_stat, using dirent.d_type info if available.
9395         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
9396         a command line argument into this function.  Update all callers.
9397         Map a return value of FTS_DOT to FTS_D for a command line argument.
9398         * modules/fts (Depends-on): Add d-type.  Alphabetize.
9399         Thanks to Miklos Szeredi for his tenacity and for the initial
9400         bug report about "find" failing on a FUSE-based file system.
9401
9402         * lib/fts.c (fts_open): Use consistent indentation.
9403
9404 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9405
9406         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
9407         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
9408         reported by Jim Meyering.  All uses of cache variables renamed
9409         to match Autoconf's.
9410         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
9411         the other one.
9412
9413         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
9414         Fix misspelling in diagnostic.
9415
9416 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9417
9418         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
9419         defined.  Problem reported by Matthew Woehlke.
9420
9421         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
9422         Add support for Tandem NonStop R series.
9423         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
9424         Use new macro.
9425
9426         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
9427         (has_trailing_slash): Omit size arg; all callers changed.
9428         Omit 'inline', since it doesn't help performance and we'd
9429         need to configure it.
9430         Don't count //, ///, etc. as having a trailing slash.
9431         As a side effect, this removes a C99ism reported by Matthew Woehlke.
9432         (rpl_rename_dest_slash): On failure, use rename's errno rather
9433         than (in some cases) an incorrect or junk errno.
9434         Simplify code by removing need to compute length; this does
9435         cause it to make two passes instead of one over the file name,
9436         but it's worth it.
9437
9438         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
9439         change, since Autoconf's version may no longer be appropriate now
9440         that we are using CVS Autoconf's version.  Add support for Tandem.
9441
9442 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9443             Bruno Haible  <bruno@clisp.org>
9444
9445         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
9446         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
9447         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
9448         gl_AC_TYPE_LONG_LONG.
9449
9450         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
9451         instead of HAVE_LONG_LONG.
9452         * lib/printf-args.c (printf_fetchargs): Likewise.
9453         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
9454         * lib/vasnprintf.c (VASNPRINTF): Likewise.
9455         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
9456         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
9457         gl_AC_TYPE_LONG_LONG.
9458
9459 2006-10-11  Bruno Haible  <bruno@clisp.org>
9460
9461         * m4/longlong.m4: Add comments.
9462         * m4/ulonglong.m4: Likewise.
9463
9464 2006-10-10  Bruno Haible  <bruno@clisp.org>
9465
9466         Make it possible to #define stpcpy, strdup to aliases.
9467         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
9468         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
9469
9470 2006-10-10  Bruno Haible  <bruno@clisp.org>
9471
9472         Make it possible to #define gcd to an alias.
9473         * lib/gcd.c: Include config.h.
9474
9475 2006-10-10  Bruno Haible  <bruno@clisp.org>
9476
9477         Make it possible to #define c_isascii to an alias.
9478         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
9479         defined. Undefine the macros before defining them, to avoid gcc
9480         warnings.
9481         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
9482         define NO_C_CTYPE_MACROS early.
9483
9484 2006-10-10  Bruno Haible  <bruno@clisp.org>
9485
9486         Make it possible to #define set_program_name to an alias.
9487         * lib/progname.c: Don't undefine set_program_name; instead, undefine
9488         ENABLE_RELOCATABLE early.
9489
9490 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9491
9492         Port to Tandem NSK OSS, which has 64-bit signed int but at most
9493         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
9494         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
9495         More generally, don't assume that 64-bit signed int is available
9496         if unsigned int is, and vice versa.
9497         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
9498         unsigned symbols, not on their signed counterparts.
9499         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
9500         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
9501         (UINT64_C, UINTMAX_C):
9502         Likewise.
9503         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
9504         unsigned counterparts.
9505         (Have_long_long, Unsigned): New macros.
9506         (Int): Renamed from INT.
9507         (strtoimax): Use the new macros.
9508         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
9509         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
9510         * modules/inttypes (inttypes.h): Substitute
9511         HAVE_UNSIGNED_LONG_LONG_INT.
9512         * modules/stdint (stdint.h): Likewise.
9513         (Files): Add m4/ulonglong.m4.
9514
9515 2006-10-10  Bruno Haible  <bruno@clisp.org>
9516
9517         Fix a gcc -Wshadow warning.
9518         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
9519         to 'bucket'.
9520         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
9521         gl_linked_indexof_from_to): Likewise.
9522         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
9523         Likewise.
9524         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
9525         Likewise.
9526         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
9527         Reported by Eric Blake.
9528
9529 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
9530
9531         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
9532         for NetBSD.  Problem reported by Bruno Haible.
9533
9534 2006-10-09  Jim Meyering  <jim@meyering.net>
9535
9536         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
9537         Patch from Bruno Haible.
9538
9539 2006-10-09  Jim Meyering  <jim@meyering.net>
9540
9541         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
9542         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
9543         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
9544
9545 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
9546
9547         Don't include <config.h> twice; this doesn't work in some cases,
9548         e.g., when config.h has "#define intmax_t long long int" and
9549         we include <config.h>, <inttypes.h>, <config.h> in that order.
9550         Problem reported by Matthew Woehlke in:
9551         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
9552         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
9553         * lib/fts-cycle.c: Don't include config.h.
9554         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
9555         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
9556         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
9557         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
9558         inttypes.h.
9559         * lib/xstrtoumax.c: Likewise.
9560         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
9561         __strtol and the like, so that this module is more like its siblings.
9562         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
9563         Remove; no longer needed now that we assume gnulib inttypes.h.
9564
9565 2006-10-08  Bruno Haible  <bruno@clisp.org>
9566
9567         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
9568         option.
9569
9570 2006-10-07  Jim Meyering  <jim@meyering.net>
9571
9572         * modules/inttypes (inttypes.h): Revert what seems to have been
9573         an inadvertent part of today's change: use "|", not "/" in the
9574         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
9575
9576 2006-10-07  Bruno Haible  <bruno@clisp.org>
9577
9578         * modules/sublist: New file.
9579
9580 2006-10-07  Bruno Haible  <bruno@clisp.org>
9581
9582         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
9583         * modules/argz (argz.h): Likewise.
9584         * modules/arpa_inet (arpa/inet.h): Likewise.
9585         * modules/byteswap (byteswap.h): Likewise.
9586         * modules/configmake (configmake.h): Likewise.
9587         * modules/fcntl (fcntl.h): Likewise.
9588         * modules/fnmatch (fnmatch.h): Likewise.
9589         * modules/getopt (getopt.h): Likewise.
9590         * modules/glob (glob.h): Likewise.
9591         * modules/inttypes (inttypes.h): Likewise.
9592         * modules/netinet_in (netinet/in.h): Likewise.
9593         * modules/poll (poll.h): Likewise.
9594         * modules/stdbool (stdbool.h): Likewise.
9595         * modules/stdint (stdint.h): Likewise.
9596         * modules/sys_select (sys/select.h): Likewise.
9597         * modules/sys_socket (sys/socket.h): Likewise.
9598         * modules/sys_stat (sys/stat.h): Likewise.
9599         * modules/sysexits (sysexits.h): Likewise.
9600         * modules/unistd (unistd.h): Likewise.
9601         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9602         Add a "DO NOT EDIT" comment to the generated file.
9603         (func_import): Likewise for gnulib-comp.m4.
9604
9605 2006-10-07  Bruno Haible  <bruno@clisp.org>
9606
9607         * lib/gl_sublist.h: New file.
9608         * lib/gl_sublist.c: New file.
9609
9610 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9611
9612         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
9613         name (relative to the original working directory) and the file
9614         name component (relative to the temporary working directory).  All
9615         callers changed.
9616         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
9617         * lib/mkdir-p.c (make_dir_parents): Likewise.
9618         * lib/mkdir-p.h (make_dir_parents): Likewise.
9619
9620 2006-10-06  Eric Blake  <ebb9@byu.net>
9621
9622         Define several macros for use by the clean-temp module.
9623         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
9624         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
9625         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
9626
9627         * lib/clean-temp.h (close_stream_temp): New declaration.
9628         * lib/clean-temp.c (includes): Pull in headers according to what
9629         other modules are in use.
9630         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
9631
9632 2006-10-06  Bruno Haible  <bruno@clisp.org>
9633
9634         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
9635         instead of fopen, fwriteerror.
9636
9637 2006-10-06  Bruno Haible  <bruno@clisp.org>
9638
9639         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
9640         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
9641         int.
9642         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
9643         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
9644         Return an error indicator.
9645         Suggested by Eric Blake.
9646
9647 2006-10-06  Bruno Haible  <bruno@clisp.org>
9648
9649         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
9650         Reported by Eric Blake.
9651
9652 2006-10-06  Bruno Haible  <bruno@clisp.org>
9653
9654         * modules/closeout (Description): Mention stderr too.
9655
9656 2006-10-06  Bruno Haible  <bruno@clisp.org>
9657         and Paul Eggert  <eggert@cs.ucla.edu>
9658
9659         * lib/closeout.c (close_stdout): Also close stderr.
9660         * lib/closeout.h: Update comment.
9661
9662 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9663
9664         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
9665         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
9666         * lib/dirchownmod.c: Include lchown.h.
9667         * lib/lchown.c: Don't include files that lchown.h now includes.
9668         Don't declare chown, since lchown.h now does that.
9669         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
9670         (lchown): Define to rpl_chown if lchown is declared but
9671         does not exist.  Declare using a prototype if lchown is not
9672         declared.  Add a copyright notice.
9673         * lib/mkstemp.h: Include <unistd.h>.
9674         * lib/openat.c: Include lchown.h.
9675
9676         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
9677         we now test for that separately.
9678         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
9679         rather than O_NOFOLLOW, when testing whether it's possible to
9680         avoid a race condition reliably.
9681         * lib/savewd.c (savewd_chdir): Likewise.
9682
9683         Remove macros that are no longer needed now that stdint.h is
9684         reliable.
9685         * lib/fsusage.c (UINTMAX_MAX): Remove.
9686         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
9687         * lib/utimecmp.c (SIZE_MAX): Remove.
9688
9689         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
9690
9691         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
9692         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
9693         O_NOATIME works.
9694
9695 2006-10-05  Bruno Haible  <bruno@clisp.org>
9696
9697         * lib/gl_list.h (gl_sortedlist_search_from_to,
9698         gl_sortedlist_indexof_from_to): New declarations.
9699         (gl_list_implementation): New fields sortedlist_search_from_to,
9700         sortedlist_indexof_from_to.
9701         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
9702         inline functions.
9703         * lib/gl_list.c (gl_sortedlist_search_from_to,
9704         gl_sortedlist_indexof_from_to): New functions.
9705         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
9706         function.
9707         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
9708         (gl_array_sortedlist_search_from_to): New function.
9709         (gl_array_list_implementation): Update.
9710         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
9711         function.
9712         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
9713         (gl_carray_sortedlist_search_from_to): New function.
9714         (gl_carray_list_implementation): Update.
9715         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
9716         gl_linked_sortedlist_indexof_from_to): New functions.
9717         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9718         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9719         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
9720         gl_tree_sortedlist_indexof_from_to): New functions.
9721         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9722         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9723         Update.
9724         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9725         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
9726         Update.
9727
9728 2006-10-05  Bruno Haible  <bruno@clisp.org>
9729
9730         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
9731         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
9732         (struct gl_list_implementation): Add fields search_from_to,
9733         indexof_from_to. Remove fields search, indexof.
9734         (gl_list_search): Use the search_from_to method.
9735         (gl_list_search_from, gl_list_search_from_to): New functions.
9736         (gl_list_indexof): Use the indexof_from_to method.
9737         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9738         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
9739         (gl_list_search_from, gl_list_search_from_to): New functions.
9740         (gl_list_indexof): Use the indexof_from_to method.
9741         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9742         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
9743         gl_array_indexof. Add start_index, end_index arguments.
9744         (gl_array_search_from_to): Renamed from gl_array_search. Add
9745         start_index, end_index arguments.
9746         (gl_array_remove, gl_array_list_implementation): Update.
9747         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
9748         gl_carray_indexof. Add start_index, end_index arguments.
9749         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
9750         start_index, end_index arguments.
9751         (gl_carray_remove, gl_carray_list_implementation): Update.
9752         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
9753         gl_linked_search. Add start_index, end_index arguments.
9754         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
9755         start_index, end_index arguments.
9756         (gl_linked_remove): Update.
9757         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9758         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9759         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
9760         field to 'size_t'.
9761         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
9762         gl_tree_search. Add start_index, end_index arguments.
9763         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9764         start_index, end_index arguments.
9765         (gl_tree_remove): Update.
9766         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9767         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9768         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
9769         function.
9770         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
9771         gl_tree_search. Add start_index, end_index arguments.
9772         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9773         start_index, end_index arguments.
9774         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9775         Update.
9776         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
9777
9778 2006-10-05  Bruno Haible  <bruno@clisp.org>
9779
9780         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
9781
9782         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
9783         fwriteerror_temp): New declarations.
9784         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
9785         (descriptors): New variable.
9786         (cleanup): First, close the descriptors.
9787         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
9788         fclose_temp, fwriteerror_temp): New functions.
9789
9790 2006-10-04  Jim Meyering  <jim@meyering.net>
9791
9792         * lib/fts.c (fts_open): Tiny comment change.
9793
9794 2006-10-04  Bruno Haible  <bruno@clisp.org>
9795
9796         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
9797         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
9798         gl_LOCK_BODY.
9799         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
9800         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
9801         gl_LOCK_EARLY_BODY.
9802         (gl_LOCK): Require gl_LOCK_BODY.
9803
9804 2006-10-04  Bruno Haible  <bruno@clisp.org>
9805
9806         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
9807         (gl_oset_search_atleast): New declaration.
9808         (struct gl_oset_implementation): Add field 'search_atleast'.
9809         (gl_oset_search_atleast): New inline function.
9810         * lib/gl_oset.c (gl_oset_search_atleast): New function.
9811         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
9812         (gl_array_oset_implementation): Update.
9813         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
9814         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
9815         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
9816
9817 2006-10-04  Bruno Haible  <bruno@clisp.org>
9818
9819         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
9820
9821 2006-10-03  Bruno Haible  <bruno@clisp.org>
9822
9823         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
9824         from gl_avltreehash_list_implementation.
9825
9826 2006-10-03  Bruno Haible  <bruno@clisp.org>
9827
9828         * lib/gl_oset.c (gl_oset_add): Fix return type.
9829
9830 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
9831
9832         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
9833
9834 2006-10-02  Eric Blake  <ebb9@byu.net>
9835
9836         * modules/strnlen (Depends-on): Add extensions.
9837
9838 2006-10-02  Eric Blake  <ebb9@byu.net>
9839
9840         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
9841         definition in 2.60+.
9842
9843 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
9844
9845         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
9846         checks.
9847
9848 2006-10-02  Bruno Haible  <bruno@clisp.org>
9849
9850         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
9851         to the AUTOMAKE_OPTIONS.
9852         Reported by Jim Meyering.
9853
9854 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9855
9856         Work around bug in Solaris 10 /proc file system:
9857         /proc/self/fd/NNN/.. isn't the parent directory of
9858         the directory whose file descriptor is NNN.  This needs to
9859         be worked around at run time, not compile time, since a
9860         program might be built on Solaris 8, where things work, and
9861         run on Solaris 10.
9862         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
9863         to use the following interface instead:
9864         (OPENAT_BUFFER_SIZE): New macro.
9865         (openat_proc_name): New function.
9866         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
9867         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
9868         Likewise.
9869         * lib/openat-proc.c: New file.
9870         * modules/openat (Files): Add lib/openat-proc.c.
9871         (Depends-on): Add same-inode, stdbool.
9872         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
9873
9874 2006-09-29  Bruno Haible  <bruno@clisp.org>
9875
9876         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
9877         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
9878         argument. Set stdout_closed before testing for ferror, not after.
9879         (fwriteerror, fwriteerror_no_ebadf): New functions.
9880
9881 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9882
9883         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
9884
9885 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
9886
9887         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
9888         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
9889
9890 2006-09-28  Jim Meyering  <jim@meyering.net>
9891
9892         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
9893         Include <unistd.h>.
9894
9895 2006-09-28  Bruno Haible  <bruno@clisp.org>
9896
9897         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
9898         * modules/linkedhash-list (Depends-on): Likewise.
9899         * modules/rbtreehash-list (Depends-on): Likewise.
9900
9901 2006-09-28  Bruno Haible  <bruno@clisp.org>
9902
9903         * lib/strndup.h: Simplify the redefinition of strndup.
9904         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
9905         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
9906
9907 2006-09-28  Bruno Haible  <bruno@clisp.org>
9908
9909         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
9910         * lib/gl_linkedhash_list.c: Likewise.
9911         * lib/gl_rbtreehash_list.c: Likewise.
9912
9913 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9914
9915         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
9916         getaddrinfo.
9917
9918         * lib/__fpending.h: Don't include <stdio_ext.h> unless
9919         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
9920         it causes <stdio_ext.h> to cause a compile-time error.
9921         Problem reported by Nelson H. F. Beebe.
9922         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
9923         of HAVE_DECL___PENDING.
9924
9925         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
9926         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
9927         declaration.
9928
9929 2006-09-27  Jim Meyering  <jim@meyering.net>
9930
9931         This file could end up with a definition for a function
9932         named __strndup, rather than rpl_strndup on a system with
9933         incomplete weak_alias support.
9934         * lib/strndup.c (strndup): Rename from __strndup.
9935         Remove #defines that used to map __strndup to strndup.
9936         Don't use K&R prototypes.
9937         Remove LIBC-related code, since this file is not sync'd with glibc.
9938         * lib/strndup.h: Revamp, accordingly.
9939         * m4/strndup.m4: Modernize.
9940
9941 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9942
9943         * modules/savewd (Depends-on): Add 'raise'.
9944         * lib/savewd.c: Include <signal.h>, for 'raise'.
9945
9946 2006-09-26  Jim Meyering  <jim@meyering.net>
9947
9948         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
9949         when we detect Darwin 8.7.0's acl_get_file bug.
9950         Rearrange to perform the new (below) run-test while $LIBS
9951         contains any acl-related library.  Set USE_ACL at the end.
9952         (gl_ACL_GET_FILE): New function.
9953
9954 2006-09-26  Eric Blake  <ebb9@byu.net>
9955
9956         * lib/verror.c: Include <config.h> unconditionally.
9957
9958 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
9959
9960         * modules/clock-time (Maintainer): Add self.
9961         * modules/getlogin_r (Depends-on): Add extensions.
9962
9963 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9964
9965         * modules/clock-time: New module.
9966         * modules/nanosleep (Depends-on): Add clock-time.
9967         * modules/gethrxtime (Depends-on): Likewise.
9968         * modules/gettime (Depends-on): Likewise.
9969         * modules/settime (Depends-on): Likewise.
9970
9971         * modules/fts-lgpl: Depend on openat.
9972         * modules/mkancesdirs: Depend on savewd.
9973         * modules/mkdir-p: Likewise.
9974
9975 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9976
9977         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
9978
9979         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
9980         `gl_have_arbitrary_file_name_length_limit' to
9981         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
9982         actually works between configure runs.
9983
9984 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9985             Bruno Haible  <bruno@clisp.org>
9986
9987         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
9988
9989 2006-09-25  Jim Meyering  <jim@meyering.net>
9990
9991         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
9992         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
9993
9994 2006-09-25  Eric Blake  <ebb9@byu.net>
9995
9996         * gnulib-tool (func_import, func_create_testdir): Fix typos in
9997         exec's in 2006-09-18 patch when shuffling fds.
9998
9999 2006-09-25  Bruno Haible  <bruno@clisp.org>
10000
10001         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
10002         Reported by Jim Meyering.
10003
10004 2006-09-24  Jim Meyering  <jim@meyering.net>
10005
10006         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
10007         compare a pointer against a literal "0".  That caused failures with
10008         at least HP-UX's hpcc.
10009
10010 2006-09-22  Simon Josefsson  <jas@extundo.com>
10011
10012         * modules/gc-sha1:
10013         * modules/gc-md4:
10014         * modules/gc-hmac-sha1:
10015         * modules/gc-hmac-md5:
10016         * modules/gc-des:
10017         * modules/gc-arcfour: Distribute more files.
10018
10019 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10020
10021         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
10022         (gl_linked_iterator_from_to): Initialize struct completely.
10023         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
10024         (gl_tree_iterator_from_to): Likewise
10025         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
10026         * lib/gl_array_list.c [lint] (gl_array_iterator)
10027         (gl_array_iterator_from_to): Likewise.
10028         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
10029         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
10030         (gl_carray_iterator_from_to): Likewise.
10031
10032         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
10033         * lib/md4.c (md4_process_block): Remove unused variable.
10034         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
10035         parentheses for clarity.
10036
10037 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10038
10039         * modules/bison-i18n (Depends-on): Add gettext.
10040
10041 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10042
10043         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
10044         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
10045         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
10046         also add missing comma that caused broken test.
10047         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
10048         stdlib.h, for `abort'.
10049         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
10050         variables.
10051         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
10052         include unistd.h if present, for `rmdir'.
10053         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
10054         variables.
10055         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
10056         in the process include standard headers for prototypes.
10057         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
10058         gets declared on GNU/Linux.
10059         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
10060         unistd.h, for `rmdir'.
10061         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
10062
10063         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10064         always true.
10065         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10066
10067         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10068
10069 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10070
10071         * gnulib-tool (func_version): Create output all at once.  This
10072         may help avoid triggering unnecessary SIGPIPEs, and at any
10073         rate it doesn't hurt.
10074
10075 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10076             Bruno Haible  <bruno@clisp.org>
10077
10078         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10079         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10080         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10081
10082         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10083         (gl_FUNC_VASPRINTF): Invoke it.
10084
10085 2006-09-22  Bruno Haible  <bruno@clisp.org>
10086
10087         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10088         getloadavg.c as first argument.
10089
10090 2006-09-22  Bruno Haible  <bruno@clisp.org>
10091
10092         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10093         at the beginning of the gl_INIT macro.
10094         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10095         gl_GETLOADAVG.
10096
10097 2006-09-22  Bruno Haible  <bruno@clisp.org>
10098
10099         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10100         module.
10101         Suggested by Ralf Wildenhues.
10102
10103 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10104
10105         Import this patch from libc:
10106
10107         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10108
10109         * lib/regex_internal.c (re_string_reconstruct): Handle
10110         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10111         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10112         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10113         re_string_context_at.
10114
10115         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10116         now requires it.
10117         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10118         gl_REGEX now does it for us.
10119         (gl_REGEX): Add test taken from
10120         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10121
10122         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10123         Check that large offsets work.  Modernize Autoconf usages.
10124         Prefer "yes" to mean a good thing rather than a bad.
10125         Don't put "#define mkstemp" in config.h, as this might interfere
10126         with standard system headers that "#define mkstemp mkstemp64".
10127
10128         * modules/mkstemp (Depends-on): Add extensions, so that
10129         mkstemp is visible on some platforms.
10130         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10131         (Include): Change to "mkstemp.h" from <stdlib.h>.
10132         (Files): Add mkstemp.h.
10133
10134         * lib/mkstemp.h: New file, since some standard headers
10135         #define mkstemp.
10136         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10137         Include "mkstemp.h".
10138         Make the _LIBC code resemble glibc original more,
10139         e.g., use K&R style.
10140         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10141         (mkstemp): Remove, since mkstemp.h does this for us.
10142         * lib/stdlib--.h: Include mkstemp.h.
10143
10144         Import this patch from libc:
10145
10146         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10147
10148         * lib/tempname.c (__gen_tempname): Change attempts_min
10149         into a macro.  Use preprocessor to decide how to initialize
10150         attempts [Coverity CID 67].
10151
10152 2006-09-20  Bruno Haible  <bruno@clisp.org>
10153
10154         * lib/mkdtemp.c: Import from libc.
10155         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10156                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10157                 attempts_min into a macro.  Use preprocessor to decide how to
10158                 initialize attempts [Coverity CID 67].
10159         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10160                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10161                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10162
10163 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10164
10165         * gnulib-tool (func_exit): New function, to allow to pass the
10166         exit status portably through the trap.  Use everywhere.
10167         (--help, --version): Signal a write error.
10168         (trap): catch SIGPIPE, for write errors.
10169         Exit at the end of the trap, with the correct exit status.
10170
10171 2006-09-19  Karl Berry  <karl@gnu.org>
10172
10173         * doc/gnulib.texi: note about the license texinfo files.
10174
10175 2006-09-19  Eric Blake  <ebb9@byu.net>
10176
10177         * gnulib-tool: Avoid space-tab.
10178
10179 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10180
10181         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10182         that prevented coreutils 6.1 from building.  Problem reported
10183         by Petter Reinholdtsen.
10184
10185 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10186
10187         * gnulib-tool (avoidlist): Fix typo that broke options like
10188         --avoid=lock that are used by coreutils bootstrap.
10189
10190 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10191
10192         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10193         more systematically.
10194
10195 2006-09-18  Jim Meyering  <jim@meyering.net>
10196
10197         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10198
10199 2006-09-18  Bruno Haible  <bruno@clisp.org>
10200
10201         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10202
10203 2006-09-18  Bruno Haible  <bruno@clisp.org>
10204
10205         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10206         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10207         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10208         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10209         * m4/gettext.m4: Require autoconf >= 2.52.
10210         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10211         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10212         of gl_cv_header_inttypes_h.
10213
10214 2006-09-18  Bruno Haible  <bruno@clisp.org>
10215
10216         * lib/javaversion.c: Include configmake.h.
10217
10218 2006-09-18  Bruno Haible  <bruno@clisp.org>
10219
10220         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10221         avoid that the while loops be executed in a subshell.
10222
10223 2006-09-18  Bruno Haible  <bruno@clisp.org>
10224
10225         * MODULES.html.sh (func_module): Break long lines.
10226         Suggested by Bruce Korb <bkorb@gnu.org>.
10227
10228 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10229
10230         Speed up by a factor of 1.12.
10231         * gnulib-tool (nl): New variable.
10232         (func_import): Rewrite include directive extraction to only read each
10233         directive once.
10234
10235 2006-09-17  Bruno Haible  <bruno@clisp.org>
10236
10237         * modules/javaversion (Makefile.am): Remove DEFS setting.
10238         (Depends-on): Add configmake, for PKGDATADIR definition.
10239
10240 2006-09-17  Bruno Haible  <bruno@clisp.org>
10241
10242         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10243
10244 2006-09-17  Bruno Haible  <bruno@clisp.org>
10245
10246         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10247         (func_modules_transitive_closure, func_modules_add_dummy,
10248         func_modules_to_filelist, func_import, func_create_testdir,
10249         func_create_megatestdir, ...): Use it wherever possible.
10250         Suggested by Ralf Wildenhues.
10251
10252 2006-09-16  Karl Berry  <karl@gnu.org>
10253
10254         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10255         to avoid sectioning errors.
10256         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10257         [ifinfo]: blank line after @center-ed titles.
10258         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10259         Spell FSF address consistently with others.
10260         (These changes approved by rms.)
10261
10262 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10263
10264         Speed up by a factor of 1.61.
10265         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10266         already checked module names again.
10267
10268 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10269
10270         Speed up by a factor of 1.13.
10271         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10272         for new_files, and the input to func_add_or_update.
10273
10274 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10275
10276         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10277         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10278
10279 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10280
10281         * modules/mkancesdirs (Depends-on): Add fcntl.
10282         * modules/savewd: New file.
10283         * MODULES.html.sh (File system functions): Add savewd.
10284
10285         * modules/configmake (Makefile.am): Add support for the
10286         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10287
10288 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10289
10290         * m4/savewd.m4: New file.
10291
10292 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10293
10294         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10295         (dirchownmod): New arg FD.  All callers changed.
10296         Use FD rather than opening the directory ourself, as opening is
10297         now the caller's responsibility.
10298         * lib/dirchownmod.h: Likewise.
10299         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10300         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10301         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10302         (test_dir): Remove.
10303         (mkancesdirs): Return length of prefix of FILE that has already
10304         been made, or -2 if there is a child doing the work.  Redo
10305         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10306         ".", and treat ".." specially since it might stray back into
10307         already-created areas.  Use a subprocess if necessary.  New arg
10308         WD; all users changed.  MAKE_DIR function should now return 1
10309         if it creates a directory that is not readable.  Return -2 if
10310         a child process is spun off.
10311         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10312         Adjust signature to match code.
10313         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10314         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10315         all users changed.
10316         * lib/savewd.c, lib/savewd.h: New files.
10317
10318 2006-09-15  Jim Meyering  <jim@meyering.net>
10319
10320         * modules/rename-dest-slash: New module.
10321         * MODULES.html.sh (posix_compat): Add it here.
10322
10323         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10324
10325 2006-09-15  Jim Meyering  <jim@meyering.net>
10326
10327         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10328         file.
10329
10330         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10331
10332 2006-09-15  Jim Meyering  <jim@meyering.net>
10333
10334         * lib/rename-dest-slash.c (has_trailing_slash): Use
10335         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10336         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10337         test before testing whether SRC is a directory.
10338         Suggestions from Bruno Haible.
10339
10340         Avoid a warning about an unused variable.
10341         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10342         into the #ifdef block where it's used.
10343
10344         * lib/rename-dest-slash.c: New file.
10345
10346 2006-09-14  Bruno Haible  <bruno@clisp.org>
10347
10348         * lib/allocsa.c: Include <config.h> unconditionally.
10349         * lib/asnprintf.c: Likewise.
10350         * lib/asprintf.c: Likewise.
10351         * lib/c-strcasecmp.c: Likewise.
10352         * lib/c-strcasestr.c: Likewise.
10353         * lib/c-strncasecmp.c: Likewise.
10354         * lib/c-strstr.c: Likewise.
10355         * lib/classpath.c: Likewise.
10356         * lib/clean-temp.c: Likewise.
10357         * lib/concatpath.c: Likewise.
10358         * lib/copy-file.c: Likewise.
10359         * lib/csharpcomp.c: Likewise.
10360         * lib/csharpexec.c: Likewise.
10361         * lib/execute.c: Likewise.
10362         * lib/fatal-signal.c: Likewise.
10363         * lib/findprog.c: Likewise.
10364         * lib/fwriteerror.c: Likewise.
10365         * lib/gl_array_list.c: Likewise.
10366         * lib/gl_array_oset.c: Likewise.
10367         * lib/gl_avltree_list.c: Likewise.
10368         * lib/gl_avltree_oset.c: Likewise.
10369         * lib/gl_avltreehash_list.c: Likewise.
10370         * lib/gl_carray_list.c: Likewise.
10371         * lib/gl_linked_list.c: Likewise.
10372         * lib/gl_linkedhash_list.c: Likewise.
10373         * lib/gl_list.c: Likewise.
10374         * lib/gl_oset.c: Likewise.
10375         * lib/gl_rbtree_list.c: Likewise.
10376         * lib/gl_rbtree_oset.c: Likewise.
10377         * lib/gl_rbtreehash_list.c: Likewise.
10378         * lib/imaxabs.c: Likewise.
10379         * lib/imaxdiv.c: Likewise.
10380         * lib/javacomp.c: Likewise.
10381         * lib/javaexec.c: Likewise.
10382         * lib/javaversion.c: Likewise.
10383         * lib/linebreak.c: Likewise.
10384         * lib/localcharset.c: Likewise.
10385         * lib/lock.c: Likewise.
10386         * lib/mbchar.c: Likewise.
10387         * lib/mbswidth.c: Likewise.
10388         * lib/mkdtemp.c: Likewise.
10389         * lib/pipe.c: Likewise.
10390         * lib/printf-args.c: Likewise.
10391         * lib/printf-parse.c: Likewise.
10392         * lib/progname.c: Likewise.
10393         * lib/progreloc.c: Likewise.
10394         * lib/readlink.c: Likewise.
10395         * lib/sh-quote.c: Likewise.
10396         * lib/stpcpy.c: Likewise.
10397         * lib/stpncpy.c: Likewise.
10398         * lib/strcasecmp.c: Likewise.
10399         * lib/strcasestr.c: Likewise.
10400         * lib/strcspn.c: Likewise.
10401         * lib/striconv.c: Likewise.
10402         * lib/strncasecmp.c: Likewise.
10403         * lib/strnlen1.c: Likewise.
10404         * lib/strstr.c: Likewise.
10405         * lib/strtok_r.c: Likewise.
10406         * lib/tls.c: Likewise.
10407         * lib/tmpdir.c: Likewise.
10408         * lib/unicodeio.c: Likewise.
10409         * lib/unsetenv.c: Likewise.
10410         * lib/vasnprintf.c: Likewise.
10411         * lib/vasprintf.c: Likewise.
10412         * lib/wait-process.c: Likewise.
10413         * lib/xallocsa.c: Likewise.
10414         * lib/xsetenv.c: Likewise.
10415         * lib/xstriconv.c: Likewise.
10416
10417 2006-09-13  Simon Josefsson  <jas@extundo.com>
10418
10419         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
10420         that internally, suggested by Ralf Wildenhues
10421         <Ralf.Wildenhues@gmx.de>.
10422
10423 2006-09-13  Simon Josefsson  <jas@extundo.com>
10424
10425         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
10426         @LIBOBJS@.
10427         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10428
10429 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
10430
10431         * lib/_fpending.c: Include <config.h> unconditionally, since we no
10432         longer worry about uses that don't define HAVE_CONFIG_H.
10433         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
10434         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
10435         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
10436         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
10437         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
10438         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
10439         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
10440         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
10441         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
10442         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
10443         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
10444         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
10445         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
10446         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
10447         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
10448         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
10449         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
10450         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
10451         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
10452         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
10453         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
10454         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
10455         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
10456         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
10457         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
10458         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
10459         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
10460         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
10461         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
10462         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
10463         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
10464         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
10465         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
10466         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
10467         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
10468         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
10469         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
10470         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
10471         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
10472         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
10473         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
10474         Likewise.
10475
10476 2006-09-13  Eric Blake  <ebb9@byu.net>
10477
10478         * lib/getopt.c: Fix typo in last commit.
10479
10480 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10481
10482         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
10483         dgettext.
10484
10485 2006-09-12  Jim Meyering  <jim@meyering.net>
10486
10487         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
10488         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
10489         Reported by Nelson H. F. Beebe.
10490
10491 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10492
10493         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
10494         program_invocation_name and program_invocation_short_name are
10495         initialized.
10496         * lib/argp-namefrob.h: Move declarations of program_invocation_name
10497         and program_invocation_short_name to argp.h, so they are visible
10498         to user programs.
10499         * lib/argp.h: Likewise
10500
10501 2006-09-10  Bruno Haible  <bruno@clisp.org>
10502
10503         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10504         m4/inttypes_h.m4, m4/uintmax_t.m4.
10505
10506 2006-09-10  Bruno Haible  <bruno@clisp.org>
10507
10508         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
10509         gl_AC_TYPE_UINTMAX_T.
10510
10511 2006-09-10  Bruno Haible  <bruno@clisp.org>
10512
10513         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
10514
10515 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10516
10517         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
10518         convention.  Text proposed by Bruno Haible.
10519         (struct argp_option): Document the use of N_() wrappers.
10520
10521         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
10522         '\v', and translate the two parts separately, instead of feeding
10523         the whole string to gettext.  This allows to exclude
10524         '\v' from the strings visible to the translator by writing doc
10525         strings as N_("..") "\v" N_("..").
10526
10527 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
10528
10529         * config/srclist.txt: Undo latest change; the bug was fixed.
10530
10531 2006-09-09  Bruno Haible  <bruno@clisp.org>
10532
10533         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
10534         assignments if building a library without libtool.
10535         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
10536         in func_emit_lib_Makefile_am.
10537         (func_import): When building a static library libfoo.a, arrange to
10538         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
10539         (func_create_testdir): Likewise.
10540         * modules/gc (configure.ac, Makefile.am): If building statically,
10541         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
10542         * modules/iconvme (configure.ac, Makefile.am): Likewise.
10543         * modules/striconv (configure.ac, Makefile.am): Likewise.
10544         Based on a suggestion by Ralf Wildenhues.
10545
10546 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10547
10548         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
10549         Check for unistd.h too, since Autoconf doesn't assume POSIX.
10550         Also:
10551
10552         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10553         Add year_2050_test to catch glibc bug 2821
10554         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10555
10556         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10557         Prefer #ifdef to #if.
10558
10559         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
10560         Return from 'main' instead of calling 'exit'.
10561
10562 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10563
10564         * lib/mktime.c (guess_time_tm): Fix bug where mktime
10565         returned the maximum time_t value rather than (time_t) -1.
10566         Problem originally reported by William Bardwell
10567         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10568
10569         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10570         Moved to here ...
10571         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10572         ... from here.
10573
10574 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10575
10576         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
10577         2821 is fixed.
10578
10579 2006-09-08  Jim Meyering  <jim@meyering.net>
10580
10581         Don't make generated files read-only.  That would bother too many
10582         people.  However, do retain the ability to work when targets are
10583         read-only: remove the destination and temporary files before writing
10584         them (when generated via sed or echo), or by using the -f option for
10585         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
10586         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10587         * modules/byteswap, modules/configmake, modules/fcntl:
10588         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10589         * modules/localcharset, modules/netinet_in, modules/poll:
10590         * modules/stdbool, modules/stdint, modules/sys_select:
10591         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10592
10593 2006-09-08  Jim Meyering  <jim@meyering.net>
10594
10595         Avoid new build failure on FreeBSD 6.0.
10596         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
10597         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
10598         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
10599
10600 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10601
10602         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
10603
10604 2006-09-07  Jim Meyering  <jim@meyering.net>
10605
10606         Fix global typo in last change: use chmod u-w, not chmod u-x.
10607         Spotted by Paul Eggert and Bruce Korb.
10608         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10609         * modules/byteswap, modules/configmake, modules/fcntl:
10610         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10611         * modules/localcharset, modules/netinet_in, modules/poll:
10612         * modules/stdbool, modules/stdint, modules/sys_select:
10613         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10614
10615 2006-09-06  Jim Meyering  <jim@meyering.net>
10616
10617         Make generated files be read-only.
10618         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
10619         Ensure that each generated file is now read-only.
10620         * modules/argz: Likewise.
10621         * modules/arpa_inet: Likewise.
10622         * modules/byteswap: Likewise.
10623         * modules/configmake: Likewise.
10624         * modules/fcntl: Likewise.
10625         * modules/fnmatch: Likewise.
10626         * modules/getopt: Likewise.
10627         * modules/glob: Likewise.
10628         * modules/inttypes: Likewise.
10629         * modules/netinet_in: Likewise.
10630         * modules/poll: Likewise.
10631         * modules/stdbool: Likewise.
10632         * modules/stdint: Likewise.
10633         * modules/sys_select: Likewise.
10634         * modules/sys_socket: Likewise.
10635         * modules/sys_stat: Likewise.
10636         * modules/sysexits: Likewise.
10637         * modules/localcharset: Same as above, but continue using temporary
10638         file named "t-$@" (why different?) rather than the "$@-t" used
10639         everywhere else.
10640
10641         * modules/sysexits (Makefile.am): Replace literal occurrences
10642         of "sysexit.h" more readable, and more consistent, "$@".
10643
10644 2006-09-06  Bruno Haible  <bruno@clisp.org>
10645
10646         * modules/striconv: New file.
10647         * modules/xstriconv: New file.
10648         * MODULES.html.sh (Internationalization functions): Add striconv,
10649         xstriconv.
10650
10651 2006-09-06  Bruno Haible  <bruno@clisp.org>
10652
10653         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
10654         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
10655         not using libtool correctly.
10656
10657 2006-09-06  Bruno Haible  <bruno@clisp.org>
10658
10659         * lib/striconv.h: New file.
10660         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
10661         iconvstring.c.
10662         * lib/xstriconv.h: New file.
10663         * lib/xstriconv.c: New file.
10664
10665 2006-09-06  Bruno Haible  <bruno@clisp.org>
10666
10667         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
10668         lib_..._LDFLAGS.
10669
10670 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10671
10672         * lib/argz_.h: Sync from Libtool.
10673
10674         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
10675                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10676
10677         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
10678
10679 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10680
10681         * modules/trim: New file.
10682
10683 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10684
10685         * lib/trim.h: New file.
10686         * lib/trim.c: New file.
10687
10688 2006-09-05  Bruno Haible  <bruno@clisp.org>
10689
10690         * MODULES.html.sh (String handling): Add trim.
10691
10692 2006-09-04  Karl Berry  <karl@gnu.org>
10693
10694         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
10695         until next release.
10696
10697 2006-09-03  Bruno Haible  <bruno@clisp.org>
10698
10699         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
10700         correctly.
10701
10702 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10703
10704         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
10705         not gl_GETLOADAVG.  Omit unneeded semicolons.
10706         Problems reported by Ralf Wildenhues in
10707         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10708         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
10709         at the end, which is the usual gnulib style.
10710
10711         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
10712         of doing all the work ourselves.
10713         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
10714         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
10715
10716 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10717
10718         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
10719         Problem reported by Ralf Wildenhues in
10720         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10721
10722         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
10723         HAVE_STRUCT_STATFS_F_FSTYPENAME.
10724
10725 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10726
10727         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
10728         yesterday's patch by changing test -n to test -z.
10729
10730 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10731
10732         * modules/getloadavg (Files): Add m4/getloadavg.m4.
10733         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
10734         the former is now obsolescent.
10735
10736         * modules/chdir-long (Depends-on): Add fcntl.
10737
10738 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10739
10740         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
10741         obsolescent, and programs should use gnulib instead.
10742         * m4/getloadavg.m4: New file, with contents taken from Autoconf
10743         but with prefixes changed.
10744
10745 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10746
10747         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
10748         or stdbool.h, because they might not exist while configuring.
10749
10750         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
10751         Don't include unistd.h or limits.h; not needed, since chdir-long.h
10752         does that for us.
10753         (O_DIRECTORY): Remove.
10754
10755 2006-08-31  Eric Blake  <ebb9@byu.net>
10756
10757         * gnulib-tool: Don't let emacs change spaces to TAB.
10758
10759 2006-08-31  Bruno Haible  <bruno@clisp.org>
10760
10761         * gnulib-tool: When calling func_import more than once, do it in a
10762         subshell.
10763         Reported by Eric Blake <ebb9@byu.net>.
10764
10765 2006-08-31  Bruno Haible  <bruno@clisp.org>
10766
10767         * gnulib-tool (nl): Remove variable.
10768         (sed_transform_lib_file): Use more robust test for config-h module.
10769         (func_import): Fix typo in 2006-08-25 patch.
10770
10771 2006-08-31  Bruno Haible  <bruno@clisp.org>
10772
10773         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
10774         specified, augment Makefile.am variables instead of assigning them.
10775
10776 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10777
10778         Work around a bug in both the Linux and SunOS 64-bit kernels:
10779         nanosleep mishandles sleeps for longer than 2**31 seconds.
10780         Problem reported by Frank v Waveren in
10781         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10782         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
10783         Check for nanosleep bug.
10784         (LIB_NANOSLEEP): Append clock_gettime library if needed.
10785
10786 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10787
10788         Work around a bug in both the Linux and SunOS 64-bit kernels:
10789         nanosleep mishandles sleeps for longer than 2**31 seconds.
10790         Problem reported by Frank v Waveren in
10791         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10792         * lib/nanosleep.c (BILLION): New constant.
10793         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
10794         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
10795         implementation.
10796
10797 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10798
10799         * modules/nanosleep (Depends-on): Add gettime.
10800
10801 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10802         and Simon Josefsson  <jas@extundo.com>
10803         and Oskar Liljeblad  <oskar@osk.mine.nu>
10804
10805         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
10806         * gnulib-tool (func_import): New license type 'unmodifiable license
10807         text'.
10808         * modules/fdl: Use it.  Longer description.
10809         * module/gpl, module/lgpl: New files.
10810
10811 2006-08-30  Jim Meyering  <jim@meyering.net>
10812
10813         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
10814         shadowing the parameter.
10815
10816 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10817
10818         Sync from Libtool:
10819
10820         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10821
10822         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
10823         sharing with gnulib.  Report by Eric Blake.
10824
10825 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10826
10827         * modules/isapipe: New file.
10828         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
10829
10830 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10831
10832         * modules/configmake (Makefile.am): Add a comment, and omit
10833         the CONFIGMAKE_ prefix from generated macro names.  Suggested
10834         by Bruno Haible.
10835
10836 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10837
10838         * m4/isapipe.m4: New file.
10839
10840 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10841
10842         * lib/isapipe.c, lib/isapipe.h: New files.
10843
10844 2006-08-29  Jim Meyering  <jim@meyering.net>
10845
10846         * modules/configmake (Makefile.am): Make configmake.h depend on
10847         Makefile.  Otherwise, a stale configmake.h could hang around.
10848
10849 2006-08-29  Eric Blake  <ebb9@byu.net>
10850
10851         * lib/error.c (error_at_line, print_errno_message): Match libc, after
10852         resolution of upstream bug 3044.
10853
10854 2006-08-29  Bruno Haible  <bruno@clisp.org>
10855
10856         * modules/localcharset (Depends-on): Add configmake.
10857         (Makefile.am): Remove setting of LIBDIR through DEFS.
10858
10859 2006-08-29  Bruno Haible  <bruno@clisp.org>
10860
10861         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
10862         defined.
10863
10864 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10865
10866         * modules/fcntl: New file.
10867         * modules/chdir-safer (Depends-on): Add fcntl.
10868         * modules/fts: Likewise.
10869         * modules/mkdir-p: Likewise.
10870
10871         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
10872         This undoes the most recent change, since we're now addressing the
10873         problem in a different way.
10874
10875         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
10876         into output, since the output might be called Makefile.am even
10877         if $makefile_name is something different.
10878         (func_import): Use $makefile_am rather than
10879         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
10880         empty.
10881
10882         * modules/inttypes (Files): Add m4/inttypes-h.m4.
10883
10884 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10885
10886         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
10887         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
10888         recent change to stdint.m4, since we're now addressing the problem in a
10889         different way.
10890
10891 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10892
10893         * m4/fcntl_h.m4: New file.
10894
10895 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10896
10897         * lib/fcntl_.h: New file.
10898         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
10899         the fcntl module.
10900         * lib/dirchownmod.c: Likewise.
10901         * lib/fts.c: Likewise.
10902
10903         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
10904         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
10905         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
10906         just before including <inttypes.h>, to avoid circular inclusion.
10907
10908 2006-08-28  Jim Meyering  <jim@meyering.net>
10909
10910         * doc/visibility.texi: Actually read and correct the grammar of the
10911         sentence affected by yesterday's change.
10912
10913 2006-08-28  Eric Blake  <ebb9@byu.net>
10914
10915         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
10916         needs wrapper.
10917
10918 2006-08-28  Eric Blake  <ebb9@byu.net>
10919
10920         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
10921
10922 2006-08-28  Eric Blake  <ebb9@byu.net>
10923
10924         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
10925
10926 2006-08-28  Bruno Haible  <bruno@clisp.org>
10927
10928         * modules/c-strstr: New file, from GNU gettext.
10929         * MODULES.html.sh (String handling): Add c-strstr.
10930
10931 2006-08-28  Bruno Haible  <bruno@clisp.org>
10932
10933         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
10934         macros.
10935         Reported by Eric Blake.
10936
10937 2006-08-28  Bruno Haible  <bruno@clisp.org>
10938
10939         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
10940         (VASNPRINTF): Return a string of length > INT_MAX without failing.
10941         * lib/vasprintf.c: Include errno.h, limits.h.
10942         (EOVERFLOW): New fallback definition.
10943         (vasprintf): Test here whether the string length is > INT_MAX.
10944         * lib/vsnprintf.c: Include errno.h, limits.h.
10945         (EOVERFLOW): New fallback definition.
10946         (vsnprintf): Fix bug when generated string was too long for the buffer.
10947         Test here whether the string length is > INT_MAX.
10948
10949 2006-08-28  Bruno Haible  <bruno@clisp.org>
10950
10951         * lib/inttypes_.h (SCNX*): Remove definitions.
10952         Reported by Eric Blake.
10953
10954 2006-08-28  Bruno Haible  <bruno@clisp.org>
10955
10956         * lib/c-strstr.h: New file, from GNU gettext.
10957         * lib/c-strstr.c: New file, from GNU gettext.
10958
10959 2006-08-28  Bruno Haible  <bruno@clisp.org>
10960
10961         * gnulib-tool: Reorder some statements.
10962
10963 2006-08-28  Bruno Haible  <bruno@clisp.org>
10964
10965         * gnulib-tool: New option --makefile-name.
10966         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
10967         $makefile_name.
10968         (func_import): Write $makefile_name to the cache file, and read it from
10969         there unless explicitly specified. Use $makefile_name as file name
10970         instead of Makefile.am. Adjust the recommendations accordingly.
10971
10972 2006-08-28  Bruno Haible  <bruno@clisp.org>
10973
10974         * gnulib-tool (func_verify_module): Check against misapplying patch.
10975
10976 2006-08-28  Bruno Haible  <bruno@clisp.org>
10977
10978         * gnulib-tool (func_relativize, func_relconcat): New functions.
10979         Give an error if --local-dir is given with --update.
10980         Remove trailing slashes from $local_gnulib_dir.
10981         (func_import): Store the relativized $local_gnulib_dir in
10982         gnulib-cache.m4, and read it from there if not specified explicitly.
10983
10984 2006-08-28  Bruno Haible  <bruno@clisp.org>
10985
10986         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
10987         is the current directory. Respect also $local_gnulib_dir.
10988
10989 2006-08-28  Bruno Haible  <bruno@clisp.org>
10990             Simon Josefsson  <jas@extundo.com>
10991
10992         BeOS portability.
10993         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
10994
10995 2006-08-27  Jim Meyering  <jim@meyering.net>
10996
10997         * doc/visibility.texi: Remove duplicate word: "pointer".
10998
10999 2006-08-26  Bruno Haible  <bruno@clisp.org>
11000
11001         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
11002         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
11003         (Makefile.am): Create inttypes.h from inttypes_.h.
11004         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
11005
11006         * modules/imaxabs: New file.
11007
11008         * modules/imaxdiv: New file.
11009
11010 2006-08-26  Bruno Haible  <bruno@clisp.org>
11011
11012         * m4/inttypes.m4: New file.
11013         * m4/_inttypes_h.m4: Remove file.
11014         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
11015         PRI_MACROS_BROKEN.
11016         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
11017
11018         * m4/imaxabs.m4: New file.
11019
11020         * m4/imaxdiv.m4: New file.
11021
11022 2006-08-26  Bruno Haible  <bruno@clisp.org>
11023
11024         * lib/inttypes_.h: New file.
11025         * lib/inttypes.h: Remove file.
11026         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
11027
11028         * lib/imaxabs.c: New file.
11029
11030         * lib/imaxdiv.c: New file.
11031
11032 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11033
11034         New config-h module, so that "make" output needn't be cluttered
11035         by -DHAVE_CONFIG_H.
11036         * MODULES.html.sh (Support for building libraries and executables):
11037         Add config-h.
11038         * modules/config-h: New file.
11039         * gnulib-tool (nl, sed_transform_lib_file): New vars.
11040         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
11041         the config-h module is used.
11042
11043         New configmake module, so that "make" output needn't be cluttered
11044         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
11045         * MODULES.html.sh (Support for building libraries and executables):
11046         Add configmake.
11047         * modules/configmake: New file.
11048
11049 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11050
11051         * m4/config-h.m4: New file.
11052
11053 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11054
11055         * config/srclist.txt: Add elisp-comp.
11056
11057 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11058
11059         * MODULES.html.sh (Support for building libraries and executables):
11060         Add elisp-comp.
11061         * build-aux/elisp-comp: New file.
11062         * modules/elisp-comp: New file.
11063
11064 2006-08-24  Bruno Haible  <bruno@clisp.org>
11065
11066         * gnulib-tool (func_create_testdir): Use non-default values of
11067         sourcebase and m4base.
11068
11069 2006-08-24  Bruno Haible  <bruno@clisp.org>
11070
11071         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11072         HTML structure.
11073
11074 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11075
11076         * modules/openat (Depends-on): Add lchown.
11077
11078 2006-08-23  Bruno Haible  <bruno@clisp.org>
11079
11080         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11081         of gl_LOCK_EARLY instead of gl_LOCK.
11082
11083 2006-08-23  Bruno Haible  <bruno@clisp.org>
11084
11085         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11086         on OSF/1 to no.
11087         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11088
11089 2006-08-23  Bruno Haible  <bruno@clisp.org>
11090
11091         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11092         as unusable.
11093
11094         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11095         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11096         (gl_LOCK): New macro.
11097
11098 2006-08-22  Simon Josefsson  <jas@extundo.com>
11099
11100         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11101         to md5 module.
11102
11103 2006-08-22  Simon Josefsson  <jas@extundo.com>
11104
11105         * MODULES.html.sh: Add "Support for maintaining and release
11106         projects".
11107
11108         * build-aux/gnupload: New file, from coreutils.
11109
11110 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11111
11112         Avoid the need for AC_LIBSOURCES in m4 macros.
11113         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11114         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11115         * modules/check-version (EXTRA_DIST): Add check-version.h.
11116         * modules/crc (EXTRA_DIST): Add crc.h.
11117         * modules/des (EXTRA_DIST): Add des.h.
11118         * modules/gc (EXTRA_DIST): Add gc.h.
11119         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11120         * modules/getline (EXTRA_DIST): Add getline.h.
11121         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11122         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11123         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11124         * modules/md2 (EXTRA_DIST): Add md2.h.
11125         * modules/md4 (EXTRA_DIST): Add md4.h.
11126         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11127         * modules/read-file (EXTRA_DIST): Add read-file.h.
11128         * modules/readline (EXTRA_DIST): Add readline.h.
11129         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11130         rijndael-api-fst.h.
11131
11132 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11133
11134         * m4/rijndael.m4 (gl_ARCFOUR):
11135         * m4/arctwo.m4 (gl_ARCTWO):
11136         * m4/check-version.m4 (gl_CHECK_VERSION):
11137         * m4/crc.m4 (gl_CRC):
11138         * m4/des.m4 (gl_DES):
11139         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11140         * m4/gc.m4 (gl_GC):
11141         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11142         * m4/getline.m4 (gl_FUNC_GETLINE):
11143         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11144         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11145         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11146         * m4/md2.m4 (gl_MD2):
11147         * m4/md4.m4 (gl_MD4):
11148         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11149         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11150         * m4/readline.m4 (gl_FUNC_READLINE):
11151         * m4/rijndael.m4 (gl_RIJNDAEL):
11152         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11153         to get the necessary .h files and whatnot.
11154
11155 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11156
11157         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11158         gnulib rather than the other way around.
11159         * config/srclistvars.sh (COREUTILS): Remove.
11160
11161 2006-08-22  Jim Meyering  <jim@meyering.net>
11162
11163         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11164
11165         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11166
11167 2006-08-22  Eric Blake  <ebb9@byu.net>
11168
11169         * modules/regexprops-generic: New file.
11170         * MODULES.html.sh (Support for building documentation): List it.
11171
11172 2006-08-22  Eric Blake  <ebb9@byu.net>
11173
11174         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11175         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11176         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11177         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11178
11179 2006-08-22  Bruno Haible  <bruno@clisp.org>
11180
11181         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11182         and lib_LTLIBRARIES like the other lib_* variables.
11183
11184 2006-08-22  Bruno Haible  <bruno@clisp.org>
11185
11186         * build-aux/x-to-1.in: New file, from GNU gettext.
11187
11188 2006-08-22  Bruno Haible  <bruno@clisp.org>
11189
11190         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11191         <utmpx.h> exists.
11192
11193 2006-08-22  Bruno Haible  <bruno@clisp.org>
11194
11195         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11196         <utmpx.h> exists.
11197
11198 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11199
11200         BeOS portability.
11201         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11202         exist.
11203         Problem reported by Bruno Haible.
11204
11205 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11206
11207         Avoid the need for AC_LIBSOURCES in m4 macros.
11208         * modules/acl (EXTRA_DIST): Add acl.h.
11209         * modules/argmatch (Files): Add m4/argmatch.m4.
11210         (configure.ac): Add gl_ARGMATCH.
11211         (EXTRA_DIST): Renamed from lib_SOURCES, for
11212         consistency with the other modules.  Remove argmatch.c.
11213         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11214         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11215         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11216         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11217         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11218         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11219         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11220         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11221         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11222         * modules/closeout (EXTRA_DIST): Add closeout.h.
11223         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11224         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11225         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11226         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11227         dirname.h; remove basename.c and stripslash.c.
11228         * modules/exclude (EXTRA_DIST): Add exclude.h.
11229         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11230         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11231         * modules/file-type (EXTRA_DIST): Add file-type.h.
11232         * modules/filemode (EXTRA_DIST): Add filemode.h.
11233         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11234         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11235         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11236         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11237         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11238         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11239         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11240         * modules/getdate (EXTRA_DIST): Add getdate.c.
11241         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11242         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11243         * modules/getpass (EXTRA_DIST): Add getpass.h.
11244         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11245         * modules/group-member (EXTRA_DIST): Add group-member.h.
11246         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11247         * modules/hash (EXTRA_DIST): Add hash.h.
11248         * modules/human (EXTRA_DIST): Add human.h.
11249         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11250         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11251         * modules/lchown (EXTRA_DIST): Add lchown.h.
11252         * modules/long-options (EXTRA_DIST): Add long-options.h.
11253         * modules/lstat (EXTRA_DIST): Add lstat.h.
11254         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11255         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11256         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11257         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11258         * modules/memxor (EXTRA_DIST): Add memxor.h.
11259         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11260         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11261         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11262         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11263         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11264         * modules/physmem (EXTRA_DIST): Add physmem.h.
11265         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11266         * modules/posixver (EXTRA_DIST): Add posixver.h.
11267         * modules/quote (EXTRA_DIST): Add quote.h.
11268         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11269         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11270         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11271         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11272         regex_internal.h regexec.c.
11273         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11274         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11275         * modules/same (EXTRA_DIST): Add same.h.
11276         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11277         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11278         * modules/savedir (EXTRA_DIST): Add savedir.h.
11279         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11280         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11281         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11282         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11283         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11284         * modules/strdup (EXTRA_DIST): Add strdup.h.
11285         * modules/strftime (EXTRA_DIST): Add strftime.h.
11286         * modules/strndup (EXTRA_DIST): Add strndup.h.
11287         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11288         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11289         * modules/time_r (EXTRA_DIST): Add time_r.h.
11290         * modules/timespec (EXTRA_DIST): Add timespec.h.
11291         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11292         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11293         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11294         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11295         * modules/userspec (EXTRA_DIST): Add userspec.h.
11296         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11297         * modules/utimens (EXTRA_DIST): Add utimens.h.
11298         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11299         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11300         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11301         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11302         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11303         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11304         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11305         * modules/yesno (EXTRA_DIST): Add yesno.h.
11306
11307 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11308
11309         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11310
11311         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11312         * m4/dev-ino.m4, same-inode.m4: Remove.
11313
11314         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11315         * m4/acl.m4 (AC_FUNC_ACL):
11316         * m4/backupfile.m4 (gl_BACKUPFILE):
11317         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11318         * m4/canon-host.m4 (gl_CANON_HOST):
11319         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11320         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11321         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11322         * m4/cloexec.m4 (gl_CLOEXEC):
11323         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11324         * m4/closeout.m4 (gl_CLOSEOUT):
11325         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11326         * m4/dirname.m4 (gl_DIRNAME):
11327         * m4/exclude.m4 (gl_EXCLUDE):
11328         * m4/exitfail.m4 (gl_EXITFAIL):
11329         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11330         * m4/file-type.m4 (gl_FILE_TYPE):
11331         * m4/filemode.m4 (gl_FILEMODE):
11332         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11333         * m4/fpending.m4 (gl_FUNC_FPENDING):
11334         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11335         * m4/fts.m4 (gl_FUNC_FTS):
11336         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11337         * m4/getdate.m4 (gl_GETDATE):
11338         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11339         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11340         * m4/getpass.m4 (gl_FUNC_GETPASS):
11341         * m4/gettime.m4 (gl_GETTIME):
11342         * m4/getugroups.m4 (gl_GETUGROUPS):
11343         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11344         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11345         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11346         * m4/hash.m4 (gl_HASH):
11347         * m4/idcache.m4 (gl_IDCACHE):
11348         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
11349         * m4/lchown.m4 (gl_FUNC_LCHOWN):
11350         * m4/long-options.m4 (gl_LONG_OPTIONS):
11351         * m4/lstat.m4 (gl_FUNC_LSTAT):
11352         * m4/md5.m4 (gl_MD5):
11353         * m4/memcasecmp.m4 (gl_MEMCASECMP):
11354         * m4/memcoll.m4 (gl_MEMCOLL):
11355         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
11356         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
11357         * m4/memxor.m4 (gl_MEMXOR):
11358         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
11359         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
11360         * m4/modechange.m4 (gl_MODECHANGE):
11361         * m4/mountlist.m4 (gl_MOUNTLIST):
11362         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
11363         * m4/openat.m4 (gl_FUNC_OPENAT):
11364         * m4/pathmax.m4 (gl_PATHMAX):
11365         * m4/physmem.m4 (gl_PHYSMEM):
11366         * m4/posixtm.m4 (gl_POSIXTM):
11367         * m4/posixver.m4 (gl_POSIXVER):
11368         * m4/quote.m4 (gl_QUOTE):
11369         * m4/quotearg.m4 (gl_QUOTEARG):
11370         * m4/readtokens.m4 (gl_READTOKENS):
11371         * m4/readutmp.m4 (gl_READUTMP):
11372         * m4/regex.m4 (gl_REGEX):
11373         * m4/safe-read.m4 (gl_SAFE_READ):
11374         * m4/safe-write.m4 (gl_SAFE_WRITE):
11375         * m4/same.m4 (gl_SAME):
11376         * m4/save-cwd.m4 (gl_SAVE_CWD):
11377         * m4/savedir.m4 (gl_SAVEDIR):
11378         * m4/settime.m4 (gl_SETTIME):
11379         * m4/sha1.m4 (gl_SHA1):
11380         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
11381         * m4/stat-macros.m4 (gl_STAT_MACROS):
11382         * m4/stat-time.m4 (gl_STAT_TIME):
11383         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
11384         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
11385         * m4/strdup.m4 (gl_FUNC_STRDUP):
11386         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
11387         * m4/strndup.m4 (gl_FUNC_STRNDUP):
11388         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
11389         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
11390         * m4/time_r.m4 (gl_TIME_R):
11391         * m4/timespec.m4 (gl_TIMESPEC):
11392         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
11393         * m4/unlinkdir.m4 (gl_UNLINKDIR):
11394         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
11395         * m4/userspec.m4 (gl_USERSPEC):
11396         * m4/utimecmp.m4 (gl_UTIMECMP):
11397         * m4/utimens.m4 (gl_UTIMENS):
11398         * m4/xalloc.m4 (gl_XALLOC):
11399         * m4/xgetcwd.m4 (gl_XGETCWD):
11400         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
11401         * m4/xreadlink.m4 (gl_XREADLINK):
11402         * m4/xstrtod.m4 (gl_XSTRTOD):
11403         * m4/yesno.m4 (gl_YESNO):
11404         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11405         to get the necessary .h files and whatnot.
11406
11407 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
11408             Bruno Haible  <bruno@clisp.org>
11409
11410         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
11411         /bin/sh understanding of '!' conditional negation.
11412
11413 2006-08-21  Jim Meyering  <jim@meyering.net>
11414
11415         * modules/openat (Depends-on): Really alphabetize.
11416
11417         * modules/acl (Depends-on): Add error and quote.
11418
11419         * check-module (find_included_lib_files): Add at-func.c to the
11420         ok-to-include-more-than-once white list.
11421
11422         * modules/openat (Depends-on): Add lstat.  Alphabetize.
11423
11424 2006-08-21  Bruno Haible  <bruno@clisp.org>
11425
11426         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11427         Emit a pkgdata_DATA variable only if some snippets add contents to it.
11428         Reported by Martin Lambers <marlam@marlam.de>.
11429
11430 2006-08-21  Bruno Haible  <bruno@clisp.org>
11431
11432         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
11433         specify an installation location, don't emit a noinst_LIBRARIES or
11434         noinst_LTLIBRARIES assignment.
11435
11436 2006-08-21  Bruno Haible  <bruno@clisp.org>
11437
11438         BeOS portability.
11439         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
11440         BeOS has mbrtowc() but no <wctype.h>.
11441
11442 2006-08-21  Bruno Haible  <bruno@clisp.org>
11443
11444         BeOS portability.
11445         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
11446         exist.
11447
11448 2006-08-21  Bruno Haible  <bruno@clisp.org>
11449
11450         BeOS portability.
11451         * lib/mbchar.h: Include <wctype.h> only if it exists.
11452
11453 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         Remove files that are no longer needed by their respective modules.
11456         * m4/obstack.m4: Remove.
11457         * m4/strerror_r.m4: Remove.
11458         * m4/uint32_t.m4: Remove.
11459         * m4/uintptr_t.m4: Remove.
11460         * m4/ullong_max.m4: Remove.
11461         * m4/xstrtoimax.m4: Remove.
11462         * m4/xstrtoumax.m4: Remove.
11463
11464         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
11465         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
11466         dependencies now capture this.
11467
11468         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
11469         Do not use AC_LIBSOURCES, since gnulib modules now do this.
11470         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
11471         * m4/human.m4 (gl_HUMAN): Likewise.
11472         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
11473         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
11474
11475         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
11476
11477         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
11478         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
11479         stdint.
11480         * m4/human.m4 (gl_HUMAN): Likewise.
11481         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
11482         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
11483         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11484         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11485         * m4/xstrtol (gl_XSTRTOL): Likewise.
11486
11487         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
11488         AC_TYPE_LONG_LONG_INT.
11489         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11490         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
11491         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
11492         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11493
11494         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
11495         on stdbool.
11496
11497         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
11498         (gl_PREREQ_XSTRTOUL): Remove.
11499
11500         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
11501
11502         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
11503         mode.
11504
11505 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11506
11507         Add and change modules to make it easier for coreutils to use
11508         gnulib-tool.
11509         * modules/backupfile (Files): Remove m4/d-ino.m4.
11510         (Depends-on): Add d-ino.
11511         * modules/cycle-check (Depends-on): Add stdint.
11512         (lib_SOURCES): Add cycle-check.h.
11513         * modules/d-ino: New module.
11514         * modules/d-type: New module.
11515         * modules/error (Files): Remove m4/strerror_r.m4.
11516         * modules/filemode (Files): Add m4/st_dm_mode.m4.
11517         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11518         m4/inttypes_h.m4, m4/uintmax_t.m4.
11519         (Depends-on): Add stdint.
11520         (lib_SOURCES): Add fsusage.h.
11521         * modules/getcwd (Files): Remove d-ino.m4.
11522         (Depends-on): Add d-ino.
11523         * modules/getndelim2 (Depends-on): Add stdint.
11524         * modules/glob (Files): Remove m4/d-type.m4.
11525         (Depends-on): Add d-type.
11526         * modules/host-os: New module.
11527         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
11528         m4/inttypes_h.m4, m4/uintmax_t.m4.
11529         * Depends-on: Add stdint.
11530         (lib_SOURCES): Add human.h.
11531         * modules/inttostr (Files): Remove m4/intmax_t.m4,
11532         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
11533         m4/uintmax_t.m4, m4/ulonglong.m4.
11534         (Depends-on): Add stdint.
11535         (EXTRA_DIST): Add inttostr.h.
11536         * modules/lchmod: New module.
11537         * modules/link-follow: New module.
11538         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
11539         (Depends-on): Add lchmod.
11540         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
11541         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
11542         (Depends-on): Add stdint.
11543         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
11544         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
11545         (Depends-on): Add stdint.
11546         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
11547         * modules/perl: New module.
11548         * modules/regex (Depends-on): Add stdint.
11549         * modules/rmdir-errno: New module.
11550         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11551         m4/intmax_t.m4.
11552         (Depends-on): Add stdint.
11553         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11554         m4/uintmax_t.m4.
11555         (Depends-on): Add stdint.
11556         * modules/unlink-busy: New module.
11557         * modules/utimecmp (Depends-on): Add stdint.
11558         * modules/uptime: New module.
11559         * modules/winsz-ioctl: New module.
11560         * modules/winsz-termios: New module.
11561         * modules/xnanosleep (Depends-on): Add nanosleep.
11562         * modules/ullong_max: Remove.
11563         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
11564         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
11565         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
11566         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
11567         (Depends-on): Add inttypes.
11568         (lib_SOURCES): Add xstrtol.h.
11569         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
11570         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
11571         * MODULES.html.sh: Move 'assert' into the assert section.
11572         Move 'dummy' into the linking section.
11573         Remove ullong_max.
11574         Add section for compatibility checks for POSIX:2001 functions,
11575         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
11576         winsz-ioctl, and winsz-termios into it.
11577         Add lchmod.
11578         Add top-level Misc section and put host-os, perl, and uptime
11579         into it.
11580
11581 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11582
11583         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
11584         now assume the stdint module.  Do not include inttypes.h.
11585         * lib/fsusage.h: Likewise.
11586         * lib/getndelim2.c: Likewise.
11587         * lib/human.h: Likewise.
11588         * lib/inttostr.h: Likewise.
11589         * lib/obstack.c: Likewise.
11590         * lib/regex_internal.h: Likewise.
11591         * lib/tempname.c: Likewise.
11592         * lib/utimecmp.c: Likewise.
11593         * lib/xstrtol.h: Likewise.
11594
11595         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
11596
11597         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
11598         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
11599         * lib/xtime.h: Likewise.
11600
11601 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11602
11603         * modules/openat (Files): Add lib/fchmodat.c.
11604         Fixes problem reported by Jay Youngman.
11605
11606 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11607
11608         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
11609         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
11610
11611 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
11612             Bruno Haible  <bruno@clisp.org>
11613
11614         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
11615         and is a script that invokes bison. Tighten the code. Add comments.
11616
11617 2006-08-18  Jim Meyering  <jim@meyering.net>
11618
11619         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
11620         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
11621         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
11622         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
11623
11624 2006-08-18  Bruno Haible  <bruno@clisp.org>
11625
11626         * modules/bison-i18n: New file.
11627         * MODULES.html.sh (Internationalization functions): Add it.
11628
11629 2006-08-18  Bruno Haible  <bruno@clisp.org>
11630
11631         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
11632         sys/statvfs.h. When getmntinfo was found, check its declaration and
11633         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
11634
11635 2006-08-18  Bruno Haible  <bruno@clisp.org>
11636
11637         * m4/bison-i18n.m4: New file, from bison.
11638
11639 2006-08-18  Bruno Haible  <bruno@clisp.org>
11640
11641         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
11642         (ME_DUMMY): Treat "kernfs" as a dummy.
11643         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
11644
11645 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11646
11647         Update from coreutils.
11648
11649         2006-08-15  Jim Meyering  <jim@meyering.net>
11650
11651         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
11652
11653         2006-01-17  Jim Meyering  <jim@meyering.net>
11654
11655         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
11656
11657         2006-01-11  Jim Meyering  <jim@meyering.net>
11658
11659         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
11660         Check for the lchmod function.
11661
11662 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11663
11664         Update from coreutils.
11665
11666         * lib/__fpending.h: Add copyright notice.
11667         * lib/fprintftime.h: Likewise.
11668         * lib/savedir.c: Use (C) in copyright notice.
11669         * lib/savedir.h: Likewise.
11670
11671         2006-08-15  Jim Meyering  <jim@meyering.net>
11672
11673         * lib/at-func.c: New file, with the logic of all emulated at-functions.
11674         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
11675         in support of the EXPECTED_ERRNO macro.
11676         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
11677         definitions.  Instead, define the appropriate symbols and include
11678         "at-func.c".
11679         * lib/mkdirat.c (mkdirat): Likewise.
11680         * lib/fchmodat.c (fchmodat): Likewise.
11681         (ENOSYS): Remove definition.
11682         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
11683         it.  Don't include "unistd--.h" -- it wasn't ever used.
11684
11685         2006-01-17  Jim Meyering  <jim@meyering.net>
11686
11687         Rewrite fts.c not to change the current working directory,
11688         by using openat, fstatat, fdopendir, etc..
11689
11690         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
11691         (HAVE_OPENAT_SUPPORT): Define.
11692         [_LIBC] (fchdir): Don't undef or define; no longer used.
11693         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
11694         Now, this `function' always succeeds, and consumes its file descriptor
11695         parameter -- so callers must not close such FDs.  Update callers.
11696         (diropen_fd, opendirat, cwd_advance_fd): New functions.
11697         (diropen): Add parameter, SP.  Adjust all callers.
11698         Implement using diropen_fd, rather than open.
11699         (fts_open): Initialize new member, fts_cwd_fd.
11700         Remove fts_rft-setting code.
11701         (fts_close): Close fts_cwd_fd, if necessary.
11702         (__opendir2): Define in terms of opendir or opendirat,
11703         depending on whether the FST_NOCHDIR flag is set.
11704         (fts_build): Since fts_safe_changedir consumes its FD, and since
11705         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
11706         and close the dup'd file descriptor upon failure.
11707         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
11708         (fts_safe_changedir): Tweak semantics to reflect that this function
11709         now calls cwd_advance_fd and hence consumes its FD argument.
11710         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
11711         [struct FTS] (fts_rft): Remove now-unused member.
11712         [struct FTS] (fts_cycle.state): Improve comment.
11713
11714         * lib/openat.c (openat_needs_fchdir): New function.
11715         * lib/openat.h (openat_needs_fchdir): Declare it.
11716
11717 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11718
11719         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
11720         Problem and fix reported by Pádraig Brady in
11721         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
11722
11723 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11724
11725         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
11726
11727 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11728
11729         * lib/memcoll.c (memcoll): Optimize for the common case where the
11730         arguments are bytewise equal.
11731
11732 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11733
11734         * doc/regexprops-generic.texi: Add a copyright notice.
11735
11736 2006-08-15  Bruno Haible  <bruno@clisp.org>
11737
11738         * modules/tmpdir (License): Change to LGPL.
11739
11740 2006-08-15  Bruno Haible  <bruno@clisp.org>
11741
11742         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
11743         module.
11744
11745 2006-08-14  Simon Josefsson  <jas@extundo.com>
11746
11747         * config/srclist.txt: Add gnupload.
11748
11749 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11750
11751         Change copyright notice from LGPL 2 to GPL 2, since that's the
11752         standard form used in the gnulib repository.
11753         * tests/test-lock.c: Likewise.
11754         * tests/test-stdint.c: Likewise.
11755         * tests/test-tls.c: Likewise.
11756
11757         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
11758         prelude-manager.  User shorter URLs for GNU projects, without '?'.
11759         Add copyright notice.
11760
11761         * check-module: Add copyright notice.  Output a copyright
11762         notice if "--version" is specified.
11763         * modules/COPYING: New file.
11764         * tests/test-getaddrinfo.c: Add copyright notice.
11765         * tests/test-verify.c: Likewise.
11766
11767 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11768
11769         Change copyright notice from LGPL 2 to GPL 2, since that's the
11770         standard form used in the gnulib repository.
11771         * lib/lock.c: LGPL -> GPL.
11772         * lib/lock.h: Likewise.
11773         * lib/strnlen1.c: Likewise.
11774         * lib/strnlen1.h: Likewise.
11775         * lib/tls.c: Likewise.
11776         * lib/tls.h: Likewise.
11777         * lib/tmpdir.c: Likewise.
11778
11779         * lib/TODO: Remove; this belongs only in coreutils.
11780
11781 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11782
11783         Add copyright notices to long-enough files that lack them, since
11784         otherwise the files aren't clearly free.  Use the same notice that
11785         getdate.texi already uses.
11786         * doc/alloca-opt.texi: Add copyright notice.
11787         * doc/alloca.texi: Likewise.
11788         * doc/ctime.texi: Likewise.
11789         * doc/functions.texi: Likewise.
11790         * doc/gcd.texi: Likewise.
11791         * doc/gnulib-tool.texi: Likewise.
11792         * doc/inet_ntoa.texi: Likewise.
11793         * doc/visibility.texi: Likewise.
11794
11795         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
11796         * doc/quote.texi: Add copyright notice.
11797
11798         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
11799         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
11800         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
11801         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
11802         is now obsolete, and give a pointer to the Sun list.
11803         Add copyright notice.
11804
11805 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11806
11807         * config/srclistvars.sh: Add copyright notice.
11808
11809 2006-08-14  Eric Blake  <ebb9@byu.net>
11810
11811         Import the following change from libc:
11812
11813         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
11814
11815         Upstream bug 2997.
11816         * lib/misc/error.c: Add space between program name and message if file
11817         name is missing.
11818
11819 2006-08-12  Karl Berry  <karl@gnu.org>
11820
11821         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
11822         remove, these originate in gnulib now.
11823
11824 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11825
11826         * doc/Makefile (standards.info standards.html standards.dvi):
11827         Also depend on make-stds.texi.
11828
11829 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
11830
11831         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
11832         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
11833
11834         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
11835         in wchar_t.  Problem reported by Eric Blake.
11836
11837         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
11838         LEN is smaller than SIZE.  Suggested by Bruno Haible.
11839         Also, help the compiler to keep LEN in a register.
11840
11841 2006-08-11  Eric Blake  <ebb9@byu.net>
11842
11843         * users.txt: Sort.  Add tar.
11844
11845 2006-08-11  Bruno Haible  <bruno@clisp.org>
11846
11847         * users.txt: New file.
11848
11849 2006-08-11  Bruno Haible  <bruno@clisp.org>
11850
11851         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
11852         before <wchar.h>. Needed for OSF/1 and BSD/OS.
11853
11854 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
11855
11856         * modules/snprintf (Depends-on): Remove minmax.
11857         (Maintainer): Add self and Bruno.
11858
11859 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
11860
11861         * lib/.cppi-disable: Add snprintf.h, socket_.h.
11862         * lib/snprintf.c: Include <errno.h> and <limits.h>.
11863         (EOVERFLOW): Define if the system does not.
11864         Do not include "minmax.h"; it wasn't used.
11865         (snprintf): Don't assume size_t promotes to an unsigned type.
11866         Fix bug when generated string was too long for the buffer: the
11867         buffer's contents are supposed to be the initial prefix of the
11868         output.  Don't assume vasnprintf returns EOVERFLOW if the size
11869         exceeds INT_MAX; do the check ourselves.
11870
11871         Import the following changes from libc:
11872
11873         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
11874
11875         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
11876         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
11877         set wc to the byte which couldn't be converted.
11878         (re_string_reconstruct): Don't clear valid_raw_len before calling
11879         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
11880         tip_context using re_string_context_at.
11881
11882         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
11883
11884         * lib/posix/regex.h: g++ still cannot handled [restrict].
11885
11886         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
11887
11888         * lib/posix/regex.h: Remove special handling for VMS.
11889
11890 2006-08-10  Jim Meyering  <jim@meyering.net>
11891
11892         * modules/same-inode: New module.
11893         * modules/dev-ino: New module.
11894         * modules/cycle-check: Depend on these modules, rather than simply
11895         including their .h files.
11896         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
11897         required via m4/cycle-check.m4.
11898         * modules/same: Depend on new same-inode module, rather than
11899         including same-inode.h.
11900         * modules/chdir-safer: New file.
11901
11902         * modules/chown (Depends-on): Add stat-macros.
11903
11904 2006-08-10  Jim Meyering  <jim@meyering.net>
11905
11906         * m4/cycle-check.m4: New file.
11907         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
11908         * m4/dev-ino.m4, m4/same-inode.m4: New files.
11909
11910 2006-08-10  Eric Blake  <ebb9@byu.net>
11911
11912         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
11913         in from original proposal.
11914
11915 2006-08-10  Eric Blake  <ebb9@byu.net>
11916         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11917
11918         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
11919         namespace.
11920
11921 2006-08-10  Bruno Haible  <bruno@clisp.org>
11922
11923         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
11924         as well.
11925
11926 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11927
11928         Sync from coreutils.
11929
11930         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
11931
11932         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
11933         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
11934
11935 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11936
11937         * modules/restrict: Remove; no longer needed now that we assume
11938         Autoconf 2.59 or later.
11939         * MODULES.html.sh: Remove 'restrict'.
11940         * modules/argp (Depends-on): Remove 'restrict'.
11941         * modules/base64 (Depends-on): Likewise.
11942         * modules/gc (Depends-on): Likewise.
11943         * modules/getaddrinfo (Depends-on): Likewise.
11944         * modules/glob (Depends-on): Likewise.
11945         * modules/inet_ntop (Depends-on): Likewise.
11946         * modules/inet_pton (Depends-on): Likewise.
11947         * modules/memxor (Depends-on): Likewise.
11948         * modules/regex (Depends-on): Likewise.
11949         * modules/strtok_r (Depends-on): Likewise.
11950         * modules/time_r (Depends-on): Likewise.
11951
11952 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11953
11954         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
11955         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
11956         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
11957         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
11958         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
11959         * m4/memxor.m4 (gl_MEMXOR): Likewise.
11960         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
11961         gl_C_RESTRICT replaced by AC_C_RESTRICT.
11962
11963         Merge from coreutils.
11964         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
11965         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
11966         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
11967         * m4/time_r.m4 (gl_TIME_R): Likewise.
11968
11969 2006-08-09  Karl Berry  <karl@gnu.org>
11970
11971         * config/srclist.txt: no more gettext-tools, per Bruno.
11972
11973 2006-08-08  Eric Blake  <ebb9@byu.net>
11974
11975         * modules/verror: New module.
11976         * MODULES.html.sh: Document it.
11977
11978 2006-08-08  Eric Blake  <ebb9@byu.net>
11979
11980         * lib/verror.h, lib/verror.c: New files.
11981
11982 2006-08-08  Eric Blake  <ebb9@byu.net>
11983
11984         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
11985         verror_at_line output complies with GNU Coding Standards even when
11986         file is NULL.
11987
11988 2006-08-07  Bruno Haible  <bruno@clisp.org>
11989
11990         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
11991         versions of AIX.
11992         Reported by Ralf Wildenhues.
11993
11994 2006-08-07  Bruno Haible  <bruno@clisp.org>
11995
11996         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
11997         in an AC_DEFUN. Needed so that the autoconf snippets can use
11998         AC_REQUIRE.
11999
12000 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12001
12002         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12003         Initialize pkgdata_DATA.
12004         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
12005         overriding it.
12006
12007 2006-08-06  Eric Blake  <ebb9@byu.net>
12008
12009         * lib/error.h: Fold in some upstream changes from glibc.
12010         * lib/error.c: Likewise.
12011
12012 2006-08-04  Bruno Haible  <bruno@clisp.org>
12013
12014         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12015         Make the mostlyclean-local rule depend on mostlyclean-generic.
12016         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
12017
12018 2006-07-31  Bruno Haible  <bruno@clisp.org>
12019
12020         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
12021         <stdlib.h>, <string.h>.
12022
12023 2006-07-30  Bruno Haible  <bruno@clisp.org>
12024
12025         * modules/readlink (License): Change to LGPL.
12026
12027 2006-07-30  Bruno Haible  <bruno@clisp.org>
12028
12029         * modules/javaversion (Makefile.am): Distribute javaversion.java and
12030         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
12031         set PKGDATADIR to point to it.
12032
12033 2006-07-30  Bruno Haible  <bruno@clisp.org>
12034
12035         * modules/csharpexec (configure.ac): Comment out macro invocation.
12036         * modules/javaexec (configure.ac): Likewise.
12037         * modules/javacomp-script (configure.ac): Likewise.
12038
12039         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
12040
12041 2006-07-30  Bruno Haible  <bruno@clisp.org>
12042
12043         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
12044         linked-list.
12045
12046 2006-07-30  Bruno Haible  <bruno@clisp.org>
12047
12048         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
12049
12050 2006-07-30  Bruno Haible  <bruno@clisp.org>
12051
12052         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12053         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
12054         get removed.
12055
12056 2006-07-29  Bruno Haible  <bruno@clisp.org>
12057
12058         Make it possible for gnulib-tool to work with locally modified or
12059         augmented gnulib repositories.
12060         * gnulib-tool (func_usage): Document --local-dir option.
12061         (local_gnulib_dir): New variable.
12062         Handle --local-dir option.
12063         (func_lookup_file): New function.
12064         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12065         (func_get_description, func_get_filelist, func_get_description,
12066         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12067         func_get_automake_snippet, func_get_include_directive,
12068         func_get_license, func_get_maintainer): Use func_lookup_file.
12069         (func_import, func_create_testdir): Use func_lookup_file.
12070
12071 2006-07-29  Bruno Haible  <bruno@clisp.org>
12072
12073         * modules/setenv (Depends-on): Add unistd.
12074
12075 2006-07-29  Bruno Haible  <bruno@clisp.org>
12076
12077         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12078
12079 2006-07-29  Bruno Haible  <bruno@clisp.org>
12080
12081         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12082
12083 2006-07-29  Bruno Haible  <bruno@clisp.org>
12084
12085         * gnulib-tool (import, update): If there is no Makefile.am, look at
12086         aclocal.m4, instead of bailing out.
12087
12088 2006-07-29  Bruno Haible  <bruno@clisp.org>
12089
12090         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12091         Categorize the options by when they are useful.
12092
12093 2006-07-29  Bruno Haible  <bruno@clisp.org>
12094
12095         * gnulib-tool (func_usage): Document option --no-libtool.
12096         Handle option --no-libtool.
12097         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12098         for changed semantics of $libtool variable.
12099         (func_import): Likewise. If libtool is not used, show this through
12100         an option --no-libtool.
12101         (func_create_testdir): Update.
12102
12103 2006-07-29  Bruno Haible  <bruno@clisp.org>
12104
12105         * gnulib-tool (func_import): Extend error message about missing
12106         --doc-base.
12107
12108 2006-07-29  Bruno Haible  <bruno@clisp.org>
12109
12110         * gnulib-tool (func_import): Don't create the $docbase directory if
12111         there is no file to store there.
12112
12113 2006-07-29  Bruno Haible  <bruno@clisp.org>
12114
12115         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12116         relevant, look for configure.ac there, not in the current directory.
12117         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12118
12119 2006-07-29  Bruno Haible  <bruno@clisp.org>
12120
12121         * gnulib-tool (SORT): New variable.
12122         (func_usage): Undocument --assume-autoconf option.
12123         Remove --assume-autoconf option handling.
12124         (autoconf_minversion): Determine from the contents of configure.ac.
12125         (func_import): Remove autoconf_minversion handling.
12126         Suggested by Eric Blake.
12127
12128 2006-07-29  Bruno Haible  <bruno@clisp.org>
12129
12130         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12131
12132 2006-07-29  Bruno Haible  <bruno@clisp.org>
12133
12134         * config/srclist.txt (*setenv.[ch]): Remove rules.
12135
12136 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12137
12138         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12139
12140 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12141
12142         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12143         arpa/inet.h.
12144
12145 2006-07-28  Simon Josefsson  <jas@extundo.com>
12146
12147         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12148         * modules/inet_pton (Depends-on): Likewise.
12149
12150 2006-07-28  Simon Josefsson  <jas@extundo.com>
12151
12152         * m4/netinet_in_h.m4: New file.
12153
12154 2006-07-28  Simon Josefsson  <jas@extundo.com>
12155
12156         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12157         #include's.
12158
12159 2006-07-28  Simon Josefsson  <jas@extundo.com>
12160
12161         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12162         #include's.
12163
12164 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12165
12166         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12167         setgid on directories only if they set these bits.
12168         * lib/modechange.h: Remove obsolete comment about masks.
12169
12170 2006-07-28  Eric Blake  <ebb9@byu.net>
12171
12172         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12173         macro expansion.
12174
12175 2006-07-28  Bruno Haible  <bruno@clisp.org>
12176
12177         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12178
12179 2006-07-28  Bruno Haible  <bruno@clisp.org>
12180
12181         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12182
12183 2006-07-28  Bruno Haible  <bruno@clisp.org>
12184
12185         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12186         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12187         Define fallbacks.
12188         Avoids link error on FreeBSD 4.x.
12189         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12190
12191         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12192         encoding.
12193         * lib/mbswidth.c (iswcntrl): Likewise.
12194
12195 2006-07-27  Bruno Haible  <bruno@clisp.org>
12196
12197         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12198         test.
12199
12200 2006-07-27  Bruno Haible  <bruno@clisp.org>
12201
12202         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12203         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12204         defined.
12205
12206 2006-07-26  Eric Blake  <ebb9@byu.net>
12207
12208         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12209
12210 2006-07-26  Eric Blake  <ebb9@byu.net>
12211
12212         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12213         like mingw that lack mkstemp.
12214         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12215         avoid compilation warning on mingw.
12216
12217 2006-07-26  Bruno Haible  <bruno@clisp.org>
12218
12219         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12220         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12221         INT_FAST*_MIN, INTPTR_MIN.
12222
12223 2006-07-25  Bruno Haible  <bruno@clisp.org>
12224
12225         * modules/version-etc (Depends-on): Add stdarg.
12226
12227 2006-07-25  Bruno Haible  <bruno@clisp.org>
12228
12229         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12230         complex commands.
12231
12232 2006-07-25  Bruno Haible  <bruno@clisp.org>
12233
12234         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12235         defined in <stdarg.h> or config.h.
12236
12237 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12238
12239         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12240         (gl_STDIO_SAFER): Remove.
12241
12242 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12243
12244         * MODULES.html.sh (File stream based Input/Output):
12245         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12246         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12247         * modules/fopen-safer, modules/tmpfile-safer: New files.
12248         * modules/stdio-safer: Remove.
12249
12250 2006-07-24  Bruno Haible  <bruno@clisp.org>
12251
12252         * modules/tmpdir: New file.
12253         * MODULES.html.sh (File system functions): Add it.
12254
12255 2006-07-24  Bruno Haible  <bruno@clisp.org>
12256
12257         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12258         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12259
12260 2006-07-24  Bruno Haible  <bruno@clisp.org>
12261
12262         * modules/clean-temp: New file.
12263
12264 2006-07-24  Bruno Haible  <bruno@clisp.org>
12265
12266         * m4/tmpdir.m4: New file, from GNU gettext.
12267
12268 2006-07-24  Bruno Haible  <bruno@clisp.org>
12269
12270         * lib/tmpdir.h: New file, from GNU gettext.
12271         * lib/tmpdir.c: New file, from GNU gettext.
12272
12273 2006-07-24  Bruno Haible  <bruno@clisp.org>
12274
12275         * lib/clean-temp.h: New file, from GNU gettext.
12276         * lib/clean-temp.c: New file, from GNU gettext.
12277
12278 2006-07-23  Eric Blake  <ebb9@byu.net>
12279
12280         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12281         (Depends-on): Add binary-io.
12282
12283 2006-07-23  Eric Blake  <ebb9@byu.net>
12284
12285         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12286
12287 2006-07-23  Eric Blake  <ebb9@byu.net>
12288
12289         * lib/tmpfile-safer.c: New file.
12290         * lib/stdio-safer.h (fopen_safer): Add prototype.
12291         * lib/stdio--.h (tmpfile): Make safer.
12292
12293 2006-07-23  Bruno Haible  <bruno@clisp.org>
12294
12295         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12296         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12297         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12298         gl_linked_remove_at): Use it.
12299
12300 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12301         and Simon Josefsson <jas@extundo.com>
12302
12303         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12304
12305         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12306
12307 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12308
12309         * modules/close-stream: New file.
12310         * modules/closeout (Description): Make it clear that it exits
12311         with a diagnostic on error.
12312         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12313         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12314
12315 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12316
12317         * m4/close-stream.m4: New file.
12318
12319 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12320
12321         * lib/close-stream.c, lib/close-stream.h: New files.
12322
12323 2006-07-22  Bruno Haible  <bruno@clisp.org>
12324
12325         Merge from GNU gettext 0.15.
12326
12327         2006-05-01  Bruno Haible  <bruno@clisp.org>
12328
12329                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12330
12331         2006-07-22  Bruno Haible  <bruno@clisp.org>
12332
12333                 * modules/javaversion: New file.
12334                 * MODULES.html.sh (Java): Add javaversion.
12335
12336         2006-03-12  Bruno Haible  <bruno@clisp.org>
12337
12338                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12339
12340         2005-12-04  Bruno Haible  <bruno@clisp.org>
12341
12342                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12343                 (untested).
12344
12345         2006-06-21  Bruno Haible  <bruno@clisp.org>
12346
12347                 Avoid warnings from recent versions of mcs.
12348                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
12349                 -o, -L, -r any more. Use options documented since mcs-1.0
12350                 instead. Similarly for -g.
12351
12352         2005-12-04  Bruno Haible  <bruno@clisp.org>
12353
12354                 * build-aux/csharpcomp.sh.in: Suffix for resources is
12355                 .resources, not .resource.
12356
12357         2005-07-09  Bruno Haible  <bruno@clisp.org>
12358
12359                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
12360                 add a .dll suffix.
12361                 Reported by Mark Junker <mjscod@gmx.de>.
12362
12363         2006-07-22  Bruno Haible  <bruno@clisp.org>
12364
12365                 * modules/gettext: Upgrade to gettext-0.15.
12366                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
12367                 m4/visibility.m4.
12368                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
12369
12370 2006-07-22  Bruno Haible  <bruno@clisp.org>
12371
12372         Merge from GNU gettext 0.15.
12373
12374         2006-03-25  Bruno Haible  <bruno@clisp.org>
12375
12376                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
12377
12378         2006-07-21  Bruno Haible  <bruno@clisp.org>
12379
12380                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
12381                 "1.1".
12382
12383         2006-05-09  Bruno Haible  <bruno@clisp.org>
12384
12385                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
12386                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
12387                 for the conftestver execution.
12388
12389         2006-05-01  Bruno Haible  <bruno@clisp.org>
12390
12391                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
12392                 optional target-version argument. Verify that the compiler
12393                 groks source of the specified source-version, or add -source
12394                 option as necessary. Verify that the compiler produces
12395                 bytecode in the specified target-version, or add -target and
12396                 -source options as necessary. Make the result of the test
12397                 available as variable CONF_JAVAC. Also log error output in
12398                 config.log.
12399
12400         2006-03-11  Bruno Haible  <bruno@clisp.org>
12401
12402                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
12403
12404         2006-05-09  Bruno Haible  <bruno@clisp.org>
12405
12406                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
12407                 CLASSPATH_SEPARATOR to a semicolon.
12408
12409         2006-03-12  Bruno Haible  <bruno@clisp.org>
12410
12411                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
12412                 available as variable CONF_JAVA, for subsequent autoconf
12413                 tests. Also log error output in config.log.
12414
12415         2006-07-19  Bruno Haible  <bruno@clisp.org>
12416
12417                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
12418                 that getline works on glibc2 systems. Needed to avoid trouble
12419                 in relocatable.c.
12420                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
12421
12422         2005-12-04  Bruno Haible  <bruno@clisp.org>
12423
12424                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
12425                 launcher (untested).
12426
12427         2005-12-04  Bruno Haible  <bruno@clisp.org>
12428
12429                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
12430
12431         2006-07-22  Bruno Haible  <bruno@clisp.org>
12432
12433                 * gettext.m4: Update from GNU gettext-0.15.
12434                 * nls.m4: Likewise.
12435                 * po.m4: Likewise.
12436                 * inttypes-pri.m4: Likewise.
12437                 * inttypes-h.m4: Renamed from inttypes.m4.
12438                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
12439
12440 2006-07-22  Bruno Haible  <bruno@clisp.org>
12441
12442         Merge from GNU gettext 0.15.
12443
12444         2005-07-05  Bruno Haible  <bruno@clisp.org>
12445
12446                 * printf-args.c (printf_fetchargs): Work around broken
12447                 definition of wint_t on mingw.
12448
12449         2005-02-12  Bruno Haible  <bruno@clisp.org>
12450
12451                 * xallocsa.h: Add extern "C" for C++.
12452
12453         2006-05-17  Bruno Haible  <bruno@clisp.org>
12454
12455                 Cygwin portability.
12456                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
12457
12458         2006-04-30  Bruno Haible  <bruno@clisp.org>
12459
12460                 * progreloc.c: Include <mach-o/dyld.h> if available.
12461                 (find_executable): Use _NSGetExecutablePath when possible.
12462
12463         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
12464
12465                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
12466                 function.
12467
12468         2005-12-29  Bruno Haible  <bruno@clisp.org>
12469
12470                 * progreloc.c (set_program_name_and_installdir): Fix
12471                 compilation error.
12472
12473         2005-12-04  Bruno Haible  <bruno@clisp.org>
12474
12475                 Cygwin portability.
12476                 * progreloc.c: Include <windows.h> also on Cygwin.
12477                 (find_executable): Add support for Cygwin.
12478                 (set_program_name_and_installdir): Handle also platforms with
12479                 nonempty EXEEXT.
12480
12481         2006-07-11  Bruno Haible  <bruno@clisp.org>
12482
12483                 * javacomp.c: Fix a comment.
12484                 Reported by Jim Meyering.
12485
12486         2006-04-30  Bruno Haible  <bruno@clisp.org>
12487
12488                 * javacomp.h (compile_java_class): Add source_version,
12489                 target_version arguments.
12490                 * javacomp.c: Rewritten to choose only a compiler that
12491                 respects the specified source_version and target_version.
12492
12493         2006-06-27  Bruno Haible  <bruno@clisp.org>
12494
12495                 Assume correct S_ISDIR macro.
12496                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
12497
12498         2006-07-22  Bruno Haible  <bruno@clisp.org>
12499
12500                 * javaversion.h: New file, from GNU gettext.
12501                 * javaversion.c: New file, from GNU gettext.
12502                 * javaversion.java: New file, from GNU gettext.
12503                 * javaversion.class: New file, from GNU gettext.
12504
12505         2006-05-17  Bruno Haible  <bruno@clisp.org>
12506
12507                 Cygwin portability.
12508                 * javaexec.c (execute_java_class): Test for jview program
12509                 also on Cygwin.
12510
12511         2006-04-09  Bruno Haible  <bruno@clisp.org>
12512
12513                 * fatal-signal.c: Don't include string.h.
12514                 (at_fatal_signal): Use a copying loop instead of memcpy.
12515
12516         2005-12-04  Bruno Haible  <bruno@clisp.org>
12517
12518                 * csharpexec.c: Add support for 'clix' launcher (untested).
12519                 (execute_csharp_using_sscli): New function.
12520                 (execute_csharp_program): Call it.
12521
12522         2006-06-21  Bruno Haible  <bruno@clisp.org>
12523
12524                 Avoid warnings from recent versions of mcs.
12525                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
12526                 -o, -L, -r any more. Use options documented since mcs-1.0
12527                 instead. Similarly for -g.
12528
12529         2005-07-09  Bruno Haible  <bruno@clisp.org>
12530
12531                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
12532                 add a .dll suffix.
12533                 Reported by Mark Junker <mjscod@gmx.de>.
12534
12535         2006-06-17  Bruno Haible  <bruno@clisp.org>
12536
12537                 * config.charset: Update for NetBSD 3.0.
12538
12539         2006-05-17  Bruno Haible  <bruno@clisp.org>
12540
12541                 Cygwin portability.
12542                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
12543
12544         2006-05-16  Bruno Haible  <bruno@clisp.org>
12545
12546                 * localcharset.c [CYGWIN]: Include <windows.h>.
12547                 (get_charset_aliases): For Cygwin, return the same CPxxx
12548                 aliases list as under WIN32.
12549                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
12550                 the environment variables. Fall back to GetACP().
12551
12552         2006-04-05  Bruno Haible  <bruno@clisp.org>
12553
12554                 * config.charset: Update Juan Manuel Guerrero's address.
12555
12556         2005-02-12  Bruno Haible  <bruno@clisp.org>
12557
12558                 * allocsa.h: Add extern "C" for C++.
12559
12560         2005-02-10  Bruno Haible  <bruno@clisp.org>
12561
12562                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
12563                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
12564
12565         2006-07-22  Bruno Haible  <bruno@clisp.org>
12566
12567                 * gettext.h: Update to GNU gettext-0.15.
12568
12569 2006-07-22  Bruno Haible  <bruno@clisp.org>
12570
12571         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
12572         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
12573         lib-prefix.m4, longdouble.m4, ssize_t.m4.
12574
12575 2006-07-21  Eric Blake  <ebb9@byu.net>
12576
12577         * modules/stdlib-safer: New file.
12578         * MODULES.html.sh (File stream based Input/Output): Add
12579         stdlib-safer.
12580
12581 2006-07-21  Eric Blake  <ebb9@byu.net>
12582
12583         * lib/stdlib-safer.h: New file from coreutils, required by
12584         stdlib--.h.
12585
12586 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
12587
12588         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
12589
12590 2006-07-20  Bruno Haible  <bruno@clisp.org>
12591
12592         * gnulib-tool: Recognize new option --assume-autoconf.
12593         (autoconf_minversion): New variable.
12594         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
12595
12596 2006-07-20  Bruno Haible  <bruno@clisp.org>
12597
12598         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
12599
12600 2006-07-19  Derek R. Price  <derek@ximbiot.com>
12601
12602         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
12603         Reindent and repaginate.
12604
12605 2006-07-19  Derek Price  <derek@ximbiot.com>
12606
12607         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
12608         Correct grammar.
12609
12610 2006-07-17  Bruno Haible  <bruno@clisp.org>
12611
12612         * modules/list: New file.
12613         * modules/array-list: New file.
12614         * modules/carray-list, modules/carray-list-tests: New files.
12615         * modules/linked-list, modules/linked-list-tests: New files.
12616         * modules/avltree-list, modules/avltree-list-tests: New files.
12617         * modules/rbtree-list, modules/rbtree-list-tests: New files.
12618         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
12619         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
12620         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
12621         * modules/oset: New file.
12622         * modules/array-oset: New file.
12623         * modules/avltree-oset, modules/avltree-oset-tests: New files.
12624         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
12625         * tests/test-carray_list.c: New file.
12626         * tests/test-linked_list.c: New file.
12627         * tests/test-avltree_list.c: New file.
12628         * tests/test-rbtree_list.c: New file.
12629         * tests/test-linkedhash_list.c: New file.
12630         * tests/test-avltreehash_list.c: New file.
12631         * tests/test-rbtreehash_list.c: New file.
12632         * tests/test-avltree_oset.c: New file.
12633         * tests/test-rbtree_oset.c: New file.
12634         * MODULES.html.sh (Container data structures): New section.
12635
12636 2006-07-17  Bruno Haible  <bruno@clisp.org>
12637
12638         * m4/gl_list.m4: New file.
12639
12640 2006-07-17  Bruno Haible  <bruno@clisp.org>
12641
12642         * lib/gl_list.h: New file.
12643         * lib/gl_list.c: New file.
12644         * lib/gl_array_list.h: New file.
12645         * lib/gl_array_list.c: New file.
12646         * lib/gl_carray_list.h: New file.
12647         * lib/gl_carray_list.c: New file.
12648         * lib/gl_linked_list.h: New file.
12649         * lib/gl_linked_list.c: New file.
12650         * lib/gl_anylinked_list1.h: New file.
12651         * lib/gl_anylinked_list2.h: New file.
12652         * lib/gl_avltree_list.h: New file.
12653         * lib/gl_avltree_list.c: New file.
12654         * lib/gl_anyavltree_list1.h: New file.
12655         * lib/gl_anyavltree_list2.h: New file.
12656         * lib/gl_rbtree_list.h: New file.
12657         * lib/gl_rbtree_list.c: New file.
12658         * lib/gl_anyrbtree_list1.h: New file.
12659         * lib/gl_anyrbtree_list2.h: New file.
12660         * lib/gl_anytree_list1.h: New file.
12661         * lib/gl_anytree_list2.h: New file.
12662         * lib/gl_linkedhash_list.h: New file.
12663         * lib/gl_linkedhash_list.c: New file.
12664         * lib/gl_anyhash_list1.h: New file.
12665         * lib/gl_anyhash_list2.h: New file.
12666         * lib/gl_avltreehash_list.h: New file.
12667         * lib/gl_avltreehash_list.c: New file.
12668         * lib/gl_rbtreehash_list.h: New file.
12669         * lib/gl_rbtreehash_list.c: New file.
12670         * lib/gl_anytreehash_list1.h: New file.
12671         * lib/gl_anytreehash_list2.h: New file.
12672
12673         * lib/gl_oset.h: New file.
12674         * lib/gl_oset.c: New file.
12675         * lib/gl_array_oset.h: New file.
12676         * lib/gl_array_oset.c: New file.
12677         * lib/gl_avltree_oset.h: New file.
12678         * lib/gl_avltree_oset.c: New file.
12679         * lib/gl_rbtree_oset.h: New file.
12680         * lib/gl_rbtree_oset.c: New file.
12681         * lib/gl_anytree_oset.h: New file.
12682
12683 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12684
12685         * m4/mkancesdirs.m4: New file.
12686         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
12687         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
12688         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
12689         it.
12690
12691 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12692
12693         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
12694         * lib/mkancesdirs.h: New files.
12695         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
12696         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
12697         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
12698         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
12699         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
12700         callers changed.  Revamp internals significantly, by not
12701         attempting to create directories that are temporarily more
12702         permissive than the final results.  Do not attempt to use
12703         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
12704         This removes some race conditions, fixes some bugs, and simplifies
12705         things.  Use new dirchownmod function to do owner and mode changes.
12706         * lib/mkdir-p.h: Likewise.
12707         * lib/modechange.c (octal_to_mode): New function.
12708         (struct mode_change): New member mentioned.
12709         (make_node_op_equals): New arg mentioned.  All callers changed.
12710         (mode_compile): Keep track of which mode bits the user has explicitly
12711         mentioned.
12712         (mode_adjust): New arg DIR, so that we implement the X op correctly.
12713         New arg PMODE_BITS, to keep track of which mode bits the user
12714         mentioned; it treats S_ISUID and S_ISGID speciall.
12715         All callers changed.
12716         * lib/modechange.h: Likewise.
12717
12718 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12719
12720         * MODULES.html.sh: Add mkancestors.
12721         * modules/mkancesdirs: New module.
12722         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
12723         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
12724         The chdir-safer and afs files are now orphans; I'll remove them
12725         unless someone speaks up.
12726         Add lib/dirchownmod.c, lib/dirchownmod.h.
12727         (Depends-on): Remove alloca, chown, save-cwd, dirname.
12728         Add lchown, mkancesdirs.
12729         (Maintainer): Add self.
12730
12731 2006-07-15  Karl Berry  <karl@gnu.org>
12732
12733         * gnulib-tool: help message wording/arrangement.
12734
12735 2006-07-14  Simon Josefsson  <jas@extundo.com>
12736
12737         * doc/gnulib.texi (Libtool and Windows): New section.
12738
12739 2006-07-12  Simon Josefsson  <jas@extundo.com>
12740
12741         * modules/gendocs (License): Fix license, approved by Karl.
12742
12743 2006-07-12  Eric Blake  <ebb9@byu.net>
12744
12745         * MODULES.html.sh: Add gendocs.
12746
12747 2006-07-11  Eric Blake  <ebb9@byu.net>
12748
12749         * modules/fdl: New module, to install doc/fdl.texi.
12750         * MODULES.html.sh: Add new section for documentation modules.
12751         * gnulib-tool: Avoid space-tab.
12752         (--doc-base): New option, to manage files from doc.
12753
12754 2006-07-11  Eric Blake  <ebb9@byu.net>
12755
12756         * m4/absolute-header.m4: Fix comments to match recent change.
12757
12758 2006-07-11  Eric Blake  <ebb9@byu.net>
12759
12760         * gnulib-tool: List --doc-base before --tests-base.
12761
12762 2006-07-11  Derek R. Price  <derek@ximbiot.com>
12763
12764         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
12765
12766 2006-07-11  Bruno Haible  <bruno@clisp.org>
12767
12768         * README: Mention where to put documentation.
12769
12770 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12771
12772         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
12773
12774 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12775
12776         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
12777         to stdint.m4.
12778
12779 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12780
12781         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
12782         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
12783         "no/such/file/stdint.h" when there is no such file, so that
12784         the resulting C code can be parsed by dodgy compilers.
12785         Problems reported by Bob Proulx.
12786
12787 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12788
12789         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
12790         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12791         macros into the GNU _D_EXACT_NAMLEN.
12792         * lib/savedir.c:  Likewise.
12793         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
12794
12795 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12796         and Paul Eggert  <eggert@cs.ucla.edu>
12797
12798         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
12799         * m4/savedir.m4:
12800         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12801         macros into the GNU _D_EXACT_NAMLEN.
12802
12803 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12804
12805         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
12806         around the absolute name, to work around a problem with the HP-UX
12807         11.23 native C compiler, reported by Bob Proulx.
12808
12809 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12810
12811         * doc/maintain.texi, make-stds.texi: Sync from
12812         <http://savannah.gnu.org/projects/gnustandards>.
12813
12814 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12815
12816         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
12817
12818 2006-07-09  Jim Meyering  <jim@meyering.net>
12819
12820         * m4/glob.m4: Remove a doubled word in a comment.
12821
12822 2006-07-09  Jim Meyering  <jim@meyering.net>
12823
12824         * lib/argp-pv.c: Remove a doubled word in a comment.
12825         * lib/check-version.c (check_version): Likewise.
12826         * lib/javacomp.c (compile_java_class): Likewise.
12827
12828 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12829
12830         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
12831         for the benefit of people using Autoconf 2.60.  If you want to
12832         support older Autoconf versions you can copy m4/onceonly_2_57.m4
12833         (or m4/onceonly.m4, if pre-2.57) manually.
12834
12835 2006-07-08  Jim Meyering  <jim@meyering.net>
12836
12837         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
12838         comment.
12839         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
12840         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
12841         comment.
12842
12843 2006-07-08  Jim Meyering  <jim@meyering.net>
12844
12845         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
12846
12847 2006-07-07  Simon Josefsson  <jas@extundo.com>
12848
12849         * tests/test-crc.c: Change expected crc value, the test vector
12850         were probably computed using the old broken crc.c?
12851
12852 2006-07-06  Simon Josefsson  <jas@extundo.com>
12853
12854         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
12855         now the canonical place for the M4 file).
12856
12857         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
12858         from the sys_socket dependency now.
12859
12860         * modules/inet_pton (Files): Ditto.
12861
12862         * modules/inet_ntop (Files): Ditto.
12863
12864 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12865
12866         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
12867         not gl_PREREQ_GETUSERSHELL.
12868
12869 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12870
12871         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
12872         with only one argument, for Autoconf 2.60.
12873         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
12874         expand to nothing, so add a shell command to avoid syntax error.
12875         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
12876
12877 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12878
12879         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
12880
12881 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12882
12883         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
12884         no longer needed.  Check for isblank decl.
12885         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
12886         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
12887         of existence.
12888
12889 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12890
12891         * lib/getloadavg.c: Use __VMS, not VMS.
12892         * lib/getopt.c: Likewise.
12893         * lib/getpagesize.h: Likewise.
12894         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
12895         and probably does not work.
12896
12897 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12898
12899         * lib/.cppi-disable: Add wcwidth.
12900         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
12901         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
12902         (ISGRAPH): Remove.  All uses changed to isgraph.
12903         (FOLD) [!defined _LIBC]: Remove special case.
12904         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
12905         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
12906         HAVE_ISBLANK.
12907         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
12908         case.
12909
12910 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
12911
12912         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
12913         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
12914         brackets.  Other minor changes to suppress some compiler
12915         warnings.
12916
12917 2006-07-06  Derek R. Price  <derek@ximbiot.com>
12918         and Paul Eggert  <eggert@cs.ucla.edu>
12919
12920         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
12921         of invoking obsolescent AC_HEADER_DIRENT macro.
12922         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
12923         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
12924         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
12925         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
12926         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
12927         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12928         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
12929         * m4/readdir.m4: Remove; no longer needed.
12930
12931 2006-07-06  Derek R. Price  <derek@ximbiot.com>
12932         and Paul Eggert  <eggert@cs.ucla.edu>
12933
12934         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
12935         Don't worry about this obsolete case any more.
12936         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
12937         directories.
12938         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
12939         worry about this obsolete case any more.
12940         * lib/fts.c: Likewise.
12941         * lib/getcwd.c: Likewise.
12942         * lib/glob.h: Likewise.
12943         * lib/savedir.c: Likewise.
12944
12945 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12946
12947         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
12948         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
12949         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
12950         needed.
12951         All uses removed.
12952         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12953         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
12954         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
12955         needed.
12956         * m4/getdate.m4 (gl_GETDATE): Likewise.
12957         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12958         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12959         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12960         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12961         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
12962         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12963         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
12964         needed.
12965
12966 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12967
12968         * lib/memcasecmp.c: Include <limits.h>.
12969         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
12970         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
12971         Don't assume isdigit succeeds only on '0' through '9'.
12972
12973 2006-07-05  Eric Blake  <ebb9@byu.net>
12974
12975         * modules/getaddrinfo (Depends-on): Add snprintf.
12976
12977 2006-07-05  Eric Blake  <ebb9@byu.net>
12978
12979         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
12980         to avoid 'header present but could not be compiled' on cygwin.
12981
12982 2006-07-05  Eric Blake  <ebb9@byu.net>
12983
12984         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
12985         missing from netdb.h.
12986         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
12987
12988 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12989
12990         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
12991         no longer needed.
12992         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
12993         * m4/getdate.m4 (gl_GETDATE): Likewise.
12994         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12995         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12996         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12997         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12998         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12999
13000 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13001
13002         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
13003         All uses of is_space replaced by isspace.
13004         * lib/exit.h: Don't talk about STDC_HEADERS.
13005         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
13006         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
13007         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
13008         replaced by isprint etc.
13009         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
13010         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13011         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
13012         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
13013         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
13014         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13015
13016 2006-07-05  Bruno Haible  <bruno@clisp.org>
13017
13018         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
13019         the function exists, before testing against AIX.
13020         Reported by Martin Lambers <marlam@marlam.de>.
13021
13022 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13023
13024         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
13025         From Mark D. Baushke.
13026
13027 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13028
13029         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
13030         to the absolute name, not just one, to bypass Sun C 5.8's
13031         "warning: #include of /usr/include/... may be non-portable".
13032
13033 2006-07-04  Eric Blake  <ebb9@byu.net>
13034
13035         * modules/dirname-tests: New test module.
13036         * tests/test-dirname.c: New file, replacing dirname.c
13037         TEST_DIRNAME section that was recently deleted.
13038
13039 2006-07-04  Bruno Haible  <bruno@clisp.org>
13040
13041         Assume ANSI C header files and <ctype.h> functions.
13042         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
13043         (mbsnwidth): Use isprint, iscntrl instead.
13044
13045 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13046
13047         Merge from coreutils.
13048         * MODULES.html.sh: Add xstrtold.
13049         * modules/xstrtold: New file.
13050         * modules/cycle-check (Files): Add lib/same-inode.h.
13051         * modules/dirname (Files): Add m4/double-slash-root.m4.
13052         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
13053         * modules/mkdir-p (Files): Add lib/same-inode.h.
13054         * modules/same (Files): Add lib/same-inode.h.
13055
13056 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13057
13058         * m4/absolute-header.m4: Renamed from full-header-path.m4.
13059         This is to keep the terminology clean; POSIX talks about
13060         "absolute pathnames", not "full pathnames", but the GNU
13061         Coding Standards say to use "path" for something else;
13062         so use "absolute" to keep both sides happy.
13063         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13064         Set gl_absolute_header, not gl_full_header_path.
13065         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13066         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13067         All uses changed.
13068
13069         Merge from coreutils.
13070
13071         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13072
13073         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13074         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13075         want to require the building of c-strtod.o.
13076         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13077         needs -lm directly.
13078         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13079
13080         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13081
13082         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13083         --as-needed option if available.  Problem reported by Albert Chin in
13084         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13085         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13086         cc merely issues a bunch of annoying warnings for --as-needed
13087         (this problem was reported by Bob Proulx).  Also, try linking with
13088         -lm to detect a bug in binutils 2.16 (this problem was reported
13089         by Ralf Wildenhues).
13090
13091         2006-06-18  Jim Meyering  <jim@meyering.net>
13092
13093         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13094         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13095         macro.
13096         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13097         also check for glibc-2.4's abort-inducing bug.
13098
13099         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13100         Low-probability clean-up should be to use rmdir to get rid of
13101         the just-created directory, not unlink.
13102
13103         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13104         configure fail, and request a bug report to inform us about it.
13105         Add a comment that, barring reports to the contrary, in 2007 we'll
13106         assume ftruncate is universally available.
13107
13108         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13109
13110         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13111
13112         2006-03-12  Jim Meyering  <jim@meyering.net>
13113
13114         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13115         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13116         * m4/same.m4 (gl_SAME): Likewise.
13117         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13118
13119         2006-03-11  Eric Blake  <ebb9@byu.net>
13120
13121         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13122         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13123         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13124         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13125
13126 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13127
13128         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13129         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13130         reported by Mark D. Baushke, one in
13131         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13132
13133         Merge from coreutils.
13134
13135         * lib/.cppi-disable: Add stdint_.h.
13136         * lib/.cvsignore: Add stdint.h.
13137
13138         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13139
13140         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13141         both double and long double versions.
13142         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13143         * lib/xstrtold.c: New file.
13144         * lib/xstrtod.h (xstrtold): New decl.
13145
13146         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13147
13148         * lib/filemode.c (setst): Remove.
13149         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13150         (arguably) clearer, and the generated code is a bit smaller on my
13151         Debian GNU/Linux stable x86 host.
13152
13153         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13154
13155         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13156         Assume that filemode.h includes sys/types.h and sys/stat.h.
13157         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13158         (ftypelet): Reorder to put common cases first, for efficiency.
13159         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13160         to do 'M'.
13161         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13162         of 10, for compatibility with FreeBSD.  All callers changed.
13163         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13164         types that can't be deduced solely from st_mode.  First arg is now a
13165         const pointer.
13166         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13167         (strmode): Renamed from mode_string.
13168         (filemodestring): New decl.
13169         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13170         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13171         needed.
13172         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13173
13174         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13175
13176         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13177         fsusage.h now does that.  Include fsusage.h first, to test interface.
13178         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13179         at most one method (the old code could have generated decls that
13180         didn't conform to C89, not that this was ever exercised).
13181         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13182
13183         2006-03-19  Jim Meyering  <jim@meyering.net>
13184
13185         Work even in a chroot where d_ino values for entries in "/"
13186         don't match the stat.st_ino values for the same names.
13187         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13188         number, iterate through all entries again, using lstat instead.
13189         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13190         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13191
13192         * lib/getcwd.c (__getcwd): Clarify a comment.
13193         Use memcpy in place of a call to strcpy.
13194
13195         2006-03-12  Jim Meyering  <jim@meyering.net>
13196
13197         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13198         matches that of the current directory (which we're about to chdir ".."
13199         out of), then save the dev-ino of the parent, instead.
13200
13201         * lib/same-inode.h (SAME_INODE): New file/macro.
13202         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13203         Include "same-inode.h", instead.
13204         * lib/same.c: Likewise.
13205         * lib/cycle-check.h: Include "same-inode.h".
13206         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13207         * lib/cycle-check.c (SAME_INODE): Remove definition.
13208         * lib/root-dev-ino.h: Include "same-inode.h".
13209
13210         2006-03-11  Eric Blake  <ebb9@byu.net>
13211
13212         * lib/same.c (same_name): s/base_name/last_component/
13213         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13214         * lib/filenamecat.c (file_name_concat): Likewise.
13215
13216         2006-03-11  Eric Blake  <ebb9@byu.net>,
13217                     Paul Eggert  <eggert@cs.ucla.edu>
13218
13219         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13220         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13221         drive prefix.
13222         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13223         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13224         (last_component): New method.
13225         * lib/dirname.c (dir_len): Determine when drive letters need a
13226         subsequent slash.  Preserve // when it is special.
13227         (dir_name): Don't append dot when drive letter is absolute.
13228         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13229         * lib/basename.c (base_name): New semantics - malloc the result.
13230         Preserve // when it is special.  Preserve relative files that look
13231         like drive letters.
13232         (base_len): Preserve // when it is special.
13233         (last_component): New method, similar to old base_name semantics.
13234         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13235         base_name.  Strip redundant slashes from ///.
13236
13237 2006-07-03  Jim Meyering  <jim@meyering.net>
13238
13239         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13240         macro is used before the first cycle_check call.
13241
13242 2006-07-03  Eric Blake  <ebb9@byu.net>
13243
13244         * modules/dirname (Depends-on): Add xstrndup.
13245
13246 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13247
13248         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13249         test cases, so that config.log is a bit easier to follow.
13250
13251 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13252
13253         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13254         both are 64 bits, since this seems to be the tradition, and this
13255         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13256         we ever run into a host that prefers long long to long in this
13257         case, we'll need another configure-time test.  Problem reported by
13258         Jim Meyering.
13259
13260 2006-07-02  Eric Blake  <ebb9@byu.net>
13261
13262         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13263
13264 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13265
13266         * modules/inttypes (Depends-on): No longer depends on stdint.
13267         * modules/stdint (Description): Say more about assumptions.
13268         Say that the fast types might differ.  Say macros are used.
13269         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13270         (Makefile.am): Revise list of substituted symbols to match
13271         new stdint.m4.
13272         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13273         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13274         * tests/test-stdint.c (verify_same_types)
13275         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13276         the code conforms to C99/C89.
13277         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13278         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13279
13280 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13281
13282         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13283         but fix a bug, by requiring at least 64 bits.
13284         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13285         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13286         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13287         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13288
13289         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13290         changes.  Make 2.59 a prerequisite.  Check and substitute for
13291         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13292         inttypes.h.  Do not use special include files; just use the
13293         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13294         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13295         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13296         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13297         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13298         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13299         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13300         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13301         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13302         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13303         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13304         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13305         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13306         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13307         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13308         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13309         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13310         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13311         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13312         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13313         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13314         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13315         not check for things that C99 does not require, e.g., int8_t.  If
13316         a test isn't needed unless <stdint.h> isn't working, and is
13317         unlikely to be needed for any other reason, then don't do it
13318         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13319         size_t, since we assume C89 freestanding at least.  Do not check
13320         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13321         the right thing even if the types are not defined.  Instead use:
13322         (gl_STDINT_TYPE_PROPERTIES): New macro.
13323         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13324         testing whether <sys/types.h> clashes, as Autoconf does this for
13325         us now.  All uses removed.
13326         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13327         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13328         (gl_CHECK_TYPE_SAME):
13329         Remove; no longer needed.
13330         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13331         exists, since we'll return 0 anyway in that case.
13332         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13333
13334 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13335
13336         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13337         possible collision with system files.
13338         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13339         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13340         WCHAR_MIN and WCHAR_MAX in this case.
13341         (<stddef.h>): Do not include; no longer needed.
13342         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13343         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13344         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13345         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13346         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13347         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
13348         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
13349         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
13350         !defined(__c99))]: Include in this case too, since it's harmless
13351         now.
13352         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
13353         dangerous to do so.
13354         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
13355         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
13356         (_STDINT_MIN, _STDINT_MAX): New macros.
13357         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
13358         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
13359         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
13360         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
13361         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
13362         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
13363         macros, not typedefs; this simplifies things quite a bit.
13364         Use long int for all types narrower than int64_t.
13365         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
13366         Define in terms of long long int or int64_t or long int,
13367         not int64_t or int32_t.  This saves some compile-time testing.
13368         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
13369         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
13370         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
13371         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
13372         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
13373         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
13374         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
13375         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
13376         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
13377         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
13378         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13379         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13380         undef any previous version and define our own version, for
13381         simplicity and consistency with the new macros for types.
13382         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13383         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13384         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
13385         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
13386         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
13387         @WINT_T_SUFFIX@ to keep things simple here.
13388         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
13389         Simplify by assuming typical 8/16/32/64 host, since we're
13390         already doing that elsewhere anyway.
13391         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
13392         and assume long long int is 64 bits if available.  This
13393         speeds up 'configure'.
13394
13395 2006-07-01  Eric Blake  <ebb9@byu.net>
13396
13397         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
13398         Reported by Andreas Buening.
13399
13400 2006-07-01  Eric Blake  <ebb9@byu.net>
13401
13402         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
13403
13404 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13405
13406         * lib/getaddrinfo.c: fixed typo
13407
13408 2006-06-29  Jim Meyering  <jim@meyering.net>
13409
13410         * modules/strftime (Maintainer): Add my name, since with the
13411         FPRINTFTIME changes strftime.c has forked from glibc.
13412
13413 2006-06-29  Eric Blake  <ebb9@byu.net>
13414
13415         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
13416
13417 2006-06-29  Eric Blake  <ebb9@byu.net>
13418
13419         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
13420
13421 2006-06-29  Eric Blake  <ebb9@byu.net>
13422
13423         * lib/stat_.h: New file.
13424
13425 2006-06-29  Eric Blake  <ebb9@byu.net>
13426
13427         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
13428         unused static function.
13429
13430 2006-06-29  Eric Blake  <ebb9@byu.net>
13431
13432         * doc/functions.texi (Function Portability): Document missing lstat
13433         on mingw.
13434
13435 2006-06-29  Eric Blake  <ebb9@byu.net>
13436
13437         * MODULES.html.sh: Add sys_stat.
13438         * modules/sys_stat: New module.
13439         * modules/mkstemp (Depends-on): Add sys_stat.
13440
13441 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13442
13443         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
13444
13445 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13446
13447         * m4/c-bs-a.m4: Removed.
13448
13449 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13450
13451         * lib/strftime.c: Assume strftime() exists.
13452
13453 2006-06-29  Derek Price  <derek@ximbiot.com>
13454
13455         * modules/c-bs-a: Removed - \a is C89.
13456         * MODULES.html.sh: Remove c-bs-a.
13457
13458 2006-06-29  Bruno Haible  <bruno@clisp.org>
13459
13460         * modules/wcwidth (License): Change to LGPL.
13461
13462 2006-06-28  Simon Josefsson  <jas@extundo.com>
13463
13464         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
13465         on _WIN32.
13466
13467         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
13468         getnameinfo.
13469
13470 2006-06-28  Simon Josefsson  <jas@extundo.com>
13471
13472         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
13473
13474 2006-06-28  Simon Josefsson  <jas@extundo.com>
13475
13476         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
13477         functions there.  It will succeed on Windows XP, but on Windows
13478         2000 and (presumably) earlier, it will fail, and use the internal
13479         re-implementation.
13480         (use_win32_p): New function.
13481         (getaddrinfo): Use strtoul on servname, to support numeric ports.
13482         Support AI_NUMERICSERV to disable getservbyname.
13483         (getnameinfo): New function, only supports
13484         NI_NUMERICHOST|NI_NUMERICSERV for now.
13485
13486         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
13487         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
13488         getnameinfo.
13489
13490 2006-06-28  Eric Blake  <ebb9@byu.net>
13491
13492         * modules/wcwidth: New file.
13493         * modules/mbchar (Depends-on): Add wcwidth.
13494         * modules/mbswidth (Depends-on): Add wcwidth.
13495         * MODULES.html.sh: Add wcwidth.
13496
13497 2006-06-28  Eric Blake  <ebb9@byu.net>
13498
13499         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
13500         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
13501
13502 2006-06-28  Eric Blake  <ebb9@byu.net>
13503
13504         * lib/xvasprintf.h: Fix comments.
13505
13506 2006-06-28  Eric Blake  <ebb9@byu.net>
13507
13508         * lib/mbchar.h (wcwidth): Include wcwidth.h.
13509         * lib/mbswidth.c (wcwidth): Move from here...
13510         * lib/wcwidth.h: ...to this new file.
13511
13512 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13513
13514         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
13515
13516         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
13517         it's obsolete.
13518         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
13519
13520 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13521
13522         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
13523         Autoconf 2.60 says this stuff was obsolete.
13524
13525 2006-06-28  Bruno Haible  <bruno@clisp.org>
13526
13527         * modules/wcwidth (Files): Add m4/wchar_t.m4.
13528
13529 2006-06-28  Bruno Haible  <bruno@clisp.org>
13530
13531         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
13532         gt_TYPE_WCHAR_T.
13533
13534 2006-06-28  Bruno Haible  <bruno@clisp.org>
13535
13536         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
13537         declaration for wcwidth.
13538         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
13539
13540 2006-06-28  Bruno Haible  <bruno@clisp.org>
13541
13542         * lib/mkdtemp.c [MINGW]: Include <io.h>.
13543         (mkdir): Define using _mkdir.
13544
13545 2006-06-28  Bruno Haible  <bruno@clisp.org>
13546
13547         * lib/getaddrinfo.h: Fix POSIX URL.
13548         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
13549         _WIN32.
13550         (use_win32_p): Make static.
13551         (getaddrinfo): Reject service name if it is empty or does not consist
13552         solely of decimal digits, or if its value is > 65535.
13553         (getnameinfo): Remove useless casts.
13554
13555 2006-06-27  Simon Josefsson  <jas@extundo.com>
13556
13557         * modules/sys_select: New file, suggested by Bruno Haible, Paul
13558         Eggert and Martin Lambers.
13559
13560 2006-06-27  Simon Josefsson  <jas@extundo.com>
13561
13562         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
13563         Eggert and Martin Lambers.
13564
13565 2006-06-27  Bruno Haible  <bruno@clisp.org>
13566
13567         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
13568         result to 0, not to empty.
13569         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
13570
13571 2006-06-27  Bruno Haible  <bruno@clisp.org>
13572
13573         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
13574
13575 2006-06-26  Simon Josefsson  <jas@extundo.com>
13576
13577         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
13578         present.
13579
13580 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
13581
13582         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
13583         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
13584         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
13585
13586 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
13587
13588         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
13589
13590 2006-06-26  Bruno Haible  <bruno@clisp.org>
13591
13592         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
13593
13594 2006-06-26  Bruno Haible  <bruno@clisp.org>
13595
13596         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
13597
13598 2006-06-26  Bruno Haible  <bruno@clisp.org>
13599
13600         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
13601         SGI C compiler in pre-C99 mode.
13602         Suggested by Mark D. Baushke and Larry Jones.
13603
13604 2006-06-26  Bruno Haible  <bruno@clisp.org>
13605
13606         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
13607         WCHAR_MAX.
13608         Reported by Mark D. Baushke and Larry Jones.
13609
13610 2006-06-26  Bruno Haible  <bruno@clisp.org>
13611
13612         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
13613         in pre-C99 mode.
13614         Suggested by Mark D. Baushke and Larry Jones.
13615
13616 2006-06-23  Simon Josefsson  <jas@extundo.com>
13617             Bruno Haible  <bruno@clisp.org>
13618
13619         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
13620         Emit mostlyclean-local rule.
13621         (func_emit_tests_Makefile_am): Likewise.
13622         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
13623
13624 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
13625
13626         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
13627
13628 2006-06-23  Bruno Haible  <bruno@clisp.org>
13629
13630         * tests/test-stdint.c: Update to match ISO C 99 Technical
13631         Corrigendum 1.
13632
13633 2006-06-23  Bruno Haible  <bruno@clisp.org>
13634
13635         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
13636
13637 2006-06-23  Bruno Haible  <bruno@clisp.org>
13638
13639         * lib/stdint_.h: Treat IRIX like OpenBSD.
13640
13641 2006-06-23  Bruno Haible  <bruno@clisp.org>
13642
13643         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
13644         ISO C 99 Technical Corrigendum 1.
13645
13646 2006-06-22  Simon Josefsson  <jas@extundo.com>
13647
13648         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
13649         MinGW.
13650
13651 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13652
13653         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
13654         needed.  Some compiler complained about some of them.  Problem reported
13655         by Larry Jones in
13656         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
13657
13658 2006-06-21  Simon Josefsson  <jas@extundo.com>
13659
13660         * tests/test-getaddrinfo.c: New file.
13661
13662         * modules/getaddrinfo-tests: New file.
13663
13664         * MODULES.html.sh: Add inet_pton.
13665
13666         * modules/inet_pton: New file.
13667
13668 2006-06-21  Simon Josefsson  <jas@extundo.com>
13669
13670         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
13671         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
13672         of using the (limited) gnulib implementation on Windows XP.
13673
13674         * m4/inet_pton.m4: New file.
13675
13676 2006-06-21  Simon Josefsson  <jas@extundo.com>
13677
13678         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
13679         variable.
13680
13681         * lib/socket_.h: Don't define WINVER.
13682
13683         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
13684         slightly modified to work in gnulib.
13685
13686 2006-06-21  Simon Josefsson  <jas@extundo.com>
13687
13688         * doc/gnulib.texi (Windows sockets): Add.
13689
13690 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
13691
13692         * lib/read-file.c (fread_file): Start with buffer allocation of
13693         0 bytes rather than 1 byte; this simplifies the code.
13694         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
13695         code to free buffer and save/restore errno.
13696         (internal_read_file): Remove unused local.
13697
13698 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
13699
13700         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
13701         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
13702         Problem reported by Denis Excoffier in
13703         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
13704
13705 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13706
13707         * modules/sys_socket, modules/socklen: Include sys/types since
13708         FreeBSD 4.x's sys/socket.h needs it.
13709
13710 2006-06-19  Simon Josefsson  <jas@extundo.com>
13711
13712         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
13713
13714 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13715
13716         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
13717
13718 2006-06-19  Bruno Haible  <bruno@clisp.org>
13719
13720         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
13721         and FULL_PATH_INTTYPES_H in angle brackets.
13722         Reported by Mark D. Baushke <mdb@gnu.org>.
13723
13724 2006-06-17  Eric Blake  <ebb9@byu.net>
13725
13726         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
13727         errno.
13728
13729 2006-06-17  Bruno Haible  <bruno@clisp.org>
13730
13731         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
13732         <sys/inttypes.h>.
13733
13734 2006-06-17  Bruno Haible  <bruno@clisp.org>
13735
13736         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
13737         whether errno is declared. Assume <errno.h> declares errno.
13738
13739 2006-06-17  Bruno Haible  <bruno@clisp.org>
13740
13741         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
13742
13743 2006-06-17  Bruno Haible  <bruno@clisp.org>
13744
13745         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
13746         problem on Solaris 2.5.1.
13747
13748 2006-06-16  Eric Blake  <ebb9@byu.net>
13749
13750         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
13751         * lib/unicodeio.c [!defined errno]: Likewise.
13752         * lib/strtol.c [!defined errno]: Likewise.
13753         * lib/strtod.c [!defined errno]: Likewise.
13754
13755 2006-06-15  Eric Blake  <ebb9@byu.net>
13756
13757         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
13758
13759 2006-06-15  Eric Blake  <ebb9@byu.net>
13760
13761         * config/srclist.txt (ssize_t.m4): Lose sync.
13762
13763 2006-06-15  Bruno Haible  <bruno@clisp.org>
13764
13765         * modules/stdint (Files): Include m4/full-header-path.m4,
13766         m4/size_max.m4, m4/wchar_t.m4.
13767         (Makefile.am): Many more substitutions.
13768         * modules/stdint-tests: New file.
13769         * tests/test-stdint.c: New file.
13770
13771 2006-06-15  Bruno Haible  <bruno@clisp.org>
13772
13773         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
13774         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
13775         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
13776         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
13777         gl_CHECK_TYPE_SAME): New macros.
13778
13779 2006-06-15  Bruno Haible  <bruno@clisp.org>
13780
13781         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
13782
13783 2006-06-15  Bruno Haible  <bruno@clisp.org>
13784
13785         * lib/stdint_.h: Rewritten to be fully auto-configured.
13786         Fixes bug on HP-UX/IA64.
13787
13788 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
13789
13790         * lib/getdate.y (__attribute__): Don't define if already defined.
13791         Problem reported by Larry Jones.
13792         * lib/utimens.c (__attribute__): Likewise.
13793
13794 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
13795
13796         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
13797         reported by Andreas Schwab.
13798
13799 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13800             Bruno Haible  <bruno@clisp.org>
13801
13802         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
13803         check for the declaration of strnlen and a run test that exposes the
13804         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
13805         rpl_strndup.
13806
13807 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13808             Bruno Haible  <bruno@clisp.org>
13809
13810         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
13811
13812 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13813
13814         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
13815         compile test, for Tru64 4.0D.
13816
13817 2006-05-28  Karl Berry  <karl@gnu.org>
13818
13819         * config/srclist.txt (printf-args.c): lose sync.
13820
13821 2006-05-26  Martin Lambers  <marlam@marlam.de>
13822
13823         * lib/getpass.c: Updates the test for the native W32 API, and adds
13824         missing includes, thus fixing compilation warnings.
13825
13826 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
13827
13828         * lib/exclude.c (exclude_fnmatch): New function.
13829         (excluded_file_name): Call exclude_fnmatch.
13830         * lib/exclude.h (excluded_file_name): New prototype
13831
13832 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
13833
13834         * lib/tempname.c (small_open, large_open): New macros.
13835         (__open, __open64) [!_LIBC]: Remove.
13836         (__gen_tempname): Use small_open and large_open instead of __open
13837         and __open64.  This fixes a portability bug on HP-UX 11.11i
13838         reported by Simon Wing-Tang in
13839         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
13840
13841 2006-05-24  Bruno Haible  <bruno@clisp.org>
13842
13843         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
13844         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
13845         Reported by Thorsten Maerz <torte@netztorte.de> via
13846         Aaron Stone <aaron@serendipity.cx>.
13847
13848 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13849
13850         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
13851         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
13852         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
13853         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
13854         not really conditional on the cache.
13855         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
13856
13857 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13858
13859         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
13860         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
13861         (my_usleep): Don't mishandle maximum value.
13862
13863 2006-05-19  Jim Meyering  <jim@meyering.net>
13864
13865         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
13866
13867 2006-05-17  Bruno Haible  <bruno@clisp.org>
13868
13869         Cygwin portability.
13870         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
13871
13872 2006-05-17  Bruno Haible  <bruno@clisp.org>
13873
13874         * lib/stdint_.h: Fix recognition of Cygwin.
13875
13876 2006-05-15  Bruno Haible  <bruno@clisp.org>
13877
13878         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
13879         on libtool patch by Ralf Wildenhues.
13880
13881 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13882
13883         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
13884         test for C99 conformance; (bool) 0.5 is an integer constant
13885         expression, but (bool) -0.5 is not.  Problem reported by Fedor
13886         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
13887
13888 2006-05-11  Simon Josefsson  <jas@extundo.com>
13889
13890         * m4/xvasprintf.m4: Fix obvious typo.
13891
13892 2006-05-11  Jim Meyering  <jim@meyering.net>
13893
13894         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
13895         James Lemley.
13896
13897 2006-05-10  Simon Josefsson  <jas@extundo.com>
13898
13899         * lib/md4.c: Typo fix, update copyright years.
13900         (K1, K2): Don't use L because it turn computations into 64-bit on
13901         64-bit platforms.
13902
13903 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
13904
13905         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
13906         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
13907         unwanted sign propagation, e.g., on hosts with 64-bit int.
13908         There still are some problems with reeelly weird theoretical hosts
13909         (e.g., 33-bit int) but it's not worth worrying about now.
13910         * lib/sha1.c (rol): Likewise.
13911         (K1, K2, K3, K4): Remove unnecessary L suffix.
13912
13913 2006-05-10  Bruno Haible  <bruno@clisp.org>
13914
13915         * lib/des.c: Cast to avoid warnings.
13916
13917 2006-05-09  Bruno Haible  <bruno@clisp.org>
13918
13919         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
13920         (Depends-on): Depend also on xsize, stdarg.
13921         (configure.ac): Add gl_XVASPRINTF.
13922
13923 2006-05-09  Bruno Haible  <bruno@clisp.org>
13924
13925         * m4/xvasprintf.m4: New file.
13926
13927 2006-05-09  Bruno Haible  <bruno@clisp.org>
13928
13929         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
13930         (EOVERFLOW): Define fallback value.
13931         (xstrcat): New function.
13932         (xvasprintf): Recognize the special case of a string concatenation.
13933
13934 2006-05-08  Eric Blake  <ebb9@byu.net>
13935
13936         * gnulib-tool (func_version): Base copyright year on CVS date.
13937         (func_emit_copyright_notice): New function.
13938         (func_emit_lib_Makefile_am): Use it.
13939         (func_emit_tests_Makefile_am): Likewise.
13940         (func_import): Likewise.
13941
13942 2006-05-08  Bruno Haible  <bruno@clisp.org>
13943
13944         * modules/stdarg: New file.
13945         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
13946
13947 2006-05-08  Bruno Haible  <bruno@clisp.org>
13948
13949         * m4/stdarg.m4: New file, from GNU gettext.
13950
13951 2006-05-08  Bruno Haible  <bruno@clisp.org>
13952
13953         * config/srclist.txt (build-aux/config.rpath): different from latest
13954         release.
13955
13956 2006-05-08  Bruno Haible  <bruno@clisp.org>
13957
13958         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
13959
13960 2006-05-05  Jim Meyering  <jim@meyering.net>
13961
13962         * m4/warning.m4: New file, derived from bison's file by the same name.
13963
13964 2006-05-03  Bruno Haible  <bruno@clisp.org>
13965
13966         * lib/stdint_.h: Shorter URL.
13967         * lib/inttypes.h: Likewise.
13968
13969 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13970
13971         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
13972
13973 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13974
13975         * lib/verify.h: Document the internals better.  Most of this change
13976         was written by Bruno Haible.
13977
13978 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13979
13980         * doc/verify.texi: New file, partly based on a proposal by
13981         Bruno Haible.
13982
13983 2006-05-02  Bruno Haible  <bruno@clisp.org>
13984
13985         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
13986         test from here...
13987         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
13988
13989 2006-04-29  Bruno Haible  <bruno@clisp.org>
13990
13991         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
13992         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
13993
13994 2006-04-29  Bruno Haible  <bruno@clisp.org>
13995
13996         * gnulib-tool: Make --update option actually work.
13997
13998 2006-04-29  Bruno Haible  <bruno@clisp.org>
13999
14000         * doc/gcd.texi: New file.
14001         * doc/gnulib.texi: Include it.
14002
14003 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
14004
14005         * lib/getdate.y (get_date): When adding relative date, start with the
14006         initial time, not with the result of the first mktime call.
14007
14008 2006-04-25  Bruno Haible  <bruno@clisp.org>
14009
14010         * gnulib-tool (func_import): Output the include directives in three
14011         blocks, sorted separately.
14012         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14013
14014 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14015
14016         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
14017         to define main with arguments, for C++.  Reported by Eric Blake.
14018         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
14019         Prefer 'int main ()' to 'int main (void)', for C++.
14020         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
14021         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
14022         for 'main', for C99 and C++.
14023
14024 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14025
14026         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
14027         Don't assume that exit status -1 is valid.
14028         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14029         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
14030         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
14031         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
14032         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
14033         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
14034         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
14035         functions can be used without declaring them, or that you can
14036         exit with status -1.
14037         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
14038
14039 2006-04-24  Karl Berry  <karl@gnu.org>
14040
14041         * config/srclist.txt (longdouble.m4): sync lost.
14042
14043 2006-04-24  Eric Blake  <ebb9@byu.net>
14044
14045         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
14046
14047 2006-04-24  Bruno Haible  <bruno@clisp.org>
14048
14049         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
14050         poll() implementation in AIX.
14051         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14052
14053 2006-04-24  Bruno Haible  <bruno@clisp.org>
14054
14055         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
14056         assigned exactly once.
14057
14058 2006-04-23  Claudio Fontana  <claudio@gnu.org>
14059             Bruno Haible  <bruno@clisp.org>
14060
14061         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
14062         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14063         for AM_CPPFLAGS.
14064
14065 2006-04-23  Bruno Haible  <bruno@clisp.org>
14066
14067         * modules/copy-file: Depend on unistd.
14068         * modules/execute: Likewise.
14069         * modules/fatal-signal: Likewise.
14070         * modules/findprog: Likewise.
14071         * modules/mkdtemp : Likewise.
14072         * modules/pipe: Likewise.
14073         * modules/wait-process: Likewise.
14074
14075 2006-04-23  Bruno Haible  <bruno@clisp.org>
14076
14077         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14078         condition was already detected.
14079         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14080
14081 2006-04-23  Bruno Haible  <bruno@clisp.org>
14082
14083         * lib/copy-file.c: Include <unistd.h> unconditionally.
14084         * lib/execute.c: Likewise.
14085         * lib/fatal-signal.c: Likewise.
14086         * lib/findprog.c: Likewise.
14087         * lib/mkdtemp.c: Likewise.
14088         * lib/pipe.h: Likewise.
14089         * lib/pipe.c: Likewise.
14090         * lib/wait-process.h: Likewise.
14091
14092 2006-04-23  Bruno Haible  <bruno@clisp.org>
14093
14094         * gnulib-tool (func_usage): Fix --import description. Document
14095         --update.
14096         (func_import): Create temporary file in a temporary directory, if
14097         --dry-run is specified. Silence errors from 'grep' when there are no
14098         m4 files in $m4dir.
14099         (func_create_testdir): Silence errors from 'grep' when there are no
14100         m4 files in $m4dir.
14101         Reported by Karl Berry <karl@freefriends.org>.
14102
14103 2006-04-20  Bruno Haible  <bruno@clisp.org>
14104
14105         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14106         one argument, so that the code will be portable to Autoconf 2.60.
14107         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14108         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14109         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14110
14111 2006-04-19  Derek Price  <derek@ximbiot.com>
14112             Eric Blake  <ebb9@byu.net>
14113
14114         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14115         rather than "/full/path.h".  Update comment to match.  Shorten &
14116         generalize m4_translit call via AS_TR_CPP.
14117
14118 2006-04-19  Derek Price  <derek@ximbiot.com>
14119             Eric Blake  <ebb9@byu.net>
14120
14121         * lib/inttypes.h: Correct grammar in comment.
14122
14123 2006-04-18  Derek Price  <derek@ximbiot.com>
14124             Paul Eggert  <eggert@cs.ucla.edu>
14125
14126         * modules/inttypes: New file.
14127         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14128
14129 2006-04-18  Derek Price  <derek@ximbiot.com>
14130             Paul Eggert  <eggert@cs.ucla.edu>
14131
14132         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14133         New files.
14134
14135 2006-04-18  Derek Price  <derek@ximbiot.com>
14136             Paul Eggert  <eggert@cs.ucla.edu>
14137
14138         * lib/inttypes.h: New file.
14139         * lib/strtoimax.c: Assume <inttypes.h>.
14140
14141 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14142
14143         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14144         isn't mounted.  Problem reported by Kir Kolyshkin.
14145
14146 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14147
14148         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14149         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14150         Derek R. Price.
14151         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14152         implementation.
14153
14154 2006-04-12  Eric Blake  <ebb9@byu.net>
14155
14156         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14157         is now done automatically by the corresponding Autoconf macro.
14158
14159 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14160
14161         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14162         time_r.h.
14163
14164 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14165
14166         Merge regex changes from libc, removing some of our
14167         POSIX-conformance changes that were rejected and redoing them in a
14168         less-intrusive way.
14169
14170         * lib/regcomp.c (re_compile_internal, init_dfa):
14171         Length arg is now size_t, not Idx.  All uses changed.
14172         (peek_token): Forward decl now says internal_function.
14173         (__re_error_msgid, __re_error_msgid_idx):
14174         Now static rather than extern with attribute_hidden.
14175         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14176         For some reason libc prefers K&R style defns for external functions.
14177         (regerror) [!defined _LIBC]: Likewise.
14178         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14179         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14180         (build_range_exp, build_collating_symbol):
14181         Use K&R-style defn.
14182         (re_compile_fastmap): Use '\0' to memset, not 0.
14183         (utf8_sb_map): Make the calculations more obvious.
14184         (init_dfa, parse_bracket_exp, build_charclass_op):
14185         Call calloc and cast result, as glibc does.
14186         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14187         (build_range_exp, build_collating_symbol):
14188         Now internal functions.
14189
14190         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14191
14192         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14193         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14194         Don't depend on VMS; depend on __VMS instead, for POSIX
14195         namespace cleanness.
14196         (regoff_t): Define to ssize_t, not long int.
14197
14198         Remove the REG_ macros named below.  Instead, make the old names
14199         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14200         __USE_GNU_REGEX.
14201         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14202         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14203         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14204         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14205         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14206         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14207         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14208         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14209         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14210         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14211         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14212         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14213         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14214         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14215         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14216         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14217         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14218         (REG_NREGS):
14219         Remove.  All uses replaced by the old RE_* names.
14220         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14221         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14222         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14223         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14224         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14225         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14226         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14227         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14228         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14229         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14230         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14231         Don't bother having these macros be independent of each others'
14232         values, since they no longer exist in the POSIX name space.
14233
14234         Rename the following member names back to their old names,
14235         unless !__USE_GNU_REGEX.  All uses changed back.
14236         (buffer): Renamed from re_buffer.
14237         (allocated): Renamed from re_allocated.
14238         (used): Renamed from re_used.
14239         (syntax): Renamed from re_syntax.
14240         (fastmap): Renamed from re_fastmap.
14241         (translate): Renamed from re_translate.
14242         (can_be_null): Renamed from re_can_be_null.
14243         (regs_allocated): Renamed from re_regs_allocated.
14244         (fastmap_accurate): Renamed from re_fastmap_accurate.
14245         (no_sub): Renamed from re_no_sub.
14246         (not_bol): Renamed from re_not_bol.
14247         (not_eol): Renamed from re_not_eol.
14248         (newline_anchor): Renamed from re_newline_anchor.
14249         (num_regs): Renamed from rm_num_regs.
14250         (start): Renamed from rm_start.
14251         (end): Renamed from rm_end.
14252
14253         (free_state): Move up a bit.
14254
14255         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14256         #define to be empty.
14257         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14258         when that is what is intended.
14259         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14260         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14261         (MAX): New macro.
14262         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14263         All uses changed back to re_malloc, etc.  It's now the caller's
14264         responsibility to check for overflow; all callers changed.
14265         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14266         (re_x2nrealloc): Remove.
14267         (free_state): Remove decl.
14268
14269         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14270         (re_set_registers, re_exec):
14271         Use K&R-style defn.
14272
14273         2006-01-31  Roland McGrath  <roland@redhat.com>
14274
14275         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14276         Reported by Mike Frysinger <vapier@gentoo.org>.
14277
14278         2006-01-15  Andreas Jaeger  <aj@suse.de>
14279
14280         [BZ #1950]
14281         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14282         build_wcs_upper_buffer change.
14283         (build_wcs_upper_buffer): Change return type.
14284
14285         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14286
14287         * lib/regex_internal.h: Include <stdint.h> if available.
14288
14289         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14290
14291         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14292
14293         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14294
14295         * lib/regcomp.c: Adjust for changed secondary hash function.
14296
14297         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14298
14299         * lib/regex.h: Pretty printing.
14300         Clean up namespace a bit.
14301
14302         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14303
14304         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14305         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14306
14307         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14308                     Ulrich Drepper  <drepper@redhat.com>
14309
14310         [BZ #1302]
14311         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14312         changed.
14313         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14314
14315         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14316
14317         [BZ #281]
14318         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14319         * lib/regcomp.c: Remove unnecessary uses of
14320         unsigned RE_TRANSLATE_TYPE.
14321         * lib/regex_internal.h: Likewise.
14322         * lib/regex_internal.c: Likewise.
14323         * lib/regexec.c: Likewise.
14324         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14325
14326         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14327
14328         * lib/regexec.c (find_recover_state): Remove unnecessary
14329         initialization.
14330         (transit_state_bkref): Make DFA a const pointer.
14331         (get_subexp): Likewise.
14332         (check_arrival): Likewise.
14333         (update_cur_sifted_state): Likewise.
14334         (re_search_internal): Likewise.
14335         (prune_impossible_nodes): Likewise.
14336         (acquire_init_state_context): Likewise.
14337         (proceed_next_node): Likewise.
14338         (set_regs): Likewise.
14339         (free_fail_stack_return): Likewise.
14340         (check_arrival_expand_ecl): Mark DFA parameter as const.
14341         (check_arrival_expand_ecl_sub): Likewise.
14342         (check_subexp_limits): Likewise.
14343         (sub_epsilon_src_nodes):  Likewise.
14344         (add_epsilon_src_nodes):  Likewise.
14345         (merge_state_array): Likewise.
14346         (update_regs): Likewise.
14347         (build_trtable): Likewise.
14348         (sift_states_backward): Mark MCTX parameter as const.
14349         (build_sifted_states): Likewise.
14350         (update_cur_sifted_state): Likewise.
14351         (sift_states_mkref): Likewise.
14352         (check_arrival_expand_ecl): Mark eclosure as const.
14353         (check_dst_limits_calc_pos_1): Likewise.
14354         * lib/regex_internal.h (re_match_context_t): Make dfa a const
14355         pointer.
14356
14357         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
14358
14359         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
14360         (transit_state_sb): Likewise.
14361         (transit_state_mb): Likewise.
14362         (sift_states_iter_mb): Likewise.
14363         (check_arrival_add_next_nodes): Likewise.
14364         (check_node_accept_bytes): Change first parameter to pointer-to-const.
14365         [_LIBC] (re_search_2_stub): Use mempcpy.
14366
14367         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
14368         mbrtowc for very simple UTF-8 case.
14369
14370         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
14371         a pointer-to-const.
14372         (re_acquire_state_context): Likewise.
14373         * lib/regex_internal.h: Adjust prototypes.
14374
14375         * lib/regex.c: Prevent using C++ compilers.
14376
14377         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
14378         (re_acquire_state_context): Likewise.
14379
14380 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14381
14382         * modules/regex (Depends-on): Add ssize_t.
14383
14384 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14385
14386         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
14387         translation table.
14388
14389 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14390
14391         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
14392
14393 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
14394             Bruno Haible  <bruno@clisp.org>
14395
14396         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
14397         <sys/types.h> and <inttypes.h>.
14398
14399 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14400
14401         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
14402         `__error_t_defined', so argp.h will not typedef the former.
14403
14404 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
14405
14406         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
14407         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
14408         glibc names.  Even if glibc is changed to conform to POSIX, the
14409         traditional names will be available anyway, since regex depends on
14410         the extensions module.  Also, fix a longstanding typo in the
14411         implementation of Spencer ERE test #75 from grep 2.3.  Problems
14412         reported by Emanuele Giaquinta.  Also, change sense of cached
14413         variable, so that the message makes sense.
14414
14415 2006-03-24  Simon Josefsson  <jas@extundo.com>
14416
14417         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
14418         including some doc fixes.
14419         (base64_encode_alloc): Fix +1 bug on allocation failures.
14420
14421 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14422
14423         * lib/base64.c (base64_encode): Do not read past end of array with
14424         unsanitized input on systems with CHAR_BIT > 8.
14425
14426 2006-03-24  Eric Blake  <ebb9@byu.net>
14427
14428         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
14429
14430 2006-03-22  Karl Berry  <karl@gnu.org>
14431
14432         * config/srclist.txt (*setenv.[ch]): get from coreutils.
14433         * config/srclistvars.sh (COREUTILS): new var.
14434
14435 2006-03-17  Jim Meyering  <jim@meyering.net>
14436
14437         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
14438         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
14439
14440 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14441
14442         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
14443         no longer needs it.  Instead, check that regoff_t is as least
14444         as wide as ptrdiff_t.
14445
14446         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
14447         so that our regex.h stays compatible with the installed regex.
14448         This is helpful for installers who configure --without-included-regex.
14449         Problem reported by Emanuele Giaquinta.
14450
14451 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14452
14453         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
14454         Typedef to long int, not to off_, as POSIX will likely change
14455         in that direction.
14456
14457 2006-03-15  Eric Blake  <ebb9@byu.net>
14458
14459         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
14460
14461 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14462
14463         * lib/argp-help.c (validate_uparams): Fix typo
14464         * lib/argp-parse.c (argp_default_options): Consistently begin help
14465         messages with a lowercase letter.
14466
14467 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
14468
14469         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
14470         overrun buffers and shouldn't be used (much as gets shouldn't be
14471         used).
14472         * lib/time_r.c (asctime_r, ctime_r): Likewise.
14473
14474 2006-03-08  Simon Josefsson  <jas@extundo.com>
14475
14476         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
14477         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14478
14479 2006-03-08  Simon Josefsson  <jas@extundo.com>
14480
14481         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
14482         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14483
14484 2006-03-08  Simon Josefsson  <jas@extundo.com>
14485
14486         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
14487         signal that configure disabled the device.
14488
14489 2006-03-08  Simon Josefsson  <jas@extundo.com>
14490
14491         * build-aux/maint.mk: Fix refresh-po, to handle no translated
14492         languages.
14493
14494 2006-03-07  Simon Josefsson  <jas@extundo.com>
14495
14496         * modules/getopt (Depends-on): Add unistd.
14497
14498         * modules/unistd: New file.
14499
14500 2006-03-07  Simon Josefsson  <jas@extundo.com>
14501
14502         * modules/gc-random: New file.
14503
14504 2006-03-07  Simon Josefsson  <jas@extundo.com>
14505
14506         * m4/unistd_h.m4: New file.
14507
14508 2006-03-07  Simon Josefsson  <jas@extundo.com>
14509
14510         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
14511         test to be side-effect free by storing the result in the cache
14512         variable gl_cv_lib_readline, and moving the assignment of
14513         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
14514         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14515
14516 2006-03-07  Simon Josefsson  <jas@extundo.com>
14517
14518         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
14519         error on missing devices (the functions will return an error).
14520
14521         * m4/gc.m4: Move random stuff to gc-random.m4
14522
14523 2006-03-07  Simon Josefsson  <jas@extundo.com>
14524
14525         * lib/unistd_.h: New file.
14526
14527 2006-03-07  Simon Josefsson  <jas@extundo.com>
14528
14529         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
14530
14531 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14532
14533         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
14534         Problem reported by Juan Manuel Guerrero.
14535
14536 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14537
14538         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
14539         the unistd module.
14540         * lib/getlogin_r.c: Likewise.
14541         * lib/getlogin_r.h: Likewise.
14542         * lib/glob.c: Likewise.
14543         * lib/pagealign_alloc.c: Likewise.
14544         * lib/unistd_.h: Remove; no longer needed.
14545
14546 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14547
14548         * MODULES.html.sh (Support for systems lacking POSIX:2001):
14549         Add unistd.
14550         * modules/c-stack (Depends-on): Add unistd.
14551         * modules/getlogin_r: Likewise.
14552         * modules/glob: Likewise.
14553         * modules/pagealign_alloc: Likewise.
14554         * modules/unistd (Files): Remove lib/unistd_.h.
14555         (EXTRA_DIST): Remove.
14556         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
14557         need unistd_.h.
14558         (MOSTLYCLEANFILES): Remove unistd.h-t.
14559
14560 2006-03-03  Simon Josefsson  <jas@extundo.com>
14561
14562         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
14563
14564 2006-03-03  Simon Josefsson  <jas@extundo.com>
14565
14566         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
14567         libidn and bison.
14568
14569 2006-03-03  Simon Josefsson  <jas@extundo.com>
14570
14571         * build-aux/maint.mk: Add indent target.
14572
14573 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
14574
14575         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
14576         our replacement poll.h in any case, to avoid a differing
14577         declaration from a system header.  Seen on AIX.
14578
14579 2006-03-01  Simon Josefsson  <jas@extundo.com>
14580
14581         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
14582         <kasal@ucw.cz>.
14583
14584 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * modules/gettime (Depends-on): Add extensions module.
14587         * modules/nanosleep (Depends-on): Likewise.
14588         * modules/settime (Depends-on): Likewise.
14589
14590 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14591
14592         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
14593         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
14594         pedantically.
14595         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14596         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
14597
14598         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
14599         not "==".  Reported by Ralf Wildenhues.
14600
14601 2006-03-01  Karl Berry  <karl@gnu.org>
14602
14603         * doc/Copyright/request-*: new files, synced from gnuorg.
14604
14605 2006-03-01  Karl Berry  <karl@gnu.org>
14606
14607         * config/srclist.txt (Copyright/*): new entries.
14608
14609 2006-02-28  Simon Josefsson  <jas@extundo.com>
14610
14611         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
14612
14613 2006-02-27  Simon Josefsson  <jas@extundo.com>
14614
14615         * lib/base64.h: Indent #define's.  From Jim Meyering
14616         <jim@meyering.net>.
14617
14618 2006-02-27  Jim Meyering  <jim@meyering.net>
14619
14620         Revert the change of 2006-02-24, so these files can continue
14621         to be sync'd from gettext.
14622         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
14623         of `config.h'.
14624
14625 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14626
14627         * modules/intprops: New file.
14628         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
14629         Add intprops.
14630         * modules/getloadavg (Files): Remove lib/intprops.h.
14631         (Depends-on): Add intprops.
14632         * modules/human: Likewise.
14633         * modules/inttostr: Likewise.
14634         * modules/openat: Likewise.
14635         * modules/sig2str: Likewise.
14636         * modules/userspec: Likewise.
14637         * modules/utimecmp: Likewise.
14638         * modules/xnanosleep: Likewise.
14639         * modules/xstrtol: Likewise.
14640
14641 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
14642
14643         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
14644         * modules/lock-tests (TESTS): Use $(EXEEXT).
14645         * modules/tls-tests: Likewise.
14646         * modules/argp-tests: Likewise.
14647         (check_PROGRAMS): New var, replacing...
14648         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
14649
14650 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14651
14652         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
14653         `config.h'.
14654
14655 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
14658
14659 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14660
14661         Sync from coreutils.
14662         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
14663         gl_CHDIR_SAFER.
14664
14665 2006-02-22  Jim Meyering  <jim@meyering.net>
14666
14667         Sync from coreutils.
14668         * m4/chdir-safer.m4: New file.
14669
14670 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
14671
14672         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
14673         AT_FDCWD exceeds INT_MAX.
14674         * lib/openat.h (AT_FDCWD): Likewise.
14675
14676 2006-02-17  Eric Blake  <address@hidden>
14677
14678         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
14679
14680 2006-02-16  Simon Josefsson  <jas@extundo.com>
14681
14682         * modules/getaddrinfo (Depends-on): Add sys_socket.
14683
14684 2006-02-15  Simon Josefsson  <jas@extundo.com>
14685
14686         * build-aux/maint.mk: Add dsyntax-check rule.
14687
14688 2006-02-15  Eric Blake  <ebb9@byu.net>
14689
14690         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
14691         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
14692         'present but cannot compile' warnings on cygwin.
14693         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
14694         use ws2tcpip.h if sys/socket.h works.
14695         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
14696         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
14697
14698 2006-02-14  Simon Josefsson  <jas@extundo.com>
14699
14700         * modules/maintainer-makefile (Files): Rename.
14701
14702         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
14703         and (the local) Makefile.cfg to maint-cfg.mk.
14704
14705         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
14706         to the latter.
14707
14708         * modules/maintainer-makefile: New module.
14709
14710         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
14711         severaly stripped to make it possible to build it up from scratch
14712         with reliable tests.
14713
14714         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
14715         fixes to permit overriding the default actions when configure and
14716         makefile are not available.
14717
14718 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
14719
14720         Sync from coreutils.
14721         * modules/lstat (Depends-on): Don't depend on xalloc.
14722         (License): Change from GPL to LGPL, since this is now simply a
14723         replacement for a libc function.
14724
14725 2006-02-14  Jim Meyering  <jim@meyering.net>
14726
14727         Sync from coreutils.
14728
14729         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
14730         failure on deficient systems, and simplify gnulib lgpl dependencies.
14731         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
14732         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
14733
14734         * lib/xalloc-die.c: Remove unused definition of N_.
14735
14736 2006-02-14  Jim Meyering  <jim@meyering.net>
14737
14738         Sync from coreutils.
14739         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
14740         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
14741         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
14742         double-quote uses of that variable, to accommodate the rare case in
14743         which getmntent is available in none of the libraries checked.  This
14744         happens at least on FreeBSD 5.0.
14745
14746 2006-02-13  Simon Josefsson  <jas@extundo.com>
14747
14748         * gnulib-tool (Usage): Fix --import, from
14749         karl@freefriends.org (Karl Berry).
14750
14751 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14752
14753         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
14754
14755 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
14756
14757         * lib/argp-namefrob.h: Restore changes accidentally lost during the
14758         "autoupdate" on 2005-12-12.
14759
14760 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14761
14762         * modules/closeout (Depends-on): Remove atexit.
14763
14764 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14765
14766         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
14767         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
14768
14769 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
14770
14771         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
14772         __EXTENSIONS__ if this causes compilation to fail.  Problem
14773         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
14774         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
14775
14776 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
14777
14778         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
14779         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
14780         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
14781         All uses changed.
14782
14783 2006-01-26  Simon Josefsson  <jas@extundo.com>
14784
14785         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
14786         prototype is visible on mingw32.
14787
14788         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
14789         for mingw32.
14790
14791         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
14792         mingw32).
14793
14794 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
14795
14796         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
14797         attempt to open for write; this always fails, at least on POSIX
14798         hosts.  This reinstates the 2006-01-09 change, which was
14799         inadvertently removed.
14800
14801 2006-01-26  Bruno Haible  <bruno@clisp.org>
14802
14803         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
14804         Reported by Paul Eggert.
14805
14806 2006-01-26  Bruno Haible  <bruno@clisp.org>
14807             Paul Eggert  <eggert@cs.ucla.edu>
14808
14809         * lib/stdbool_.h (_Bool)
14810         [(! (defined __cplusplus || defined __BEOS__)
14811           && !defined __GNUC__
14812           && !(defined __HP_cc || defined __xlc__
14813                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
14814                || defined __sgi))]:
14815         #define to signed char in these cases too; this simplifies
14816         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
14817         etc., separately) and makes it more conservative.
14818
14819 2006-01-25  Simon Josefsson  <jas@extundo.com>
14820
14821         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
14822         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
14823         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
14824
14825 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14826
14827         * lib/argp-namefrob.h: Bugfix. Remove stray #
14828
14829 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
14830
14831         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
14832         so that we test the test.
14833         Check for yet another HP-UX cc bug involving *bool |= bool.
14834
14835 2006-01-25  Karl Berry  <karl@gnu.org>
14836
14837         * config/srclist.txt (vasnprintf.c): sync lost.
14838
14839 2006-01-25  Jim Meyering  <jim@meyering.net>
14840
14841         Sync from the stable (b5) branch of coreutils:
14842
14843         * lib/fts.c (fts_children): Don't let close() clobber errno from
14844         failed fchdir().
14845
14846         * lib/fts.c (fts_stat): When following a symlink-to-directory,
14847         don't necessarily interpret stat-fails+lstat-succeeds as indicating
14848         a dangling symlink.  That can also happen at least for ELOOP.
14849         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
14850         FYI, this bug predates the inclusion of fts.c in coreutils.
14851
14852         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
14853         in their own block, so pre-c99 compilers don't object.
14854
14855         Avoid the double-free (first in fts_read, second in fts_close) that
14856         would occur when an `active' directory is made inaccessible (e.g.,
14857         via chmod a-x) during a traversal.
14858         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
14859         before returning.  Reproduce this failure by
14860         mkdir -p a/b; cd a; chmod a-x . b
14861         Reported by Stavros Passas.
14862
14863 2006-01-25  Jim Meyering  <jim@meyering.net>
14864
14865         * lib/fileblocks.c: Remove more useless parentheses.
14866         * lib/readutmp.h: Likewise.
14867
14868 2006-01-25  Bruno Haible  <bruno@clisp.org>
14869
14870         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
14871         warnings.
14872         Reported by Paul Eggert.
14873
14874 2006-01-25  Bruno Haible  <bruno@clisp.org>
14875
14876         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
14877         rid of a trap command. For Solaris sh.
14878         Reported by Mark D. Baushke <mdb@gnu.org>.
14879
14880 2006-01-24  Simon Josefsson  <jas@extundo.com>
14881
14882         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
14883         Bruno.
14884
14885 2006-01-24  Karl Berry  <karl@gnu.org>
14886
14887         * config/srclist.txt (argp-namefrob.h): sync lost.
14888
14889 2006-01-24  Jim Meyering  <jim@meyering.net>
14890
14891         * modules/openat (Files): Add lib/intprops.h.
14892         From Mark D. Baushke.
14893
14894 2006-01-24  Jim Meyering  <jim@meyering.net>
14895
14896         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
14897         Reported by Mark D. Baushke.
14898
14899 2006-01-24  Jim Meyering  <jim@meyering.net>
14900
14901         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
14902
14903 2006-01-24  Bruno Haible  <bruno@clisp.org>
14904
14905         * modules/strnlen (Maintainer): Change from glibc to all.
14906
14907 2006-01-24  Bruno Haible  <bruno@clisp.org>
14908
14909         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
14910         Patch by Paul Eggert.
14911
14912 2006-01-24  Bruno Haible  <bruno@clisp.org>
14913
14914         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
14915         already has it.
14916         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
14917         2005-11-26.
14918
14919         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
14920         'signed char' to avoid problems with the built-in _Bool type.
14921         Reported by Paul Eggert on 2005-11-26.
14922
14923 2006-01-24  Bruno Haible  <bruno@clisp.org>
14924
14925         * gnulib-tool (func_import): Avoid constructing complicated sed
14926         expressions inside backquote.
14927         Report and solution by Mark D. Baushke <mdb@gnu.org>.
14928
14929 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
14930
14931         These changes imported from libc.
14932         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
14933         test and two separate function calls.
14934         * lib/strndup.c (__strndup): Add libc_hidden_def.
14935
14936 2006-01-23  Simon Josefsson  <jas@extundo.com>
14937
14938         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
14939         Remove the test_*_SOURCES variable: automake infers it by default.
14940         * modules/tls-tests: Likewise.
14941
14942 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14943
14944         Work around porting bugs reported by Dieter in
14945         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
14946         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
14947         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
14948         Include "getopt.h" first, to check interface.
14949         (getenv): Declare only if defined HAVE_DECL_GETENV &&
14950         !HAVE_DECL_GETENV.
14951         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
14952         (__strndup): Revert to K&R-style function dfns, the glibc style.
14953         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
14954         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
14955         Include strnlen.h first, to get prototype properly.
14956         (strnlen): Renamed from __strnlen.
14957         Remove weak alias.
14958
14959 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14960
14961         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
14962
14963 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14964
14965         * config/srclist.txt: Adjust to reflect glibc reorganization.
14966         This affects only comments.
14967
14968 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14969
14970          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
14971          Reported by Bruce Korb <bkorb@gnu.org>.
14972
14973 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
14974
14975         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
14976         to pacify gcc -Wswitch-default.
14977
14978 2006-01-22  Bruno Haible  <bruno@clisp.org>
14979
14980         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
14981         temporary buffer for sprintf, take into account the precision also
14982         for 'd', 'i', 'u', 'o', 'x', 'X'.
14983
14984 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14985
14986         * modules/argp-tests: New module
14987         * tests/test-argp.c: New file
14988         * tests/test-argp-2.sh: New file
14989
14990 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14991
14992         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
14993         (__argp_base_name): Removed
14994         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
14995         typo.
14996         (__argp_base_name): Provide macro definition or extern declaration
14997         depending on the configuration
14998
14999 2006-01-20  Simon Josefsson  <jas@extundo.com>
15000
15001         * modules/inet_ntop (Depends-on): Depend on sys_socket.
15002
15003 2006-01-20  Simon Josefsson  <jas@extundo.com>
15004
15005         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
15006
15007 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15008
15009         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
15010         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
15011         Suggested by Bruno Haible.
15012
15013 2006-01-20  Karl Berry  <karl@gnu.org>
15014
15015         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
15016         until changes propagate, I guess.
15017
15018 2006-01-19  Simon Josefsson  <jas@extundo.com>
15019
15020         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
15021
15022 2006-01-19  Simon Josefsson  <jas@extundo.com>
15023
15024         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
15025
15026 2006-01-19  Simon Josefsson  <jas@extundo.com>
15027
15028         * gnulib-tool: Set check_PROGRAMS.
15029
15030         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15031         modules/des-tests, modules/gc-arcfour-tests,
15032         modules/gc-arctwo-tests, modules/gc-des-tests,
15033         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15034         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15035         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15036         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15037         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15038         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
15039         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
15040         test_*_SOURCES.
15041
15042 2006-01-18  Simon Josefsson  <jas@extundo.com>
15043
15044         * modules/socklen (Depends-on): Depend on sys_socket.
15045
15046 2006-01-18  Simon Josefsson  <jas@extundo.com>
15047
15048         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15049         modules/des-tests, modules/gc-arcfour-tests,
15050         modules/gc-arctwo-tests, modules/gc-des-tests,
15051         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15052         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15053         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15054         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15055         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15056         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
15057         $(EXEEXT) to automake TESTS variable, for mingw32.
15058
15059 2006-01-17  Simon Josefsson  <jas@extundo.com>
15060
15061         * modules/socklen (Include): Need sys/socket.h.
15062
15063 2006-01-17  Bruno Haible  <bruno@clisp.org>
15064
15065         * modules/ssize_t (Include): Add <sys/types.h>.
15066
15067 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15068
15069         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15070         it's not portable and it doesn't work with cross-compiles.
15071         Problem reported by Bruno Haible.  Fix missing-$ typo in
15072         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15073         -zignore from being used with Sun's C compiler.
15074
15075 2006-01-12  Simon Josefsson  <jas@extundo.com>
15076
15077         * lib/base64.c: Fix warning, reported by Bruno Haible
15078         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15079
15080 2006-01-12  Bruno Haible  <bruno@clisp.org>
15081
15082         * modules/ldd: New file.
15083         * build-aux/ldd.sh.in: New file.
15084         * MODULES.html.sh (Support for building libraries and executables): Add
15085         ldd.
15086
15087 2006-01-12  Bruno Haible  <bruno@clisp.org>
15088
15089         * m4/ldd.m4: New file.
15090
15091 2006-01-12  Bruno Haible  <bruno@clisp.org>
15092
15093         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15094         endless loop while replacing $auxdir with build-aux.
15095
15096 2006-01-11  Simon Josefsson  <jas@extundo.com>
15097
15098         * lib/stdint_.h (SIZE_MAX): Add missing (.
15099
15100 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15101
15102         Sync from coreutils.
15103         * lib/md5.c: Fix commentary typos.
15104         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15105         * lib/md5.h (__attribute__): Remove; unused.
15106         * lib/sha1.c: Fix commentary to match md5 better.
15107         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15108         so that we don't need to worry about alignment.  All uses changed.
15109         This merges the 2005-10-28 md5 change into sha1.
15110
15111 2006-01-11  Jim Meyering  <jim@meyering.net>
15112
15113         Sync from coreutils.
15114         * lib/md5.c (OP): Fix spacing.
15115
15116 2006-01-11  Bruno Haible  <bruno@clisp.org>
15117
15118         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15119         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15120         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15121
15122 2006-01-11  Bruno Haible  <bruno@clisp.org>
15123
15124         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15125         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15126         the "early" section as well.
15127
15128 2006-01-11  Bruno Haible  <bruno@clisp.org>
15129
15130         Avoid "ar: no archive members specified" error on MacOS X.
15131         * gnulib-tool (func_modules_add_dummy): New function.
15132         (func_import, func_create_testdir): Invoke it.
15133
15134 2006-01-11  Bruno Haible  <bruno@clisp.org>
15135
15136         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15137         with $auxdir in AC_CONFIG_FILES statements.
15138
15139 2006-01-11  Bruno Haible  <bruno@clisp.org>
15140
15141         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15142         Initialize also noinst_HEADERS to empty.
15143
15144 2006-01-11  Bruno Haible  <bruno@clisp.org>
15145
15146         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15147         variables.
15148         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15149         autoreconf.
15150
15151 2006-01-11  Bruno Haible  <bruno@clisp.org>
15152
15153         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15154         overridable by the user.
15155         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15156
15157 2006-01-10  Simon Josefsson  <jas@extundo.com>
15158
15159         * modules/sys_socket: New file.
15160
15161 2006-01-10  Simon Josefsson  <jas@extundo.com>
15162
15163         * m4/sys_socket_h.m4: New file.
15164
15165 2006-01-10  Simon Josefsson  <jas@extundo.com>
15166
15167         * lib/socket_.h: New file.
15168
15169 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15170
15171         * modules/readutmp (Maintainer): Add myself.
15172
15173 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15174
15175         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15176         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15177         People who are still concerned with buggy memcmp implementations
15178         can invoke gl_FUNC_MEMCMP themselves.
15179
15180 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15181
15182         * lib/regex_internal.h (BITSET_WORD_BITS):
15183         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15184         preprocessor mishandles large unsigned values as if they were signed.
15185         Problem reported by Claudio Fontana in
15186         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15187
15188 2006-01-10  Jim Meyering  <jim@meyering.net>
15189
15190         Avoid the double-free (first in fts_read, second in fts_close) that
15191         would occur when an `active' directory is made inaccessible (e.g.,
15192         via chmod a-x) during a traversal.
15193         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15194         before returning.  Reproduce this failure by
15195         mkdir -p a/b; cd a; chmod a-x . b
15196         Reported by Stavros Passas.
15197
15198         Sync from coreutils.
15199         * lib/sha1.c: Tweak grammar in a comment.
15200
15201 2006-01-10  Jim Meyering  <jim@meyering.net>
15202
15203         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15204         Patch by Joerg Sonnenberger.
15205
15206 2006-01-10  Bruno Haible  <bruno@clisp.org>
15207
15208         * modules/readutmp: Depend on module free.
15209         * modules/strtok_r: Depend on module restrict.
15210
15211 2006-01-10  Bruno Haible  <bruno@clisp.org>
15212
15213         * modules/gettext (configure.ac): Add an invocation of
15214         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15215
15216 2006-01-10  Bruno Haible  <bruno@clisp.org>
15217
15218         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15219         Reported by Werner Lemberg <wl@gnu.org>.
15220
15221 2006-01-10  Bruno Haible  <bruno@clisp.org>
15222
15223         * lib/localcharset.c: Update from GNU gettext.
15224
15225 2006-01-10  Bruno Haible  <bruno@clisp.org>
15226
15227         * lib/argp.h (__const): Remove macro. Use const instead.
15228         * lib/argp-fmtstream.h (__const): Likewise.
15229         * lib/glob_.h (__const): Remove macro.
15230         * lib/glob-libc.h: Use const instead of __const.
15231
15232 2006-01-10  Bruno Haible  <bruno@clisp.org>
15233
15234         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15235         variable.
15236         Needed to avoid an automake error regarding the 'gettext' module.
15237
15238 2006-01-09  Simon Josefsson  <jas@extundo.com>
15239
15240         * modules/inet_ntop (Depends-on): Add restrict.
15241
15242 2006-01-09  Simon Josefsson  <jas@extundo.com>
15243
15244         * modules/gc-rijndael-tests (License): Put under LGPL.
15245
15246         * modules/gc-des-tests (License): Likewise.
15247
15248         * modules/gc-arcfour-tests (License): Likewise.
15249
15250         * modules/gc-arctwo-tests (License): Likewise.
15251
15252         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15253
15254         * modules/gc-hmac-sha1-tests (Files): Likewise.
15255
15256         * modules/gc-hmac-md5-tests (License): Likewise.
15257
15258         * modules/gc-sha1-tests (License): Likewise.
15259
15260         * modules/gc-md5-tests (License): Likewise.
15261
15262         * modules/gc-md4-tests (License): Likewise.
15263
15264         * modules/gc-md2-tests (License): Likewise.
15265
15266         * modules/gc-tests (License): Likewise.
15267
15268         * modules/des-tests (License): Likewise.
15269
15270         * modules/md4-tests (License): Likewise.
15271
15272         * modules/md2-tests (License): Likewise.
15273
15274 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15275
15276         Sync from coreutils:
15277
15278         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15279         * modules/lib-ignore: New file.
15280         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15281         chdir-safer.m4, lchmod.m4.
15282         * modules/openat: Add mkdirat.c, openat-priv.h.
15283
15284 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15285
15286         Sync from coreutils.
15287         * m4/lib-ignore.m4: New file.
15288         * m4/lchmod.m4: New file.
15289
15290 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15291
15292         Sync from coreutils.
15293         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15294         for write access: POSIX says that must fail.
15295         * lib/fts.c (diropen): Likewise.
15296         * lib/save-cwd.c (save_cwd): Likewise.
15297         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15298         well, for minor improvements on hosts that lack O_DIRECTORY.
15299         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15300         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15301         Fall back on chown if open failed with EACCES.
15302
15303         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15304         Report an error at compile-time if only a 1-second nominal clock
15305         resolution is found.
15306
15307         * lib/lchmod.h: New file.
15308         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15309         (make_dir_parents): Use lchown rather than chown, and
15310         lchmod rather than chmod.
15311
15312         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15313         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15314         "proc" reported by n0dalus.
15315
15316         * lib/mountlist.c: Include <limits.h>.
15317         (dev_from_mount_options)
15318         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15319         New function.  It no longer assumes "dev=" has the System V meaning
15320         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15321         (read_file_system_list)
15322         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15323         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15324         dev= in that case.
15325
15326         * lib/posixtm.h (PDS_PRE_2000): New macro.
15327         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15328         allow_century.  All usages changed.  Reject dates outside the range
15329         1969-1999 if PDS_PRE_2000 is used.
15330
15331 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15332
15333         Sync from coreutils.
15334         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15335         (Time of day items): Mention the possibility of leap seconds.
15336         Problem reported by Dr. David Alan Gilbert.
15337
15338 2006-01-09  Jim Meyering  <jim@meyering.net>
15339
15340         Sync from coreutils.
15341
15342         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15343
15344         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15345
15346         * lib/modechange.c (mode_compile): Reject an invalid mode string
15347         that starts with an octal digit.  From Andreas Gruenbacher.
15348
15349         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
15350         and dup to open_safer and dup_safer, respectively.
15351         (openat_permissive): Fix typo in comment.
15352
15353         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
15354         "gettext.h"; either no longer needed or are guaranteed by openat.h.
15355         (_): Remove; no longer needed.
15356         (openat): Renamed from rpl_openat; no need for rpl_openat
15357         since openat.h renames openat for us.
15358         Replace most of the body with a call to openat_permissive,
15359         to avoid duplicate code.
15360         Port to (probably hypothetical) environments were mode_t is
15361         wider than int.
15362         (openat_permissive): Require mode arg, so that we can check
15363         types better.  Put it just after flags.  Change cwd failure
15364         indicator from pointer-to-bool to pointer-to-errno-value.
15365         All callers changed.
15366         Invoke openat_save_fail and/or openat_restore_fail if
15367         cwd_errno is null, so that openat can call us.
15368         (openat_permissive, fdopendir, fstatat, unlinkat):
15369         Simplify errno handling to avoid some duplicate code,
15370         as it's OK to set errno on success.
15371         * lib/openat.h: Revamp code so that function macros depend on
15372         __OPENAT_PREFIX only, not also on AT_FDCWD.
15373         (openat_ro): Remove.  Caller changed to use openat_permissive.
15374         (openat_permissive): Now a macro, if not a function.
15375         (openat_restore_fail, openat_save_fail): Now always functions,
15376         since mkdirat needs them even if __OPENAT_PREFIX is defined.
15377
15378         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
15379         and openat.c.
15380         * lib/mkdirat.c: Include openat-priv.h.
15381         Remove definitions of macros defined therein.
15382         * lib/openat.c: Likewise.
15383
15384         * lib/mkdirat.c (mkdirat): New file and function.
15385         * lib/openat.h (mkdirat): Declare.
15386
15387         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
15388
15389         * lib/openat.h (openat_permissive): Declare.
15390         (openat_ro): Define.
15391
15392         * lib/openat.c (EXPECTED_ERRNO): New macro.
15393         (openat_permissive): New function -- used in remove.c rewrite.
15394         (all functions): Set errno just before returning, only if there
15395         was an actual failure.
15396         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
15397
15398         Emulate openat-family functions using Linux's procfs, if possible.
15399         Idea and some code based on Ulrich Drepper's glibc changes.
15400
15401         * lib/openat.c: (BUILD_PROC_NAME): New macro.
15402         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
15403         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
15404         before falling back on save_cwd and restore_cwd.
15405         (fdopendir, fstatat, unlinkat): Likewise.
15406
15407         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
15408         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
15409
15410         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
15411         as second argument to va_arg.  Otherwise, some versions of gcc
15412         warn that `if this code is reached, the program will abort'.
15413
15414 2006-01-09  Jim Meyering  <jim@meyering.net>
15415
15416         Sync from coreutils.
15417         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
15418         Require openat-priv.h.
15419
15420 2006-01-09  Bruno Haible  <bruno@clisp.org>
15421
15422         * modules/strnlen (Include): Use strnlen.h.
15423
15424 2006-01-09  Bruno Haible  <bruno@clisp.org>
15425
15426         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
15427
15428 2006-01-09  Bruno Haible  <bruno@clisp.org>
15429
15430         * lib/sysexit_.h (EX_OK): New macro.
15431         Suggested by Martin Lambers <marlam@marlam.de>.
15432
15433 2006-01-09  Bruno Haible  <bruno@clisp.org>
15434
15435         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
15436         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
15437
15438 2006-01-09  Bruno Haible  <bruno@clisp.org>
15439
15440         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
15441         numbers.
15442
15443 2006-01-09  Bruno Haible  <bruno@clisp.org>
15444
15445         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
15446         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
15447         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
15448         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
15449
15450 2006-01-09  Bruno Haible  <bruno@clisp.org>
15451
15452         * build-aux/javacomp.sh.in: New file, moved from lib/.
15453         * modules/javacomp-script (Files): Update.
15454         (configure.ac): Add AC_CONFIG_FILES invocation.
15455         (EXTRA_DIST): Remove variable.
15456
15457         * build-aux/javaexec.sh.in: New file, moved from lib/.
15458         * modules/javaexec (Files): Update.
15459         (configure.ac): Add AC_CONFIG_FILES invocation.
15460         (EXTRA_DIST): Remove javaexec.sh.in.
15461
15462         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
15463         * modules/csharpcomp-script (Files): Update.
15464         (configure.ac): Add AC_CONFIG_FILES invocation.
15465         (EXTRA_DIST): Remove variable.
15466
15467         * build-aux/csharpexec.sh.in: New file, moved from lib/.
15468         * modules/csharpexec (Files): Update.
15469         (configure.ac): Add AC_CONFIG_FILES invocation.
15470         (EXTRA_DIST): Remove csharpexec.sh.in.
15471
15472 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15473
15474         Sync from coreutils.
15475
15476         Add POSIX ACL support
15477         * lib/acl.h (copy_acl, set_acl): Add declarations.
15478         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
15479         systems other than Linux.
15480         (chmod_or_fchmod): New function: use fchmod when possible,
15481         and chmod otherwise.
15482         (file_has_acl): Add a POSIX ACL implementation, with a
15483         Linux-specific subcase.
15484         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
15485         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
15486         acls are unsupported.
15487         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
15488         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
15489         are unsupported.
15490
15491 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15492
15493         Sync from coreutils.
15494         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
15495
15496 2006-01-07  Bruno Haible  <bruno@clisp.org>
15497
15498         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
15499         gl_EARLY.
15500
15501 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15502
15503         * lib/strftime.c (tzname): Don't declare if it is already #defined.
15504         Problem reported for Mingw by Mark Junker.
15505
15506 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15507
15508         * README: Gnulib normally doesn't generate a tarball.
15509
15510 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
15511
15512         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
15513         long int, not int, for nanosecond counts, so that people who are
15514         used to POSIX struct timespec won't be surprised.  Reported by Jim
15515         Meyering.
15516
15517 2005-12-28  Bruno Haible  <bruno@clisp.org>
15518
15519         * build-aux/config.rpath: Update from GNU gettext.
15520
15521 2005-12-16  Jim Meyering  <jim@meyering.net>
15522
15523         * modules/fprintftime: New module.
15524         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
15525
15526 2005-12-16  Jim Meyering  <jim@meyering.net>
15527
15528         * m4/fprintftime.m4: New file.
15529
15530 2005-12-16  Jim Meyering  <jim@meyering.net>
15531
15532         * lib/fprintftime.c, lib/fprintftime.h: New files.
15533
15534 2005-12-15  Simon Josefsson  <jas@extundo.com>
15535
15536         * modules/socklen (configure.ac): Fix M4 macro name, to align with
15537         new m4/socklen.m4.
15538
15539 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15540
15541         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
15542         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
15543
15544 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15545
15546         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
15547         * lib/argp-help.c (fill_in_uparams): Check if the constructed
15548         struct uparams is valid. Fall back to the default values if it is
15549         not.
15550
15551 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15552
15553         * modules/argp (Files): Add argp-pin.c
15554         (Depends-on): dirname
15555         (lib_SOURCES): Add argp-pin.c
15556
15557 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15558
15559         * m4/argp.m4:  Check if program_invocation_name and
15560         program_invocation_short_name are declared and define appropriate
15561         macros if they are not.
15562
15563 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15564
15565         * lib/argp-help.c (__argp_base_name): New function
15566         (__argp_short_program_name): Rewrite using __argp_base_name
15567         * lib/argp-namefrob.h: Define program_invocation_name and
15568         program_invocation_short_name if requested
15569         (__argp_base_name): Add prototype
15570         * lib/argp-parse.c (argp_def): Use gettext wrappers
15571         (argp_default_parser): Use __argp_base_name
15572         * lib/argp-pin.c: New file. Defines program_invocation_name and
15573         program_invocation_short_name on systems that lack them.
15574
15575 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15576
15577         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
15578         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15579         porting problem reported by Georg Schwarz in
15580         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15581
15582 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15583
15584         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
15585         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15586         porting problem reported by Georg Schwarz in
15587         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15588
15589 2005-12-05  Bruno Haible  <bruno@clisp.org>
15590
15591         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
15592         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
15593         Reported by Mark Junker <mjscod@gmx.de>.
15594
15595 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
15596
15597         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
15598         Use implementation from Albert Chin, with some
15599         comments/corrections by Stepan Kasal and myself.
15600
15601 2005-12-02  Bruno Haible  <bruno@clisp.org>
15602
15603         * gnulib-tool (func_import): Accept GPLed build tool modules when
15604         --lgpl is given.
15605         * modules/csharpcomp-script: New file.
15606         * modules/csharpcomp: Depend on it.
15607         * modules/javacomp-script: New file.
15608         * modules/javacomp: Depend on it.
15609         Suggested by Simon Josefsson.
15610
15611 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
15612
15613         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
15614         statement, to work around an HP-UX 10.20 compiler bug reported by
15615         Peter O'Gorman.
15616
15617 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15618
15619         * modules/savedir (Depends-on): Add openat.
15620
15621 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15622
15623         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
15624         (uintmax_t) [defined uintmax_t]: Do not declare.
15625         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
15626         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
15627         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
15628         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
15629         sake of portability to weird hosts that C allows (though we don't
15630         know of any practical examples).
15631
15632         * lib/savedir.h (fdsavedir): New decl.
15633         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
15634         contains most of the former guts of savedir.
15635         (savedir): Use savedirstream.
15636         Include "openat.h".
15637
15638 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15639
15640         * modules/obstack (Files): Add m4/ulonglong.m4.
15641         Problem reported by Davide Angelocola.
15642
15643 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
15644
15645         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
15646         coreutils no longer futzes with rounding modes.
15647
15648 2005-11-14  Jim Meyering  <jim@meyering.net>
15649
15650         * lib/mkstemp-safer.c: Include <config.h>, required for possible
15651         replacement of mkstemp.
15652
15653 2005-11-10  Simon Josefsson  <jas@extundo.com>
15654
15655         * lib/readline.c: Remove EOL.
15656
15657 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15658
15659         * modules/gethrxtime (Depends-on): Add gettime.
15660
15661 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
15664         or gettimeofday; no longer needed.
15665
15666 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
15669         time business.
15670         (gethrxtime) [! (HAVE_NANOUPTIME
15671         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
15672         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
15673         our own approximation.
15674
15675 2005-11-08  Eric Blake  <ebb9@byu.net>
15676
15677         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15678
15679 2005-11-08  Eric Blake  <ebb9@byu.net>
15680
15681         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15682
15683 2005-11-04  Bruno Haible  <bruno@clisp.org>
15684
15685         * gnulib-tool: Implement --update mode.
15686
15687 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15688
15689         Fix porting problem reported by Theodoros V. Kalamatianos.
15690         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
15691         Don't assume that futimes failing means we must fail.
15692
15693 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15694
15695         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
15696         variables to suggest the intended function of the PATH_MAX check.
15697
15698 2005-10-30  Kean Johnston  <jkj@sco.com>
15699
15700         Trivial changes to support SCO systems.
15701         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
15702         as PATH_MAX.
15703         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
15704         where __ptr is null when no I/O is pending.
15705
15706 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15707
15708         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
15709         leave errno alone.  Problem reported by Dmitry V. Levin.
15710
15711 2005-10-28  Simon Josefsson  <jas@extundo.com>
15712
15713         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
15714         Test more.
15715
15716         * tests/test-gc-md2.c, tests/test-md2.c: New files.
15717
15718         * modules/md2, modules/md2-tests: New files.
15719
15720 2005-10-28  Simon Josefsson  <jas@extundo.com>
15721
15722         * m4/inet_ntop.m4: More tests.
15723
15724         * m4/gc-md2.m4, md2.m4: New file.
15725
15726 2005-10-28  Simon Josefsson  <jas@extundo.com>
15727
15728         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
15729         "restrict" keywords, as per POSIX.  Protect the function
15730         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
15731         Don't use K&R prototypes.  Check the sprintf return values.
15732         Re-define EAFNOSUPPORT if not present.  Indent.
15733
15734         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
15735         suggested by Bruno Haible <bruno@clisp.org>.
15736
15737         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
15738
15739         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
15740
15741         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
15742         libgcrypt).
15743
15744         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
15745
15746         * lib/md2.h, lib/md2.c: New files.
15747
15748 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
15749
15750         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
15751         errno alone.  Problem reported by Frederic Jolliton.
15752
15753 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
15754
15755         * modules/verify (License): Change from GPL to LGPL.  This is a
15756         tiny module and there are apparently near-equivalents that are
15757         under the BSD license.
15758
15759 2005-10-24  Simon Josefsson  <jas@extundo.com>
15760
15761         * modules/sha1: Relicense to LGPL.
15762
15763 2005-10-24  Simon Josefsson  <jas@extundo.com>
15764
15765         * lib/md4.h: Shrink buffer size, now that we changed the type.
15766
15767 2005-10-23  Simon Josefsson  <jas@extundo.com>
15768
15769         * gnulib-tool (func_import): Fix --tests-base.
15770
15771 2005-10-22  Simon Josefsson  <jas@extundo.com>
15772
15773         * modules/arcfour (Depends-on): Need stdint.
15774
15775 2005-10-22  Simon Josefsson  <jas@extundo.com>
15776
15777         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
15778         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
15779
15780 2005-10-22  Simon Josefsson  <jas@extundo.com>
15781
15782         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
15783         suggested by Bruno Haible <bruno@clisp.org>.
15784
15785 2005-10-22  Simon Josefsson  <jas@extundo.com>
15786
15787         * lib/crc.h: Include stddef.h, for size_t.
15788
15789 2005-10-22  Simon Josefsson  <jas@extundo.com>
15790
15791         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
15792         arcfour_context struct (simplify test vector testing in GNU
15793         Shishi).
15794
15795 2005-10-21  Simon Josefsson  <jas@extundo.com>
15796
15797         * modules/des, modules/des-tests: New files.
15798
15799         * modules/gc-des, modules/gc-des-tests: New files.
15800
15801         * tests/test-des.c, tests/test-gc-des.c: New file.
15802
15803 2005-10-21  Simon Josefsson  <jas@extundo.com>
15804
15805         * modules/arctwo, modules/arctwo-tests: New files.
15806
15807         * tests/test-arctwo.c: New file.
15808
15809         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
15810
15811         * tests/test-gc-arctwo.c: New file.
15812
15813 2005-10-21  Simon Josefsson  <jas@extundo.com>
15814
15815         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
15816         Bruno Haible <bruno@clisp.org>.
15817
15818         * m4/gc-des.m4: New file.
15819
15820 2005-10-21  Simon Josefsson  <jas@extundo.com>
15821
15822         * m4/arctwo.m4: New file.
15823
15824         * m4/gc-arctwo.m4: New file.
15825
15826 2005-10-21  Simon Josefsson  <jas@extundo.com>
15827
15828         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
15829         block.
15830
15831 2005-10-21  Simon Josefsson  <jas@extundo.com>
15832
15833         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
15834         <bruno@clisp.org>.
15835
15836         * lib/hmac-sha1.c (hmac_sha1): Likewise.
15837
15838         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
15839         Bruno Haible <bruno@clisp.org>.
15840
15841         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
15842         <bruno@clisp.org>.
15843
15844 2005-10-21  Simon Josefsson  <jas@extundo.com>
15845
15846         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
15847
15848 2005-10-21  Simon Josefsson  <jas@extundo.com>
15849
15850         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
15851
15852 2005-10-21  Simon Josefsson  <jas@extundo.com>
15853
15854         * lib/des.h, lib/des.c: New files.
15855
15856         * lib/gc-gnulib.c: Support DES.c
15857
15858 2005-10-21  Simon Josefsson  <jas@extundo.com>
15859
15860         * lib/arctwo.h, lib/arctwo.c: New files.
15861
15862         * lib/gc-gnulib.c: Support ARCTWO.
15863
15864 2005-10-21  Simon Josefsson  <jas@extundo.com>
15865
15866         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
15867         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15868
15869 2005-10-21  Simon Josefsson  <jas@extundo.com>
15870
15871         * gnulib-tool (func_import, func_create_testdir): Define automake
15872         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
15873         Makefile.am snippet),
15874         suggested by Bruno Haible <bruno@clisp.org>.
15875
15876         * modules/gc (Makefile.am): Use it.
15877
15878 2005-10-21  Bruno Haible  <bruno@clisp.org>
15879
15880         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
15881         patch.
15882
15883 2005-10-19  Simon Josefsson  <jas@extundo.com>
15884
15885         * tests/test-gc-rijndael.c: New file.
15886
15887         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
15888
15889 2005-10-19  Simon Josefsson  <jas@extundo.com>
15890
15891         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
15892         interface too.
15893
15894 2005-10-19  Simon Josefsson  <jas@extundo.com>
15895
15896         * tests/test-gc-arcfour.c: New file.
15897
15898         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
15899
15900 2005-10-19  Simon Josefsson  <jas@extundo.com>
15901
15902         * modules/gc-md4, modules/gc-md4-tests: New file.
15903
15904         * tests/test-gc-md4.c: New file.
15905
15906 2005-10-19  Simon Josefsson  <jas@extundo.com>
15907
15908         * m4/gc-md4.m4: New file.
15909
15910 2005-10-19  Simon Josefsson  <jas@extundo.com>
15911
15912         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
15913         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
15914         <kasal@ucw.cz>.
15915
15916 2005-10-19  Simon Josefsson  <jas@extundo.com>
15917
15918         * m4/gc-arcfour.m4: New file.
15919
15920         * m4/gc-rijndael.m4: New file.
15921
15922 2005-10-19  Simon Josefsson  <jas@extundo.com>
15923
15924         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
15925
15926 2005-10-19  Simon Josefsson  <jas@extundo.com>
15927
15928         * lib/gc-gnulib.c: Support ARCFOUR.
15929
15930 2005-10-19  Simon Josefsson  <jas@extundo.com>
15931
15932         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
15933         support.
15934
15935         * lib/gc.h: Add ECB enum type.
15936
15937         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
15938
15939 2005-10-18  Simon Josefsson  <jas@extundo.com>
15940
15941         * tests/test-md5.c: New file.
15942
15943         * modules/md5-tests: New file.
15944
15945 2005-10-18  Simon Josefsson  <jas@extundo.com>
15946
15947         * tests/test-md4.c: New file.
15948
15949         * modules/md4, modules/md4-tests: New files.
15950
15951 2005-10-18  Simon Josefsson  <jas@extundo.com>
15952
15953         * m4/md4.m4: New file.
15954
15955 2005-10-18  Simon Josefsson  <jas@extundo.com>
15956
15957         * lib/md4.h, lib/md4.c: New files, based on md5.?.
15958
15959 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
15960
15961         * gnulib-tool (func_create_testdir): Omit the second check whether
15962         BUILT_SOURCES in nonempty.
15963
15964 2005-10-17  Simon Josefsson  <jas@extundo.com>
15965
15966         * tests/test-rijndael.c: New file.
15967
15968 2005-10-17  Simon Josefsson  <jas@extundo.com>
15969
15970         * modules/sha1: Depend on stdint instead of md5.
15971
15972         * modules/md5: Depend on stdint, remove uint32_t.
15973
15974 2005-10-17  Simon Josefsson  <jas@extundo.com>
15975
15976         * modules/gc-sha1-tests: New file.
15977
15978         * tests/test-gc-sha1.c: New file.
15979
15980 2005-10-17  Simon Josefsson  <jas@extundo.com>
15981
15982         * m4/md5.m4: Remove call to uint32_t.m4.
15983
15984 2005-10-17  Simon Josefsson  <jas@extundo.com>
15985
15986         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
15987
15988         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
15989         md5.h.
15990
15991         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
15992
15993         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
15994
15995 2005-10-17  Simon Josefsson  <jas@extundo.com>
15996
15997         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
15998
15999 2005-10-17  Simon Josefsson  <jas@extundo.com>
16000
16001         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
16002
16003 2005-10-17  Simon Josefsson  <jas@extundo.com>
16004
16005         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
16006
16007         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
16008
16009 2005-10-17  Bruno Haible  <bruno@clisp.org>
16010
16011         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
16012         that it can also be used in a test.
16013
16014 2005-10-16  Bruno Haible  <bruno@clisp.org>
16015
16016         * gnulib-tool (func_emit_tests_Makefile_am): Also define
16017         TESTS_ENVIRONMENT, so that individual tests can augment it.
16018
16019         * gnulib-tool (func_create_testdir): Use an intermediate target for
16020         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
16021         macros, like $(ALLOCA_H), which cannot be passed through the command
16022         line.
16023
16024 2005-10-15  Simon Josefsson  <jas@extundo.com>
16025
16026         * modules/rijndael-tests: New file.
16027
16028         * modules/rijndael: New file.
16029
16030 2005-10-15  Simon Josefsson  <jas@extundo.com>
16031
16032         * m4/rijndael.m4: New file.
16033
16034 2005-10-15  Simon Josefsson  <jas@extundo.com>
16035
16036         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
16037
16038         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
16039
16040 2005-10-14  Simon Josefsson  <jas@extundo.com>
16041
16042         * tests/test-arcfour.c: New file.
16043
16044         * modules/arcfour, modules/arcfour-tests: New files.
16045
16046 2005-10-14  Simon Josefsson  <jas@extundo.com>
16047
16048         * m4/arcfour.m4: New file.
16049
16050 2005-10-14  Simon Josefsson  <jas@extundo.com>
16051
16052         * lib/arcfour.h, lib/arcfour.c: New files.
16053
16054 2005-10-14  Roland McGrath  <roland@redhat.com>
16055
16056         Import from libc.  [BZ #1331]
16057         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
16058         macro argument.
16059         Reported by Matej Vela <vela@debian.org>.
16060
16061 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16062
16063         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16064         include <wchar.h>; no longer needed.
16065
16066 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16067
16068         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16069
16070 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16071         and  Ulrich Drepper  <drepper@redhat.com>
16072
16073         Import from libc.
16074         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16075         instead of inline stream orientation test and two separate
16076         function calls.  Pay no attention to USE_IN_LIBIO.
16077
16078 2005-10-13  Simon Josefsson  <jas@extundo.com>
16079
16080         * modules/gc-hmac-md5-tests: New file.
16081
16082         * tests/test-gc-hmac-sha1.c: New file.
16083
16084         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16085
16086         * modules/gc-hmac-md5-tests: New file.
16087
16088         * tests/test-gc-md5.c: New file.
16089
16090         * modules/gc-md5-tests: New file.
16091
16092 2005-10-13  Simon Josefsson  <jas@extundo.com>
16093
16094         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16095         Move memory allocation outside of loop.
16096
16097 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16098
16099         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16100         intermediate directory is in a read-only file system.  Problem
16101         reported by Eric Blake.
16102
16103 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16104
16105         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16106
16107 2005-10-12  Simon Josefsson  <jas@extundo.com>
16108
16109         * tests/test-hmac-sha1.c: New file.
16110
16111         * modules/hmac-sha1-tests: New file.
16112
16113         * modules/hmac-sha1: New file.
16114
16115 2005-10-12  Simon Josefsson  <jas@extundo.com>
16116
16117         * modules/gc-sha1: New file.
16118
16119 2005-10-12  Simon Josefsson  <jas@extundo.com>
16120
16121         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16122
16123         * tests/test-gc-pbkdf2-sha1.c: New file.
16124
16125 2005-10-12  Simon Josefsson  <jas@extundo.com>
16126
16127         * modules/gc-md5, modules/gc-hmac-md5: New files.
16128
16129         * modules/gc (Files): Remove md5, memxor and hmac files.
16130
16131 2005-10-12  Simon Josefsson  <jas@extundo.com>
16132
16133         * m4/gc-pbkdf2-sha1.m4: New file.
16134
16135         * m4/gc-hmac-sha1.m4: New file.
16136
16137         * m4/gc-sha1: New file.
16138
16139         * m4/hmac-sha1.m4: New file.
16140
16141 2005-10-12  Simon Josefsson  <jas@extundo.com>
16142
16143         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16144
16145         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16146
16147 2005-10-12  Simon Josefsson  <jas@extundo.com>
16148
16149         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16150         suggested by Bruno Haible <bruno@clisp.org>.
16151
16152 2005-10-12  Simon Josefsson  <jas@extundo.com>
16153
16154         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16155
16156 2005-10-12  Simon Josefsson  <jas@extundo.com>
16157
16158         * lib/gc-pbkdf2-sha1.c: New file.
16159
16160         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16161
16162 2005-10-12  Simon Josefsson  <jas@extundo.com>
16163
16164         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16165
16166         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16167
16168 2005-10-12  Simon Josefsson  <jas@extundo.com>
16169
16170         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16171         GC_USE_HMAC_MD5, respectively.
16172
16173         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16174         (gc_md5): Fix typo.
16175
16176         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16177
16178         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16179
16180         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16181
16182 2005-10-12  Bruno Haible  <bruno@clisp.org>
16183
16184         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16185         Reported by Stepan Kasal <kasal@ucw.cz>.
16186
16187 2005-10-11  Simon Josefsson  <jas@extundo.com>
16188
16189         * tests/test-crc.c: New file.
16190
16191         * modules/crc, modules/crc-tests: New files.
16192
16193 2005-10-11  Simon Josefsson  <jas@extundo.com>
16194
16195         * m4/crc.m4: New file.
16196
16197 2005-10-11  Simon Josefsson  <jas@extundo.com>
16198
16199         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16200
16201         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16202
16203         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16204
16205 2005-10-11  Simon Josefsson  <jas@extundo.com>
16206
16207         * lib/crc.h, lib/crc.c: New files.
16208
16209         * lib/gc.h (gc_hash_buffer): Add doc.
16210
16211 2005-10-11  Bruno Haible  <bruno@clisp.org>
16212
16213         * modules/c-strcasestr: New file.
16214         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16215
16216 2005-10-11  Bruno Haible  <bruno@clisp.org>
16217
16218         * modules/c-strcase: New file.
16219         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16220
16221 2005-10-11  Bruno Haible  <bruno@clisp.org>
16222
16223         * lib/strcasecmp.c: Include limits.h.
16224         (strcasecmp): Avoid integer overflow on exotic platforms.
16225         * lib/strncasecmp.c: Include limits.h.
16226         (strncasecmp): Avoid integer overflow on exotic platforms.
16227         Reported by Paul Eggert.
16228
16229 2005-10-11  Bruno Haible  <bruno@clisp.org>
16230
16231         * lib/c-strcasestr.h: New file, from GNU gettext.
16232         * lib/c-strcasestr.c: New file, from GNU gettext.
16233
16234 2005-10-11  Bruno Haible  <bruno@clisp.org>
16235
16236         * lib/c-strcase.h: New file, from GNU gettext.
16237         * lib/c-strcasecmp.c: New file, from GNU gettext.
16238         * lib/c-strncasecmp.c: New file, from GNU gettext.
16239
16240 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16241
16242         * modules/mempcpy (License): GPL -> LGPL.
16243         * modules/strchrnul (License): Likewise.
16244         * modules/sysexits (License): Likewise.
16245
16246 2005-10-08  Simon Josefsson  <jas@extundo.com>
16247
16248         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16249
16250 2005-10-07  Simon Josefsson  <jas@extundo.com>
16251
16252         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16253
16254 2005-10-06  Simon Josefsson  <jas@extundo.com>
16255
16256         * tests/test-hmac-md5.c: New file.
16257
16258         * modules/hmac-md5-tests: New file.
16259
16260         * modules/hmac-md5: New file.
16261
16262 2005-10-06  Simon Josefsson  <jas@extundo.com>
16263
16264         * m4/hmac-md5.m4: New file.
16265
16266         * m4/memxor.m4: Require gl_C_RESTRICT.
16267
16268 2005-10-06  Simon Josefsson  <jas@extundo.com>
16269
16270         * lib/memxor.c (memxor): Avoid casts and warnings.
16271
16272 2005-10-06  Simon Josefsson  <jas@extundo.com>
16273
16274         * lib/hmac-md5.c: New file.
16275
16276         * lib/hmac.h: New file.
16277
16278 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16279
16280         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16281         promotes to int, not unsigned int, to catch the AIX 5.3
16282         compiler bug.
16283
16284 2005-10-05  Simon Josefsson  <jas@extundo.com>
16285
16286         * modules/memxor: New file.
16287
16288         * modules/iconv (Files): Move config.rpath to havelib, it is used
16289         there.
16290
16291         * modules/havelib (Files): Add config.rpath.
16292
16293 2005-10-05  Simon Josefsson  <jas@extundo.com>
16294
16295         * m4/memxor.m4: New file.
16296
16297 2005-10-05  Simon Josefsson  <jas@extundo.com>
16298
16299         * lib/memxor.c (memxor): Fix compiler error.
16300
16301         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16302         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16303
16304         * lib/memxor.h, lib/memxor.c: New files.
16305
16306         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16307         we assume all systems have it, suggested by Jim Meyering
16308         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16309         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16310         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16311         same reasons.
16312
16313 2005-10-05  Simon Josefsson  <jas@extundo.com>
16314
16315         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16316
16317 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16318
16319         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16320         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16321         needed, since the source code now assumes these .h files.
16322
16323 2005-10-05  Derek Price  <derek@ximbiot.com>
16324
16325         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16326
16327 2005-10-05  Bruno Haible  <bruno@clisp.org>
16328
16329         * modules/stdint (License): Change to LGPL.
16330
16331 2005-10-04  Simon Josefsson  <jas@extundo.com>
16332
16333         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16334         D. Baushke" <mdb@gnu.org>.
16335
16336 2005-10-04  Bruno Haible  <bruno@clisp.org>
16337
16338         * lib/verify.h (verify_true): Provide alternative definition for C++.
16339
16340 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16341
16342         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16343         (SSIZE_MAX): New macro, if not already defined.
16344         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16345         than 2 GiB.
16346
16347 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16348
16349         Sync from coreutils.
16350         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
16351         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
16352         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
16353         ULLONG_MAX doesn't work with 2.7.2.1.
16354
16355 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16356
16357         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
16358         From Ben Pfaff.
16359
16360         * modules/exclude (Depends-on): Depend on verify.
16361         * modules/strtoimax (Depends-on): Likewise.
16362         * modules/utimecmp (Depends-on): Likewise.
16363
16364 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16365
16366         * lib/exclude.c: Include verify.h.
16367         (verify): Remove.  All callers changed to use verify.h's version.
16368         * lib/strtoimax.c: Likewise.
16369         * lib/utimecmp.c: Likewis.e
16370
16371         Sync from coreutils.
16372         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
16373         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
16374         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
16375         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
16376         bother returning ENOSYS if settimeofday or stime fails; just let
16377         them return whatever errno they want to return.
16378         * lib/utimens.c: Include unistd.h, for dup2.
16379         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
16380         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
16381
16382 2005-10-02  Jim Meyering  <jim@meyering.net>
16383
16384         Sync from coreutils.
16385         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
16386         from glibc-2.2.5 that fails for read-only files.
16387
16388 2005-10-02  Jim Meyering  <jim@meyering.net>
16389
16390         Sync from coreutils.
16391         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
16392         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
16393         `#if HAVE_CONFIG_H'.
16394         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
16395         Remove AT_FDCWD test.
16396         Do not consume the fd unless successful.
16397         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
16398         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
16399         block, so that we don't even try to compile it if settimeofday is
16400         available.  This works around a compilation failure on OSF1 V5.1,
16401         due to stime requiring a `long int*' while tv_sec is `int'.
16402
16403 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
16404
16405         Sync from coreutils.
16406         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
16407         against `yes', rather than just testing for nonempty.
16408
16409 2005-10-01  Simon Josefsson  <jas@extundo.com>
16410
16411         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
16412         and Darwin.
16413
16414         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
16415         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
16416         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
16417         freeaddrinfo and gai_strerror are declared by the POSIX headers.
16418         Check if struct addrinfo is declared.
16419
16420 2005-10-01  Simon Josefsson  <jas@extundo.com>
16421
16422         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
16423         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
16424         AI_* and EAI_* definitions.  Protect function declarations.
16425
16426 2005-10-01  Jim Meyering  <jim@meyering.net>
16427
16428         Sync from coreutils.
16429
16430         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
16431         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
16432         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
16433         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16434         in the inet and nsl libraries.  Required on Solaris 5.7.
16435
16436 2005-10-01  Jim Meyering  <jim@meyering.net>
16437
16438         Sync from coreutils.
16439         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16440         in the inet and nsl libraries.  Required on Solaris 5.7.
16441
16442 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
16443
16444         * lib/getdelim.c (getdelim): Remove unused variables.
16445
16446 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
16447
16448         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
16449         so that the code works even with ancient cpp.  Portability problem
16450         with GCC 2.7.2.1 reported by Thomas M.Ott.
16451
16452 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
16453
16454         * modules/regex (Depends-on): Add strcase.
16455
16456         * modules/gethostname (Licence): Change from GPL to LGPL, since
16457         gethostname.c is a trivial implementation of a standard library
16458         function.
16459         * modules/poll (License): Change from GPL to LGPL, since it's
16460         derived from LGPL code.
16461
16462 2005-09-27  Jim Meyering  <jim@meyering.net>
16463
16464         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
16465         HAVE_CONFIG_H.
16466
16467         * lib/intprops.h (signed_type_or_expr__): Define.
16468         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
16469         for unsigned types.
16470
16471 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
16472
16473         * lib/verify.h (verify_expr): Remove, replacing with:
16474         (verify_true): New macro that returns true instead of void.
16475         (verify_type__): Remove.
16476         (verify): Use verify_true rather than verify_type__.
16477
16478 2005-09-26  Bruno Haible  <bruno@clisp.org>
16479
16480         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
16481         is necessary.
16482         (lib_SOURCES): Remove mbchar.c.
16483         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
16484         (Files): Add m4/mbrtowc.m4.
16485         * modules/mbiter: Likewise.
16486         * modules/mbuiter: Likewise.
16487
16488 2005-09-26  Bruno Haible  <bruno@clisp.org>
16489
16490         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
16491         compile mbchar.c if they are not both present.
16492         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
16493         * m4/mbiter.m4 (gl_MBITER): Likewise.
16494         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
16495         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
16496         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
16497
16498 2005-09-25  Jim Meyering  <jim@meyering.net>
16499
16500         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
16501         also uses socklen_t.
16502
16503 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
16504
16505         * lib/utimens.c (ENOSYS): Define if not already defined.
16506         (futimens): Support having a null PATH if the file descriptor
16507         is nonnegative.
16508
16509         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
16510         Remove.
16511         (__attribute): Define to empty unless GCC 3.1 or later.
16512         This works around a core dump on OpenBSD 3.4, which has GCC
16513         2.95.3, which dumps core when given __attribute__(()).  It also
16514         simplifies other tests, since we really don't want to bother with
16515         worrying about which ancient version of GCC supported what.
16516         Original problem reported by Yoann Vandoorselaere, with part of
16517         the fix suggested by Derek Price.
16518
16519 2005-09-24  Jim Meyering  <jim@meyering.net>
16520
16521         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
16522         so we can once again use a positive bitfield width of 1 -- now we
16523         don't have to explain why we were using a bitfield width of 2.
16524
16525 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16526
16527         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
16528         and similarly for the other external symbols.  Problem reported
16529         by James Gallager.
16530
16531         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
16532         bug reported by Jim Meyering.
16533
16534         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
16535         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
16536         not needed, since socklen is a prerequisite module.
16537
16538 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16539
16540         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
16541         Problem reported by Eric Blake.
16542         (getaddrinfo): Initialize se so that it's not garbage.
16543         Redo internal storage allocation so that it doesn't make unportable
16544         assumptions about alignment.
16545         Fix a memory leak.
16546
16547         * lib/utimens.c (futimens): Use futimesat if available.
16548         Prefer it to futimes since it doesn't have the futimes bug.
16549
16550         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
16551         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
16552         Instead, declare a function that returns a pointer to an array,
16553         and use verify_type__ to declare the size of the array.
16554         Problem and germ of a solution reported by Bruno Haible.
16555         (verify_type__): Use 2, not 1, for bitfield size, to avoid
16556         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
16557
16558 2005-09-23  Jim Meyering  <jim@meyering.net>
16559
16560         Sync from coreutils.
16561         Correct build failure (socklen_t not defined) on at least
16562         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
16563         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
16564
16565 2005-09-23  Jim Meyering  <jim@meyering.net>
16566
16567         * modules/getaddrinfo (Depends-on): Add socklen.
16568
16569 2005-09-23  Bruno Haible  <bruno@clisp.org>
16570
16571         * tests/test-verify.c: New file.
16572
16573 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16574
16575         Sync from coreutils.
16576
16577         * modules/argmatch (Depends-on): Add verify.
16578         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
16579         unistd-safer.
16580         * modules/save-cwd (Depends-on): Likewise.
16581
16582         * modules/openat (Files): Add lib/openat-die.c.
16583         (Depends-on): Remove error, exitfail.
16584         Add dirname.
16585
16586         * modules/verify: New file.
16587         * MODULES.html.sh (Diagnostics <assert.h>): New section,
16588         with "verify" module.
16589
16590 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16591
16592         Sync from coreutils.
16593
16594         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
16595         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
16596         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
16597         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
16598         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
16599         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
16600         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
16601         Don't bother checking for string.h, stdlib.h, unistd.h.
16602         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
16603         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
16604         module's job.
16605         * m4/jm-macros.m4 (gl_MACROS): Likewise.
16606         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
16607
16608         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
16609         (gl_GETDATE): Use it.
16610
16611         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
16612
16613 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16614
16615         Sync from coreutils.
16616
16617         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
16618         stat-time.h.
16619         * lib/argmatch.h: Include verify.h
16620         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
16621         (ARGMATCH_ASSERT): Remove; unused.
16622         * lib/canonicalize.c: Assume STDC_HEADERS.
16623         * lib/exclude.c: Include "strcase.h".
16624         * lib/regex_internal.h [!defined _LIBC]: Likewise.
16625         * lib/getusershell.c: Include stdio--.h rather than stdio.h
16626         and stdio-safer.h.
16627         (getusershell): Call fopen, not fopen_safer.
16628         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
16629         Do not include unistd-safer.h.
16630         (save_cwd): Don't call fd_safer; no longer needed
16631         now that we include fcntl--.h.
16632
16633         * lib/getdate.y (relative_time): New type.
16634         (RELATIVE_TIME_0): New constant.
16635         (parser_control): Use relative_time instead of doing it ourselves.
16636         (%union): Add new relative_time rel member.
16637         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
16638         Now typeless.
16639         (relunit, relunit_snumber): Now of type rel.
16640         (zone, rel, relunit, get_date): Adjust to above changes.
16641
16642         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
16643         Do not include unistd-safer.h.
16644         (getloadavg): Don't call fd_safer; no longer needed
16645         now that we include fcntl--.h.
16646
16647         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
16648         (make_dir_parents): Treat ENOSYS like EEXIST.
16649
16650         Improve quality of diagnostics on restore_cwd failure.
16651         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
16652         (make_dir_parents): Last arg is now int * (for errno), not bool *.
16653         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
16654         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
16655         each time through the loop.  Do not diagnose restore_cwd failure;
16656         that is the caller's job (and perhaps the caller does not care).
16657
16658         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
16659         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
16660         If the file already exists but is not a directory, don't bother
16661         to try to make its parents.
16662         Close potential file descriptor leak if we can't chdir("/") (!).
16663         Don't always return true if chdir($PWD) fails; return true only
16664         if the requested action was done successfully (except for the
16665         chdir($PWD)).
16666         Don't log final directory unless we actually made it.
16667         Refactor to avoid duplicate code to fix up permissions.
16668         Don't attempt to fix up parent permissions if chdir($PWD) fails.
16669
16670         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
16671         to make it a bit faster and (I hope) clearer.
16672         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
16673         Fix bug in formats like %2N.
16674
16675         * lib/verify.h: New file.
16676
16677 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16678
16679         Sync from coreutils.
16680         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
16681
16682 2005-09-22  Jim Meyering  <jim@meyering.net>
16683
16684         Sync from coreutils.
16685
16686         * m4/lstat.m4 (gl_FUNC_LSTAT):
16687         Use AC_LIBSOURCES to require lstat.c and lstat.h.
16688         Remove obsolete comment.
16689         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
16690         * m4/xstrtod.m4: Likewise.
16691
16692         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
16693
16694 2005-09-22  Jim Meyering  <jim@meyering.net>
16695
16696         Sync from coreutils.
16697
16698         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
16699
16700         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
16701         the .tm_year member, since otherwise gcc-4.0 would now warn about
16702         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
16703
16704         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
16705         order to avoid an unsuppressible warning from gcc on 64-bit systems.
16706
16707         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
16708         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
16709         when run in a time zone for which daylight savings time is in effect
16710         for the starting date.
16711
16712         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
16713         stop us from restricting permissions of just-created absolute-named
16714         directories.
16715         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
16716         to restore initial working directory.
16717         * lib/mkdir-p.c (make_dir_parents): New parameter:
16718         different_working_dir, to tell caller if/when we change the working
16719         directory and are unable to return to the initial one.
16720         * lib/mkdir-p.h (make_dir_parents): Update prototype.
16721         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
16722         `return false'.  This fixes a bug introduced on 2004-07-30.
16723
16724         * lib/openat.c (fdopendir): Be sure to close the supplied
16725         file descriptor before returning.  This makes our replacement
16726         implementation a little closer to Solaris's, where fdopendir
16727         ties the file descriptor to the returned DIR* pointer.
16728         * lib/openat.c (unlinkat): New function.
16729         * lib/openat.h (unlinkat): Add prototype.
16730         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
16731         (openat_restore_fail): Rename from openat_restore_die.
16732         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
16733
16734         Provide an alternative to exiting immediately upon save_cwd or
16735         restore_cwd failure.  Now, an application can arrange e.g.,
16736         to perform a longjump in that case.
16737         * lib/openat.c: Include dirname.h.
16738         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
16739         (rpl_openat, fdopendir, fstatat): Call openat_save_die
16740         and openat_restore_die rather than calling error directly.
16741         Don't include "error.h" or "exitfail.h"; they're no longer needed.
16742
16743         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
16744         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
16745         define.
16746
16747         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
16748         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
16749                             int utc, int nanoseconds);
16750         Background:
16751         date should not have to allocate a megabyte of virtual memory to
16752         handle a format argument like +%1048575T.  When implemented with
16753         strftime, it must allocate such a buffer, use strftime to fill it
16754         in, print it, then free it.
16755         With fprintftime, it simply prints everything and exits.
16756         With no need for memory allocation, that's one fewer way to fail.
16757         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
16758         optional field width, not before, so we accept %9:z, not %:9z.
16759         (my_strftime): Be sure to use L_('x') for literals.
16760
16761         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
16762         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
16763         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
16764         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
16765         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
16766         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
16767         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
16768         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
16769         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
16770         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
16771         * lib/xgethostname.c, lib/xreadlink.c:
16772         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
16773
16774         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
16775         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
16776         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
16777         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16778         and don't include <sys/file.h>).
16779
16780 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
16781
16782         Sync from coreutils.
16783
16784         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
16785         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
16786         [!LDAV_DONE]: Avoid unused variable warning.
16787
16788 2005-09-21  Bruno Haible  <bruno@clisp.org>
16789
16790         * lib/unicodeio.h (unicode_to_mb): New declaration.
16791
16792 2005-09-20  Derek Price  <derek@ximbiot.com>
16793
16794         * lib/getaddrinfo.c: Don't include <netdb.h> included from
16795         getaddrinfo.h.
16796
16797 2005-09-20  Bruno Haible  <bruno@clisp.org>
16798
16799         * gnulib-tool: Remove trailing slashes from the values specified for
16800         --source-base, --m4-base, --tests-base, --aux-dir.
16801         Suggested by Simon Josefsson <jas@extundo.com>.
16802
16803 2005-09-20  Bruno Haible  <bruno@clisp.org>
16804
16805         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
16806         func_modules_to_filelist, func_import, func_create_testdir): Make all
16807         sorting results locale-independent, so that gnulib-cache.m4 doesn't
16808         change when gnulib-tool is invoked in a different locale.
16809
16810 2005-09-19  Simon Josefsson  <jas@extundo.com>
16811
16812         * m4/socklen.m4: Fix typo.
16813
16814 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
16815
16816         Use a consistent style for including <config.h>.
16817         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
16818         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
16819         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
16820         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
16821         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
16822         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
16823         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
16824         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
16825         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
16826         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
16827         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
16828         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
16829         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
16830         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
16831         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
16832         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
16833         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
16834         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
16835         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
16836         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
16837         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
16838         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
16839         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
16840         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
16841         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
16842         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
16843         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
16844         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
16845         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
16846         lib/xstrtoumax.c, lib/yesno.c:
16847         Standardize inclusion of config.h.
16848         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
16849         lib/inttostr.h:  Removed inclusion of config.h from header files.
16850         * lib/inttostr.c:  Adjusted in-tree users.
16851         * lib/timespec.h: Remove superfluous warning to include config.h.
16852         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
16853         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
16854         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
16855         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
16856         config.h with HAVE_CONFIG_H.
16857
16858 2005-09-19  Jim Meyering  <jim@meyering.net>
16859
16860         * modules/pathmax (License): Change to LGPL.
16861
16862 2005-09-19  Derek Price  <derek@ximbiot.com>
16863
16864         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
16865
16866 2005-09-19  Bruno Haible  <bruno@clisp.org>
16867
16868         * gnulib-tool (import): Provide default for --tests-base.
16869
16870 2005-09-19  Bruno Haible  <bruno@clisp.org>
16871
16872         * doc/quote.texi: New file, extracted from gnulib.texi.
16873         * doc/ctime.texi: New file, extracted from gnulib.texi.
16874         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
16875         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
16876         * doc/gnulib.texi: Include them.
16877
16878 2005-09-18  Bruno Haible  <bruno@clisp.org>
16879
16880         Portability fix.
16881         * gnulib-tool (func_readlink): New function.
16882         (func_ln_if_changed): Use it.
16883
16884 2005-09-18  Bruno Haible  <bruno@clisp.org>
16885
16886         * gnulib-tool: Support --with-tests also with --import.
16887         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
16888         (func_import): Use variables $testsbase and $inctests. Emit a
16889         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
16890         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
16891         SUBDIRS += $testsdir.
16892         (func_create_testdir): Update.
16893
16894 2005-09-18  Bruno Haible  <bruno@clisp.org>
16895
16896         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
16897         instead of $dry_run.
16898         (func_cp_if_changed, func_mv_if_changed): Remove functions.
16899         (func_ln_if_changed): Don't handle dry-run here.
16900         (func_import): In dry-run mode, detect more precisely which actions
16901         would be performed, and don't use "...ing" verbs.
16902
16903 2005-09-18  Bruno Haible  <bruno@clisp.org>
16904
16905         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
16906         (func_import): Use join on two temporary files instead of three nested
16907         loops, in order to determine which files are new or old.
16908
16909 2005-09-18  Bruno Haible  <bruno@clisp.org>
16910
16911         * gnulib-tool (func_import): Comment out code that spits out the
16912         new files with --dry-run.
16913
16914 2005-09-18  Bruno Haible  <bruno@clisp.org>
16915
16916         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
16917
16918 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16919
16920         * lib/stat-time.h: New file.
16921         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
16922         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
16923         in a different way.
16924         (timespec_cmp): New function.
16925         * lib/utimecmp.c: Include stat-time.h.
16926         (SYSCALL_RESOLUTION): Depend on whether various struct stat
16927         members exist, not on the obsolescent ST_MTIM_NSEC.
16928         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
16929
16930 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16931
16932         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
16933
16934 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16935
16936         * MODULES.html.sh (File system functions): Add stat-time.
16937         * modules/stat-time: New file.
16938         * modules/timespec (Files): Remove m4/st_mtim.m4; this
16939         is now done in a different way, by the stat-time module.
16940         * modules/utimecmp (Depends-on): Add stat-time.
16941
16942 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
16943
16944         * m4/st_mtim.m4: Remove.  Superseded by...
16945         * m4/stat-time.m4: New file.
16946         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
16947         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
16948
16949 2005-09-15  Derek Price  <derek@ximbiot.com>
16950
16951         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
16952
16953 2005-09-15  Derek Price  <derek@ximbiot.com>
16954
16955         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
16956         * lib/regex_internal.c: Ditto, using this...
16957         (__GNUC_PREREQ): ...new macro.
16958         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
16959         using...
16960         (__GNUC_PREREQ): ...this new macro.
16961
16962         * lib/strstr.h: Include string.h. Define strstr as a macro here.
16963
16964 2005-09-15  Derek Price  <derek@ximbiot.com>
16965             Paul Eggert  <eggert@cs.ucla.edu>
16966
16967         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
16968         changes, consolidating in...
16969         * lib/regex_internal.h: ...this file.
16970
16971 2005-09-13  Jim Meyering  <jim@meyering.net>
16972
16973         * lib/canon-host.c: Filter through gnu indent and reword comments
16974         slightly.
16975         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
16976
16977 2005-09-13  Derek Price  <derek@ximbiot.com>
16978
16979         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
16980         failure.
16981         Reported by Jim Meyering  <jim@meyering.net>.
16982
16983 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16984
16985         * lib/base64.c: Typo.
16986         (base64_encode): Put b64str in initialized data section.
16987
16988 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
16989
16990         Merge glibc and coreutils changes into gnulib, plus a few
16991         extra fixes.
16992         * lib/md5.c: Use #error rather than a string.
16993         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
16994         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
16995         (__attribute__): Define to empty for non recent-GCC.
16996         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
16997         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
16998         Renamed from their non-__ counterparts, with new macros replacing
16999         them if not _LIBC.  Add __THROW attribute.
17000         (rol): Remove.
17001         (struct md5_ctx): Align buffer if using GCC.
17002         * lib/sha1.h (struct sha1_ctx): Likewise.
17003         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
17004         The old name was backwards.
17005         (NOTSWAP): Remove; not used.
17006         (rol): New macro, moved here from md5.h.
17007         (sha1_process_block): Remove a FIXME that doesn't make sense.
17008
17009 2005-09-12  Derek Price  <derek@ximbiot.com>
17010
17011         Return usable errors from canon-host.
17012         * lib/canon-host.h: New file.
17013         * lib/canon-host.c (canon_host): Wrap...
17014         (canon_host_r): ...this new function, which now relies exclusively on
17015         getaddrinfo.
17016         (ch_strerror): New function.
17017         (last_cherror): New global.
17018         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
17019         interface.
17020         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
17021         void *.
17022         (freeaddrinfo): Free ai->ai_canonname when set.
17023
17024 2005-09-12  Derek Price  <derek@ximbiot.com>
17025
17026         Make canon-host require getaddrinfo.
17027         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
17028         AC_LIBSOURCE canon-host.h.  Call...
17029         (gl_PREREQ_CANON_HOST): ...this new function, which requires
17030         gl_GETADDRINFO.
17031         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
17032
17033 2005-09-12  Derek Price  <derek@ximbiot.com>
17034
17035         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
17036         LGPL.
17037         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
17038
17039 2005-09-12  Derek Price  <derek@ximbiot.com>
17040
17041         * lib/gai_strerror.c: Include config.h when available.  Include
17042         getaddrinfo.h before other headers to test interface.
17043         Reported by Larry Jones <lawrence.jones@ugs.com>.
17044
17045 2005-09-12  Derek Price  <derek@ximbiot.com>
17046             Paul Eggert  <eggert@cs.ucla.edu>
17047
17048         * modules/glob (Files): Add glob-libc.h.
17049
17050 2005-09-12  Derek Price  <derek@ximbiot.com>
17051             Paul Eggert  <eggert@cs.ucla.edu>
17052
17053         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
17054         glob_.h, glob-libc.h.
17055         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
17056
17057 2005-09-12  Derek Price  <derek@ximbiot.com>
17058             Paul Eggert  <eggert@cs.ucla.edu>
17059
17060         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
17061         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
17062         protecting things that should be done only in gnulib contexts.
17063         * lib/glob_.h: New file, containing only the glob things needed for
17064         gnulib.
17065         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17066         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17067         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17068         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17069         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17070         and to respect the namespace rules better.
17071
17072 2005-09-08  Simon Josefsson  <jas@extundo.com>
17073
17074         * modules/socklen: New file.
17075
17076 2005-09-08  Simon Josefsson  <jas@extundo.com>
17077
17078         * m4/socklen.m4: New file.
17079
17080 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17081
17082         * modules/utimens (Files): Add m4/utimbuf.m4, since
17083         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17084         Reported by Sergey Poznyakoff.
17085
17086 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17087
17088         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17089         definitions, since that's the preferred style in glibc.
17090         Fix a minor spacing issue, and update copyright notice to match
17091         glibc's.
17092
17093 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17094
17095         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17096
17097 2005-09-06  Simon Josefsson  <jas@extundo.com>
17098
17099         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17100         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17101
17102 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17103
17104         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17105         warning.
17106
17107 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17108
17109         * config/srclist.txt: Add glibc bug 1302.
17110
17111 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17112
17113         Change bitset word type from unsigned int to unsigned long int,
17114         as this has better performance on typical 64-bit hosts.
17115         Port bitset code to hosts with unusual word sizes.
17116         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17117         (build_collating_symbol):
17118         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17119         argument is a bitset.  This is merely a style issue, but it makes
17120         it clearer that an entire array is expected.
17121         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17122         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17123         Port to the case where bitset_word is not the same as unsigned int.
17124         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17125         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17126         Likewise.
17127         * lib/regexec.c (check_dst_limits_calc_pos_1,
17128         check_subexp_matching_top):
17129         (build_trtable, group_nodes_into_DFAstates):
17130         Likewise.
17131         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17132         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17133         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17134         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17135         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17136         * lib/regcomp.c (optimize_subexps, lower_subexp):
17137         Work even if bitset_word has holes in its bitwise representation.
17138         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17139         * lib/regexec.c (check_dst_limits_calc_pos_1,
17140         check_subexp_matching_top):
17141         Likewise.
17142         * lib/regex_internal.c (re_string_reconstruct):
17143         Don't assume UCHAR_MAX == 255.
17144         * lib/regex_internal.h (bitset_set_all): Likewise.
17145         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17146         All uses changed.
17147         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17148         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17149         All uses changed.
17150         (BITSET_WORD_MAX): New macro.
17151         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17152         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17153         (bitset_empty, bitset_copy):
17154         Prefer sizeof (bitset) to multiplying it out ourselves.
17155         (bitset_not_merge): Remove; unused.
17156         (bitset_contain): Return bool, not unsigned int with one bit on.
17157         All callers changed.
17158         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17159         alignment than re_node_set; do this by defining a new internal
17160         type struct dests_alloc and using it to allocate memory.
17161
17162 2005-09-05  Bruno Haible  <bruno@clisp.org>
17163
17164         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17165         links.
17166
17167 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17168
17169         * modules/size_max (Makefile.am): Add size_max.h
17170
17171 2005-09-04  Derek Price  <derek@ximbiot.com>
17172
17173         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17174
17175 2005-09-03  Simon Josefsson  <jas@extundo.com>
17176
17177         * gnulib-tool: Fix typo.
17178
17179 2005-09-03  Simon Josefsson  <jas@extundo.com>
17180
17181         * config/srclist.txt: Add glibc bug 1293.
17182
17183 2005-09-03  Derek Price  <derek@ximbiot.com>
17184
17185         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17186         From Larry Jones <lawrence.jones@ugs.com>.
17187
17188 2005-09-02  Simon Josefsson  <jas@extundo.com>
17189
17190         * modules/socklen: New file.
17191
17192 2005-09-02  Simon Josefsson  <jas@extundo.com>
17193
17194         * modules/havelib: New module.
17195
17196         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17197         Use havelib.
17198
17199 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17200
17201         Check for arithmetic overflow when calculating sizes, to prevent
17202         some buffer-overflow issues.  These patches are conservative, in the
17203         sense that when I couldn't determine whether an overflow was possible,
17204         I inserted a run-time check.
17205         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17206         macros.
17207         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17208         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17209         (re_xnrealloc, re_x2nrealloc): New inline functions.
17210         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17211         parse_bracket_exp):
17212         (build_equiv_class, build_charclass): Check for arithmetic overflow
17213         in size expression calculations.
17214         * lib/regex_internal.c (re_string_realloc_buffers):
17215         (build_wcs_upper_buffer, re_node_set_add_intersect):
17216         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17217         (re_dfa_add_node, register_state): Likewise.
17218         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17219         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17220         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17221         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17222
17223 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17224
17225         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17226         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17227
17228 2005-09-02  Bruno Haible  <bruno@clisp.org>
17229
17230         Support for lib vs. lib64 distinction on biarch platforms.
17231         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17232         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17233         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17234
17235 2005-09-02  Bruno Haible  <bruno@clisp.org>
17236
17237         * gnulib-tool (import): In the other first-use case, provide defaults
17238         as well.
17239
17240 2005-09-02  Bruno Haible  <bruno@clisp.org>
17241
17242         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17243         patches not yet found in the latest gettext release.
17244
17245 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17246
17247         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17248         to avoid a collision with bits/local_lim.h in glibc.
17249         All uses changed.  Problem reported by Dmitry V. Levin in
17250         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17251
17252         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17253         bugs in int versus size_t comparisons.
17254         (re_string_context_at): Fix bug where the code assumed that
17255         Idx is signed.
17256
17257         Use bool where appropriate.
17258         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17259         All callers changed.
17260         (calc_eclosure_iter): Likewise, for ROOT arg.
17261         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17262         (build_charclass_op): Likewise, for NON_MATCH arg.
17263         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17264         (re_string_construct_common): Likewise, for ICASE arg.
17265         * lib/regexec.c (re_search_2_stub, re_search_stub):
17266         Likewise, for RET_LEN arg.
17267         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17268         (set_regs): Likewise, for FL_BACKTRACK arg.
17269         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17270         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17271         (calc_eclosure_iter, parse_bracket_exp):
17272         Use bool for internal variables that are booleans.
17273         * lib/regexec.c (re_search_internal, check_matching,
17274         proceed_next_node):
17275         (set_regs, build_sifted_states, sift_states_bkref):
17276         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17277         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17278         (find_collation_sequence_value):
17279         Likewise.
17280         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17281         (re_node_set_compare):
17282         Return bool, not int. All callers changed.
17283         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17284         (build_trtable, check_node_accept): Likewise.
17285         * lib/regex_internal.h: Include stdbool.h.
17286
17287         Fix bugs uncovered when converting to bool.
17288         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17289         failure instead of charging ahead blindly.
17290         * lib/regex_internal.c (register_state): Likewise.
17291         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17292         for freeing internal storage.
17293         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17294         bitset pieces used as boolean, to avoid undefined behavior
17295         on hosts that do int overflow checking.
17296
17297 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17298
17299         * config/srclist.txt: Add glibc bugs 1285-1287.
17300
17301 2005-09-01  Jim Meyering  <jim@meyering.net>
17302
17303         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17304         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17305         Require gl_STAT_MACROS, too.
17306
17307 2005-09-01  Bruno Haible  <bruno@clisp.org>
17308
17309         * gnulib-tool (import): In the first-use case, provide defaults.
17310
17311 2005-09-01  Bruno Haible  <bruno@clisp.org>
17312
17313         * gnulib-tool (func_import): Remove the .tmp files.
17314
17315 2005-09-01  Bruno Haible  <bruno@clisp.org>
17316
17317         * gnulib-tool (func_import): Fix handling of symbolic links.
17318
17319 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17320
17321         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17322         old glibc regex code mishandles strings longer than 2**31 bytes.
17323         This patch fixes this when the regex code is used in gnulib
17324         (i.e., outside glibc).
17325
17326         This patch should not affect the use of the regex code inside
17327         glibc.  No doubt this problem also needs to be handled for glibc
17328         as well, but the result will be an incompatible change to the
17329         glibc ABI, and the old ABI will have to be supported too.  That
17330         can be the the subject for another patch.
17331
17332         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17333         governing whether the rest of this patch is active.  By default,
17334         the macro is disabled and the patch has no effect.
17335         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17336         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17337         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17338         (re_match_2, re_set_registers): Use the new types.
17339         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17340         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17341         New macros.
17342         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17343         (re_string_context_at, bin_tree_t, re_dfastate_t):
17344         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17345         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17346         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17347         (re_string_char_size_at, re_string_wchar_at):
17348         (re_string_elem_size_at):
17349         Use the new types and macros to port to 64-bit hosts.
17350         Use unsigned types for internal values, so that the code
17351         mostly works even for arrays larger than SSIZE_MAX.
17352         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
17353         (search_duplicated_node, calc_eclosure_iter, fetch_number):
17354         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
17355         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
17356         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
17357         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
17358         (calc_inveclosure, parse_dup_op, build_range_exp):
17359         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
17360         (fetch_number, create_token_tree, mark_opt_subexp):
17361         Likewise.
17362         * lib/regex_internal.c (re_string_construct_common,
17363         create_ci_newstate):
17364         (create_cd_newstate, re_string_allocate, re_string_construct):
17365         (re_string_realloc_buffers, build_wcs_upper_buffer):
17366         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17367         (re_string_reconstruct, re_string_peek_byte_case):
17368         (re_string_fetch_byte_case, re_string_context_at):
17369         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17370         (re_node_set_init_copy, re_node_set_add_intersect):
17371         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17372         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17373         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17374         (re_acquire_state, re_acquire_state_context, register_state):
17375         Likewise.
17376         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
17377         search_cur_bkref_entry):
17378         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
17379         (re_search_internal, re_search_2_stub, re_search_stub)
17380         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
17381         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
17382         (update_cur_sifted_state, check_dst_limits):
17383         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17384         (check_subexp_limits, sift_states_bkref, merge_state_array):
17385         (check_subexp_matching_top, get_subexp, get_subexp_sub):
17386         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
17387         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17388         (expand_bkref_cache, check_node_accept_bytes):
17389         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
17390         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
17391         (acquire_init_state_context, check_halt_node_context):
17392         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
17393         (sift_states_backward, clean_state_log_if_needed):
17394         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
17395         (find_recover_state, transit_state_sb, transit_state_mb):
17396         (transit_state_bkref, build_trtable, match_ctx_clean):
17397         Likewise.
17398         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
17399         to work around an assumption that REG_MISSING is negative.
17400
17401         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
17402         (seek_collating_symbol_entry) [defined _LIBC]:
17403         (lookup_collation_sequence_value) [defined _LIBC]:
17404         (build_range_exp, build_collating_symbol) [defined _LIBC]:
17405         Use prototypes rather than old-style function definitions.
17406         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
17407         (transit_state_sb) [0]:
17408         (find_collation_sequence_value) [defined _LIBC]: Likewise.
17409
17410         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
17411         rm_eo.
17412
17413         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
17414         (optimize_subexps, lower_subexp):
17415         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
17416         since the signed shift might overflow.  Use 1u<<31 instead.
17417         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17418         Likewise.
17419         * lib/regexec.c (check_dst_limits_calc_pos_1,
17420         check_subexp_matching_top): Likewise.
17421
17422         * lib/regcomp.c (optimize_subexps, lower_subexp):
17423         Use CHAR_BIT rather than 8, for clarity.
17424         * lib/regexec.c (check_dst_limits_calc_pos_1):
17425         (check_subexp_matching_top): Likewise.
17426         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
17427         have to worry about portability issues when shifting it left.
17428         Remove no-longer-needed test for table_size > 0.
17429         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
17430         in a word, as the resulting behavior is undefined.
17431         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
17432         in one case, a <= should have been an <, and in another case the
17433         whole test was missing.
17434         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
17435         the standard name CHAR_BIT.
17436         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
17437         this is not true on one's complement and signed-magnitude hosts.
17438
17439         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
17440         next_last_offset.
17441         (struct re_dfa_t): Remove unused member states_alloc.
17442         * lib/regcomp.c (init_dfa): Don't initialize unused members.
17443
17444 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17445
17446         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
17447         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
17448         and large-file glibc and in 32-bit large-file Solaris.
17449
17450 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17451
17452         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
17453         lengths fit in regoff_t; this isn't true if regoff_t is the same
17454         width as size_t.
17455         * lib/regex.c (re_search_internal): 5th arg is LAST_START
17456         (= START + RANGE) instead of RANGE.  This avoids overflow
17457         problems when regoff_t is the same width as size_t.
17458         All callers changed.
17459         (re_search_2_stub): Check for overflow when adding the
17460         sizes of the two strings.
17461         (re_search_stub): Check for overflow when adding START
17462         to RANGE; if it occurs, substitute the extreme value.
17463
17464 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17465
17466         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
17467
17468 2005-08-31  Jim Meyering  <jim@meyering.net>
17469
17470         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
17471         a pointer-to-const.
17472         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
17473         (register_state): Likewise.
17474         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
17475         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17476         (group_nodes_into_DFAstates): Likewise.
17477
17478 2005-08-31  Jim Meyering  <jim@meyering.net>
17479
17480         * check-module: Add a FIXME comment.
17481
17482 2005-08-31  Eric Blake  <ebb9@byu.net>
17483
17484         * modules/unistd-safer (Files): Add unistd--.h.
17485         * modules/stdio-safer (Files): Add stdio--.h.
17486
17487 2005-08-31  Derek Price  <derek@ximbiot.com>
17488
17489         * lib/getdelim.c (getdelim): Return EOF on EOF.
17490         Reported by Larry Jones <lawrence.jones@ugs.com>.
17491
17492 2005-08-31  Bruno Haible  <bruno@clisp.org>
17493
17494         Avoid unnecessary diffs in the generated lib/Makefile.am.
17495         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
17496         the generated files.
17497         (func_import): Don't set cmd.
17498
17499 2005-08-31  Bruno Haible  <bruno@clisp.org>
17500
17501         * lib/strstr.c: Include <stddef.h>, for NULL.
17502         * lib/strcasestr.c: Likewise.
17503         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17504
17505 2005-08-31  Bruno Haible  <bruno@clisp.org>
17506
17507         * gnulib-tool: New option --macro-prefix.
17508         (func_import): Use macro_prefix.
17509         (import): Handle option --macro-prefix.
17510
17511 2005-08-31  Bruno Haible  <bruno@clisp.org>
17512
17513         * gnulib-tool (import): Rename most ac_* variables to cached_*.
17514         Also use new variables cached_lgpl, cached_libtool.
17515
17516 2005-08-31  Bruno Haible  <bruno@clisp.org>
17517
17518         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
17519         always instantiating them.
17520
17521 2005-08-31  Bruno Haible  <bruno@clisp.org>
17522
17523         * gnulib-tool (func_import): Read the previous cached settings
17524         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
17525         earlier added by gnulib but are now dropped. Warn when a gnulib file
17526         overwrites a non-gnulib file.
17527
17528 2005-08-31  Bruno Haible  <bruno@clisp.org>
17529
17530         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
17531         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
17532         projects that don't keep autogenerated files in CVS. Put into
17533         actioncmd only the specified modules, not the transitive closure.
17534
17535 2005-08-31  Bruno Haible  <bruno@clisp.org>
17536
17537         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
17538         Create directories that shall be filled.
17539         (import): Don't look for gl_* macros in configure.ac. Recurse across
17540         all directories containing a gnulib-cache.m4 files, if meaningful.
17541
17542 2005-08-31  Bruno Haible  <bruno@clisp.org>
17543
17544         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
17545         (import): Set seen_libtool when we see gl_LIBTOOL.
17546
17547 2005-08-31  Bruno Haible  <bruno@clisp.org>
17548
17549         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
17550         declaration macro definitions from generated gnulib.m4.
17551
17552 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
17553
17554         * lib/iconvme.h: Add prototype for iconv_alloc.
17555
17556 2005-08-29  Simon Josefsson  <jas@extundo.com>
17557
17558         * lib/iconvme.c: Fix errno.
17559
17560 2005-08-29  Bruno Haible  <bruno@clisp.org>
17561
17562         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
17563         that it works when the directory contains spaces.
17564
17565 2005-08-29  Bruno Haible  <bruno@clisp.org>
17566
17567         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
17568
17569 2005-08-29  Bruno Haible  <bruno@clisp.org>
17570
17571         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
17572         Emit more advice.
17573
17574 2005-08-29  Bruno Haible  <bruno@clisp.org>
17575         and Stepan Kasal  <kasal@ucw.cz>
17576
17577         * check-module: If more parameters are given, check each of them
17578         separately; add more exceptions, as noted by Jim Meyering.
17579         (check_module): New procedure.
17580         (%exempt_header): Now contains all exceptions.
17581
17582 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
17583
17584         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
17585
17586 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17587
17588         * lib/iconvme.c: Split iconv_string into iconv_alloc.
17589
17590 2005-08-28  Bruno Haible  <bruno@clisp.org>
17591
17592         * m4/gnulib-tool.m4: New file.
17593
17594 2005-08-27  Jim Meyering  <jim@meyering.net>
17595
17596         * modules/unistd-safer (Files): Add pipe-safer.c.
17597         * modules/fcntl-safer (Files): Add creat-safer.c.
17598
17599 2005-08-27  Jim Meyering  <jim@meyering.net>
17600
17601         * m4/stdlib-safer.m4: New file.  From coreutils.
17602         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
17603         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
17604         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
17605         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
17606         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
17607
17608 2005-08-27  Jim Meyering  <jim@meyering.net>
17609
17610         * lib/fopen-safer.c: Merge minor changes from coreutils.
17611         * lib/dup-safer.c: Likewise.
17612         * lib/fd-safer.c: Likewise.
17613
17614         Merge from coreutils.
17615         * lib/stdio--.h: New file.
17616         * lib/stdlib--.h: New file.
17617         * lib/mkstemp-safer.c: New file.
17618
17619         GNU tar needs these.
17620         * lib/pipe-safer.c: New file.
17621         * lib/creat-safer.c: New file.
17622         * lib/fcntl--.h (creat): Define to creat_safer.
17623         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
17624         * lib/unistd--.h (pipe): Define to pipe_safer.
17625         * lib/unistd-safer.h: Declare pipe_safer.
17626
17627 2005-08-26  Simon Josefsson  <jas@extundo.com>
17628
17629         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
17630         Haible <bruno@clisp.org>.
17631
17632 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
17633
17634         * lib/regex_internal.h: Remove all references to
17635         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
17636         or better.
17637         (bitset_not, bitset_merge, bitset_not_merge):
17638         (bitset_mask, re_string_allocate, re_string_construct):
17639         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
17640         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
17641         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
17642         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
17643         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17644         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17645         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
17646         (re_acquire_state_context):
17647         Remove unnecessary forward decls.
17648         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
17649         Put __attribute at function definition,
17650         now that the function decl has been removed.
17651         * lib/regex_internal.c (re_string_peek_byte_case):
17652         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
17653         Likewise.
17654
17655 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
17656
17657         * m4/regex.m4: Add AC_PREREQ(2.50).
17658         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
17659
17660 2005-08-25  Simon Josefsson  <jas@extundo.com>
17661
17662         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
17663         __fsetlocking.
17664
17665 2005-08-25  Simon Josefsson  <jas@extundo.com>
17666
17667         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
17668         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
17669         GLIBC specific code.
17670
17671 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17672
17673         Make regex safe for g++.  This fixes one real bug (an "err"
17674         that should have been "*err").  g++ problem reported by
17675         Sam Steingold.
17676         * lib/regex_internal.h (re_calloc): New macro, consistent with
17677         re_malloc etc.  All callers of calloc changed to use re_calloc.
17678         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
17679         not int.  All callers changed.
17680         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
17681         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
17682         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
17683         (find_recover_state): Change "err" to "*err"; this fixes what
17684         appears to be a real bug.
17685         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
17686         versus int.
17687
17688 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17689
17690         * modules/regex (Depends-on): Add malloc, since the code
17691         assumes that !malloc(0) means failure.
17692
17693 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17694
17695         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
17696
17697         alloca modernization/simplification for regex.
17698         * lib/regex.c: Remove portability cruft for alloca.  This no longer
17699         needs to be at the start of the file, and can be moved into
17700         regex_internal.h and simplified.
17701         * lib/regex_internal.h: Include <alloca.h>.
17702         (__libc_use_alloca) [!defined _LIBC]: New macro.
17703         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
17704         now works outside glibc.
17705
17706 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17707
17708         * config/srclist.txt: Add glibc bugs 1241, 1245.
17709
17710 2005-08-25  Jim Meyering  <jim@meyering.net>
17711
17712         * lib/open-safer.c: Include <config.h>.
17713         Otherwise, we'd lose LARGEFILE support in any file using
17714         e.g. "fcntl--.h"
17715
17716 2005-08-25  Bruno Haible  <bruno@clisp.org>
17717
17718         * m4/minmax.m4: Require autoconf 2.52.
17719         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
17720         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
17721         alternatives of translit over the alphabet.
17722         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
17723
17724 2005-08-24  Simon Josefsson  <jas@extundo.com>
17725
17726         * tests/test-getpass.c: New file.
17727
17728 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17729
17730         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
17731         for GNU regex features.
17732
17733 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17734
17735         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
17736         * lib/regex.h (regerror): Likewise.
17737
17738         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
17739         requires this.  (The code never needed it.)
17740
17741         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
17742         All uses of recently-renamed identifiers changed to use the new,
17743         POSIX-compliant names.  The code will build and run just fine
17744         without these changes, but it's better to eat our own dog food
17745         and use the standard-conforming names.
17746
17747         * lib/regex.h: Fix a multitude of POSIX name space violations.
17748         These changes have an effect only for programs that define
17749         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
17750         do not change anything for programs compiled in the normal way.
17751         Also, there is no effect on the ABI.
17752
17753         (_REGEX_SOURCE): New macro.
17754         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
17755         defined and _GNU_SOURCE is not; this fixes a name space violation.
17756
17757         Rename the following macros to obey POSIX requirements.
17758         The old names are still visible as macros if _REGEX_SOURCE is defined.
17759         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
17760         RE_BACKSLASH_ESCAPE_IN_LISTS.
17761         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
17762         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
17763         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
17764         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
17765         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
17766         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
17767         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
17768         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
17769         (REG_INTERVALS): renamed from RE_INTERVALS.
17770         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
17771         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
17772         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
17773         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
17774         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
17775         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
17776         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
17777         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
17778         RE_UNMATCHED_RIGHT_PAREN_ORD.
17779         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
17780         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
17781         (REG_DEBUG): renamed from RE_DEBUG.
17782         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
17783         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
17784         unusual, since we can't clash with the POSIX REG_ICASE.
17785         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
17786         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
17787         (REG_NO_SUB): renamed from RE_NO_SUB.
17788         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
17789         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
17790         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
17791         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
17792         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
17793         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
17794         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
17795         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
17796         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
17797         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
17798         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
17799         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
17800         RE_SYNTAX_POSIX_MINIMAL_BASIC.
17801         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
17802         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
17803         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
17804         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
17805         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
17806         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
17807         (REG_FIXED): Renamed from REGS_FIXED.
17808         (REG_NREGS): Renamed from RE_NREGS.
17809
17810         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
17811         of other REG_* macros, since POSIX says the user is allowed to
17812         #undef these macros selectively.
17813
17814         (reg_errcode_t): Update comment stating what other tables need
17815         to be consistent.
17816
17817         Rename the following enum values to obey POSIX requirements.
17818         The old names are still visible as macros.
17819         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
17820         is not defined, since GNU is supposed to be a superset of POSIX as
17821         much as possible, and since we want reg_errcode_t to be a signed
17822         type for implementation consistency.
17823         (_REG_NOERROR): Renamed from REG_NOERROR.
17824         (_REG_NOMATCH): Renamed from REG_NOMATCH.
17825         (_REG_BADPAT): Renamed from REG_BADPAT.
17826         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
17827         (_REG_ECTYPE): Renamed from REG_ECTYPE.
17828         (_REG_EESCAPE): Renamed from REG_EESCAPE.
17829         (_REG_ESUBREG): Renamed from REG_ESUBREG.
17830         (_REG_EBRACK): Renamed from REG_EBRACK.
17831         (_REG_EPAREN): Renamed from REG_EPAREN.
17832         (_REG_EBRACE): Renamed from REG_EBRACE.
17833         (_REG_BADBR): Renamed from REG_BADBR.
17834         (_REG_ERANGE): Renamed from REG_ERANGE.
17835         (_REG_ESPACE): Renamed from REG_ESPACE.
17836         (_REG_BADRPT): Renamed from REG_BADRPT.
17837         (_REG_EEND): Renamed from REG_EEND.
17838         (_REG_ESIZE): Renamed from REG_ESIZE.
17839         (_REG_ERPAREN): Renamed from REG_ERPAREN.
17840         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
17841         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
17842         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
17843         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
17844
17845         (_REG_RE_NAME, _REG_RM_NAME): New macros.
17846         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
17847         changed.  But support the old name if the new one is not defined
17848         and if _REGEX_SOURCE.
17849
17850         Change the following member names in struct re_pattern_buffer.
17851         The old names are still supported if !_REGEX_SOURCE.
17852         The new names are always supported, regardless of _REGEX_SOURCE.
17853         (re_buffer): Renamed from buffer.
17854         (re_allocated): Renamed from allocated.
17855         (re_used): Renamed from used.
17856         (re_syntax): Renamed from syntax.
17857         (re_fastmap): Renamed from fastmap.
17858         (re_translate): Renamed from translate.
17859         (re_can_be_null): Renamed from can_be_null.
17860         (re_regs_allocated): Renamed from regs_allocated.
17861         (re_fastmap_accurate): Renamed from fastmap_accurate.
17862         (re_no_sub): Renamed from no_sub.
17863         (re_not_bol): Renamed from not_bol.
17864         (re_not_eol): Renamed from not_eol.
17865         (re_newline_anchor): Renamed from newline_anchor.
17866
17867         Change the following member names in struct re_registers.
17868         The old names are still supported if !_REGEX_SOURCE.
17869         The new names are always supported, regardless of _REGEX_SOURCE.
17870         (rm_num_regs): Renamed from num_regs.
17871         (rm_start): Renamed from start.
17872         (rm_end): Renamed from end.
17873
17874         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
17875         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
17876         Prepend __ to parameter names.
17877
17878         Undo yesterday's changes.
17879
17880 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17881
17882         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
17883         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
17884         lib/regex.c.
17885
17886 2005-08-24  Jim Meyering  <jim@meyering.net>
17887
17888         Sync from coreutils.
17889         * m4/fcntl-safer.m4: New file.
17890
17891         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
17892         and object files for this module.
17893
17894 2005-08-24  Jim Meyering  <jim@meyering.net>
17895
17896         Sync from coreutils.
17897         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
17898
17899 2005-08-24  Jim Meyering  <jim@meyering.net>
17900
17901         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
17902         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
17903
17904 2005-08-24  Jim Meyering  <jim@meyering.net>
17905
17906         * modules/fcntl-safer: New module.
17907         * modules/fts (Depends-on): Add fcntl-safer.
17908         * MODULES.html.sh (File descriptor based Input/Output):
17909         Add fcntl-safer.
17910
17911 2005-08-24  Bruno Haible  <bruno@clisp.org>
17912
17913         Support for unit test modules.
17914         * modules/README: Mention tests modules.
17915         * modules/TEMPLATE-TESTS: New file.
17916         * gnulib-tool: New options --extract-tests-module, --with-tests and
17917         --tests-base (unused for the moment).
17918         (testsbase, inctests): New variables.
17919         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
17920         (func_verify_module): Exclude TEMPLATE-TESTS.
17921         (func_verify_nontests_module, func_verify_tests_module): New functions.
17922         (func_get_dependencies): Add implicit dependency for tests modules.
17923         (func_get_tests_module): New function.
17924         (func_modules_transitive_closure): When --with-tests was specified,
17925         include the unit tests as well, unless explicitly avoided.
17926         (func_emit_lib_Makefile_am): Ignore the tests modules here.
17927         (func_emit_tests_Makefile_am): New function.
17928         (func_create_testdir): When --with-tests was specified, emit a
17929         tests/ directory.
17930         * MODULES.html.sh (Future developments): Update.
17931
17932 2005-08-24  Bruno Haible  <bruno@clisp.org>
17933
17934         * modules/tls-tests: New file.
17935         * tests/test-tls.c: New file, from GNU gettext.
17936
17937 2005-08-24  Bruno Haible  <bruno@clisp.org>
17938
17939         * modules/lock-tests: New file.
17940         * tests/test-lock.c: New file, from GNU gettext.
17941
17942 2005-08-24  Bruno Haible  <bruno@clisp.org>
17943
17944         * lib/lock.h: Add multiple inclusion guard.
17945         * lib/tls.h: Add multiple inclusion guard.
17946
17947 2005-08-24  Bruno Haible  <bruno@clisp.org>
17948
17949         * gnulib-tool: Add support for the --aux-dir option to
17950         --create-testdir, --create-megatestdir, --test, --megatest.
17951         (func_create_testdir, func_create_megatestdir): Optionally emit a
17952         AC_CONFIG_AUX_DIR directive.
17953         (create-testdir, create-megatestdir, test, megatest): Provide a
17954         default value for $auxdir.
17955
17956 2005-08-24  Bruno Haible  <bruno@clisp.org>
17957
17958         * gnulib-tool (import): Use compound statement instead of subshell
17959         where possible.
17960
17961 2005-08-24  Bruno Haible  <bruno@clisp.org>
17962
17963         * gnulib-tool (import): Change --aux-dir default to "build-aux".
17964
17965 2005-08-24  Bruno Haible  <bruno@clisp.org>
17966
17967         * gnulib-tool (func_version): Update.
17968
17969 2005-08-24  Bruno Haible  <bruno@clisp.org>
17970
17971         * gnulib-tool (func_import, func_create_testdir,
17972         func_create_megatestdir): Quote all autoconf macro arguments.
17973
17974 2005-08-24  Bruno Haible  <bruno@clisp.org>
17975
17976         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
17977         option --force, because --force causes the aclocal.m4 of each
17978         subdirectory to be newer than the corresponding config.h.in.
17979
17980 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17981
17982         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
17983         All contents moved to gl_REGEX.
17984         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
17985         assume that it does.
17986
17987 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17988
17989         * lib/regex.h (REG_NOSYS)
17990         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
17991         Define, since POSIX requires it as of 2001.
17992         (_REG_ENOSYS)
17993         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
17994         New private symbol, used to keep the enum signed in all cases.
17995         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
17996         Youngman in
17997         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
17998
17999         * lib/regex_internal.c (re_string_skip_chars, register_state):
18000         (calc_state_hash):
18001         Remove forward decls; no longer needed now that we use prototypes.
18002         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
18003         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
18004         (clean_state_log_if_needed): Likewise.
18005
18006 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18007
18008         * config/srclist.txt: Add glibc bugs 1231-1233.
18009
18010 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18011
18012         Fix problems reported by Sam Steingold in
18013         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
18014         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
18015         assumed that reg_errcode_t is a signed type, which is not
18016         necessarily true if _XOPEN_SOURCE is not defined.
18017         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
18018         since some compilers warn about it otherwise.
18019
18020 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18021
18022         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
18023         (init_word_char, create_initial_state, duplicate_node_closure):
18024         (fetch_token, peek_token_bracket, build_range_exp):
18025         (build_collating_symbol): Remove forward decls; no longer needed
18026         now that we use prototypes.
18027
18028         * lib/regcomp.c:
18029         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
18030         (re_compile_fastmap_iter, regcomp, regerror, regfree):
18031         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
18032         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
18033         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
18034         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
18035         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
18036         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
18037         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
18038         (build_range_exp, build_collating_symbol, parse_bracket_exp):
18039         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
18040         (build_charclass, build_charclass_op, fetch_number, create_tree):
18041         (create_token_tree, mark_opt_subexp, duplicate_tree):
18042         Use prototypes rather than old-style definitions.
18043
18044         * lib/regex_internal.c:
18045         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
18046         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
18047         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18048         (re_string_reconstruct, re_string_peek_byte_case):
18049         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
18050         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18051         (re_node_set_init_copy, re_node_set_add_intersect):
18052         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18053         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18054         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18055         (re_acquire_state, re_acquire_state_context, register_state):
18056         (create_ci_newstate, create_cd_newstate, free_state):
18057         Likewise.
18058         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
18059         re_search_2):
18060         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
18061         (re_search_internal, prune_impossible_nodes):
18062         (acquire_init_state_context, check_matching, static):
18063         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18064         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18065         (update_regs, sift_states_backward, build_sifted_states):
18066         (clean_state_log_if_needed, merge_state_array):
18067         (update_cur_sifted_state, add_epsilon_src_nodes):
18068         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18069         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18070         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18071         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18072         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18073         (check_arrival, check_arrival_add_next_nodes):
18074         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18075         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18076         (check_node_accept_bytes, check_node_accept, extend_buffers):
18077         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18078         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18079         (sift_ctx_init):
18080         Likewise.
18081
18082         * lib/regex_internal.h:
18083         (re_string_allocate, re_string_construct, re_string_reconstruct):
18084         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18085         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18086         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18087         (re_string_context_at, re_string_peek_byte_case):
18088         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18089         is defined, since we now use prototypes always.
18090
18091         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18092         C89 or better.  All uses removed.
18093
18094 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18095
18096         * config/srclist.txt: Add glibc bugs 1220-1227.
18097
18098 2005-08-20  Jim Meyering  <jim@meyering.net>
18099
18100         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18101         of unused local, dfa.
18102
18103 2005-08-20  Bruno Haible  <bruno@clisp.org>
18104
18105         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18106
18107 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18108
18109         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18110         (re_node_set_insert_last, re_dfa_add_node):
18111         Rename local variables to avoid GCC shadowing warnings.
18112
18113 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18114
18115         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18116         [defined lint]: Suppress bogus uninitialized-variable warnings.
18117
18118         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18119         and let the caller return REG_ESPACE if out of space.  This
18120         removes an uninitialied-variable warning with GCC 4.0.1, and also
18121         avoids taking the address of a local variable.  All callers
18122         changed.
18123
18124 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18125
18126         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18127         $LIBCSRC/posix/regexec.c.
18128         Add glibc bug 1217 for regcomp.c.
18129
18130 2005-08-19  Jim Meyering  <jim@meyering.net>
18131
18132         * lib/regexec.c (proceed_next_node): Redo local variables to
18133         avoid GCC shadowing warnings.
18134
18135 2005-08-18  Bruno Haible  <bruno@clisp.org>
18136
18137         * lib/strstr.c (strstr): Fix return value in multibyte case.
18138         * lib/strcasestr.c (strcasestr): Likewise.
18139
18140 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18141
18142         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18143
18144 2005-08-17  Jim Meyering  <jim@meyering.net>
18145
18146         Make the %s format (seconds since the epoch) work for a negative
18147         number and when used with a zero-padded field width, e.g. %015s.
18148
18149         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18150         label so that it precedes the code to set `digits'.  Otherwise,
18151         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18152         print `00-22'.  Now, it prints `-0022', as it should.
18153
18154 2005-08-17  Bruno Haible  <bruno@clisp.org>
18155
18156         * modules/strstr (Files): Add m4/mbrtowc.m4.
18157         (Depends-on): Add mbuiter.
18158
18159 2005-08-17  Bruno Haible  <bruno@clisp.org>
18160
18161         * modules/strcasestr: New file.
18162         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18163         strcasestr.
18164
18165 2005-08-17  Bruno Haible  <bruno@clisp.org>
18166
18167         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18168
18169 2005-08-17  Bruno Haible  <bruno@clisp.org>
18170
18171         * modules/mbuiter: New file.
18172         * MODULES.html.sh (Extended multibyte and wide character utilities):
18173         Add mbuiter.
18174
18175 2005-08-17  Bruno Haible  <bruno@clisp.org>
18176
18177         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18178         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18179
18180 2005-08-17  Bruno Haible  <bruno@clisp.org>
18181
18182         * m4/strcasestr.m4: New file.
18183
18184 2005-08-17  Bruno Haible  <bruno@clisp.org>
18185
18186         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18187         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18188
18189 2005-08-17  Bruno Haible  <bruno@clisp.org>
18190
18191         * lib/strcasestr.h: New file.
18192         * lib/strcasestr.c: New file.
18193
18194 2005-08-17  Bruno Haible  <bruno@clisp.org>
18195
18196         * lib/strcasecmp.c: Use mbuiter.h.
18197
18198 2005-08-17  Bruno Haible  <bruno@clisp.org>
18199
18200         * lib/mbuiter.h: New file.
18201
18202 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18203
18204         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18205         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18206         and gl_GETOPT are both invoked via different paths (as happens
18207         with GNU tar CVS because it uses both argp and getopt), the former
18208         wins.
18209
18210 2005-08-16  Bruno Haible  <bruno@clisp.org>
18211
18212         * modules/tls: New file.
18213         * MODULES.html.sh (Multithreading): Add tls.
18214
18215 2005-08-16  Bruno Haible  <bruno@clisp.org>
18216
18217         * modules/strnlen1: New file.
18218         * MODULES.html.sh (String handling): Add strnlen1.
18219
18220 2005-08-16  Bruno Haible  <bruno@clisp.org>
18221
18222         * modules/strcase (Files): Add m4/mbrtowc.m4.
18223         (Depends-on): Add strnlen1, mbchar.
18224
18225 2005-08-16  Bruno Haible  <bruno@clisp.org>
18226
18227         * modules/mbiter: New file.
18228         * MODULES.html.sh (Extended multibyte and wide character utilities):
18229         Add mbiter.
18230
18231 2005-08-16  Bruno Haible  <bruno@clisp.org>
18232
18233         * modules/mbfile: New file.
18234         * MODULES.html.sh (Extended multibyte and wide character utilities):
18235         Add mbfile.
18236
18237 2005-08-16  Bruno Haible  <bruno@clisp.org>
18238
18239         * modules/mbchar: New file.
18240         * MODULES.html.sh (Extended multibyte and wide character utilities):
18241         New section.
18242
18243 2005-08-16  Bruno Haible  <bruno@clisp.org>
18244
18245         * m4/tls.m4: New file, from GNU gettext.
18246
18247 2005-08-16  Bruno Haible  <bruno@clisp.org>
18248
18249         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18250         always.
18251         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18252
18253 2005-08-16  Bruno Haible  <bruno@clisp.org>
18254
18255         * m4/mbiter.m4: New file.
18256
18257 2005-08-16  Bruno Haible  <bruno@clisp.org>
18258
18259         * m4/mbfile.m4: New file.
18260
18261 2005-08-16  Bruno Haible  <bruno@clisp.org>
18262
18263         * m4/mbchar.m4: New file.
18264
18265 2005-08-16  Bruno Haible  <bruno@clisp.org>
18266
18267         * lib/tls.h: New file, from GNU gettext.
18268         * lib/tls.c: New file, from GNU gettext.
18269
18270 2005-08-16  Bruno Haible  <bruno@clisp.org>
18271
18272         * lib/strnlen1.h: New file.
18273         * lib/strnlen1.c: New file.
18274
18275 2005-08-16  Bruno Haible  <bruno@clisp.org>
18276
18277         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18278         (mbi_init): Update.
18279         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18280         NUL byte, not after it.
18281
18282 2005-08-16  Bruno Haible  <bruno@clisp.org>
18283
18284         * lib/strcase.h (strcasecmp): Add note in comments.
18285         * lib/strncasecmp.c: Use code from strcasecmp.c.
18286         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18287         (strcasecmp): Work correctly in multibyte locales.
18288
18289 2005-08-16  Bruno Haible  <bruno@clisp.org>
18290
18291         * lib/mbiter.h: New file.
18292
18293 2005-08-16  Bruno Haible  <bruno@clisp.org>
18294
18295         * lib/mbfile.h: New file.
18296
18297 2005-08-16  Bruno Haible  <bruno@clisp.org>
18298
18299         * lib/mbchar.h: New file.
18300         * lib/mbchar.c: New file.
18301
18302 2005-08-16  Bruno Haible  <bruno@clisp.org>
18303
18304         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18305         the valid ones. Makes the comparison operations transitive:
18306         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18307         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18308
18309 2005-08-15  Simon Josefsson  <jas@extundo.com>
18310
18311         * modules/ssize_t (License): Change to 'unlimited'.
18312
18313         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18314
18315 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18316
18317         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18318         Add comments for each pending glibc patch.
18319
18320 2005-08-15  Bruno Haible  <bruno@clisp.org>
18321
18322         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18323         __cplusplus is defined.
18324
18325 2005-08-14  Jim Meyering  <jim@meyering.net>
18326
18327         Sync from coreutils.
18328
18329         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18330         Use the hash-table-based cycle-detection code not just when
18331         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18332         Reported by James Youngman in
18333         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18334         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18335         FTS_TIGHT_CYCLE_CHECK.
18336         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18337         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18338         once again.
18339         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18340         * lib/fts.c (fd_safer): Remove decl.
18341         Include fcntl--.h rather than unistd-safer.h
18342         (fts_safe_changedir): Don't call fd_safer; no longer needed
18343         now that we include fcntl--.h.
18344
18345 2005-08-12  Simon Josefsson  <jas@extundo.com>
18346
18347         * modules/getndelim2: Use ssize_t module.
18348         * modules/getnline: Likewise.
18349         * modules/safe-read: Likewise.
18350         * modules/xreadlink: Likewise.
18351
18352         * modules/ssize_t: New file.
18353
18354 2005-08-12  Simon Josefsson  <jas@extundo.com>
18355
18356         * m4/readline.m4: Look for termcap, curses or ncurses if required.
18357
18358 2005-08-12  Simon Josefsson  <jas@extundo.com>
18359
18360         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18361         ssize_t.
18362
18363 2005-08-12  Simon Josefsson  <jas@extundo.com>
18364
18365         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
18366         readline, getdelim and check_version.
18367         (Support for systems lacking ISO C 99: Sizes of integer types):
18368         Add size_max.
18369
18370 2005-08-12  Bruno Haible  <bruno@clisp.org>
18371
18372         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
18373
18374 2005-08-11  Simon Josefsson  <jas@extundo.com>
18375
18376         * modules/readline: New file.
18377
18378         * modules/strnlen (Files): Add strnlen.h.
18379
18380 2005-08-11  Simon Josefsson  <jas@extundo.com>
18381
18382         * m4/readline.m4: New file.
18383
18384 2005-08-11  Simon Josefsson  <jas@extundo.com>
18385
18386         * lib/readline.h, readline.c: New file.
18387
18388 2005-08-11  Simon Josefsson  <jas@extundo.com>
18389
18390         * doc/gnulib.texi (Initial import, Finishing touches): Mention
18391         gl_AVOID.
18392
18393 2005-08-11  Bruno Haible  <bruno@clisp.org>
18394
18395         * lib/strnlen.h (strnlen): Change parameter name to match comment.
18396
18397 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
18398
18399         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
18400
18401 2005-08-10  Simon Josefsson  <jas@extundo.com>
18402
18403         * tests/test-iconvme.c: New file.
18404
18405 2005-08-10  Simon Josefsson  <jas@extundo.com>
18406
18407         * m4/strnlen.m4: New file.
18408
18409         * m4/strndup.m4: Don't check for strnlen declaration, done in
18410         strnlen.m4.
18411
18412 2005-08-10  Simon Josefsson  <jas@extundo.com>
18413
18414         * lib/strndup.c: Use strnlen.h.
18415
18416         * lib/strnlen.h: New file.
18417
18418 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18419
18420         * README: Typos.
18421
18422 2005-08-02  Simon Josefsson  <jas@extundo.com>
18423
18424         * modules/readline: New file.
18425
18426 2005-08-02  Simon Josefsson  <jas@extundo.com>
18427
18428         * modules/getdelim: New file.
18429
18430         * modules/getline: Rewrite, don't use getndelim2.
18431
18432 2005-08-02  Simon Josefsson  <jas@extundo.com>
18433
18434         * m4/getline.m4: Separate out getdelim stuff into separate module.
18435
18436         * m4/getdelim.m4: New file.
18437
18438 2005-08-02  Simon Josefsson  <jas@extundo.com>
18439
18440         * lib/getline.h, getline.c: Rewrite.
18441
18442         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
18443
18444 2005-07-31  Bruno Haible  <bruno@clisp.org>
18445
18446         * lib/lock.h (gl_lock_initializer): New macro.
18447         (gl_lock_define_initialized): Use it.
18448         (gl_rwlock_initializer): New macro.
18449         (gl_rwlock_define_initialized): Use it.
18450         (gl_recursive_lock_initializer): New macro.
18451         (gl_recursive_lock_define_initialized): Use it.
18452
18453 2005-07-30  Karl Berry  <karl@gnu.org>
18454
18455         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
18456         Report from Ben Pfaff, regarding getopt.
18457
18458 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
18459
18460         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
18461         normal way.
18462         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
18463         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
18464         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
18465         (gl_GETOPT): Use the new macros.  Most of the implementation
18466         is moved to the new macros.  This is for programs like Emacs
18467         that don't want all the functionality of gl_GETOPT.
18468
18469 2005-07-26  Bruno Haible  <bruno@clisp.org>
18470
18471         * m4/lock.m4: Update from GNU gettext.
18472
18473 2005-07-26  Bruno Haible  <bruno@clisp.org>
18474
18475         * lib/lock.h: Update from GNU gettext.
18476         * lib/lock.c: Update from GNU gettext.
18477
18478 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
18479
18480         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
18481         obsolescent AC_TRY_RUN.  Include the default includes files, for
18482         'exit'.
18483
18484 2005-07-24  Bruno Haible  <bruno@clisp.org>
18485
18486         * modules/visibility: New file.
18487         * MODULES.html.sh (Misc): Add visibility.
18488
18489 2005-07-24  Bruno Haible  <bruno@clisp.org>
18490
18491         * m4/visibility.m4: New file.
18492
18493 2005-07-24  Bruno Haible  <bruno@clisp.org>
18494
18495         * doc/visibility.texi: New file.
18496
18497 2005-07-22  Bruno Haible  <bruno@clisp.org>
18498
18499         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
18500         $(ALLOCA_H), redundant through BUILT_SOURCES.
18501         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
18502         redundant through BUILT_SOURCES.
18503         * modules/byteswap (Makefile.am): Remove explicit dependency on
18504         $(BYTESWAP_H), redundant through BUILT_SOURCES.
18505         * modules/fnmatch (Makefile.am): Remove explicit dependency on
18506         $(FNMATCH_H), redundant through BUILT_SOURCES.
18507         * modules/getopt (Makefile.am): Remove explicit dependency on
18508         $(GETOPT_H), redundant through BUILT_SOURCES.
18509         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
18510         redundant through BUILT_SOURCES.
18511         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
18512         redundant through BUILT_SOURCES.
18513         * modules/stdbool (Makefile.am): Remove explicit dependency on
18514         $(STDBOOL_H), redundant through BUILT_SOURCES.
18515         * modules/stdint (Makefile.am): Remove explicit dependency on
18516         $(STDINT_H), redundant through BUILT_SOURCES.
18517         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
18518         Remove explicit dependency on $(SYSEXITS_H).
18519         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
18520
18521 2005-07-18  Simon Josefsson  <jas@extundo.com>
18522
18523         * lib/check-version.c (check_version): Accept identical versions too.
18524
18525 2005-07-18  Bruno Haible  <bruno@clisp.org>
18526
18527         * modules/lock: New file.
18528         * MODULES.html.sh (Multithreading): New section.
18529
18530 2005-07-18  Bruno Haible  <bruno@clisp.org>
18531
18532         * m4/lock.m4: New file, from GNU gettext.
18533
18534 2005-07-18  Bruno Haible  <bruno@clisp.org>
18535
18536         * lib/lock.h: New file, from GNU gettext.
18537         * lib/lock.c: New file, from GNU gettext.
18538
18539 2005-07-18  Bruno Haible  <bruno@clisp.org>
18540
18541         * lib/lock.h (gl_once_t): New type.
18542         (gl_once_define, gl_once): New macros.
18543         * lib/lock.c (fresh_once): New variable.
18544         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
18545         functions.
18546
18547 2005-07-16  Simon Josefsson  <jas@extundo.com>
18548
18549         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
18550         workaround, suggested by Bruno.
18551
18552 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18553
18554         * modules/xalloc (Depends-on): Add xalloc-die.
18555         * modules/xvasprintf (Depends-on): Add xalloc-die.
18556
18557 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18558
18559         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
18560         with a minor change.
18561
18562 2005-07-15  Bruno Haible  <bruno@clisp.org>
18563
18564         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
18565         When using lib/poll.c, define poll as rpl_poll.
18566
18567 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
18568
18569         * modules/argp (Depends-on): Remove unlocked-io.
18570
18571 2005-07-14  Derek Price  <derek@ximbiot.com>
18572
18573         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
18574         for glob symlink bug.
18575
18576 2005-07-14  Bruno Haible  <bruno@clisp.org>
18577
18578         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
18579         Instead, test for *_unlocked function declarations directly.
18580
18581 2005-07-11  Simon Josefsson  <jas@extundo.com>
18582
18583         * modules/size_max: New file.
18584
18585         * modules/xsize: Depend on size_max module for size_max.m4.
18586
18587 2005-07-11  Simon Josefsson  <jas@extundo.com>
18588
18589         * lib/size_max.h: New file.
18590
18591 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
18592
18593         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
18594         copyright symbol and the year.
18595         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
18596         (version_etc_va): Use parameterized copyright notice.
18597         Reword to conform to the current GNU coding standards.
18598
18599 2005-07-11  Karl Berry  <karl@gnu.org>
18600
18601         * doc/gnulib.texi (Quoting): new node.
18602         (Initial import): more info, from Patrice.
18603
18604 2005-07-11  Bruno Haible  <bruno@clisp.org>
18605
18606         * gnulib-tool (func_usage): Document option --avoid.
18607         (Command line options): Handle --avoid.
18608         (func_acceptable): New function.
18609         (func_modules_transitive_closure): Use it.
18610
18611 2005-07-11  Bruno Haible  <bruno@clisp.org>
18612
18613         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
18614         Reported by Jim Meyering.
18615
18616 2005-07-10  Bruno Haible  <bruno@clisp.org>
18617
18618         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
18619         Needed when size_t is smaller than 'unsigned int'.
18620         Reported by Paul Eggert.
18621
18622 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18623
18624         * modules/argp (Depends-on): Add unlocked-io
18625
18626 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18627
18628         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
18629         block of defines.
18630
18631 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
18632
18633         * config/srclist.txt: Comment out regcomp.c, since we have a porting
18634         fix now.
18635
18636 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
18637         and Paul Eggert  <eggert@cs.ucla.edu>
18638
18639         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
18640         in wint_t, not wchar_t.  Remove now-unnecessary cast.
18641
18642 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18643
18644         * modules/regex (Files): Add lib/regex_internal.c,
18645         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
18646         (Depends-on): Add extensions.
18647         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
18648
18649 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18650
18651         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
18652         pathconf.
18653         * m4/same.m4 (gl_SAME): Likewise.
18654         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
18655
18656         * m4/regex.m4: Adjust to new libc regex implementation.
18657         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
18658         all the .c and .h parts of (the new) regex.
18659         Quote the m4 stuff better.
18660         Check for RE_ICASE bug of old gnulib.
18661         Check for REG_STARTEND of recent libc.
18662         Rename local variables from jm_* to gl_*.
18663         Quote operand of "test -f".
18664         Say "recent enough" version of libc, not "version 2".
18665         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
18666         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
18667         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
18668         Remove check for btowc, isascii.
18669         Require AM_LANGINFO_CODESET.
18670
18671 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18672
18673         * lib/regex.c, regex.h: Sync from libc.
18674         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
18675         * lib/regexec.c:
18676         New files, synced from libc, except that regex_internal.h
18677         currently has a small porting fix.
18678
18679 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18680
18681         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
18682         regex_internal.c, regexec.c.
18683         Add regex_internal.h too, but as a comment, since the libc version
18684         is currently broken in gnulib mode.
18685
18686 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
18687
18688         Support programs like Emacs that use gnulib but not gettext.
18689         * MODULES.html.sh (Internationalization functions): Add gettext-h.
18690         * modules/gettext-h: New file.
18691         * modules/gettext (Files): Remove lib/gettext.h.
18692         (Depends-on): Add gettext-h.
18693         (Makefile.am): Remove lib_SOURCES.
18694         * modules/argmatch, modules/c-stack, modules/closeout:
18695         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
18696         * modules/execute, modules/file-type, modules/getaddrinfo:
18697         * modules/getopt, modules/human, modules/javacomp:
18698         * modules/javaexec, modules/mkdir-p, modules/obstack:
18699         * modules/openat, modules/pagealign_alloc, modules/pipe:
18700         * modules/quotearg, modules/regex, modules/rpmatch:
18701         * modules/unicodeio, modules/userspec, modules/version-etc:
18702         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
18703         * modules/xsetenv:
18704         Depend on gettext-h, not gettext.
18705
18706 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
18707
18708         * gnulib-tool (func_import): Add support for 'public domain' license.
18709         * modules/alloca, modules/atexit, modules/memmove:
18710         Now public domain, not GPL.
18711         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
18712         * modules/realloc, modules/strerror, modules/strtod:
18713         Now LGPL, not GPL.
18714
18715 2005-07-05  Bruno Haible  <bruno@clisp.org>
18716
18717         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
18718         autoconf CVS. Needed for mingw.
18719
18720 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18721
18722         Remove the dependency of the strftime module on the tzset module.
18723         * modules/strftime (Depends-on): Remove dependency on tzset.
18724
18725 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18726
18727         Remove the dependency of the strftime module on the tzset module.
18728         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
18729         gl_FUNC_TZSET_CLOBBER.
18730
18731 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18732
18733         Remove the dependency of the strftime module on the tzset module.
18734         * lib/strftime.c (my_strftime)
18735         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
18736         Copy the input structure, to work around some of the bug with
18737         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
18738         Solaris releases, you should also use the tzset module, but we won't
18739         require it as a dependency any more since we don't want LGPLed code
18740         to depend on GPLed code.
18741
18742 2005-07-02  Jim Meyering  <jim@meyering.net>
18743
18744         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
18745         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
18746         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
18747         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
18748
18749 2005-07-02  Jim Meyering  <jim@meyering.net>
18750
18751         * lib/backupfile.c (backup_args): Change a `0' to NULL.
18752
18753 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
18754
18755         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
18756         declares only 'struct timespec;' (!).
18757
18758 2005-07-01  Jim Meyering  <jim@meyering.net>
18759
18760         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
18761         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
18762         * lib/save-cwd.c, tempname.c:
18763         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
18764         and don't include <sys/file.h>).
18765
18766 2005-06-29  Jim Meyering  <jim@meyering.net>
18767
18768         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
18769         type name.  Use the variable name instead.
18770         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
18771         Likewise.
18772
18773 2005-06-28  Simon Josefsson  <jas@extundo.com>
18774
18775         * modules/check-version (Files): Add check-version.m4.
18776
18777 2005-06-28  Simon Josefsson  <jas@extundo.com>
18778
18779         * m4/check-version.m4: New file, suggested by Jim Meyering
18780         <jim@meyering.net>.
18781
18782 2005-06-28  Simon Josefsson  <jas@extundo.com>
18783
18784         * lib/check-version.h, lib/check-version.c: New files.
18785
18786 2005-06-28  Simon Josefsson  <jas@extundo.com>
18787
18788         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
18789         collision with global variable.  Better indentation.  Don't
18790         increment buffer pointer beyond buffer end.  Based on comments
18791         from Paul Eggert <eggert@cs.ucla.edu>.
18792
18793         * lib/base64.h: Indent.
18794
18795 2005-06-28  Simon Josefsson  <jas@extundo.com>
18796
18797         * doc/gnulib.texi (Library version handling): New section.
18798
18799 2005-06-28  Jim Meyering  <jim@meyering.net>
18800
18801         * check-module (find_included_lib_files): Hard-code another
18802         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
18803         but modules/fts-lgpl (correctly) does not list those files.
18804
18805         * modules/canonicalize (Files): Add lib/pathmax.h.
18806
18807 2005-06-25  Simon Josefsson  <jas@extundo.com>
18808
18809         * modules/check-version: New file.
18810
18811 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
18812
18813         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
18814         initializer of struct addrinfo, as an indication that we don't
18815         care how many members the structure has.
18816
18817 2005-06-24  Derek Price  <derek@ximbiot.com>
18818         and Bruno Haible  <bruno@clisp.org>
18819
18820         Remove stat module & update lstat.
18821         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
18822         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
18823         * m4/stat.m4: Remove this file.
18824
18825 2005-06-24  Derek Price  <derek@ximbiot.com>
18826         and Bruno Haible  <bruno@clisp.org>
18827
18828         Remove stat module & update lstat.
18829         * lib/stat.c: Remove this file...
18830         (slash_aware_lstat): ...moving this content and its support...
18831         * lib/lstat.c (rpl_lstat): ...into here.
18832         * lib/lstat.h: New file.
18833
18834 2005-06-24  Derek Price  <derek@ximbiot.com>
18835         and Bruno Haible  <bruno@clisp.org>
18836
18837         Remove stat module & update lstat.
18838         * config/srclist.txt (libc sources): Remove stat.
18839
18840 2005-06-24  Derek Price  <derek@ximbiot.com>
18841         and Bruno Haible  <bruno@clisp.org>
18842
18843         Remove stat module & update lstat.
18844         * MODULES.html.sh (stat): Remove.
18845         * MODULES.html: Regenerated.
18846         * modules/lstat (Description): Correct function name.
18847         (Files): Add "lstat.h".
18848         (Depends-on): Remove stat, add xalloc, stat-macros.
18849         * modules/stat: Remove this file.
18850         (Include): Add "lstat.h", remove <sys/stat.h>.
18851
18852 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
18853
18854         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
18855         (ranged_convert): Don't save conversion in a temporary struct.
18856         This causes a warning with GCC 4.0.0, and anyway in the typical
18857         case it's not worth the extra 100 bytes or so of code.
18858         (ranged_convert, __mktime_internal): When calling a function via a
18859         pointer P, use P () rather than (*P) (), as we now assume C89 or
18860         better.
18861
18862 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18863
18864         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
18865         "who -r" failed to give output.  Problem reported by Tim Waugh.
18866
18867         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
18868         (xcalloc): Use it to avoid needless tests.
18869         Problem reported by Jim Meyering.
18870
18871 2005-06-20  Derek Price  <derek@ximbiot.com>
18872
18873         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
18874         unnecessary for Autoconfs > 2.59c.
18875
18876 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18877
18878         * lib/argp.h (__option_is_short): Check upper limit of
18879         __key. Isprint() requires its argument to have the value
18880         of an unsigned char or EOF.
18881
18882 2005-06-16  Jim Meyering  <jim@meyering.net>
18883
18884         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
18885         when either N or S is zero.
18886
18887 2005-06-16  Derek Price  <derek@ximbiot.com>
18888
18889         * m4/bison.m4: Declare YACC & YFLAGS precious.
18890
18891 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
18892
18893         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
18894         multibyte string or pattern, fall back on unibyte matching.
18895         Problem reported by James Youngman.
18896
18897 2005-06-08  Bruno Haible  <bruno@clisp.org>
18898
18899         * modules/csharpcomp: New file.
18900         * MODULES.html.sh (C#): Add csharpcomp.
18901
18902 2005-06-08  Bruno Haible  <bruno@clisp.org>
18903
18904         * m4/csharpcomp.m4: New file, from GNU gettext.
18905
18906 2005-06-08  Bruno Haible  <bruno@clisp.org>
18907
18908         * lib/csharpcomp.h: New file, from GNU gettext.
18909         * lib/csharpcomp.c: New file, from GNU gettext.
18910         * lib/csharpcomp.sh.in: New file, from GNU gettext.
18911
18912 2005-06-08  Bruno Haible  <bruno@clisp.org>
18913
18914         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
18915         warning on mingw.
18916
18917 2005-06-07  Derek Price  <derek@ximbiot.com>
18918
18919         Sync from CVS.
18920         * lib/glob_.h: Indent nested #ifdef.
18921
18922 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18923
18924         Sync from coreutils.
18925         Use "file name" when talking about file names, instead of "filename"
18926         or "path", as per the GNU coding standards.
18927         * lib/mkdir-p.c: Renamed from makepath.c.
18928         (make_dir_parents): Renamed from make_path.  All callers changed.
18929         * lib/mkdir-p.h: Likewise.  All includers changed.
18930         * lib/filenamecat.c: Renamed from path-concat.c.
18931         (file_name_concat): Renamed from path_concat.  All callers changed.
18932         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
18933         * lib/filenamecat.h: Likewise.  All includers changed.
18934         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
18935         in comments or local variable names.
18936         * lib/basename.c: Likewise.
18937         * lib/canonicalize.c, canonicalize.h: Likewise.
18938         * lib/dirname.c, dirname.h: Likewise.
18939         * lib/euidaccess.c: Likewise.
18940         * lib/exclude.c: Likewise
18941         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
18942         * lib/fsusage.c, fsuage.h: Likewise.
18943         * lib/fts.c, fts_.h: Likewise.
18944         * lib/getcwd.c: Likewise.
18945         * lib/getloadavg.c: Likewise.
18946         * lib/mkstemp.c: Likewise.
18947         * lib/mountlist.c, mountlist.h: Likewise.
18948         * lib/openat.c, openat.h: Likewise.
18949         * lib/readlink-stub.c: Likewise.
18950         * lib/readutmp.c, readutmp.h: Likewise.
18951         * lib/rename.c: Likewise.
18952         * lib/rmdir.c: Likewise.
18953         * lib/same.c: Likewise.
18954         * lib/savedir.c: Likewise.
18955         * lib/stripslash.c: Likewise.
18956         * lib/tempname.c: Likewise.
18957         * lib/xreadlink.c: Likewise.
18958         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
18959         All uses changed.
18960         * lib/exclude.h: Likewise.
18961
18962         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
18963         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18964         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
18965         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18966         * lib/pathmax.h: Include <limits.h> unconditionally, since other
18967         files have been getting away with it for years (MORE/BSD 4.3
18968         is extinct now).
18969         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
18970         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18971
18972         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
18973         Define to 256, not 255, as per modern POSIX.
18974
18975 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18976
18977         Sync from coreutils.
18978         Use "file name" when talking about file names, instead of "filename"
18979         or "path", as per the GNU coding standards.
18980         * MODULES.html.sh: mkdir-p renamed from makepath.
18981         filenamecat renamed from path-concat.
18982         * modules/filenamecat: Renamed from modules/path-concat.
18983         (Files): filenamecat.h and filenamecat.c renamed from
18984         path-concat.h and path-concat.c.
18985         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
18986         (Include): filenamecat.h, not path-concat.h.
18987         * modules/mkdir-p: Renamed from modules/makepath.
18988         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
18989         makepath.c.
18990         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
18991         (Include): mkdir-p.h, not makepath.h.
18992
18993 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18994
18995         Sync from coreutils.
18996         * m4/mkdir-p.m4: Renamed from makepath.m4.
18997         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
18998         Rename files from makepath.c to mkdir-p.c, and from
18999         makepath.h to mkdir-p.h.
19000         * m4/filenamecat.m4: Renamed from path-concat.m4.
19001         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
19002         Rename files from path-concat.c to filenamecat.c,
19003         and from path-concat.h to filenamecat.h.
19004         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
19005         "file name" in local variables or comments.
19006         * m4/rename.m4: Likewise.
19007
19008 2005-06-01  Bruno Haible  <bruno@clisp.org>
19009
19010         * modules/csharpexec: New file.
19011         * MODULES.html.sh (C#): New section.
19012
19013 2005-06-01  Bruno Haible  <bruno@clisp.org>
19014
19015         * m4/csharp.m4: New file, from GNU gettext.
19016         * m4/csharpexec.m4: New file, from GNU gettext.
19017
19018 2005-06-01  Bruno Haible  <bruno@clisp.org>
19019
19020         * lib/csharpexec.h: New file, from GNU gettext.
19021         * lib/csharpexec.c: New file, from GNU gettext.
19022         * lib/csharpexec.sh.in: New file, from GNU gettext.
19023
19024 2005-05-31  Derek Price  <derek@ximbiot.com>
19025             Paul Eggert  <eggert@cs.ucla.edu>
19026
19027         Sync from cvs.
19028         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19029
19030 2005-05-31  Derek Price  <derek@ximbiot.com>
19031             Paul Eggert  <eggert@cs.ucla.edu>
19032
19033         Sync from cvs.
19034         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19035
19036 2005-05-29  Derek Price  <derek@ximbiot.com>
19037
19038         * config/srclist.txt (glob_.h, glob.c): Add these files.
19039
19040 2005-05-29  Derek Price  <derek@ximbiot.com>
19041
19042         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
19043         * modules/glob: New file.
19044         * modules/getlogin_r: Add link to POSIX spec in description.
19045
19046 2005-05-29  Derek Price  <derek@ximbiot.com>
19047             Paul Eggert  <eggert@cs.ucla.edu>
19048
19049         * m4/glob.m4: New file.
19050
19051 2005-05-29  Derek Price  <derek@ximbiot.com>
19052             Paul Eggert  <eggert@cs.ucla.edu>
19053
19054         * lib/glob_.h, lib/glob.c: New files.
19055
19056 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19057
19058         * modules/fts (Files): Remove m4/inttypes-pri.m4.
19059         * modules/fts-lgpl (Depends-on): Remove gettext.
19060
19061 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19062
19063         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19064         and don't require gt_INTTYPES_PRI.
19065
19066 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19067
19068         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19069
19070         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19071         the configuration hassle isn't worth it.
19072         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19073         (LONGEST_MODIFIER, PRIuMAX): Remove.
19074
19075 2005-05-27  Bruno Haible  <bruno@clisp.org>
19076
19077         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19078
19079 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19080
19081         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19082         _POSIX_PTHREAD_SEMANTICS for Solaris.
19083
19084 2005-05-25  Derek Price  <derek@ximbiot.com>
19085
19086         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19087
19088 2005-05-25  Derek Price  <derek@ximbiot.com>
19089             Paul Eggert  <eggert@cs.ucla.edu>
19090
19091         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19092         * lib/getlogin_r.c, getlogin_r.h: New files.
19093
19094 2005-05-25  Bruno Haible  <bruno@clisp.org>
19095             Derek Price  <derek@ximbiot.com>
19096
19097         * lib/getlogin_r.h: Simplify API documentation.
19098
19099 2005-05-23  Derek Price  <derek@ximbiot.com>
19100
19101         * modules/minmax (Files): Add m4/minmax.m4.
19102         (configure.ac): Add gl_MINMAX.
19103
19104 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19105
19106         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19107         so that unistd-safer.h (GPL'ed code) need not be included.
19108
19109 2005-05-22  Bruno Haible  <bruno@clisp.org>
19110
19111         * m4/minmax.m4: New file.
19112         Based on a patch by Derek Price <derek@ximbiot.com>.
19113
19114 2005-05-22  Bruno Haible  <bruno@clisp.org>
19115
19116         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19117         (INT64_MIN): Fix definition.
19118         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19119
19120         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19121         NEED_SIGNED_INT_TYPES.
19122
19123         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19124         HAVE_SYSTEM_INTTYPES.
19125
19126 2005-05-22  Bruno Haible  <bruno@clisp.org>
19127
19128         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19129         Also include <sys/param.h> if it defines MIN, MAX.
19130         Based on a patch by Derek Price <derek@ximbiot.com>.
19131
19132 2005-05-21  Jim Meyering  <jim@meyering.net>
19133
19134         * modules/fts (Files): Add m4/inttypes-pri.m4.
19135         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19136
19137 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19138
19139         New fts module.
19140         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19141         (setup_dir, free_dir): New functions.
19142         (enter_dir, leave_dir): Define trivial
19143         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19144         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19145         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19146         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19147         Move to fts-cycle.c.
19148         (fts_open): Use setup_dir.
19149         (fts_close): Use free_dir.
19150         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19151         This adds a label and some gotos, but the alternatives were messier.
19152         Check for memory allocation failure when entering a dir.
19153         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19154         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19155         (FTS): New member fts_cycle, that is a union that contains the
19156         old active_dir_ht and cycle_state.  All uses changed to mention
19157         fts_cycle.ht and fts_cycle.state.
19158         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19159         fts.c, with the following changes:
19160         (setup_dir, free_dir): New functions.
19161         (enter_dir): Now returns bool.  Return true if successful, false
19162         if memory exhausted.  All callers changed.
19163         Do not bother partly cleaning up on
19164         memory allocation failure; that is free_dir's job.
19165         However, free ad if hash_insert fails, to avoid memory leak.
19166         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19167         fts->fts_options to see which union member to use.
19168
19169 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19170
19171         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19172         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19173
19174 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19175
19176         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19177
19178 2005-05-20  Jim Meyering  <jim@meyering.net>
19179
19180         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19181         Now a macro, to pacify GCC.
19182
19183 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19184
19185         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19186         of -1.
19187
19188 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19189
19190         * lib/chown.c (rpl_chown): Return -1 on failure.
19191
19192 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19193
19194         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19195         Don't check for stddef.h.
19196         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19197         don't use its results.
19198         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19199         since we include them unconditionally.  Don't require
19200         AM_STDBOOL_H, since stdbool is a prerequisite.
19201         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19202         since we assume C89 or better.
19203         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19204         as we don't use their results.
19205         Don't check for fchdir, memmove, memset, strrchr, as we use
19206         them unconditionally.
19207         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19208         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19209
19210 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19211
19212         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19213         Include <stddef.h> unconditionally, since we assume C89 now.
19214         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19215         * lib/fts.c: Include fts_.h first, to check interface.
19216         Do not include intprops.h; no longer needed.
19217         Include cycle-check.h and hash.h, since fts_.h no longer does.
19218         Remove unnecessary casts of closedir to void.
19219         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19220         decide whether to decrement nlinks.
19221         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19222         (FTS): Use struct hash_table * instead of Hash_table, so that
19223         we no longer need to include hash.h here.
19224
19225 2005-05-18  Jim Meyering  <jim@meyering.net>
19226
19227         * modules/dirfd (License): Change to LGPL.  Most of the code
19228         is already in the public domain.
19229
19230 2005-05-18  Jim Meyering  <jim@meyering.net>
19231
19232         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19233         Reported by Yoann Vandoorselaere.
19234
19235 2005-05-17  Jim Meyering  <jim@meyering.net>
19236
19237         * m4/fts.m4: New file, from coreutils.
19238
19239 2005-05-17  Jim Meyering  <jim@meyering.net>
19240
19241         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19242
19243 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19244
19245         Sync from coreutils.
19246         * m4/unlinkdir.m4: New file.
19247
19248 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19249
19250         Sync from coreutils.
19251         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19252         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19253         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19254         White space changes only.
19255         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19256         special.
19257         * lib/yesno.c: Include getline.h, not ctype.h.
19258         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19259         Use getline to remove arbitrary restriction on response length.
19260
19261 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19262
19263         * config/srclist-update: Spell out "Street" in FSF postal
19264         mail address; this is the style the FSF seems to prefer.
19265
19266         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19267         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19268         this updates FSF postal mail address.
19269
19270         Sync from coreutils.
19271         * modules/unlinkdir: New file.
19272         * modules/yesno (Depends-on): Add getline.
19273         * MODULES.html.sh (File system functions): Add unlinkdir.
19274
19275 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19276
19277         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19278         lib/strsep.h:
19279         Change the initial comment to refer to GPL, not LGPL.
19280         gnulib-tool will change it to LGPL as needed.
19281
19282         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19283         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19284         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19285         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19286         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19287         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19288         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19289         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19290         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19291         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19292         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19293         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19294         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19295         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19296         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19297         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19298         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19299         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19300         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19301         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19302         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19303         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19304         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19305         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19306         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19307         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19308         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19309         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19310         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19311         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19312         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19313         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19314         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19315         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19316         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19317         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19318         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19319         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19320         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19321         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19322         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19323         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19324         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19325         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19326         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19327         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19328         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19329         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19330         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19331         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19332         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19333         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19334         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19335         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19336         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19337         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19338         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19339         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19340         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19341         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19342         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19343         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19344         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19345         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19346         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19347         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
19348         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
19349         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
19350         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
19351         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
19352         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
19353         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
19354         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
19355         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
19356         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
19357         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
19358         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
19359         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
19360         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
19361         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
19362         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
19363         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
19364         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
19365         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
19366         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
19367         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
19368         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
19369         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
19370         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
19371         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
19372         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
19373         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
19374         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
19375         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
19376         lib/yesno.c, lib/yesno.h:
19377         Update FSF postal mail address.
19378
19379 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19380
19381         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
19382         tests/test-memmem.c, tests/test-stpncpy.c:
19383         Update FSF postal mail address.
19384
19385 2005-05-13  Bruno Haible  <bruno@clisp.org>
19386
19387         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
19388         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
19389         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
19390         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
19391         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
19392         Add support for 64-bit integers in the MSVC compiler.
19393
19394 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19395
19396         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
19397
19398 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
19399
19400         * gnulib-tool (func_import): Sort and uniquify recommended includes.
19401
19402 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
19403
19404         * doc/getdate.texi (General date syntax): Don't say that date
19405         date --iso-8601=ns generates acceptable dates; it doesn't yet.
19406         Problem reported by Nic Ferrier.
19407
19408 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19409
19410         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
19411         specified in ai_socktype. Fix invalid ai_protocol
19412         check. ai_protocol is usually set to 0 or depending on
19413         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
19414         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
19415         ai_socktype / ai_protocol in the returned addrinfo structure.
19416
19417 2005-05-10  Simon Josefsson  <jas@extundo.com>
19418
19419         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
19420         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
19421
19422 2005-05-10  Karl Berry  <karl@gnu.org>
19423
19424         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
19425         (from http://www.gnu.org/licenses).
19426         * doc/COPYING.LIB: also rename to COPYING.LESSER.
19427         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
19428         fdl.texi suffices.
19429
19430 2005-05-10  Karl Berry  <karl@gnu.org>
19431
19432         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
19433         (COPYING.DOC): remove.
19434
19435         * config/srclist-update: new FSF address.
19436
19437 2005-05-10  Derek Price  <derek@ximbiot.com>
19438
19439         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
19440         possible.
19441
19442 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19443             Bruno Haible  <bruno@clisp.org>
19444
19445         * modules/inet_ntop: New file.
19446         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19447         inet_ntop.
19448
19449 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19450             Bruno Haible  <bruno@clisp.org>
19451
19452         * m4/inet_ntop.m4: New file.
19453
19454 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19455             Bruno Haible  <bruno@clisp.org>
19456
19457         * lib/inet_ntop.h: New file.
19458         * lib/inet_ntop.c: New file, from glibc with modifications.
19459
19460 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
19461
19462         * modules/time_r (License): Change to LGPL.
19463         * modules/extensions (License): Change to LGPL.  Actually,
19464         the license is more permissive than that, but currently gnulib-tool
19465         doesn't know how to handle more-permissive licenses.
19466
19467         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
19468         Problem reported by Dave Love.
19469
19470 2005-05-08  Jim Meyering  <jim@meyering.net>
19471
19472         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
19473         blank.
19474
19475 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19476
19477         * modules/argmatch (Depends-on): Add stdbool.
19478         * modules/backupfile (Depends-on): Likewise.
19479         * modules/chdir-long (Depends-on): Likewise.
19480         * modules/closeout (Depends-on): Likewise.
19481         * modules/cycle-check (Depends-on): Likewise.
19482         * modules/dirname (Depends-on): Likewise.
19483         * modules/fnmatch (Depends-on): Likewise.
19484         * modules/fsusage (Depends-on): Likewise.
19485         * modules/fwriteerror (Depends-on): Likewise.
19486         * modules/getcwd (Depends-on): Likewise.
19487         * modules/getloadavg (Depends-on): Likewise.
19488         * modules/hard-locale (Depends-on): Likewise.
19489         * modules/makepath (Depends-on): Likewise.
19490         * modules/mountlist (Depends-on): Likewise.
19491         * modules/nanosleep (Depends-on): Likewise.
19492         * modules/posixtm (Depends-on): Likewise.
19493         * modules/quotearg (Depends-on): Likewise.
19494         * modules/readtokens (Depends-on): Likewise.
19495         * modules/readtokens0 (Depends-on): Likewise.
19496         * modules/readutmp (Depends-on): Likewise.
19497         * modules/save-cwd (Depends-on): Likewise.
19498         * modules/strftime (Depends-on): Likewise.
19499         * modules/userspec (Depends-on): Likewise.
19500         * modules/utimecmp (Depends-on): Likewise.
19501         * modules/xgetcwd (Depends-on): Likewise.
19502         * modules/xnanosleep (Depends-on): Likewise.
19503         * modules/xstrtod (Depends-on): Likewise.
19504         * modules/yesno (Depends-on): Likewise.
19505
19506 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
19507
19508         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
19509         needless checks.
19510
19511 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19512
19513         Merge from coreutils.  Among other things,
19514         add bulletproofing for cases where stdin, stdout, or stderr are closed.
19515         * lib/fd-safer.c: New file.
19516         * lib/fcntl-safer.h, open-safer.c: Remove.
19517         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
19518         * lib/dup-safer.c: Include unistd-safer.h first.
19519         Don't include errno.h.
19520         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
19521         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
19522         * lib/file-type.c: Rely on file-type.h change.
19523         * lib/getloadavg.c: Include unistd-safer.h.
19524         (getloadavg): Use safer open.
19525         * lib/getusershell.c: Include "stdio-safer.h".
19526         (getusershell): Use safer fopen.
19527         * lib/long-options.c (long_options): Use NULL rather than 0.
19528         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
19529         'free'.
19530         * lib/modechange.c: Likewise.
19531         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
19532         (MODE_DONE): New constant.
19533         (struct mode_change): Remove 'next' member.
19534         (make_node_op_equals): New function; like the old one of the
19535         same name, except it allocates an array.
19536         (mode_compile, mode_create_from_ref): Use it.
19537         (mode_compile): Allocate result as an array, not a linked list.
19538         Parse octal string ourself, so that we catch mistakes like "+0".
19539         (mode_adjust): Arg is an array, not a linked list.
19540         * lib/modechange.c: Include stat-macros.h, xalloc.h.
19541         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
19542         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
19543         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
19544         Remove.  This is now stat-macros.h's job.
19545         (talloc): Remove.  All callers replaced by xalloc, so that
19546         our invokers don't have to worry about reporting memory failures.
19547         (make_node_op_equals): Remove.
19548         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19549         New constants.
19550         (struct mode_change): Moved here from modechange.h.
19551         (mode_append_entry): Remove.
19552         (mode_compile): Remove MASKED_OPS arg, since it encouraged
19553         apps to have incorrect behavior.  Use simpler algorithm for head
19554         and tail.  Don't futz with umask; that's now the job of mode_adjust.
19555         Detect more invalid usages rather than having somewhat-random behavior.
19556         Don't insert an "a=" action, as that leads to incorrect behavior.
19557         (mode_compile, mode_create_from_ref): Return NULL on error instead
19558         of an enum, since now there's only one way to have an error.  All
19559         callers changed.
19560         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
19561         at the correct time.  Simplify calculation of "+u" and its ilk.
19562         Don't mishandle "+X".
19563         (mode_free): Remove "register" and localize decls.
19564         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19565         (struct mode_change): Move to modechange.c; callers don't
19566         need to see this stuff.
19567         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
19568         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
19569         (mode_change, mode_adjust): Reflect the new signatures noted above.
19570         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
19571         that might redefine system include files.
19572         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
19573         (my_usleep): Use NULL rather than (void *) 0.
19574         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
19575         Use siginterrupt to specify that system calls should be interrupted.
19576         (rpl_nanosleep): Move initialization of suspended closer to call of
19577         my_usleep.
19578         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
19579         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
19580         (desirable_utmp_entry): New function.
19581         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
19582         using x2nrealloc, to simplify logic.
19583         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
19584         size calculation.  Do not assume utmp file is a regular file.
19585         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
19586         (READ_UTMP_CHECK_PIDS): New constant.
19587         * lib/save-cwd.c: Include unistd-safer.h.
19588         (save_cwd): Use fd_safer.
19589         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
19590         [!_LIBC] Include "stat-macros.h" instead.
19591         * lib/unistd-safer.h (fd_safer): New decl.
19592
19593 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19594
19595         * modules/getloadavg (Depends-on): Add unistd-safer.
19596         * modules/getusershell (Depends-on): Add stdio-safer.
19597         * modules/lstat (Depends-on): Remove xalloc.
19598         * modules/mkstemp (Depends-on): Add stat-macros.
19599         * modules/modechange (Depends-on): Remove xstrtol.
19600         Add stat-macros, xalloc.
19601         * modules/save-cwd (Depends-on): Add unistd-safer.
19602         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
19603         * modules/unistd-safer (Files): Add lib/fd-safer.c
19604         (Makefile.am): Remove lib_SOURCES.
19605
19606         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
19607         Remove fcntl-safer; unistd-safer supersedes it.
19608
19609 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19610
19611         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
19612         AC_HEADER_STAT.
19613         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
19614         (gl_PREREQ_CHOWN): Remove.
19615         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
19616         it.  Don't require AC_HEADER_STAT.
19617         (gl_PREREQ_LSTAT): Remove.
19618         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
19619         Don't require AC_HEADER_STAT.
19620         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
19621         (gl_PREREQ_RMDIR): Remove.
19622         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
19623         mention stat-macros.h or AC_HEADER_STAT, since we'll make
19624         the stat-macros module a prerequisite.
19625         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
19626         * m4/filemode.m4 (gl_FILEMODE): Likewise.
19627         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
19628         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
19629         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
19630         variable names.
19631         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
19632         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
19633         variable prefixes.
19634         * m4/fcntl-safer.m4: Remove.
19635         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
19636         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
19637         Invoke gl_PREREQ_FD_SAFER.
19638         (gl_PREREQ_FD_SAFER): New macro.
19639         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
19640         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
19641         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
19642         Remove duplicate call to AC_LIBOBJ(readutmp).
19643         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
19644
19645         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
19646         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
19647
19648 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19649
19650         * MODULES.html.sh (Misc): Add byteswap.
19651
19652 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19653
19654         * modules/getcwd (Depends-on): Add extensions.
19655         * modules/openat (Depends-on): Likewise.
19656
19657 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19658
19659         * modules/byteswap: New file.
19660
19661 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19662
19663         * m4/byteswap.m4: New file.
19664
19665 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19666
19667         * lib/byteswap_.h: New file.
19668
19669 2005-04-25  Karl Berry  <karl@gnu.org>
19670
19671         * m4/gettext.m4: Update from GNU gettext 0.14.4.
19672
19673 2005-04-25  Albert Chin  <china@thewrittenword.com>
19674
19675         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
19676         Toolkit C bug.
19677
19678 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
19679
19680         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
19681         (func_ln_if_changed) Remove forcibly for no error message
19682         in case file does not exist.
19683
19684 2005-04-19  Simon Josefsson  <jas@extundo.com>
19685
19686         * gnulib-tool (Options): Make --symlink mean --symbolic.
19687
19688 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
19689
19690         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
19691
19692 2005-04-16  Simon Josefsson  <jas@extundo.com>
19693
19694         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
19695
19696 2005-04-15  Simon Josefsson  <jas@extundo.com>
19697
19698         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
19699
19700 2005-04-15  Simon Josefsson  <jas@extundo.com>
19701
19702         * gnulib-tool: Rename --symlink to --symbolic.
19703
19704 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
19705
19706         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
19707         symbolic links to files instead of copying/moving.  Add --aux-dir,
19708         specifying directory relative --dir where auxiliary build tools
19709         are placed.
19710
19711 2005-04-14  Bruno Haible  <bruno@clisp.org>
19712
19713         * modules/allocsa (License): Change to LGPL.
19714         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
19715
19716 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
19717
19718         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
19719         that "UTC +1 second" continues to work.  Problem reported
19720         by Dmitry V. Levin.
19721         (relunit_snumber): New rule.
19722         (relunit): Use it.
19723
19724 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
19725
19726         * lib/getdate.y (universal_time_zone_table): New constant.
19727         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
19728         universal_time_zone_table.
19729         (lookup_zone): Prefer universal_time_zone_table to
19730         local_time_zone_table, so that "GMT" time stamps are allowed in
19731         London during the summer.  Problem reported by Ian Abbott.
19732
19733 2005-04-12  Jim Meyering  <jim@meyering.net>
19734
19735         * lib/human.c (humblock): Set *options even when returning due to
19736         xstrtoumax conversion failure.  Thanks to a used-uninitialized
19737         warning from gcc-4.
19738
19739 2005-04-09  Jim Meyering  <jim@meyering.net>
19740
19741         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
19742         -Wuninitialized: initialize tm0.tm_year.
19743
19744 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
19745
19746         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
19747         count, since there's no maximum.  All uses changed.
19748         Add member dsts_seen.
19749         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
19750         not being INT_MAX.
19751         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
19752         Use pc_rels_seen to decide whther a date is absolute.
19753
19754         * lib/getdate.y (number): Don't overwrite year.
19755         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
19756         check.
19757
19758 2005-04-02  Simon Josefsson  <jas@extundo.com>
19759
19760         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
19761         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
19762
19763 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
19764
19765         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
19766         where no absolute path name can be longer than PATH_MAX.
19767
19768 2005-03-27  Jim Meyering  <jim@meyering.net>
19769
19770         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
19771
19772 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
19773
19774         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
19775         "one's complement" -> "ones' complement" in comment, as per Knuth.
19776         "value of type" -> "type or expression" in comment.
19777         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
19778
19779 2005-03-26  Jim Meyering  <jim@meyering.net>
19780
19781         Comment nits.
19782         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
19783         Correct typos: s/or/of/.
19784
19785 2005-03-26  Jim Meyering  <jim@meyering.net>
19786
19787         * modules/check-include-files: Move to ../ and rename to...
19788         * check-module: ...this.
19789
19790 2005-03-25  Jim Meyering  <jim@meyering.net>
19791
19792         * modules/xvasprintf (Files): Add xalloc.h.
19793
19794 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
19795
19796         * modules/gettext (Files): config/config.rpath ->
19797         build-aux/config.rpath
19798         * modules/iconv (Files): Likewise.
19799         Problem reported by Oskar Liljeblad.
19800
19801 2005-03-23  Jim Meyering  <jim@meyering.net>
19802
19803         * modules/check-include-files: New script to check for
19804         missing dependencies, multiple includes, etc.
19805
19806         * modules/c-strtold (Depends-on): Add xalloc.
19807         * modules/c-strtod (Depends-on): Add xalloc.
19808         * modules/hash (Depends-on): Add xalloc.
19809         (Files): Remove lib/xalloc.h.
19810
19811         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
19812         * modules/userspec (Files): Add lib/inttostr.h.
19813
19814 2005-03-23  Jim Meyering  <jim@meyering.net>
19815
19816         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
19817
19818 2005-03-22  Jim Meyering  <jim@meyering.net>
19819
19820         * modules/stat-macros: New module.
19821         * modules/canonicalize, modules/euidaccess, modules/file-type,
19822         * modules/filemode, modules/lchown, modules/makepath,
19823         * modules/rmdir, modules/stat: Depend on new stat-macros module
19824         rather than listing lib/stat-macros.h manually.
19825         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
19826
19827 2005-03-22  Jim Meyering  <jim@meyering.net>
19828
19829         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
19830
19831 2005-03-22  Bruno Haible  <bruno@clisp.org>
19832
19833         * config/srclist.txt: Replace target directory 'config' with
19834         'build-aux'.
19835         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
19836         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
19837         ../build-aux/.
19838
19839 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
19840
19841         * modules/chdir-long (Depends-on): Add mempcpy.
19842
19843         * modules/acl, modules/backupfile, modules/c-strtod,
19844         modules/c-strtold, modules/canon-host, modules/canonicalize,
19845         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
19846         modules/exclude, modules/exitfail, modules/file-type,
19847         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
19848         modules/getdate, modules/getline, modules/getpagesize,
19849         modules/getpass, modules/getugroups, modules/group-member,
19850         modules/hard-locale, modules/hash, modules/human, modules/idcache,
19851         modules/inttostr, modules/long-options, modules/makepath,
19852         modules/md5, modules/memcasecmp, modules/memcoll,
19853         modules/modechange, modules/mountlist, modules/path-concat,
19854         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
19855         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
19856         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
19857         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
19858         modules/strftime, modules/strndup, modules/strverscmp,
19859         modules/timespec, modules/unlocked-io, modules/userspec,
19860         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
19861         modules/yesno:
19862         Remove lib_SOURCES line from Makefile.am section, as this is now
19863         done automatically by the corresponding Autoconf macro.
19864
19865 2005-03-21  Jim Meyering  <jim@meyering.net>
19866
19867         Changes imported from coreutils.
19868
19869         * lib/cycle-check.c: Don't include xalloc.h.
19870
19871         * lib/path-concat.c: Don't include assert.h.
19872         (path_concat): Remove assertion that would have triggered
19873         for ABASE starting with more than one slash.
19874         Reported by Andreas Schwab.
19875
19876         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
19877         properly when ABASE is an absolute file name.
19878         Correct the description of this function.
19879         Include <assert.h>.
19880         Add an assertion and a test driver.
19881         This fixes a bug introduced on 2004-07-02.
19882         Andreas Schwab reported the resulting failure of cp --parents:
19883         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
19884
19885 2005-03-21  Jim Meyering  <jim@meyering.net>
19886
19887         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
19888         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
19889
19890 2005-03-21  Jim Meyering  <jim@meyering.net>
19891         and  Paul Eggert  <eggert@cs.ucla.edu>
19892
19893         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
19894         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
19895         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
19896         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
19897         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
19898         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
19899         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
19900         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
19901         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
19902         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
19903         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
19904         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
19905         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
19906         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
19907         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
19908         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
19909         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
19910         for these modules.
19911
19912 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
19913
19914         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
19915         (which shouldn't happen), generate nothing instead of returning 0
19916         immediately, so that nstrftime (NULL, ...) doesn't return 0.
19917
19918 2005-03-16  Bruno Haible  <bruno@clisp.org>
19919
19920         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
19921         HAVE_LONGLONG_64BIT.
19922
19923 2005-03-16  Bruno Haible  <bruno@clisp.org>
19924
19925         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
19926         HAVE_LONGLONG_64BIT.
19927
19928 2005-03-16  Bruno Haible  <bruno@clisp.org>
19929
19930         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
19931         HAVE_LONGLONG_64BIT.
19932
19933 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
19934
19935         * lib/strftime.c (my_strftime): Prepend space to format so that we can
19936         reliably distinguish strftime failure from empty output on POSIX
19937         hosts.
19938
19939 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
19940
19941         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
19942         (iconv_string): Don't guess a size-zero buffer, as that might cause
19943         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
19944         result would be 'too large', where 'too large' is (heuristically)
19945         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
19946         overflow concerns.  This will prevent some unwanted malloc failures
19947         when the inputs are very large.
19948
19949 2005-03-15  Karl Berry  <karl@gnu.org>
19950
19951         * config/srclist.txt (config.rpath): from gettext.
19952         * config/config.rpath: update.
19953
19954 2005-03-15  Bruno Haible  <bruno@clisp.org>
19955
19956         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
19957         to 'negate'.
19958
19959         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
19960         variable.
19961
19962         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
19963         results.
19964
19965 2005-03-14  Simon Josefsson  <jas@extundo.com>
19966
19967         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
19968         <fx@gnu.org>.
19969
19970 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
19971
19972         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
19973         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
19974         intprops.h.
19975         * lib/strtol.c: Likewise.
19976
19977 2005-03-14  Jim Meyering  <jim@meyering.net>
19978
19979         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
19980         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
19981         to be nonzero so that we (and caller) can detect the difference
19982         between a valid zero-length expansion and an error return, even
19983         when the underlying strftime fails before writing anything into
19984         that location.
19985
19986 2005-03-14  Bruno Haible  <bruno@clisp.org>
19987
19988         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
19989         Update from GNU gettext 0.14.3.
19990
19991 2005-03-10  Jim Meyering  <jim@meyering.net>
19992
19993         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
19994
19995 2005-03-10  Jim Meyering  <jim@meyering.net>
19996
19997         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
19998         so that this module works on systems without fchdir.
19999
20000 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20001
20002         Factor int-properties macros into a single file, except for
20003         glibc-related files.
20004         * lib/intprops.h: New file.
20005         * lib/getloadavg.c: Include it instead of limits.h.
20006         (INT_STRLEN_BOUND): Remove.
20007         * lib/human.c: Include intprops.h.
20008         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
20009         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
20010         302/1000.
20011         * lib/inttostr.h: Include intprops.h instead of limits.h.
20012         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
20013         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
20014         for consistency with intprops.h.
20015         (time_t_is_integer, twos_complement_arithmetic): Use them.
20016         * lib/sig2str.h: Include <signal.h>, intprops.h.
20017         (INT_STRLEN_BOUND): Remove.
20018         * lib/strftime.c (TYPE_SIGNED): Remove.
20019         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
20020         * lib/strtol.c: Adjust comments to match intprops.h.
20021         * lib/userspec.c: Include intprops.h.
20022         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
20023         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
20024         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
20025         instead of rolling our own expressions.
20026         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
20027
20028         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
20029         instead of int.
20030         (my_strftime): Do not mishandle years close to INT_MAX, by doing
20031         the right thing even if adding 1900 would overflow.  Similarly
20032         for tm_mon + 1 and tm_yday + 1.
20033         Make %Y always equivalent to %C%y, and similarly for %G and %g.
20034         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
20035         (DO_SIGNED_NUMBER): New macro.
20036         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
20037
20038 2005-03-07  Bruno Haible  <bruno@clisp.org>
20039
20040         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
20041
20042 2005-03-07  Bruno Haible  <bruno@clisp.org>
20043
20044         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
20045
20046 2005-03-04  Derek R. Price  <derek@ximbiot.com>
20047
20048         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
20049         (func_import): Only replace files via --import when they have actually
20050         changed.
20051
20052 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20053
20054         * m4/mmap-anon.m4: New file.
20055         * m4/pagealign_alloc.m4: New file.
20056
20057 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20058             Bruno Haible  <bruno@clisp.org>
20059
20060         * modules/pagealign_alloc: New file.
20061         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
20062
20063 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20064             Bruno Haible  <bruno@clisp.org>
20065
20066         * lib/pagealign_alloc.h: New file.
20067         * lib/pagealign_alloc.c: New file.
20068
20069 2005-03-03  Bruno Haible  <bruno@clisp.org>
20070
20071         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20072         Use an all-permissive copyright notice, recommended by RMS.
20073
20074 2005-03-02  Bruno Haible  <bruno@clisp.org>
20075
20076         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20077         of AIX, the replacement has to be done only after <string.h> is
20078         included, therefore not in config.h. stpncpy.h does the replacement,
20079         and stpncpy.c uses it.
20080
20081 2005-03-02  Bruno Haible  <bruno@clisp.org>
20082
20083         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20084         stpncpy.c uses it.
20085
20086 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20087
20088         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20089         The workaround isn't strictly needed for POSIX conformance, and
20090         it's too much of a pain to configure and maintain.  We'll ask
20091         people to fix their kernels instead.
20092         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20093         (NANOSLEEP_BUG_WORKAROUND): Remove.
20094         (xnanosleep): Remove the workaround.
20095
20096 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20097
20098         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20099         Reported by Derek Price.
20100         (Include): Add "timespec.h".
20101
20102         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20103
20104 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20105
20106         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20107         to detect nanosleep bug.
20108
20109 2005-03-01  Bruno Haible  <bruno@clisp.org>
20110
20111         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20112
20113 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20114
20115         * modules/gethrxtime: New file.
20116         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20117         (Depends-on): Add gethrxtime.
20118         (configure.ac): Add gl_XNANOSLEEP.
20119         (Makefile.am): Remove lib_SOURCES line.
20120
20121 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20122
20123         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20124         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20125
20126 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20127
20128         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20129         * lib/timespec.h (gettime): Return void, since it always
20130         succeeds now.  All uses changed.
20131         * lib/gettime.c (gettime) Likewise.
20132         [HAVE_NANOTIME]: Prefer nanotime.
20133         Assume gettimeofday succeeds, as POSIX requires.
20134         Assime time () succeeds, since other code already does.
20135         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20136         (timespec_subtract): Remove.
20137         (NANOSLEEP_BUG_WORKAROUND): New constant.
20138         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20139         things considerably.  Use it only on GNU/Linux hosts, since the
20140         workaround shouldn't be needed elsewhere.
20141
20142 2005-02-24  Bruno Haible  <bruno@clisp.org>
20143
20144         * modules/gettext (Files): Add m4/glibc2.m4.
20145
20146 2005-02-24  Bruno Haible  <bruno@clisp.org>
20147
20148         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20149         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20150         * m4/progtest.m4:
20151         Update from GNU gettext 0.14.2.
20152         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20153
20154 2005-02-24  Bruno Haible  <bruno@clisp.org>
20155
20156         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20157         * lib/config.charset: Update from GNU gettext 0.14.2.
20158
20159 2005-02-24  Bruno Haible  <bruno@clisp.org>
20160
20161         * lib/gettext.h: Update from GNU gettext 0.14.2.
20162
20163 2005-02-23  Simon Josefsson  <jas@extundo.com>
20164
20165         * m4/iconvme.m4: New file.
20166
20167 2005-02-23  Jim Meyering  <jim@meyering.net>
20168
20169         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20170         change.
20171         Thanks to Bruno Haible for catching it.
20172
20173 2005-02-22  Simon Josefsson  <jas@extundo.com>
20174
20175         * modules/iconvme: New file.
20176
20177         * MODULES.html.sh: Add iconvme.
20178
20179 2005-02-22  Simon Josefsson  <jas@extundo.com>
20180
20181         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20182
20183 2005-02-22  Simon Josefsson  <jas@extundo.com>
20184
20185         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20186
20187 2005-02-22  Jim Meyering  <jim@meyering.net>
20188
20189         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20190         s/ifndef/ifdef/.
20191
20192 2005-02-20  Neil Conway  <neilc@samurai.com>
20193
20194         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20195         returned by OSX/Darwin if the specified buffer is not large
20196         enough for the hostname.
20197
20198 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20199
20200         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20201         pass it to _help, otherwise the latter coredumps trying to
20202         dereference state.root_argp.
20203
20204 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20205
20206         * modules/chdir-long (Depends-on): Add memrchr.
20207         * modules/memrchr (Files): Add lib/memrchr.h.
20208         (Include): "memrchr.h".
20209
20210 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20211
20212         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20213
20214 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20215
20216         * lib/memrchr.h: New file.
20217         * lib/chdir-long.c: Include it.
20218         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20219         Don't bother including stddef.h.
20220
20221 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20222
20223         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20224         inclusion.
20225         Include <sys/types.h>, for dev_t.
20226         (ME_DUMMY, ME_REMOTE): Move from here....
20227         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20228         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20229         Dmitry V. Levin.
20230         Include mountlist.h first, to test the interface.
20231
20232 2005-01-29  Bruno Haible  <bruno@clisp.org>
20233
20234         * lib/progname.c (program_name): Initialize.
20235         Needed when linking statically on MacOS X.
20236
20237 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20238
20239         Sync from coreutils.
20240         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20241         (Depends-on): Add c-strtod.
20242         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20243
20244 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20245
20246         Sync from coreutils.
20247         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20248
20249         Remove files that are specific to coreutils.
20250         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20251
20252 2005-01-28  Bruno Haible  <bruno@clisp.org>
20253
20254         * modules/javacomp: New file.
20255         * MODULES.html.sh (Java): Add javacomp.
20256
20257 2005-01-28  Bruno Haible  <bruno@clisp.org>
20258
20259         * m4/javacomp.m4: New file, from GNU gettext.
20260
20261 2005-01-28  Bruno Haible  <bruno@clisp.org>
20262
20263         * lib/javacomp.sh.in: New file, from GNU gettext.
20264         * lib/javacomp.h: New file, from GNU gettext.
20265         * lib/javacomp.c: New file, from GNU gettext.
20266
20267 2005-01-26  Simon Josefsson  <jas@extundo.com>
20268
20269         * lib/gai_strerror.c: Use GPL in header.
20270
20271 2005-01-26  Bruno Haible  <bruno@clisp.org>
20272
20273         * modules/javaexec: New file.
20274         * MODULES.html.sh (Java): Add javaexec.
20275
20276 2005-01-26  Bruno Haible  <bruno@clisp.org>
20277
20278         * m4/javaexec.m4: New file, from GNU gettext.
20279
20280 2005-01-26  Bruno Haible  <bruno@clisp.org>
20281
20282         * lib/javaexec.sh.in: New file, from GNU gettext.
20283         * lib/javaexec.h: New file, from GNU gettext.
20284         * lib/javaexec.c: New file, from GNU gettext.
20285
20286 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20287
20288         * modules/lchown (Depends-on): Remove lchown.h
20289
20290 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20291
20292         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20293         must be defined if the header file was not found, in order
20294         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20295
20296 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20297
20298         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20299         initializers for struct pentry_state.
20300         (__argp_error): Check return value of __asprintf
20301         (__argp_failure): Translate error message
20302
20303         * lib/argp-parse.c: Removed braces around the expansion of N_()
20304
20305 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20306
20307         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20308         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20309         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20310         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20311         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20312         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20313         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20314         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20315         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20316         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20317         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20318         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20319         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20320         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20321         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20322         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20323         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20324         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20325         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20326         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20327         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20328         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20329         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20330         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20331         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20332         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20333         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20334         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20335         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20336         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20337         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20338         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20339         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20340         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20341         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20342         Use an all-permissive copyright notice, recommended by RMS.
20343
20344 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20345
20346         * modules/chdir-long (Depends-on): Remove mempcpy.
20347
20348 2005-01-21  Jim Meyering  <jim@meyering.net>
20349
20350         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
20351         same value as for Solaris 9.
20352
20353         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
20354         component length.  This included changing the parameter to be
20355         of type `char *' rather than `char const *'.
20356         * lib/chdir-long.h (chdir_long): Update prototype.
20357
20358         * lib/openat.c (fdopendir, fstatat): New functions.
20359         * lib/openat.h: Include headers required for use of DIR and struct
20360         stat.
20361         [AT_SYMLINK_NOFOLLOW]: Define.
20362         (fdopendir, fstatat): Add prototypes.
20363
20364 2005-01-21  Bruno Haible  <bruno@clisp.org>
20365
20366         * modules/classpath: New file.
20367         * MODULES.html.sh (Java): Add classpath.
20368
20369 2005-01-21  Bruno Haible  <bruno@clisp.org>
20370
20371         * lib/classpath.h: New file, from GNU gettext.
20372         * lib/classpath.c: New file, from GNU gettext.
20373
20374 2005-01-20  Simon Josefsson  <jas@extundo.com>
20375
20376         * modules/version-etc-fsf: New file.
20377
20378 2005-01-20  Simon Josefsson  <jas@extundo.com>
20379
20380         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
20381         * lib/version-etc.c: Remove version_etc_copyright.
20382         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
20383         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
20384
20385 2005-01-20  Simon Josefsson  <jas@extundo.com>
20386
20387         * lib/base64.h (isbase64): Add.
20388
20389         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
20390         using a unsigned prototype, don't inline.
20391         (base64_decode): Use it.
20392
20393 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20394
20395         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
20396         it.
20397
20398 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20399
20400         * lib/save-cwd.c (save_cwd): Remove code to support the case
20401         where fchdir is missing or flaky.
20402
20403 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20404
20405         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
20406
20407 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
20408
20409         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
20410         AC_LIBSOURCES now does this.
20411         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
20412         with new ullong_max module.
20413
20414 2005-01-19  Bruno Haible  <bruno@clisp.org>
20415
20416         * modules/sh-quote: New file.
20417         * MODULES.html.sh (Executing programs): Add sh-quote.
20418
20419 2005-01-19  Bruno Haible  <bruno@clisp.org>
20420
20421         * lib/sh-quote.h: New file, from GNU gettext.
20422         * lib/sh-quote.c: New file, from GNU gettext.
20423
20424 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20425
20426         Merge from coreutils.
20427         * m4/ullong_max.m4: New file.
20428         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
20429         (gl_MACROS): Assume localeconv exists.
20430
20431 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20432
20433         Merge changes from coreutils, as described below in several
20434         changelogs dated today.
20435
20436         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
20437         (O_DIRECTORY): Remove; not needed here, since "." must be
20438         a directory.  All uses removed.
20439         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
20440         universal on Suns, and we also need to test for IRIX.
20441         Revamp code to use 'if' rather than '#if'.
20442         Avoid unnecessary comparison of cwd->desc to 0.
20443
20444         * lib/utimens.c (futimens): Robustify the previous patch, by checking
20445         for known valid error numbers rather than observed invalid ones.
20446
20447 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20448
20449         * modules/ullong_max: New file.
20450
20451         * modules/chdir-long, modules/openat: New files.
20452         * modules/save-cwd (Depends-on): Depend on chdir-long.
20453         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
20454
20455 2005-01-18  Jim Meyering  <jim@meyering.net>
20456
20457         Merge from coreutils.
20458         * m4/chdir-long.m4, m4/openat.m4: New files.
20459         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
20460         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
20461         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
20462         is sane and DOES follow symlinks.  Besides, testing 20 different
20463         systems found no broken chown implementations.
20464         Prompted by a change in rsync's copy of this macro.
20465         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
20466
20467         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
20468
20469         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
20470         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
20471         NULL-means-set-to-current-time semantics.
20472         Remove temporary file immediately, rather than waiting
20473         for configure's at-exit trap code to do it.
20474
20475 2005-01-18  Jim Meyering  <jim@meyering.net>
20476
20477         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20478
20479         * lib/utimens.c (futimens): Account for the fact that futimes
20480         can also fail with errno == ENOSYS or errno == ENOENT.
20481         Patch from Dmitry V. Levin.
20482
20483         Change the name of the robust chdir function from chdir to chdir_long.
20484         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
20485         (restore_cwd): Use chdir_long, not chdir.
20486         * lib/chdir-long.c: Renamed from chdir.c.
20487         * lib/chdir-long.h: Renamed from chdir.h.
20488         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
20489         Hurd.
20490
20491 2005-01-18  Bruno Haible  <bruno@clisp.org>
20492
20493         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
20494         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
20495         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
20496         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
20497         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
20498         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
20499         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
20500         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
20501         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
20502         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
20503         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
20504         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
20505         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
20506         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
20507         Use an all-permissive copyright notice, recommended by RMS.
20508
20509 2005-01-18  Bob Proulx  <bob@proulx.com>
20510
20511         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
20512         simplify offsetof() macro construct to avoid compile failure with
20513         native HP-UX 11.0 ANSI C compiler.
20514
20515 2005-01-17  Bruno Haible  <bruno@clisp.org>
20516
20517         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
20518         redundant because stpncpy.m4 takes care of it.
20519
20520 2005-01-17  Bruno Haible  <bruno@clisp.org>
20521
20522         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
20523
20524 2005-01-17  Bruno Haible  <bruno@clisp.org>
20525
20526         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
20527         used.
20528
20529 2005-01-17  Bruno Haible  <bruno@clisp.org>
20530
20531         * lib/fwriteerror.h (fwriteerror): Change specification to include
20532         fclose.
20533         * lib/fwriteerror.c: Include <stdbool.h>.
20534         (fwriteerror): At the end, close the file stream. Record whether
20535         stdout was already closed.
20536
20537 2005-01-17  Bruno Haible  <bruno@clisp.org>
20538
20539         * lib/execute.c (environ): Declare if needed.
20540         * lib/pipe.c (environ): Likewise.
20541         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
20542
20543 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20544
20545         * modules/argp: Depend on vsnprintf
20546
20547 2005-01-10  Jim Meyering  <jim@meyering.net>
20548
20549         * modules/closeout (Depends-on): Add atexit.
20550
20551 2005-01-06  Bruno Haible  <bruno@clisp.org>
20552
20553         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
20554
20555 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
20556
20557         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
20558         definitions to be after all include files, to avoid collisions.
20559         Problem reported by Bob Proulx.
20560
20561 2005-01-04  Jim Meyering  <jim@meyering.net>
20562
20563         Changes imported from coreutils.
20564         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
20565         as the mkstemp template, use a temporary directory and an
20566         8.3-friendly template to avoid trouble on systems like DJGPP.
20567         Reported by Juan M. Guerrero via Stepan Kasal.
20568         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
20569         close. Remove the temporary directory right away, rather than waiting
20570         for configure's at-exit trap code to do it.
20571         Suggestion from Stepan Kasal.
20572
20573 2005-01-01  Simon Josefsson  <jas@extundo.com>
20574
20575         * gnulib-tool: Print #include directives when --import'ing.
20576
20577 2004-12-28  Simon Josefsson  <jas@extundo.com>
20578
20579         * tests/test-base64.c: Include required header files.  Remove
20580         unused variables.
20581
20582 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20583
20584         * modules/error (Depends-on): Remove gettext.
20585
20586 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20587
20588         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
20589         not needed.  This removes a dependency on the gettext module.
20590         [defined _LIBC]: Do not include <libintl.h>; not needed.
20591
20592 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20593
20594         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
20595         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
20596
20597 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20598
20599         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
20600         HAVE_DECL_STRTOLD.
20601
20602 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20603
20604         * modules/getdate (Depends-on): Remove alloca-opt.
20605
20606 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20607
20608         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
20609
20610 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20611
20612         * lib/argp-parse.c: Include <stddef.h>.
20613         (alignof, alignto): New macros.
20614         (parser_init): Don't assume that void * is aligned sufficiently
20615         for struct option.
20616
20617         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
20618         need to extend the stack.
20619         (YYINITDEPTH): New macro, so that the initial stack isn't overly
20620         large.
20621
20622 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20623
20624         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
20625
20626 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20627
20628         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
20629         (2004-10-24) change.  Apparently this was a false alarm.
20630
20631         * modules/getdate: Depend on alloca-opt, not alloca.
20632
20633 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20634
20635         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
20636         Remove now-obsolete comment about AIX.
20637         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
20638         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
20639         (YYMAXDEPTH): New macro.
20640
20641 2004-12-18  Simon Josefsson  <jas@extundo.com>
20642
20643         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
20644
20645 2004-12-18  Bruno Haible  <bruno@clisp.org>
20646
20647         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
20648
20649 2004-12-18  Bruno Haible  <bruno@clisp.org>
20650
20651         * lib/fatal-signal.c (fatal_signals): Make non-const.
20652         (init_fatal_signals): New function.
20653         (uninstall_handlers, install_handlers): Ignore signals that were set to
20654         SIG_IGN.
20655         (at_fatal_signal): Call init_fatal_signals.
20656         (init_fatal_signal_set): Likewise. Ignore signals that were set to
20657         SIG_IGN.
20658         Reported by Paul Eggert.
20659
20660 2004-12-18  Bruno Haible  <bruno@clisp.org>
20661
20662         * doc/alloca.texi: New file.
20663         * doc/alloca-opt.texi: New file.
20664
20665 2004-12-17  Jim Meyering  <jim@meyering.net>
20666
20667         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
20668         Otherwise, install-sh could exit with improper exit status when
20669         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
20670
20671 2004-12-16  Simon Josefsson  <jas@extundo.com>
20672
20673         * tests/test-base64.c: Add license.
20674
20675 2004-12-15  Stepan Kasal  <address@hidden>
20676
20677         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
20678
20679 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
20680
20681         * modules/getcwd (Files): Add m4/d-ino.m4.
20682         Suggested by Mark D. Baushke.
20683
20684 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20685
20686         * lib/getdate.y (textint): New member "negative".
20687         (time_zone_hhmm): New function.
20688         Expect 14 shift-reduce conflicts, not 13.
20689         (o_colon_minutes): New rule.
20690         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
20691         (yylex): Set the "negative" member of signed numbers.
20692
20693 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20694
20695         * doc/getdate.texi (Time of day items, Time zone items):
20696         Describe new formats +00:00, UTC+00:00.
20697
20698 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
20699
20700         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
20701         spurious "-l"s.  Problem reported by Stepan Kasal.
20702
20703 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
20704
20705         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
20706         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
20707
20708 2004-12-04  Simon Josefsson  <jas@extundo.com>
20709
20710         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
20711         Vandoorselaere <yoann@prelude-ids.org>.
20712
20713 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20714
20715         Changes imported from coreutils.
20716         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
20717         exist.
20718         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
20719
20720 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20721
20722         Changes imported from coreutils.
20723         * lib/hard-locale.c: Assume <locale.h> exists.
20724         Include "strdup.h".
20725         (GLIBC_VERSION): New macro.
20726         (hard_locale): Assume setlocale exists.
20727         Rewrite to avoid #ifdef.
20728         Use strdup rather than malloc + strcpy.
20729         * lib/human.c: Assume <locale.h> exists.
20730         (human_readable): Assume localeconv exists.
20731
20732 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20733
20734         * modules/hard-locale (Depends-on): Add strdup.
20735
20736 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
20737
20738         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
20739         convert T2, not T.  (Imported from libc.)
20740
20741 2004-11-30  Simon Josefsson  <jas@extundo.com>
20742
20743         * modules/restrict (License): Change to LGPL.
20744
20745 2004-11-30  Simon Josefsson  <jas@extundo.com>
20746
20747         * m4/restrict.m4: Add copyright and copying conditions.
20748
20749 2004-11-30  Simon Josefsson  <jas@extundo.com>
20750
20751         * m4/base64.m4: New file.
20752
20753 2004-11-30  Simon Josefsson  <jas@extundo.com>
20754
20755         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
20756         base64.
20757
20758         * tests/test-base64.c: New file.
20759
20760         * modules/base64: New file.
20761
20762 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20763
20764         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
20765         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
20766
20767         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
20768
20769 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20770
20771         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
20772         (__getcwd.c): Don't restore errno; glibc doesn't.
20773         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
20774         first, falling back to our code only if its results look suspicious.
20775         Ensure that the resulting buffer is only as large as necessary.
20776
20777         * lib/readutmp.c: Include readutmp.h first.
20778         Include <errno.h>, since readutmp.h no longer does that.
20779         * lib/readutmp.h: Don't include <errno.h>,
20780         <sys/param.h>, <time.h>; not needed to establish interface.
20781         (errno): Remove decl.
20782         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
20783         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
20784         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
20785
20786 2004-11-28  Simon Josefsson  <jas@extundo.com>
20787
20788         * lib/base64.h, base64.c: New file.
20789
20790 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
20791
20792         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
20793
20794 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
20795
20796         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
20797         (Depends-on): Remove pathmax, same.  Add mempcpy.
20798         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
20799         (Makefile.am): Append getcwd.h to lib_SOURCES.
20800         (Include): Add getcwd.h.
20801         (Maintainer): Change from Jim Meyering to "all, glibc",
20802         since getdate now uses intended-for-glibc code.
20803         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
20804         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
20805
20806 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20807
20808         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
20809         HP's ANSI C compiler.
20810         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
20811         Declaring int functions causes warnings on some modern systems and
20812         shouldn't be needed to compile on ancient ones.
20813         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
20814         defined.
20815
20816         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
20817         with the following changes.
20818         (__set_errno): Parenthesize properly.
20819         Include <stdbool.h>.
20820         (MIN, MAX, MATCHING_INO): New macros.
20821         (__getcwd): Define with prototype, not K&R form.
20822         Use heuristics to allocate default buffer on stack if possible.
20823         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
20824         behavior, and to avoid the PATH_MAX limit when computing
20825         ../../../../...
20826         Use MATCHING_INO to compare inode number to file.
20827         Check for arithmetic overflow in size calculations.
20828         Fix bug in reallocation of dot array that caused getcwd to fail
20829         on directories nested deeper than 75.
20830         Be more careful about saving errno on error.
20831         Do not use realloc; use only free+malloc, as this is a bit
20832         more flexible and avoids a needless copy operation.
20833         Do not inspect st_dev and st_ino for symbolic links; POSIX
20834         doesn't specify the latter.
20835         Check for closedir errors.
20836         Avoid needless casts.
20837         Use "#ifdef weak_alias" around weak_alias, to be like other
20838         glibc code.
20839         The following changes to getcwd.c have effect only when used in
20840         gnulib; they have no effect inside glibc proper.
20841         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
20842         as alloca isn't used.
20843         (alloca, __alloca): Likewise.
20844         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
20845         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20846         unconditionally, as gnulib assumes C89 or better.
20847         Do not include <sys/param.h>.
20848         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
20849         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
20850         better.
20851         (NULL) [!defined NULL]: Remove; we assume C89 or better.
20852         Include <dirent.h> in a way that is compatible with modern Autoconf.
20853         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
20854         New macros, if not already defined.
20855         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
20856         Use "_LIBC", not "defined _LIBC", for consistency.
20857         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
20858         a mempcpy module.
20859         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
20860         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
20861         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
20862         credit only to Jim Meyering and adjust the copyright dates.
20863         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
20864         <stdlib.h>, <unistd.h>, "pathmax.h".
20865         Instead, include "xgetcwd.h" (first) and "getcwd.h".
20866         (INITIAL_BUFFER_SIZE): Remove.
20867         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
20868
20869 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20870
20871         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
20872         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
20873         Use the _ONCE methods, for efficiency.
20874         Check for fcntl.h.  In test program, include <errno.h>
20875         and <fcntl.h> if available.  Remove old K&R cruft from
20876         test program.  Check for common errors in GNU/Linux,
20877         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
20878         don't do AC_LIBOBJ, as that's getcwd.m4's job.
20879         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
20880         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
20881         name accordingly.
20882         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
20883         accommodate new getcwd.c.
20884         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
20885         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
20886         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
20887         that's all we need now.
20888
20889 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20890
20891         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
20892         argp-parse.c depends on getopt internals, that means we should
20893         always use our getopt, to be on the safe side.
20894         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
20895         order not to spoil the result of an eventual previous invocation
20896         of gl_GETOPT_SUBSTITUTE.
20897
20898 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20899
20900         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
20901         redefinition warnings. To avoid them, include the defines
20902         in `#if !defined __need_getopt ... #endif'. The only place
20903         where __getopt_argv_const is used is in definitions
20904         of getopt_long and getopt_long_only below, which are as well
20905         protected by `#ifndef __need_getopt'.
20906         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
20907         __need_getopt after including <stdio.h> and <unistd.h> These
20908         headers might have defined it.
20909
20910 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
20911
20912         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
20913
20914 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
20915
20916         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
20917         (futimens): New function, which uses futimes if available.
20918         (futimens, utimens): Support timespec==NULL, with same semantics
20919         as utime and utimens.
20920         * lib/utimens.h (futimens): New decl.
20921
20922 2004-11-23  Jim Meyering  <jim@meyering.net>
20923
20924         * lib/getopt_.h: Remove trailing blanks.
20925
20926 2004-11-23  Jim Meyering  <jim@meyering.net>
20927
20928         * lib/__fpending.c: Add comment.
20929
20930 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
20931
20932         * modules/canonicalize (Depends-on): Add xreadlink.
20933         Problem reported by James Youngman.
20934
20935 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
20936
20937         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
20938         New macros.
20939         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
20940         optopt): Use them instead of invoking ## directly; otherwise, the
20941         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
20942
20943 2004-11-19  Bruno Haible  <bruno@clisp.org>
20944
20945         * lib/strtok_r.c: Move comments from here...
20946         * lib/strtok_r.h: ... to here.
20947
20948 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
20949
20950         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
20951         implementations that mishandle size_t overflow.
20952
20953 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
20954
20955         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
20956         might fail.  Problem reported by Yoann Vandoorselaere.
20957         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
20958         implementations that mishandle size_t overflow.
20959
20960 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20961
20962         * modules/canon-host (Depends-on): Add strdup.
20963
20964 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20965
20966         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
20967
20968 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20969
20970         * lib/canon-host.c: Include "strdup.h".
20971         (canon_host): Use getaddrinfo if available, so that IPv6 works.
20972         Use strdup instead of malloc/strcpy to duplicate strings.
20973
20974         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
20975         (human_space_before_unit): New constant.
20976         * lib/human.c (human_readable): Support it.
20977
20978         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
20979         (xgetcwd): Set errno correctly when failing.
20980         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
20981         the failure is actually due to a PATH_MAX problem.
20982
20983         Further getopt changes to make it more likely that glibc will
20984         buy the changes back.
20985         * lib/getopt.c (POSIXLY_CORRECT): New constant.
20986         (getopt): Use it, so to preserve glibc semantic
20987         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
20988         when compiling for libc.
20989         * lib/getopt_.h (__getopt_argv_const): Bring it back.
20990         (getopt_long, getopt_long_only): Use it.
20991
20992         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
20993         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
20994         (getopt): Argv is now char * const *, as per standard.
20995         (_getopt_internal_r, _getopt_internal): Argv is now char **,
20996         not char *__getopt_argv_const *.
20997         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
20998         _getopt_long_only_r): Likewise.
20999         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
21000         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21001         _getopt_long_r, _getopt_long_only_r): Likewise.
21002         * lib/getopt_.h (__getopt_argv_const): Remove.
21003         (getopt): Argv is now char * const *, as per standard.
21004
21005         * lib/getdate.y (tORDINAL): New token.
21006         (day, relunit): Allow it for relative times.
21007         (relative_time_table): Use tORDINAL for ordinals.
21008
21009 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21010
21011         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
21012         Document that "second" isn't allowed as an ordinal number.
21013
21014 2004-11-16  Jim Meyering  <jim@meyering.net>
21015
21016         * modules/closeout (Depends-on): Add fpending.
21017
21018 2004-11-15  Jim Meyering  <jim@meyering.net>
21019
21020         * lib/closeout.c: Include "__fpending.h" once again.
21021         Include <stdbool.h>.
21022         (close_stdout): Don't fail just because stdout was closed initially,
21023         since some programs don't write to stdout in the normal course of
21024         operation (other than --version and --help), and we don't want this
21025         function to make e.g. `touch file >&-' fail.
21026         But do fail if it was closed and someone has tried to write to it.
21027         E.g., `printf foo >&-' must fail.
21028
21029 2004-11-13  Jim Meyering  <jim@meyering.net>
21030
21031         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
21032
21033 2004-11-12  Simon Josefsson  <jas@extundo.com>
21034
21035         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
21036         small doc fix is still pending.
21037
21038 2004-11-11  Simon Josefsson  <jas@extundo.com>
21039
21040         * modules/strtok_r: New file.
21041
21042         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21043         strtok_r.
21044
21045 2004-11-11  Simon Josefsson  <jas@extundo.com>
21046
21047         * m4/strtok_r.m4: New file.
21048
21049         * m4/getopt.m4: Replace opterr.
21050
21051 2004-11-11  Simon Josefsson  <jas@extundo.com>
21052
21053         * lib/strtok_r.h, strtok_r.c: New file.
21054
21055 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21056
21057         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
21058         of replacing opterr, getopt, etc.  This should handle the
21059         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
21060
21061 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21062
21063         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21064         we can stop lying to compilers about the constness of argv when we
21065         are compiled outside glibc.
21066         (getopt, getopt_long, getopt_long_only): Use it.
21067         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21068         _getopt_internal, getopt): Likewise.
21069         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21070         _getopt_long_only_r): Likewise.
21071         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21072         _getopt_long_r, _getopt_long_only_r): Likewise.
21073
21074         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21075         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21076         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21077         the other external symbols.
21078         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21079         declaration, since the above renaming now works around collisions.
21080
21081 2004-11-11  Jim Meyering  <jim@meyering.net>
21082
21083         * lib/linebreak.c: Remove trailing blanks.
21084         * lib/alloca_.h: Likewise.
21085         * lib/acosl.c: Likewise.
21086         * lib/euidaccess.c: Likewise.
21087         * lib/allocsa.h: Likewise.
21088
21089 2004-11-10  Simon Josefsson  <jas@extundo.com>
21090
21091         * m4/getaddrinfo.m4: New file.
21092
21093 2004-11-10  Simon Josefsson  <jas@extundo.com>
21094
21095         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21096
21097 2004-11-10  Simon Josefsson  <jas@extundo.com>
21098
21099         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21100         getaddrinfo.
21101
21102         * modules/getaddrinfo: New file.
21103
21104 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21105
21106         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21107
21108 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21109
21110         * lib/mktime.c (SHR): New macro, which is a portable
21111         substitute for >> that should work even on Crays.
21112         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21113         Problem reported by Mark D. Baushke in
21114         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21115         * lib/getdate.y (SHR): Likewise.
21116         (tm_diff): Use it.
21117         * lib/strftime.c (SHR): Likewise.
21118         (tm_diff): Use it.
21119         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21120         quote_these_too, so that right shifts are well defined.  All uses
21121         changed.
21122
21123 2004-11-10  Jim Meyering  <jim@meyering.net>
21124
21125         Ensure that no close failure goes unreported.
21126         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21127         return early when it seems there's nothing to flush.
21128         Don't include __fpending.h.
21129
21130 2004-11-10  Jim Meyering  <jim@meyering.net>
21131
21132         * modules/closeout (Depends-on): Remove fpending.
21133
21134 2004-11-10  Jim Meyering  <jim@meyering.net>
21135
21136         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21137
21138 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21139
21140         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21141         gl_FUNC_STRFTIME.
21142         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21143         and AC_REQUIRE when possible, to avoid duplicate checks.
21144         Check for <wchar.h>.
21145
21146 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21147
21148         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21149
21150 2004-11-09  Bruno Haible  <bruno@clisp.org>
21151
21152         * m4/sockpfaf.m4: New file.
21153
21154 2004-11-05  Bruno Haible  <bruno@clisp.org>
21155
21156         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21157         Reported by Mark D. Baushke <mdb@cvshome.org>.
21158
21159 2004-11-04  Bruno Haible  <bruno@clisp.org>
21160
21161         2004-09-11  Bruno Haible  <bruno@clisp.org>
21162                 * allocsa.valgrind: New file.
21163         2004-02-06  Bruno Haible  <bruno@clisp.org>
21164                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21165                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21166                 Reported by Christopher Seip <chris.seip@hp.com>.
21167
21168 2004-11-04  Bruno Haible  <bruno@clisp.org>
21169
21170         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21171         (Makefile.am): Distribute it.
21172
21173 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21174
21175         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21176         with errno == ERANGE if the buffer is too small.
21177         Problem reported by Mark D. Baushke.
21178
21179 2004-11-03  Albert Chin  <china@thewrittenword.com>
21180             Paul Eggert  <eggert@cs.ucla.edu>
21181
21182         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21183         equivalent, substitute $ac_type for equivalent type rather than
21184         blindly using uint32_t *always* which won't work if uint32_t is not
21185         available.  Define _UINT32_T to work around typedef of uint32_t if
21186         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21187         2.5.1.
21188
21189 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21190
21191         * m4/jm-macros.m4: Sync from coreutils.
21192         (gl_MACROS): Check for mbrlen, for pathchk.
21193         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21194
21195 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21196
21197         * lib/xreadlink.c (MAXSIZE): New macro.
21198         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21199         size does not exceed MAXSIZE.  Avoid cast.
21200         As suggested by Mark D. Baushke in
21201         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21202         if readlink fails with buffer size just under MAXSIZE, try again
21203         with MAXSIZE.
21204
21205 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21206
21207         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21208
21209 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21210         and  Paul Eggert  <eggert@cs.ucla.edu>
21211
21212         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21213         (get_date): Overparenthesize to avoid GCC warning.
21214
21215 2004-11-02  Bruno Haible  <bruno@clisp.org>
21216
21217         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21218         returns void.
21219
21220 2004-11-02  Bruno Haible  <bruno@clisp.org>
21221
21222         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21223         function returns void.
21224
21225 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21226
21227         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21228         fflush_unlocked, flockfile, funlockfile, funlockfile,
21229         fputs_unlocked, putc_unlocked.
21230
21231 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21232
21233         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21234         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21235         already declared.
21236
21237 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21238
21239         * modules/getdate (Files): Add doc/getdate.texi.
21240         (Depends-on): Add setenv, xalloc.
21241
21242 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21243
21244         * lib/getdate.y: Add support for TZ="foo" within a date string.
21245         Fix some bugs near time_t boundaries.  Reject dates with
21246         out-of-range components, e.g., "Sept 31".
21247         Include <stdlib.h>, "setenv.h", "xalloc.h".
21248         (ISDIGIT_LOCALE): Remove; unused.
21249         Note that the TZ and time functions used here are not reentrant.
21250         (mktime_ok, get_tz): New functions.
21251         (TZBUFSIZE): New constant.
21252         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21253         This requires that we sometimes generate our own TZ="XXX..." setting.
21254
21255 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21256
21257         * doc/getdate.texi: New file, from coreutils with modifications for
21258         the new TZ parsing.
21259
21260 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21261
21262         * lib/mktime.c (not_equal_tm): Remove redundant check.
21263
21264 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21265
21266         * modules/regex (lib_SOURCES): Add regex.c.
21267         Reported by James Youngman in
21268         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21269
21270 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21271
21272         * lib/getdate.y: Use Bison 1.875 features, and some minor
21273         code cleanups.  This change does not affect semantics.
21274         Don't include <stdlib.h>; no longer needed.
21275         Don't include unlocked-io.h; only the "#if TEST" code uses
21276         stdio, and performance isn't crucial there.
21277         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21278         Bison 1.875 features as described below.
21279         All uses of "PC." replaced by "pc->".
21280         (YYSTYPE): Add a forward declaration.
21281         (yylex, yyerror): Use full prototypes in forward decls.
21282         Use "%pure-parser" rather than obsolescent "%pure_parser".
21283         Use %parse-param and %lex-param instead of obsolescent
21284         YYPARSE_PARAM and YYLEX_PARAM.
21285         (meridian_table, month_and_day_table, time_units_table,
21286         relative_time_table, time_zone_table, military_table,
21287         lookup_zone, lookup_word, get_date):
21288         Use NULL instead of 0 where appropriate.
21289         (to_hour): Avoid abort (), to avoid a dependency on
21290         stdlib.h.
21291         (yyerror, yylex): Now accepts parser_control * arg.
21292         (main) [TEST]: Use '\0' rather than 0 for char.
21293
21294 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21295
21296         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21297
21298 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21299
21300         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21301         It's now the caller's responsibility to handle the case where
21302         !HAVE_GETPAGESIZE && !defined getpagesize.
21303
21304         * lib/mktime.c (leapyear): Arg is long int, not int.
21305
21306 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21307
21308         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21309
21310 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21311
21312         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21313         missing.  Problem reported by James Youngman.
21314
21315 2004-10-16  Simon Josefsson  <jas@extundo.com>
21316
21317         * gnulib-tool: Fix comments.  Fix parse problem.
21318         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21319
21320 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21321
21322         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21323         implementation of getopt_long.  Problem reported by Alexander Taler in:
21324         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21325
21326 2004-10-15  Bruno Haible  <bruno@clisp.org>
21327
21328         * gnulib-tool: Untabify. Initialize supplied_libname.
21329         (func_usage): More homogenous output.
21330         (func_modules_transitive_closure, func_modules_to_filelist,
21331         func_emit_lib_Makefile_am): New functions.
21332         (func_import): New function, extracted from big case statement. Use
21333         func_get_license, func_modules_transitive_closure,
21334         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21335         opt_lgpl. Don't use test -a, as it's not portable.
21336         (func_create_testdir): Use func_modules_transitive_closure,
21337         func_modules_to_filelist, func_emit_lib_Makefile_am.
21338
21339 2004-10-15  Bruno Haible  <bruno@clisp.org>
21340
21341         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21342
21343 2004-10-15  Bruno Haible  <bruno@clisp.org>
21344
21345         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21346         the portions belonging to each module.
21347         Suggested by Derek Robert Price <derek@ximbiot.com>.
21348
21349 2004-10-12  Simon Josefsson  <jas@extundo.com>
21350
21351         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21352         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
21353         to real functions.
21354
21355 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21356
21357         * modules/vsnprintf: New file.
21358
21359 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21360
21361         * m4/vsnprintf.m4: New file.
21362
21363 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21364
21365         * lib/vsnprintf.h: New file.
21366         * lib/vsnprintf.c: New file.
21367
21368 2004-10-11  Bruno Haible  <bruno@clisp.org>
21369
21370         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
21371         vsnprintf.
21372
21373 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
21374
21375         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
21376
21377 2004-10-07  Bruno Haible  <bruno@clisp.org>
21378
21379         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
21380         fits into the provided buffer.
21381
21382 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
21383
21384         * lib/diacrit.c, diacrit.h: Add GPL notice.
21385
21386         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
21387         notice.
21388         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
21389         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
21390         This avoids a potential constant-folding bug.
21391
21392 2004-10-05  Bruno Haible  <bruno@clisp.org>
21393
21394         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
21395         for the declaration of strsep.
21396
21397 2004-10-05  Bruno Haible  <bruno@clisp.org>
21398
21399         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
21400
21401 2004-10-04  Simon Josefsson  <jas@extundo.com>
21402
21403         * modules/memmem: New file.
21404         * tests/test-memmem.c: New file.
21405         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
21406
21407 2004-10-04  Simon Josefsson  <jas@extundo.com>
21408
21409         * m4/memmem.m4: New file.
21410
21411 2004-10-04  Simon Josefsson  <jas@extundo.com>
21412
21413         * lib/memmem.h: New file.
21414         * lib/memmem.c: New file, taken from glibc.
21415
21416 2004-10-04  Simon Josefsson  <jas@extundo.com>
21417
21418         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
21419         '#ifdef USE_UNLOCKED_IO'.
21420
21421 2004-10-04  Simon Josefsson  <jas@extundo.com>
21422
21423         * config/srclist.txt: Add memmem from glibc.
21424
21425 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21426
21427         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
21428
21429         * modules/argmatch, modules/argp, modules/closeout, modules/error,
21430         modules/exclude, modules/getdate, modules/getline,
21431         modules/getndelim2, modules/getpass, modules/getpass-gnu,
21432         modules/getusershell, modules/linebuffer, modules/md5,
21433         modules/mountlist, modules/posixtm, modules/readtokens,
21434         modules/readutmp, modules/regex, modules/sha1,
21435         modules/version-etc, modules/yesno:
21436         Remove dependency on unlocked-io.
21437
21438 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21439
21440         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
21441
21442         * m4/unlocked-io.m4: Add copyright notice.
21443         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
21444
21445 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21446
21447         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
21448         * lib/xmalloc.c (xmemdup): Likewise.
21449         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
21450         XFREE): Remove these long-obsolescent macros.
21451         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
21452         * lib/xstrdup.c: Remove.
21453
21454         * lib/regex.c (re_comp): Cast gettext return value to char *,
21455         Problem reported by Martin Neitzel via Mark D. Baushke.
21456
21457 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21458
21459         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
21460         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
21461         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
21462         regex.c, sha1.c, version-etc.c, yesno.c:
21463         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
21464         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
21465         the includer's responsibility.
21466
21467         Sync from coreutils.
21468
21469         * lib/modechange.c (mode_compile): Don't decrement a pointer that
21470         points to the start of a string, as the C Standard says the
21471         resulting behavior is undefined.
21472
21473         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
21474         simple -> simple_backups, numbered_existing ->
21475         numbered_existing_backups, numbered -> numbered_backups
21476         to avoid shadowing problems.  All uses changed.
21477         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
21478         * lib/backupfile.c (check_extension, numbered_backup):
21479         Rename locals to avoid shadowing 'basename'.
21480         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
21481         once.
21482
21483         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
21484         * lib/.cvsignore: Add getopt.h.
21485
21486 2004-10-04  Bruno Haible  <bruno@clisp.org>
21487
21488         * modules/README: New file.
21489         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
21490         not a module.
21491
21492 2004-10-02  Jim Meyering  <jim@meyering.net>
21493
21494         * lib/dirfd.h, getpagesize.h: Add copyright notice.
21495
21496 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21497
21498         * modules/strsep: New file.
21499
21500 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21501
21502         * m4/strsep.m4: New file.
21503
21504 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21505
21506         * lib/strsep.h: New file.
21507         * lib/strsep.c: New file.
21508
21509 2004-10-01  Simon Josefsson  <jas@extundo.com>
21510
21511         * lib/snprintf.c (snprintf): Handle size==0.
21512
21513 2004-10-01  Simon Josefsson  <jas@extundo.com>
21514             Bruno Haible  <bruno@clisp.org>
21515
21516         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
21517         (snprintf): Declare 'args'.
21518
21519 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
21520
21521         * lib/snprintf.c: Remove comments as to why each header is needed.
21522
21523 2004-10-01  Bruno Haible  <bruno@clisp.org>
21524
21525         * MODULES.html.sh: Add strsep.
21526
21527 2004-09-30  Simon Josefsson  <jas@extundo.com>
21528
21529         * modules/snprintf: New file.
21530
21531 2004-09-30  Simon Josefsson  <jas@extundo.com>
21532
21533         * m4/snprintf.m4: New file.
21534
21535 2004-09-30  Simon Josefsson  <jas@extundo.com>
21536
21537         * lib/snprintf.h, lib/snprintf.c: New files.
21538
21539 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21540
21541         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
21542         (hol_entry_help): Never translate an empty string.
21543         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
21544         * lib/argp.h (OPTION_NO_TRANS): New option.
21545
21546 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21547
21548         * modules/argp (Maintainer): Replace Simon Josefsson
21549         by Sergey Poznyakoff.
21550
21551 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21552
21553         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
21554         changes merged back into glibc.
21555
21556 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21557
21558         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
21559
21560 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
21561
21562         * lib/xvasprintf.c: Include xalloc.h.
21563         (xvasprintf): Use xalloc_die, not xmalloc_die.
21564
21565 2004-09-29  Bruno Haible  <bruno@clisp.org>
21566
21567         * modules/alloca-opt: New file, derived from modules/alloca.
21568         * modules/allocsa: Depend on alloca-opt instead of alloca.
21569         * modules/setenv: Likewise.
21570         * modules/vasnprintf: Likewise.
21571         * MODULES.html.sh: Add alloca-opt.
21572
21573 2004-09-28  Simon Josefsson  <jas@extundo.com>
21574
21575         * gnulib-tool: New parameter --lgpl, to asseert that modules are
21576         LGPL, and to replace license template from GPL to LGPL.
21577
21578 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21579
21580         * modules/dummy: Change license to LGPL.
21581
21582 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21583
21584         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
21585
21586 2004-09-24  Simon Josefsson  <jas@extundo.com>
21587
21588         * modules/minmax (License): Change from GPL to LGPL.
21589
21590 2004-09-23  Simon Josefsson  <jas@extundo.com>
21591
21592         * gnulib-tool (--import): Typo.
21593
21594 2004-09-23  Simon Josefsson  <jas@extundo.com>
21595
21596         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
21597
21598 2004-09-22  Bruno Haible  <bruno@clisp.org>
21599
21600         * modules/*: Add 'License' field.
21601         * gnulib-tool: Accept --extract-license option.
21602         (func_get_license): New function.
21603
21604 2004-09-21  Bruno Haible  <bruno@clisp.org>
21605
21606         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
21607         Reported by Simon Josefsson.
21608
21609 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21610
21611         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
21612         gl_AC_TYPE_LONG_LONG.
21613
21614 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21615
21616         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
21617
21618 2004-09-18  Simon Josefsson  <jas@extundo.com>
21619         and  Paul Eggert  <eggert@cs.ucla.edu>
21620
21621         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
21622         calls with autoreconf.  Define GL_LIB.
21623
21624 2004-09-14  Karl Berry  <karl@gnu.org>
21625
21626         * config/srclist.txt: unsync setenv.c, sigh.
21627
21628 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21629
21630         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
21631         Problem reported by Bruno Haible in:
21632         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
21633
21634 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21635
21636         * config/srclist.txt: Comment out argp-pvh.c.
21637
21638 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
21639
21640         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
21641         in case some system header has #define'd it.  Problem reported by
21642         Soeren D. Schulze in
21643         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
21644
21645 2004-09-09  Karl Berry  <karl@gnu.org>
21646
21647         * regex.[ch]: delete from the root.  These were supposed to be
21648                 synced with emacs cvs, but this has not happened for about
21649                 a year, and anyway nothing else uses emacs regex.[ch].
21650                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
21651                 lib/regex[.ch] is untouched.
21652
21653 2004-09-09  Bruno Haible  <bruno@clisp.org>
21654
21655         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
21656
21657 2004-09-09  Bruno Haible  <bruno@clisp.org>
21658
21659         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
21660         modifications.
21661         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
21662
21663 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21664
21665         * modules/xvasprintf: New file.
21666         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
21667
21668 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21669
21670         * lib/xvasprintf.h: New file.
21671         * lib/xvasprintf.c: New file.
21672         * lib/xasprintf.c: New file.
21673
21674 2004-09-08  Bruno Haible  <bruno@clisp.org>
21675
21676         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
21677
21678 2004-09-08  Bruno Haible  <bruno@clisp.org>
21679
21680         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
21681         length is > INT_MAX.
21682         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
21683         more.
21684
21685 2004-09-08  Bruno Haible  <bruno@clisp.org>
21686
21687         * lib/stdint_.h: New file, taken from GNU clisp.
21688
21689 2004-09-08  Bruno Haible  <bruno@clisp.org>
21690             Oskar Liljeblad  <oskar@osk.mine.nu>
21691
21692         * modules/stdint: New file.
21693         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
21694
21695 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21696
21697         Import from coreutils.
21698         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
21699         strings on unbounded length.  alloca's performance benefits aren't
21700         that important here.
21701         (V_STRDUP): Remove.
21702         (parse_with_separator): New function, with most of the internals
21703         of the old parse_user_spec.  Allow user to omit both user and group,
21704         for compatibility with FreeBSD.
21705         Clone only the user name, not the entire spec.
21706         Do not set *uid, *gid unless entirely successful.
21707         Avoid memory leak in some failing cases.
21708         Fix regression for USER.GROUP reported by Dmitry V. Levin in
21709         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
21710         (parse_user_spec): Rewrite to use parse_with_separator.
21711
21712 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21713
21714         * modules/userspec: Don't depend on alloca.
21715
21716 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21717
21718         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
21719
21720 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
21721
21722         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
21723         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
21724         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
21725
21726 2004-08-16  Simon Josefsson  <jas@extundo.com>
21727
21728         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
21729         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
21730         Add --dry-run for --import.
21731         Let user provided command line parameters override configure.ac
21732         settings.
21733
21734 2004-08-12  Simon Josefsson  <jas@extundo.com>
21735
21736         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
21737         as discussed with Paul Eggert in threads rooted at
21738         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
21739         and
21740         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
21741         Before, the test was empty, and relied on ELIDE_CODE in source
21742         code.)
21743         (gl_PREREQ_GETOPT): New macro.
21744         (gl_GETOPT): Use them.
21745
21746 2004-08-12  Simon Josefsson  <jas@extundo.com>
21747
21748         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
21749         * lib/getopt_.h: Renamed from getopt.h.
21750
21751 2004-08-12  Simon Josefsson  <jas@extundo.com>
21752
21753         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
21754         Change default library name from libfoo to libgnu.
21755         Now, if you have a configure.ac that says:
21756                 gl_SOURCE_BASE(gl)
21757                 gl_M4_BASE(gl/m4)
21758                 gl_MODULES(error getopt etcetera)
21759                 gl_INIT
21760         you can import all you need by running:
21761                 ../gnulib/gnulib-tool --import
21762
21763         * modules/getopt (Files): Rename getopt.h to getopt_.h.
21764         (Makefile.am): Rewrite, use logic from argz.
21765         (Include): Use <getopt.h> instead of "getopt.h".
21766
21767 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21768
21769         * modules/argp (Files): Add m4/unlocked-io.m4.
21770         (Depends-on): Add extensions.
21771
21772 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21773
21774         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
21775         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
21776         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
21777         Check for program_invocation_name, program_invocation_short_name,
21778         flockfile, funlockfile, features.h, _getopt_long_only_r.
21779
21780 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21781
21782         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
21783         its complicated substitute.
21784         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
21785         and program_invocation_name.
21786         (__argp_basename) [!_LIBC]: Remove; the only use was
21787         replaced by its body.
21788         (__argp_short_program_name): Change condition from
21789         !defined __argp_short_program_name to
21790         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
21791         to match argp-namefrob.h.
21792         (__argp_failure): Don't assume strerror_r returns char *.
21793         * lib/argp-parse.c (N_): Define unconditionally.
21794         (argp_default_options): Fill out initializers with 0 to avoid
21795         gcc warnings.
21796
21797 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21798
21799         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
21800         getopt1.c.
21801
21802 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21803
21804         Merge from coreutils.
21805
21806         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
21807
21808         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
21809         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
21810
21811 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21812
21813         Merge from coreutils.
21814
21815         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
21816         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
21817         for Reliant Unix 5.43.
21818
21819         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
21820         (union fooround): Use uintmax_t, not long int.
21821         The rest is a merge from libc:
21822         [defined _LIBC]: Include <shlib-compat.h>.
21823         (_obstack) [defined _LIBC]: Remove after 2.3.4.
21824
21825         * lib/settime.c (settime): Recode to avoid warning with
21826         Sun Forte C 6U2.
21827
21828         * lib/strverscmp.c: Convert to UTF-8.
21829
21830 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21831
21832         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
21833         m4/uintmax_t.m4.
21834
21835 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21836
21837         * modules/xalloc-die: New file.
21838         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
21839
21840         * modules/md5 (Files): Add m4/uint32_t.m4.
21841         * modules/sha1: Renamed from modules/sha.
21842         (Files):
21843         Rename lib/sha.h to lib/sha1.h.
21844         Rename lib/sha.c to lib/sha1.c.
21845         Rename m4/sha.m4 to m4/sha1.m4.
21846         (lib_SOURCES): Likewise.
21847         (configure.ac): Rename gl_SHA to gl_SHA1.
21848         (Include): sha.h -> sha1.h.
21849
21850 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21851
21852         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
21853         * m4/sha1.m4: Renamed from sha.m4.
21854         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
21855
21856 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21857
21858         * lib/obstack.h (obstack_empty_p):
21859         Don't assume that chunk->contents is suitably aligned.
21860         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
21861         Likewise. Problem reported by Benno in
21862         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
21863
21864         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
21865         readable.  This could be improved further but it'd take some work.
21866
21867 2004-08-08  Simon Josefsson  <jas@extundo.com>
21868
21869         * modules/xgethostname (Depends-on): Remove exit and error (not
21870         used).
21871
21872         * modules/getpass-gnu: Add getpass.h.
21873         (Depends-on): Add stdbool.
21874         * modules/getpass: Add getpass.h.
21875
21876 2004-08-08  Simon Josefsson  <jas@extundo.com>
21877
21878         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
21879         Check getpass declaration.
21880
21881 2004-08-08  Simon Josefsson  <jas@extundo.com>
21882
21883         * lib/xgethostname.c: Don't include error.h (not used).
21884
21885         * lib/getpass.h: Add.
21886         * lib/getpass.c: Include getpass.h first.
21887
21888 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
21889
21890         * lib/xalloc-die.c: New file.
21891         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
21892         All uses removed.
21893         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
21894         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
21895         xalloc-die.c.
21896         (_, N_, xalloc_die): Move to xalloc-die.c.
21897         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
21898         so that we needn't mess with xalloc_msg_memory_exhausted.
21899
21900         * lib/sha1.h: Renamed from sha.h.
21901         (SHA1_H): Renamed from _SHA_H.
21902         (sha1_ctx): Renamed from sha_ctx.
21903         (sha1_init_ctx): Renamed from sha_init_ctx.
21904         (sha1_process_block): Renamed from sha_process_block.
21905         (sha1_process_bytes): Renamed from sha_process_bytes.
21906         (sha1_finish_ctx): Renamed from sha_finish_ctx.
21907         (sha1_read_ctx): Renamed from sha_read_ctx.
21908         (sha1_stream): Renamed from sha_stream.
21909         (sha1_buffer): Renamed from sha_buffer.
21910         * lib/sha1.c: Likewise; renamed from sha.c.
21911         Do not include <sys/types.h>.
21912         Include <stddef.h> rather than <stdlib.h>.
21913
21914 2004-08-08  Bruno Haible  <bruno@clisp.org>
21915
21916         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
21917         FILESYSTEM_PREFIX_LEN.
21918         * lib/progreloc.c: Likewise.
21919         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
21920
21921 2004-08-06  Simon Josefsson  <jas@extundo.com>
21922
21923         * modules/progname (Depends-on): Don't depend on stdbool.
21924
21925 2004-08-06  Simon Josefsson  <jas@extundo.com>
21926
21927         * modules/getsubopt: New file.
21928         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21929         getsubopt.
21930
21931 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21932
21933         More merge from coreutils.
21934
21935         * m4/utimens.m4, m4/utimecmp.m4: New files.
21936         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
21937         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
21938         prereq.m4, sha.m4: Import changes from coreutils.
21939
21940 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21941
21942         More merge from coreutils.
21943         * modules/raise, modules/readtokens0, modules/utimens:
21944         * modules/utimecmp, module/xnanosleep: New files.
21945         * modules/strftime: Add lib/strftime.h.
21946         Change include from <time.h> to "strftime.h".
21947         * modules/yesno: Add lib/yesno.h.
21948         * modules/backupfile: Remove lib/addext.c.
21949         * modules/euidaccess: Add stat-macros.h.
21950         * modules/canonicalize, modules/euidaccess,
21951         modules/filemode, modules/lchown, modules/makepath,
21952         modules/rmdir, modules/stat: Likewise.
21953
21954 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21955
21956         Merge from tar.
21957         * lib/argp-help.c (make_hol, hol_append): Don't assume that
21958         SIZE_MAX is a valid preprocessor constant.
21959         (__argp_basename): Change from "#ifndef _LIBC"
21960         to "#ifndef __argp_short_program_name", so that
21961         we don't compile these functions for tar.
21962
21963         More merges from coreutils.
21964         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
21965         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
21966         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
21967         * lib/addext.c: Remove; no longer needed.
21968         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
21969         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
21970         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
21971         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
21972         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
21973         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
21974         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
21975         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
21976         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
21977         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
21978         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
21979         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
21980         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
21981         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
21982         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
21983         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
21984         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
21985         Import changes from coreutils.
21986
21987 2004-08-05  Simon Josefsson  <jas@extundo.com>
21988
21989         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
21990
21991 2004-08-05  Simon Josefsson  <jas@extundo.com>
21992
21993         * m4/getsubopt.m4: New file.
21994
21995 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21996
21997         Merge from coreutils.
21998
21999         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
22000         * m4/getcwd-path-max.m4: New files.
22001
22002         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
22003         FILESYSTEM_PREFIX_LEN ->
22004         FILE_SYSTEM_PREFIX_LEN.
22005         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
22006         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
22007         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
22008         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
22009
22010         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
22011         prerequisite modules now handle the DOS stuff.
22012         Don't check for unistd.h.
22013
22014 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22015
22016         Merge from coreutils.
22017
22018         * lib/.gdb-history: Remove; this doesn't belong here.
22019
22020         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
22021         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
22022         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
22023         * lib/getcwd.c: New files.
22024
22025         * lib/dirname.h: Include <stdbool.h>.
22026         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
22027         for consistency with POSIX terminology.  All uses changed.
22028         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
22029         (strip_trailing_slashes): Use bool for booleans.
22030         * lib/stripslash.c (strip_trailing_slashes): Likewise.
22031
22032         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
22033         sometimes returns a positive errno value even when it succeeds.
22034         (print_errno_message) [!LIBC]: Fall back on strerror if
22035         __strerror_r fails.
22036
22037         * lib/path-concat.c (mempcpy): Don't define if a system header defines
22038         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
22039         (longest_relative_suffix): New function.
22040         (path_concat): Use it.  Assume first argument is not NULL.
22041         Port to DOS.  Omit redundant separators.
22042         Report an error instead of returning NULL.
22043         Use mempcpy instead of memcpy.
22044         (xpath_concat): Remove: not declared or used.
22045
22046         * lib/same.h: Include <stdbool.h>
22047         (same_name): Return bool, not int.
22048         * lib/same.c (same_name): Likewise.
22049         (errno): Don't declare; we assume C89 or better now.
22050
22051         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
22052         if not already defined.
22053
22054         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
22055         * lib/dup-safer.c (errno): Likewise.
22056
22057 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22058
22059         Merge from coreutils.
22060         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
22061         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
22062         * modules/path-concat: Don't depend on strdup.
22063
22064 2004-08-03  Simon Josefsson  <jas@extundo.com>
22065
22066         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22067         * lib/progname.h: Don't include stdbool.h.
22068
22069 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22070
22071         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22072         * MODULES.html.sh (func_all_modules): Remove fatal.
22073
22074 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22075
22076         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22077
22078 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22079
22080         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22081         working.
22082
22083 2004-08-02  Simon Josefsson  <jas@extundo.com>
22084
22085         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22086         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22087         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22088
22089 2004-08-01  Simon Josefsson  <jas@extundo.com>
22090
22091         * lib/xgetdomainname.c: Include stdlib.h, for free().
22092
22093 2004-07-19  Bruno Haible  <bruno@clisp.org>
22094
22095         * MODULES.html.sh (func_all_modules): Add dummy.
22096
22097 2004-07-16  Simon Josefsson  <jas@extundo.com>
22098
22099         * modules/dummy: New file.
22100
22101 2004-07-16  Simon Josefsson  <jas@extundo.com>
22102
22103         * lib/dummy.c: New file.
22104
22105 2004-07-16  Bruno Haible  <bruno@clisp.org>
22106
22107         * lib/backupfile.h: Add extern "C" for C++.
22108         * lib/closeout.h: Likewise.
22109         * lib/copy-file.h: Likewise.
22110         * lib/findprog.h: Likewise.
22111         * lib/full-write.h: Likewise.
22112         * lib/pathname.h: Likewise.
22113         * lib/progname.h: Likewise.
22114         * lib/stpcpy.h: Likewise.
22115         * lib/stpncpy.h: Likewise.
22116         * lib/strcase.h: Likewise.
22117         * lib/strstr.h: Likewise.
22118         * lib/xalloc.h: Likewise.
22119
22120         * lib/mbswidth.h: Add extern "C" for C++.
22121         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22122
22123 2004-07-13  Robert Millan  <robertmh@gnu.org>
22124
22125         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22126
22127 2004-07-09  Simon Josefsson  <jas@extundo.com>
22128
22129         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22130         failed without this.)
22131
22132 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22133
22134         * modules/chown (Files): Add lib/fchown-stub.c, since
22135         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22136
22137 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22138
22139         * lib/fchown-stub.c: New file.
22140
22141 2004-06-24  Jim Meyering  <jim@meyering.net>
22142
22143         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22144
22145 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22146
22147         * modules/argz: Omit "#include".
22148
22149         * MODULES.html.sh (func_all_modules): Add calloc, to match
22150         2004-06-01 addition of calloc module.
22151
22152 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22153
22154         * m4/argz.m4: New file, which is autoupdated from libtool.
22155
22156 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22157
22158         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22159         libtool.
22160
22161 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22162
22163         * config/srclist-update: Don't insist on "USA." before the
22164         close-comment, as libtool omits the period and puts the */ on a
22165         separate line.
22166         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22167         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22168
22169 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22170
22171         * modules/argz: New file.
22172         * MODULES.html.sh (func_all_modules): Add argz.
22173
22174 2004-06-12  Jim Meyering  <jim@meyering.net>
22175         and  Paul Eggert  <eggert@cs.ucla.edu>
22176
22177         * modules/hash (Files): Add lib/xalloc.h.
22178         * modules/pipe (Depends-on): Add wait-process.
22179         * modules/stat (Depends-on): Add xalloc.
22180         * modules/userspec (Files): Add lib/userspec.h.
22181         * modules/xstrto
22182
22183         Upgrade from gettext-0.13.
22184         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22185         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22186         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22187
22188 2004-06-10  Jim Meyering  <jim@meyering.net>
22189
22190         * lib/calloc.c: New file.
22191
22192 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22193
22194         * lib/getdate.y (yylex): Allow space between sign and number.
22195         Problem reported by Dan Jacobson.
22196
22197 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22198
22199         Merge from coreutils CVS.
22200
22201         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22202         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22203         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22204         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22205         xstrtol.m4: Fix copyright date and/or serial number.
22206
22207         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22208         See if we need an fchown replacement.
22209         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22210         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22211         and use the replacement function if we detect either defect.
22212
22213         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22214         gl_UTIMECMP.
22215
22216 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22217         and  Jim Meyering  <jim@meyering.net>
22218
22219         Merge from coreutils CVS.
22220
22221         * lib/stat-macros.h: New file, with contents from file-type.h
22222         and coreutils' system.h.
22223         * lib/file-type.c: Include "stat-macros.h".
22224         * lib/file-type.h (file_type): Move all macro definitions to new file,
22225         stat-macros.h.
22226
22227         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22228         Wrap old code with this conditional.
22229         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22230         function that does not dereference symlinks.
22231         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22232
22233         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22234         dependency problems.
22235         (xreadlink): Accept new arg SIZE, for efficiency.
22236         All decls and uses changed.
22237         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22238
22239         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22240         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22241
22242         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22243         sysexits.h.
22244
22245 2004-06-01  Jim Meyering  <jim@meyering.net>
22246
22247         * m4/calloc.m4: New file.
22248
22249 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22250
22251         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22252         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22253         Also, fix a typo in a diagnostic.
22254
22255 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22256
22257         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22258         or AC_FUNC_REALLOC.
22259
22260 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22261
22262         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22263         macros to be defined.
22264         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22265         the allocator returns NULL because the requested size is zero.
22266
22267 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22268
22269         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22270         var.  Add comment explaining why libc still defines it.  This
22271         merges the following patch from glibc:
22272         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22273
22274 2004-05-20  Andreas Schwab  <schwab@suse.de>
22275
22276         * m4/free.m4: Replace free if it not known to work, not the other
22277         way round.
22278
22279 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22280
22281         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22282         present in glibc since revision 1.1 of this file.
22283         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22284         obstack_alignment_mask, obstack_alloc, obstack_base,
22285         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22286         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22287         obstack_grow0, obstack_init, obstack_int_grow,
22288         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22289         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22290         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22291         nonexistent functions.
22292
22293 2004-05-18  Karl Berry  <karl@gnu.org>
22294
22295         * config/srclist.txt: break link for vasnprintf.c.
22296
22297 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22298
22299         Port obstack to the AS/400, where pointers are 16 bytes wide and
22300         you cannot cast an integer to a valid pointer.  This patch is
22301         currently waiting to be integrated into glibc; see
22302         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22303
22304         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22305         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22306         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22307         (struct obstack): temp member is now a union of a pointer and
22308         an integer, instead of an integer.  All integer uses changed.
22309         This does not affect the physical layout of struct obstack,
22310         except on hosts (like the AS/400) where the size or alignment of
22311         void * is greater than that of ptrdiff_t.
22312         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22313         __STDC__)]: Store temporary in pointer member of union, not
22314         integer member.
22315         * lib/obstack.c: Include <stddef.h>, for offsetof.
22316         (struct fooalign): Remove; it doesn't need a name.
22317         (union fooround): Change double to long double, and add void *.
22318         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22319         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22320         not a macro.  Hence the values are always int; so remove all
22321         casts-to-int in uses.
22322
22323 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22324
22325         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22326         we can get this patch merged into glibc.
22327
22328 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22329             Paul Eggert  <eggert@cs.ucla.edu>
22330
22331         * m4/argp: Depend on alloca.
22332
22333 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22334             Paul Eggert  <eggert@cs.ucla.edu>
22335
22336         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22337         freecoding.
22338
22339 2004-05-17  Bruno Haible  <bruno@clisp.org>
22340
22341         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22342         precision that consists of a '.' followed by an empty digit string.
22343         Patch by Tor Lillqvist <tml@iki.fi>.
22344
22345 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22346
22347         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
22348         for backward compatibility with older code.  We need our own
22349         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
22350         it under some other name, and our alloca.h will define it.
22351
22352 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22353             Derek Price  <derek@ximbiot.com>
22354
22355         * lib/alloca.c: Include <alloca.h>, to get our interface.
22356         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
22357         include <alloca.h> first.  Use C89 prototype for alloca; this
22358         requires including <stddef.h> for size_t.  Use extern "C" if C++.
22359         Use #elif for simplicity, since we can assume C89 now.
22360         Don't try to source the system alloca.h since it will not be found
22361         and to prevent recursively including its replacement.
22362         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
22363         * lib/regex.c: Likewise.
22364
22365 2004-05-16  Derek Price  <derek@ximbiot.com>
22366             Paul Eggert  <eggert@cs.ucla.edu>
22367
22368         getline cleanup.  This changes the getndelim2 API: both order of
22369         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
22370         no delimiter).
22371
22372         * lib/getline.c: Don't include stddef.h or stdio.h, since our
22373         interface does that.
22374         (getline): Always use getdelim, so that we don't have two
22375         copies of this code.
22376         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
22377         if available.
22378         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
22379         (GETNDELIM2_MAXIMUM): New macro.
22380         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
22381         instead of the old practice of delim2==0.  All callers changed.
22382         Return -1 on overflow, instead of returning junk.
22383         Do not set *linesize unless allocation succeeds.
22384         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
22385         that we include sys/types.h.
22386         * lib/getnline.h: Likewise.
22387         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
22388         (getndelim2): Reorder arguments.
22389         * lib/getnline.c (getnline, getndelim):
22390         Don't discard the NMAX argument.
22391         (getnline): Invoke getndelim, to avoid code duplication.
22392         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
22393         of (size_t) -1 by callers of the getnline family.
22394
22395 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22396
22397         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
22398         Check for gettimeofday.
22399         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
22400         Check for settimeofday, stime.
22401
22402 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22403
22404         * lib/nanosleep.c (suspended): Change its type from int to
22405         sig_atomic_t volatile.
22406         (first_call): Make it private to rpl_nanosleep, and have it
22407         be zero initially as that's a bit faster.
22408         (my_usleep): Round up fractional times instead of truncating them,
22409         as this is the usual meaning for 'sleep'.
22410
22411         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
22412         doesn't work.
22413         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
22414         (ENOSYS): Define if not defined.
22415         (settime): Fall back on stime if it exists and settimeofday fails.
22416         But don't bother with fallbacks if a method fails with errno == EPERM.
22417
22418 2004-05-11  Jim Meyering  <jim@meyering.net>
22419
22420         Prior to this change, the save_cwd caller required read access to the
22421         current directory on most systems (ones with the fchdir function).
22422
22423         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
22424         fails, try write-only, and finally, resort to using xgetcwd.
22425
22426 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
22427
22428         * lib/obstack.c, obstack.h: Import changes from libc.
22429
22430 2004-04-28  Bruno Haible  <bruno@clisp.org>
22431
22432         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
22433         also implicitly appends .exe to executables.
22434         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
22435         accepts Windows pathnames.
22436         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22437         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22438         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22439         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22440         Reported by Derek Robert Price <derek@ximbiot.com>.
22441
22442 2004-04-21  Karl Berry  <karl@gnu.org>
22443
22444         * config/srclist.txt (localcharset.c): break sync.
22445
22446 2004-04-20  Paul Eggert  <eggert@twinsun.com>
22447
22448         * m4/host-os.m4: Add a copyright notice.
22449
22450 2004-04-20  Jim Meyering  <jim@meyering.net>
22451
22452         Change UTILS_ to gl_ in AC_DEFINE'd names.
22453         Change utils_- and jm_-prefixed variables, too.
22454         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
22455         UTILS_FUNC_MKDIR_TRAILING_SLASH.
22456         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
22457
22458         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
22459         Don't emit trailing blanks.
22460         Also rename jm_-prefixed variables to have gl_ prefix.
22461
22462         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
22463         Also rename jm_-prefixed variables to have gl_ prefix.
22464
22465         * m4/jm-macros.m4: Reflect the renamings.
22466         * m4/prereq.m4: Likewise.
22467
22468 2004-04-20  Jim Meyering  <jim@meyering.net>
22469
22470         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
22471         memory.
22472
22473 2004-04-20  Jim Meyering  <jim@meyering.net>
22474             Bruno Haible  <bruno@clisp.org>
22475
22476         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
22477         memory when realloc fails.
22478
22479 2004-04-19  Jim Meyering  <jim@meyering.net>
22480
22481         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
22482         now that readutmp.c may call `free (0)'.
22483
22484 2004-04-19  Bruno Haible  <bruno@clisp.org>
22485
22486         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
22487         * m4/inttypes_h.m4: Likewise.
22488         * m4/stdint_h.m4: Likewise.
22489         * m4/intmax_t.m4: Likewise.
22490         * m4/uintmax_t.m4: Likewise.
22491
22492 2004-04-18  Jim Meyering  <jim@meyering.net>
22493
22494         * m4/prereq.m4: Don't forbid jm_ prefix.
22495
22496         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
22497         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
22498         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
22499         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
22500         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
22501         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
22502         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
22503         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
22504         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
22505         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
22506         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
22507         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
22508         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
22509         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
22510         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
22511         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
22512         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
22513         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
22514         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
22515
22516 2004-04-18  Jim Meyering  <jim@meyering.net>
22517
22518         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
22519         failure, don't leak memory and do call END_UTMP_ENT.
22520
22521 2004-04-16  Jim Meyering  <jim@meyering.net>
22522
22523         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
22524         coreutils' stat program.
22525         (gl_PREREQ): Don't require jm_PREREQ_STAT.
22526
22527 2004-04-11  Paul Eggert  <eggert@twinsun.com>
22528
22529         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
22530         C89.
22531         (CHAR_BIT): Remove, since we assume C89.
22532         Include <stdint.h> if available, as per current Autoconf CVS advice.
22533
22534 2004-03-31  Jim Meyering  <jim@meyering.net>
22535
22536         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
22537         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
22538         * m4/xalloc.m4: Likewise.
22539
22540 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22541
22542         Merge from coreutils.
22543
22544         * m4/inttostr.m4: New file.
22545         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
22546         Require AM_STDBOOL_H and gl_TIMESPEC instead.
22547         Require gl_CLOCK_TIME.
22548         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
22549
22550 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22551
22552         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
22553         not bool, to be more consistent with Unix conventions.
22554         Suggested by Bruno Haible.
22555
22556         Merge from coreutils.
22557
22558         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
22559         * lib/umaxtostr.c: New files.
22560
22561         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
22562         the usual <time.h> dance.
22563         (get_date): Change signature to support fractional time stamps.
22564         All callers changed.
22565         * lib/getdate.y: Include "getdate.h" first, as we can now
22566         assume C89 and don't need to worry about 'const'.
22567         Similarly, include "unlocked-io.h" near start, not in middle.
22568         Include <limits.h>.
22569         (textint.value): Use long int rather than int.
22570         (textint.digits): Use size_t rather than int.
22571         (BILLION, LOG10_BILLION): New constants.
22572         (parser_control): New member rel_ns.  Members day_ordinal,
22573         time_zone, month, day, hour, minutes, rel_year, rel_month,
22574         rel_day, rel_hour, rel_minutes, rel_seconds
22575         are now long int, not int.  Member seconds is now struct timespec,
22576         not int.  New member timespec_seen.  Members dates_seen, days_seen,
22577         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
22578         not int.
22579         (%union.intval): Now long int, not int.
22580         New member timespec.
22581         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
22582         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
22583         (spec): Now is a timespec or an item list.
22584         (timespec, items): New nonterminals.
22585         (time, rel, relunit, number, get_date):
22586         Add support for fractional seconds.
22587         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
22588         (gmtime, localtime, mktime): Remove decls; not needed with C89.
22589         (to_hour): First arg is now long int, not int.
22590         (to_year): Returns long int, not int.
22591         Don't treat year -70 like 70.
22592         (tm_diff): Returns long int, not int.
22593         (lookup_word): Use bool instead of int when appropriate.
22594         (yylex): Use size_t for count, not int.
22595         Detect overflow when parsing large integer constants.
22596         Add support for fractions.
22597         (get_date): Make pointers 'const' if possible.
22598         Use more-portable code to detect integer overflow.
22599         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
22600         Don't use ctime; it's not reliable if the year has >4 digits.
22601
22602         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
22603         This is for compatibility with BSD.
22604
22605         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
22606         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
22607         From coreutils' system.h.
22608
22609         * lib/userspec.c: Don't include "posixver.h".
22610         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
22611         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
22612         compatible extension.  Simplify code by removing a boolean int
22613         that was always nonzero if a string was nonnull.
22614
22615 2004-03-30  Jim Meyering  <jim@meyering.net>
22616
22617         Merge from coreutils.
22618
22619         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
22620         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
22621         on some systems one must include <grp.h> before it.
22622         Reported by Christian Krackowizer.
22623
22624 2004-03-30  Jim Meyering  <jim@meyering.net>
22625
22626         Merge from coreutils.
22627
22628         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
22629
22630         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
22631         an empty input stream.
22632
22633         * lib/readtokens.c: Include <stdbool.h>.
22634         (readtoken): Use `size_t' rather than int/long.
22635         All callers adjusted.
22636         Use `bool' rather than `int' where appropriate.
22637         Use memset rather than an explicit loop.
22638         Use x2nrealloc rather than xrealloc.
22639         Allow the use of `\0' as a delimiter.
22640         (readtokens): Likewise.
22641         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
22642
22643 2004-03-30  Jim Meyering  <jim@meyering.net>
22644
22645         * m4/realloc.m4: Remove file, since now it does no more than
22646         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
22647         the `configure.ac' section of module/realloc.
22648         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
22649
22650 2004-03-30  Bruno Haible  <bruno@clisp.org>
22651
22652         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
22653         nonnull.
22654
22655 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22656
22657         Merge changes to getloadavg.c from coreutils and Emacs.
22658
22659         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
22660         Define to an expression, not to the empty string.
22661         Include cloexec.h and xalloc.h.
22662         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
22663         Use set_cloexec_flag rather than rolling our own.
22664         * lib/cloexec.c, lib/cloexec.h: New files.
22665
22666 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22667
22668         * m4/cloexec.m4: New file.
22669
22670 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22671
22672         * lib/getopt.h: Sync with libc CVS.
22673
22674 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22675             Bruno Haible  <bruno@clisp.org>
22676
22677         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
22678         mbswidth.
22679
22680 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22681             Bruno Haible  <bruno@clisp.org>
22682
22683         * lib/mbswidth.h: Include <wchar.h> only if
22684         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
22685         <wchar.h>.
22686         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
22687
22688 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22689
22690         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
22691         Sync with libc CVS.
22692         * lib/getopt_int.h: New file, also synced from libc.
22693
22694 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22695
22696         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
22697         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
22698         Bring back getopt.c, getopt.h, getopt1.c.
22699
22700 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22701
22702         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
22703         All uses changed.  Check for sa_sigaction member; this fixes
22704         a bug first reported by Jason Andrade in
22705         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22706
22707 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22708
22709         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
22710         '#if' expressions.  Unlike the code it replaces, it does not
22711         depend on (defined _SC_PAGESIZE).  However, it does depend on
22712         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
22713         first reported by Jason Andrade in
22714         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22715
22716 2004-02-25  Simon Josefsson  <jas@extundo.com>
22717
22718         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
22719
22720 2004-02-25  Simon Josefsson  <jas@extundo.com>
22721
22722         * lib/strdup.h: New file.
22723         * lib/strdup.c: Include it.
22724         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
22725         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
22726
22727 2004-02-23  Karl Berry  <karl@gnu.org>
22728
22729         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
22730         (from fencepost.gnu.org:/gd/gnuorg).
22731
22732 2004-02-23  Karl Berry  <karl@gnu.org>
22733
22734         * config/srclistvars.sh (GNUORG) [karl]: redefine.
22735         * config/srclist.txt: add maintain/standards documents.
22736
22737 2004-02-18  Bruno Haible  <bruno@clisp.org>
22738
22739         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
22740         Reported by Derek Robert Price <derek@ximbiot.com>.
22741
22742 2004-02-16  Karl Berry  <karl@gnu.org>
22743
22744         * config/mkinstalldirs, install-sh: update from automake.
22745
22746 2004-02-06  Karl Berry  <karl@gnu.org>
22747
22748         * m4/po.m4: update from gettext 0.14.1.
22749
22750 2004-02-06  Karl Berry  <karl@gnu.org>
22751
22752         * lib/config.charset: update from gettext 0.14.1.
22753
22754 2004-02-05  Paul Eggert  <eggert@twinsun.com>
22755
22756         Add comments and code, prompted by suggestions from Bruno Haible
22757         for sh-quote.
22758         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
22759         describing the enum quoting_style values.
22760         * lib/quotearg.c (quotearg_alloc): New function.
22761         (quotearg_buffer_restyled): Treat lone { and } as special.
22762         Treat = as special.  Work around bug with older shells
22763         that "see" a '\' that is really the 2nd byte of a multibyte char.
22764         Quote empty string with shell_quoting_style.
22765
22766 2004-02-03  Bruno Haible  <bruno@clisp.org>
22767
22768         * m4/pipe.m4: New file, from GNU gettext.
22769
22770 2004-02-03  Bruno Haible  <bruno@clisp.org>
22771
22772         * lib/pipe.h: New file, from GNU gettext.
22773         * lib/pipe.c: New file, from GNU gettext.
22774
22775 2004-01-27  Bruno Haible  <bruno@clisp.org>
22776
22777         * m4/execute.m4: New file, from GNU gettext.
22778
22779 2004-01-27  Bruno Haible  <bruno@clisp.org>
22780
22781         * lib/execute.h: New file, from GNU gettext.
22782         * lib/execute.c: New file, from GNU gettext.
22783         * lib/w32spawn.h: New file, from GNU gettext.
22784
22785 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22786
22787         Merge from diffutils.
22788
22789         * lib/file-type.c (file_type): Add typed memory objects.
22790         * lib/file-type.h (S_TYPEISTMO): New macro.
22791
22792         * lib/c-stack.h (c_stack_action): Remove argv argument.
22793         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
22794         (die): Don't calculate message unless segv_action returns.
22795         (get_stack_location, min_address_from_argv, max_address_from_argv,
22796         volatile stack_base, volatile_stack_size): Remove.
22797         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
22798         that every segmentation violation is a stack overflow.  (Ouch!)
22799         See Debian bug 136249 (still outstanding) for more info about why
22800         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
22801
22802 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22803
22804         Exit-status fix from coreutils.
22805
22806         Use exit_failure consistently in place of EXIT_FAILURE,
22807         so that program exit statuses are consistent on failure.
22808
22809         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
22810         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
22811         * lib/argmatch.h: Comment fix to match the above.
22812         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
22813         Now a macro referring to exit_failure, instead of a separate
22814         variable.  Include "exitfail.h" to get it.
22815         * lib/xstrtol.h: Include "exitfail.h".
22816         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
22817
22818         * lib/long-options.c (parse_long_options): Use prototype
22819         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
22820         for clarity.
22821
22822 2004-01-21  Jim Meyering  <jim@meyering.net>
22823
22824         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
22825         so as not to conflict with a different-sized __mktime_internal
22826         function in GNU libc.
22827         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
22828         Problem building statically-linked `ls' reported by Michael Brunnbauer.
22829
22830 2004-01-20  Karl Berry  <karl@gnu.org>
22831
22832         * config/config.guess: update from config.
22833
22834         * config/srclistvars.sh: GNUWWWLICENSES for karl.
22835
22836 2004-01-20  Bruno Haible  <bruno@clisp.org>
22837
22838         Safer stack allocation.
22839         * lib/setenv.c: Include allocsa.h.
22840         (alloca): Remove fallback definition.
22841         (freea): Remove macro.
22842         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
22843         instead of freea.
22844
22845 2004-01-20  Bruno Haible  <bruno@clisp.org>
22846
22847         * m4/eealloc.m4: New file, from GNU gettext.
22848
22849 2004-01-20  Bruno Haible  <bruno@clisp.org>
22850
22851         * m4/allocsa.m4: New file, from GNU gettext.
22852
22853 2004-01-20  Bruno Haible  <bruno@clisp.org>
22854
22855         * lib/xallocsa.h: New file, from GNU gettext.
22856         * lib/xallocsa.c: New file, from GNU gettext.
22857
22858 2004-01-20  Bruno Haible  <bruno@clisp.org>
22859
22860         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
22861
22862 2004-01-20  Bruno Haible  <bruno@clisp.org>
22863
22864         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
22865         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
22866         specially.
22867
22868 2004-01-20  Bruno Haible  <bruno@clisp.org>
22869
22870         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
22871         patch.
22872
22873 2004-01-20  Bruno Haible  <bruno@clisp.org>
22874
22875         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
22876
22877 2004-01-20  Bruno Haible  <bruno@clisp.org>
22878
22879         * lib/eealloc.h: New file.
22880
22881 2004-01-20  Bruno Haible  <bruno@clisp.org>
22882
22883         * lib/binary-io.h: Avoid warnings on Cygwin.
22884
22885 2004-01-20  Bruno Haible  <bruno@clisp.org>
22886
22887         * lib/allocsa.h: New file, from GNU gettext.
22888         * lib/allocsa.c: New file, from GNU gettext.
22889
22890 2004-01-18  Karl Berry  <karl@gnu.org>
22891
22892         * doc/gpl.texi, doc/lgpl.texi: new files.
22893
22894 2004-01-18  Karl Berry  <karl@gnu.org>
22895
22896         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
22897         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
22898
22899 2004-01-15  Paul Eggert  <eggert@twinsun.com>
22900
22901         Merge from coreutils.
22902
22903         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
22904         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
22905         (gl_DEFAULT_POSIX2_VERSION): Move
22906         the documentation from 'configure' into 'config.hin',
22907         so that 'configure --help' isn't burdened by it and
22908         we don't have to worry about its formatting there.
22909         Reword the documentation so that it's more succinct
22910         and can be run together into a single paragraph.
22911         * m4/same.m4 (gl_SAME): Check for pathconf.
22912
22913 2004-01-15  Paul Eggert  <eggert@twinsun.com>
22914
22915         Merge from coreutils.
22916
22917         * lib/posixver.c: Include posixver.h.
22918
22919         * lib/same.c: Include <stdbool.h>, <limits.h>.
22920         (_POSIX_NAME_MAX): Define if not defined.
22921         (MIN): New macro.
22922         (same_name): If file names are silently truncated, report
22923         that the file names are the same if they are the same after
22924         the silent truncation.
22925
22926         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
22927         conversion function.
22928         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
22929         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
22930         longer needed.
22931
22932 2004-01-15  Jim Meyering  <jim@meyering.net>
22933
22934         Merge from coreutils.
22935
22936         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
22937         if no library is required.
22938         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
22939         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
22940         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
22941         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
22942         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
22943         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
22944         value, $ac_cv_search_crypt, if it's "none required".
22945         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
22946         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
22947         not gl_FUNC_GETLOADAVG.
22948         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
22949         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
22950
22951 2004-01-15  Jim Meyering  <jim@meyering.net>
22952
22953         Merge from coreutils.
22954
22955         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
22956         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
22957         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
22958
22959         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
22960         optional configure-time default.
22961
22962         * lib/version-etc.c (version_etc_copyright): Update copyright date.
22963
22964         * lib/xreadlink.c (xreadlink): Correct outdated comment.
22965
22966 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
22967
22968         Merge from coreutils.
22969
22970         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
22971         value, $ac_cv_search_nanosleep, if it's "none required".
22972
22973 2004-01-14  Paul Eggert  <eggert@twinsun.com>
22974
22975         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
22976         with like-named macro in fnmatch.c.
22977         (EXT): Use an internal constant instead.
22978
22979         Merge fnmatch patches from glibc.
22980         * lib/fnmatch.c (mbsinit): Remove define.
22981         Add libc_hidden_ver (__fnmatch, fnmatch).
22982         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
22983         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
22984
22985 2004-01-14  Karl Berry  <karl@gnu.org>
22986
22987         * config/install-sh: update from automake.
22988
22989 2004-01-13  Karl Berry  <karl@gnu.org>
22990
22991         * config/install-sh: update from automake.
22992
22993 2004-01-09  Karl Berry  <karl@gnu.org>
22994
22995         * config/install-sh: update from automake.
22996
22997 2004-01-05  Karl Berry  <karl@gnu.org>
22998
22999         * config/config.{sub,guess}: update from config.
23000
23001 2003-12-31  Karl Berry  <karl@gnu.org>
23002
23003         * config/depcomp: update from automake.
23004
23005 2003-12-14  Karl Berry  <karl@gnu.org>
23006
23007         * lib/config.charset: update from gettext-runtime.
23008
23009 2003-12-03  Paul Eggert  <eggert@twinsun.com>
23010
23011         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
23012         Bug reported by Alfred M. Szmidt.
23013
23014 2003-12-03  Bruno Haible  <bruno@clisp.org>
23015
23016         * m4/gettext.m4: Upgrade from gettext-0.13.
23017         * m4/po.m4: Upgrade from gettext-0.13.
23018         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
23019         * m4/intmax.m4: New file, from gettext-0.13.
23020         * m4/printf-posix.m4: New file, from gettext-0.13.
23021
23022 2003-11-29  Karl Berry  <karl@gnu.org>
23023
23024         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
23025
23026 2003-11-25  Paul Eggert  <eggert@twinsun.com>
23027             Bruno Haible  <bruno@clisp.org>
23028
23029         * lib/printf-parse.h: Don't include sys/types.h.
23030         (ARG_NONE): New macro.
23031         (char_directive): Change type of *arg_index fields to size_t.
23032         * lib/printf-parse.c: Don't include sys/types.h.
23033         (SSIZE_MAX): Remove macro.
23034         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
23035         Remove unnecessary overflow check.
23036         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
23037         fields.
23038
23039 2003-11-25  Bruno Haible  <bruno@clisp.org>
23040
23041         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
23042
23043 2003-11-25  Bruno Haible  <bruno@clisp.org>
23044
23045         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
23046         gt_TYPE_SSIZE_T.
23047
23048 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23049
23050         * modules/alloca: Remove dependency on xalloc.
23051
23052 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23053
23054         * lib/alloca.c: Remove dependency on xalloc module.
23055         (xalloc_die): Remove.
23056         (memory_full) [!defined emacs]: New macro.
23057         [!defined emacs]: Don't include xalloc.h.
23058         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
23059         address arithmetic overflows.  Change datatypes a bit to avoid
23060         unnecessary casts.
23061
23062 2003-11-22  Jim Meyering  <jim@meyering.net>
23063
23064         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23065         s/size/size_t/.
23066
23067 2003-11-21  Karl Berry  <karl@gnu.org>
23068
23069         * config/config.{sub,guess}: update from config.
23070
23071 2003-11-18  Karl Berry  <karl@gnu.org>
23072
23073         * config/config.{sub,guess}: update from config.
23074
23075         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23076
23077 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23078
23079         * README: Mention that S+T cannot overflow if S is the size of
23080         an existing object and T is sufficiently small.
23081
23082 2003-11-17  Jim Meyering  <jim@meyering.net>
23083
23084         On systems without utime and without a utimes function capable of
23085         dealing with a NULL struct utimbuf* argument, this utime replacement
23086         could -- in unusual circumstances -- leak a file descriptor.
23087         * lib/utime.c: Include <unistd.h> and <errno.h>.
23088         (utime_null): Be sure to close `fd' and to preserve errno.
23089         Reported by Geoff Collyer via Arnold Robbins.
23090
23091 2003-11-17  Bruno Haible  <bruno@clisp.org>
23092
23093         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23094         (Depends-on): Add xsize.
23095
23096 2003-11-17  Bruno Haible  <bruno@clisp.org>
23097
23098         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23099
23100 2003-11-17  Bruno Haible  <bruno@clisp.org>
23101
23102         * lib/vasnprintf.c (alloca): Remove fallback definition.
23103         (freea): Remove definition.
23104         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23105         Reported by Paul Eggert.
23106
23107 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23108             Bruno Haible  <bruno@clisp.org>
23109
23110         Protect against address arithmetic overflow.
23111         * lib/printf-args.h: Include stddef.h.
23112         (arguments): Change type of field 'count' to size_t.
23113         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23114         'unsigned int' where appropriate.
23115         * lib/printf-parse.h: Include sys/types.h.
23116         (char_directive): Change type of *arg_index fields to ssize_t.
23117         (char_directives): Change type of fields 'count', max_*_length to
23118         size_t.
23119         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23120         (SSIZE_MAX): Define fallback value.
23121         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23122         instead of 'int' where appropriate. Check a_allocated, d_allocated
23123         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23124         * lib/vasnprintf.c: Include xsize.h.
23125         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23126         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23127         overflow. Avoid wraparound when converting a width or precision from
23128         decimal to binary.
23129
23130 2003-11-16  Bruno Haible  <bruno@clisp.org>
23131
23132         Update from GNU gettext.
23133         * lib/printf-parse.c: Generalize to it can be compiled for wide
23134         strings.
23135         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23136         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23137         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23138         SNPRINTF): New macros.
23139         Don't include <alloca.h> if the file is used inside libintl.
23140         (local_wcslen): New function, for Solaris 2.5.1.
23141         (VASNPRINTF): Use it instead of wcslen.
23142
23143 2003-11-16  Bruno Haible  <bruno@clisp.org>
23144
23145         * lib/xsize.h (xmax): New function.
23146         (xsum, xsum3, xsum4): Declare as "pure" functions.
23147
23148 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23149
23150         * modules/xalloc (Files): Undo latest change, since xalloc.h
23151         no longer needs SIZE_MAX or PTRDIFF_MAX.
23152
23153 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23154
23155         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23156         gl_PTRDIFF_MAX.
23157
23158 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23159
23160         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23161         "return", to pacify some unknown compiler.  Problem reported
23162         by Joerg Schilling.
23163
23164 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23165
23166         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23167         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23168         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23169         heuristic is just as accurate as far as we know, and it removes a
23170         dependency on size_max.m4 and ptrdiff_max.m4.
23171
23172 2003-11-11  Bruno Haible  <bruno@clisp.org>
23173
23174         * modules/xsize (Files): Add m4/size_max.m4.
23175         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23176
23177 2003-11-11  Bruno Haible  <bruno@clisp.org>
23178
23179         * m4/size_max.m4: New file.
23180         * m4/ptrdiff_max.m4: New file.
23181         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23182         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23183         (gl_XALLOC): Invoke it.
23184
23185 2003-11-11  Bruno Haible  <bruno@clisp.org>
23186
23187         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23188         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23189         defined.
23190
23191 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23192
23193         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23194         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23195         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23196         From Bruno Haible.
23197         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23198         not (size_t) -1, since it's defined here.
23199
23200 2003-11-09  Karl Berry  <karl@gnu.org>
23201
23202         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23203
23204 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23205
23206         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23207         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23208         Reject sizes of exactly SIZE_MAX bytes.
23209         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23210         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23211
23212 2003-11-05  Bruno Haible  <bruno@clisp.org>
23213
23214         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23215         SIZE_MAX defined in <limits.h> on Solaris.
23216
23217 2003-11-04  Jim Meyering  <jim@meyering.net>
23218
23219         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23220         variable names, rather than @VAR@.
23221         * modules/poll: Likewise.
23222
23223 2003-11-04  Bruno Haible  <bruno@clisp.org>
23224
23225         * modules/xsize: New file.
23226         * modules/linebreak: Depend on xsize.
23227         * MODULES.html.sh (func_all_modules): Add xsize.
23228
23229 2003-11-04  Bruno Haible  <bruno@clisp.org>
23230
23231         * m4/xsize.m4: New file.
23232
23233 2003-11-04  Bruno Haible  <bruno@clisp.org>
23234
23235         * lib/xsize.h: New file.
23236         * lib/linebreak.c: Include xsize.h.
23237         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23238         argument for overflow.
23239         Suggested by Paul Eggert.
23240
23241 2003-11-03  Karl Berry  <karl@gnu.org>
23242
23243         * config/config.{guess,sub}: update from config.
23244
23245 2003-11-03  Jim Meyering  <jim@meyering.net>
23246
23247         * modules/userspec (lib_SOURCES): Add userspec.h.
23248         (Include): Add "userspec.h".
23249         Improve description.
23250
23251 2003-11-03  Jim Meyering  <jim@meyering.net>
23252
23253         * lib/userspec.c: Include "userspec.h".
23254         * lib/userspec.h: New file.
23255
23256 2003-11-03  Bruno Haible  <bruno@clisp.org>
23257
23258         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23259
23260 2003-11-03  Bruno Haible  <bruno@clisp.org>
23261
23262         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23263         available, to avoid (extremely rare) race condition.
23264         Suggested by Paul Eggert.
23265
23266 2003-11-02  Karl Berry  <karl@gnu.org>
23267
23268         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23269
23270 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23271
23272         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23273         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23274         (read_filesystem_list): Set and use me_type_malloced.
23275         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23276         whatever the type happens to be), for brevity and consistency.
23277         Check for size calculation overflow on Alphas running OSF/1.
23278
23279 2003-10-31  Jim Meyering  <jim@meyering.net>
23280
23281         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23282
23283         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23284
23285 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23286             Bruno Haible  <bruno@clisp.org>
23287
23288         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23289         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23290
23291 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23292
23293         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23294         netbsd*-gnu*.  Suggested by Robert Millan.
23295
23296 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23297
23298         * modules/group-member: Depend on stdbool.
23299
23300 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23301
23302         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23303
23304 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23305
23306         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23307         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23308         after the 'gnu' in these cases.  This fixes some bugs in the
23309         previous change, and is based on suggestions by Robert Millan.
23310
23311 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23312
23313         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23314         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23315         no longer needed.
23316         * lib/quotearg.c (quotearg_n_options): Use it.
23317         * lib/group-member.c: Include <stdbool.h>.
23318         (free_group_info): Arg is now const *; don't free arg.
23319         (get_group_info): Now returns bool and accepts struct group_info *,
23320         rather than returning a malloc'ed struct group_info *.
23321         All uses changed.  Check for overflow in internal size calculation.
23322
23323         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23324         rather than xmalloc/xrealloc.
23325         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23326         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23327         conformance bug: the old code used a pointer after freeing the
23328         storage that it addressed.
23329         * lib/hash.c (hash_initialize): Simplify the code by using
23330         xalloc_oversized rather than doing it by hand.
23331         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23332         the buffer preserved.  Use free and xmalloc instead.
23333         * lib/quotearg.c (quotearg_n_options): Likewise.
23334         Use a simpler test for size overflow.  Don't use xalloc_oversized
23335         because unsigned int might be wider than size_t (!); this suggests
23336         that we should switch from unsigned int to size_t for slot numbers.
23337
23338 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23339
23340         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23341         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23342         NetBSD kernels.  Requested by Richard Stallman.
23343
23344 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23345
23346         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23347         to allocate the returned structure.  Do not allocate a subarray,
23348         as x2nrealloc will do that.
23349         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
23350         instead of xnrealloc.
23351         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
23352
23353 2003-10-27  Bruno Haible  <bruno@clisp.org>
23354
23355         * lib/stdbool_.h: Better support for BeOS.
23356
23357 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23358
23359         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
23360         now uses inline.
23361
23362 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23363
23364         * lib/xalloc.h (xalloc_oversized): New static inline function, for
23365         callers that want to do their own size-overflow checking.  Include
23366         <stdbool.h>, since xalloc_oversized returns bool.
23367         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
23368         to use xalloc_oversized.
23369
23370         Add two functions x2realloc, x2nrealloc, for programs that grow
23371         arrays dynamically by doubling their sizes.
23372         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
23373         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
23374         New functions.
23375
23376         Port to C99 semantics for 'inline' of external functions.
23377         Bug reported by Bruno Haible.
23378         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
23379         with the old contents of xnmalloc.
23380         (xnmalloc, xmalloc): Use it.
23381         (xnrealloc_inline): New static inline function,
23382         with the old contents of xnrealloc.
23383         (xnrealloc, xrealloc): Use it.
23384
23385         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
23386         that.
23387
23388 2003-10-26  Karl Berry  <karl@gnu.org>
23389
23390         * config/srclist.txt (COPYING.DOC): no longer available from
23391         /gd/gnuorg; don't know where the ultimate source is.
23392
23393 2003-10-25  Paul Eggert  <eggert@twinsun.com>
23394
23395         Fix several address-calculation bugs in the hash modules,
23396         plus some minor code cleanup.
23397
23398         * lib/hash.h: Include <stdbool.h>, for bool.
23399         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
23400         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
23401         hash_get_n_entries, hash_get_max_bucket_length,
23402         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
23403         hash_rehash): Use size_t rather than unsigned.
23404         * lib/hash.c (struct hash_table, hash_get_n_buckets,
23405         hash_get_n_buckets_used, hash_get_n_entries,
23406         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
23407         hash_get_entries, hash_do_for_each, hash_string, is_prime,
23408         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
23409         Likewise.
23410         (SIZE_MAX): Define if not defined.
23411         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
23412         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
23413         hash_print):
23414         Use const * when possible.
23415         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
23416         (check_tuning): Fix bug: if tuning parameters were very close to
23417         0 or 1, rounding errors could have caused subscript violations.
23418         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
23419         (hash_initialize): Add 'fail:' label
23420         to free table and return NULL, and use it to simplify code.
23421         Use calloc rather than clearing the storage ourself.
23422         (hash_initialize, hash_rehash): Check for arithmetic overflow in
23423         buffer size calculations.
23424         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
23425         Include <stddef.h>, for size_t.
23426         * lib/hash-pjw.c (hash_pjw): Likewise.
23427         Switch to method described by Bruno Haible.
23428         Include <limits.h>, for CHAR_BIT.
23429         (SIZE_BITS): New macro.
23430
23431 2003-10-23  Paul Eggert  <eggert@twinsun.com>
23432
23433         * m4/getline.m4 (AM_FUNC_GETLINE):
23434         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
23435         hosts.  Problem reported by Derek Robert Price in
23436         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
23437         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
23438         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
23439
23440 2003-10-21  Paul Eggert  <eggert@twinsun.com>
23441
23442         * lib/getndelim2.c (getndelim2): When size calculation overflows,
23443         ceiling the allocation at NMAX bytes rather than silently
23444         discarding input bytes before NMAX is reached.  This makes
23445         a difference only if NMAX exceeds SIZE_MAX / 2.
23446
23447         * lib/obstack.c: Merge from glibc.
23448         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
23449         Add libc_hidden_def (_obstack_newchunk).
23450         (_obstack_free) [! defined _LIBC]: Remove.
23451         [defined _LIBC]: Make a strong alias from obstack_free, rather than
23452         a clone of the function body.
23453         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
23454         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
23455
23456         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
23457         glibc.
23458         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
23459         arg to memcpy.
23460
23461         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
23462         (obstack_ptr_grow_fast, obstack_int_grow_fast):
23463         Don't use lvalue casts, as GCC plans to remove support for them
23464         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
23465         was also present in the non-GCC version, indicating that this
23466         code had always been buggy and had never been widely used.
23467         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
23468         Use the fast variant of each macro, rather than copying the
23469         definiens of the fast variant; that way, we'll be more likely to
23470         catch future bugs in the fast variants.
23471
23472 2003-10-20  Bruno Haible  <bruno@clisp.org>
23473
23474         * modules/wait-process: New file.
23475         * MODULES.html.sh (func_all_modules): Add wait-process.
23476
23477 2003-10-20  Bruno Haible  <bruno@clisp.org>
23478
23479         * m4/wait-process.m4: New file.
23480
23481 2003-10-20  Bruno Haible  <bruno@clisp.org>
23482
23483         * lib/wait-process.h: New file, from GNU gettext.
23484         * lib/wait-process.c: New file, from GNU gettext.
23485
23486 2003-10-19  Jim Meyering  <jim@meyering.net>
23487
23488         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
23489         HPUX 10.20.
23490
23491 2003-10-18  Karl Berry  <karl@gnu.org>
23492
23493         * config/config.guess: update from config.
23494
23495 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23496
23497         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
23498         (getgroups): First arg is int, not size_t.
23499         Don't let 'free' mangle errno.
23500
23501 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23502
23503         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
23504
23505 2003-10-16  Karl Berry  <karl@gnu.org>
23506
23507         * config/config.{guess,sub}: update from config.
23508
23509 2003-10-16  Jim Meyering  <jim@meyering.net>
23510
23511         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
23512         memcpy.
23513
23514 2003-10-15  Paul Eggert  <eggert@twinsun.com>
23515
23516         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
23517         (SIZE_MAX): Remove.
23518         (new_exclude, add_exclude_file): Initial size no longer needs to
23519         be a power of 2.
23520         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
23521         our own address arithmetic overflow checking.
23522
23523         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
23524         (fnmatch): Do not alloca more than 2000 wide characters;
23525         instead, use malloc for large buffers.
23526         Check for address arithmetic overflow, and return -1
23527         with errno set to ENOMEM in that case.
23528         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
23529         (NEW_PATTERN): Do not alloca more than 8000 bytes;
23530         instead, return -1.  Check for address arithmetic overflow.
23531
23532 2003-10-14  Paul Eggert  <eggert@twinsun.com>
23533
23534         Handle invalid suffixes and overflow independently, so that
23535         callers can treat them independently as needed.  Fix some bugs in
23536         suffix handling, e.g., "100k@" was not diagnosed as an invalid
23537         suffix for a human-readable blocksize.  The major caller-visible
23538         change is the addition of a new
23539         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
23540         that both overflow and suffix chars were found.
23541
23542         * lib/human.c (humblock): Don't check separately for invalid suffix
23543         char; that is xstrtoumax's job (now that its bug is fixed).
23544         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
23545         INTMAX_MAX]: New macros.
23546         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
23547         TYPE_MAXIMUM): New macros.
23548         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
23549         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
23550         if overflow occurs, as it's what __strtol does and it's more useful
23551         in practice.
23552         (__xstrtol): If __strtol reports some error other than ERANGE,
23553         reflect it to the caller as LONGINT_INVALID.  If it reports
23554         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
23555         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
23556         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
23557         value.
23558         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
23559         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
23560         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
23561         [defined UINTMAX_MAX]: New macros.
23562
23563 2003-10-14  Bruno Haible  <bruno@clisp.org>
23564
23565         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
23566
23567 2003-10-14  Bruno Haible  <bruno@clisp.org>
23568
23569         * m4/sig_atomic_t: New file, from GNU gettext.
23570         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
23571
23572 2003-10-14  Bruno Haible  <bruno@clisp.org>
23573
23574         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
23575         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
23576         Also use volatile where needed.
23577
23578 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23579
23580         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
23581         Change maintainer from Bruno Haible to 'all'.
23582
23583 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23584
23585         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
23586
23587 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23588
23589         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
23590         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
23591         and define in terms of the other primitives.
23592         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
23593         (SIZE_MAX): Define if not already defined.
23594         (array_size_overflow): New function.
23595         (xalloc_die): Abort instead of exiting if 'error' returns.
23596         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
23597         (xmalloc, xrealloc): Use them.
23598         (xcalloc): Check for address arithmetic overflow.
23599         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
23600         a bit faster than strcpy.
23601
23602 2003-10-10  Simon Josefsson  <jas@extundo.com>
23603
23604         * modules/argp (Depends-on): Add restrict and strcase.
23605
23606 2003-10-10  Simon Josefsson  <jas@extundo.com>
23607
23608         * m4/argp.m4: Add AC_C_INLINE.
23609
23610 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23611
23612         Merge getpass from libc, plus a few fixes.
23613
23614         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
23615         Include <stdbool.h>.
23616         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
23617         __fsetlocking to empty.
23618         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
23619         do include <bits/libc-lock.h>.
23620         Do not include <fcntl.h>; not needed.
23621         [_LIBC]: Include <wchar.h>.
23622         (NOTCANCEL_MODE): New macro.
23623         (flockfile, funlockfile) [_LIBC]: New macros.
23624         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
23625         [!_LIBC]: New macros.
23626         (call_fclose): New function.
23627         (getpass): Use it.  Save tty stream separately; this simplifies the
23628         code and makes it more reliable if stdin happens to equal stdout.
23629         Invoke __fsetlocking on tty.
23630         Handle thread cancellation if needed.
23631         Namespace cleanup (use __tcgetattr, __getline).
23632         Use bool for Booleans.
23633         [USE_IN_LIBIO]: Handle wide streams.
23634         [!_LIBC]: Unconditionally do the fseek, since we don't know what
23635         stream might go where.
23636
23637         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
23638         doesn't have to include <stdio.h> before us.
23639         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
23640         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
23641         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
23642         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
23643         if not declared, so that we can use getpass.c code from libc without
23644         rewriting it.
23645         (flockfile, ftrylockfile, funlockfile): New macros.
23646
23647 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23648
23649         * modules/getpass: Depend on stdbool.
23650
23651 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23652
23653         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
23654
23655 2003-10-07  Karl Berry  <karl@gnu.org>
23656
23657         * config/config.{guess,sub}: update from config.
23658
23659 2003-10-06  Jim Meyering  <jim@meyering.net>
23660             Bruno Haible  <bruno@clisp.org>
23661
23662         This lets translators provide better translations for the
23663         "Written by ..." part of --version output.
23664         * lib/version-etc.h: Include stdarg.h.
23665         (version_etc_copyright): Declare as readonly.
23666         (version_etc): Make this function variadic with a NULL-terminated list
23667         of author name strings.
23668         (version_etc_va): New declaration.
23669         * lib/version-etc.c: Include stdarg.h, stdlib.h.
23670         (version_etc_copyright): Declare as readonly.
23671         (version_etc_va): New function. Provide a different translatable string
23672         for each possible number of authors < 10. Abbreviate when there are 10
23673         authors or more.
23674         (version_etc): Make this function variadic. Call version_etc_va.
23675         Suggestion from Gary V. Vaughan.
23676
23677         * lib/long-options.h (parse_long_options): Change prototype: the
23678         authors string is moved to the end and becomes variadic.
23679         * lib/long-options.c: Include stdarg.h.
23680         (parse_long_options): Make this function variadic, too.
23681         Call version_etc_va, not version_etc.
23682
23683 2003-10-06  Bruno Haible  <bruno@clisp.org>
23684
23685         * modules/version-etc-2: Remove file.
23686         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
23687
23688 2003-10-06  Bruno Haible  <bruno@clisp.org>
23689
23690         * modules/fatal-signal: New file.
23691         * MODULES.html.sh (func_all_modules): Add fatal-signal.
23692
23693 2003-10-06  Bruno Haible  <bruno@clisp.org>
23694
23695         * m4/fatal-signal.m4: New file.
23696         * m4/signalblocking.m4: New file, from GNU gettext.
23697
23698 2003-10-06  Bruno Haible  <bruno@clisp.org>
23699
23700         * lib/version-etc-2.h: Remove file.
23701         * lib/version-etc-2.c: Remove file.
23702
23703 2003-10-06  Bruno Haible  <bruno@clisp.org>
23704
23705         * lib/fatal-signal.h: New file, from GNU gettext.
23706         * lib/fatal-signal.c: New file, from GNU gettext.
23707
23708 2003-10-05  Paul Eggert  <eggert@twinsun.com>
23709
23710         * README: Rework advice for preventing empty .o files.
23711         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
23712         not <sys/types.h>.
23713
23714 2003-10-04  Karl Berry  <karl@gnu.org>
23715
23716         * lib/argp*: update from libc.
23717
23718 2003-10-04  Karl Berry  <karl@gnu.org>
23719
23720         * config/config.{guess,sub}: update from config.
23721
23722 2003-10-02  Bruno Haible  <bruno@clisp.org>
23723
23724         * modules/lchown (Include): Add lchown.h.
23725         * modules/time_r (Include): Use "..." syntax.
23726         * modules/xgetdomainname (Include): Add xgetdomainname.h.
23727
23728 2003-10-01  Simon Josefsson  <jas@extundo.com>
23729
23730         * MODULES.html.sh (func_all_modules): Move gethostname from section
23731         'based on' to section 'lacking' POSIX:2001.
23732
23733 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
23734
23735         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
23736         to output mode on the same stream.
23737
23738 2003-09-29  Paul Eggert  <eggert@twinsun.com>
23739
23740         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
23741         Fix arg typo in previous patch.
23742
23743 2003-09-28  Jim Meyering  <jim@meyering.net>
23744
23745         * lib/error.c: Correct cpp indentation.
23746
23747 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23748
23749         * modules/free: New file.
23750
23751 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23752
23753         * m4/free.m4: New file.
23754
23755 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23756
23757         * lib/minmax.h (MIN, MAX)
23758         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
23759         Omit the special code that used __typeof__, since we worry that
23760         it could be more trouble than it's worth.  See:
23761         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
23762         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
23763
23764         * lib/free.c: New file.
23765
23766 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
23767
23768         Trivial fixes to Makefile.am parts of module listings.
23769         * modules/strstr: Append strstr.h to lib_SOURCES.
23770         * modules/strcase: Likewise, for strcase.h.
23771
23772 2003-09-27  Karl Berry  <karl@gnu.org>
23773
23774         * config/mkinstalldirs: update from automake.
23775
23776 2003-09-26  Paul Eggert  <eggert@twinsun.com>
23777
23778         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
23779         (error_tail): Do not loop, reallocating temporary buffer, since
23780         the output cannot contain more wide characters than the input
23781         contains bytes, the size must be big enough already.  This avoids
23782         one potential size overflow calculation.  Check for size overflow
23783         when calculating temporary buffer size.  Free temporary buffer
23784         when done, if it was allocated with malloc; this plugs a memory
23785         leak.  Remove casts from void * to pointers, that are no longer
23786         needed now that we're assuming C89 or better.
23787
23788         Merge error changes from glibc.
23789
23790         * lib/error.c, error.h: Update copyright notice header to match glibc.
23791         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
23792         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
23793         Disable cancellation while printing error.
23794         * lib/error.h: Prepend __ to parameter names.
23795
23796 2003-09-26  Jim Meyering  <jim@meyering.net>
23797
23798         * lib/error.c (error_tail): Move some declarations
23799         into inner scope where the local variables are used.
23800
23801 2003-09-26  Bruno Haible  <bruno@clisp.org>
23802
23803         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
23804         stpncpy().
23805         Don't define stpncpy through config.h; it's now done through stpncpy.h.
23806
23807 2003-09-26  Bruno Haible  <bruno@clisp.org>
23808
23809         * lib/stpncpy.h (gnu_stpncpy): New declaration.
23810         (stpncpy): Define as alias for gnu_stpncpy.
23811         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
23812
23813 2003-09-25  Simon Josefsson  <jas@extundo.com>
23814
23815         * lib/xgetdomainname.h: New file.
23816         * lib/xgetdomainname.c: New file.
23817
23818 2003-09-25  Simon Josefsson  <jas@extundo.com>
23819             Bruno Haible  <bruno@clisp.org>
23820
23821         * modules/getdomainname: New file.
23822         * modules/xgetdomainname: New file.
23823         * MODULES.html.sh (func_all_modules): Add getdomainname,
23824         xgetdomainname.
23825
23826 2003-09-25  Simon Josefsson  <jas@extundo.com>
23827             Bruno Haible  <bruno@clisp.org>
23828
23829         * m4/getdomainname.m4: New file.
23830
23831 2003-09-25  Simon Josefsson  <jas@extundo.com>
23832             Bruno Haible  <bruno@clisp.org>
23833
23834         * lib/getdomainname.h: New file.
23835         * lib/getdomainname.c: New file.
23836
23837 2003-09-25  Karl Berry  <karl@gnu.org>
23838
23839         * lib/argp-fmtstream.c, argp-help.c: update from libc.
23840
23841 2003-09-25  Karl Berry  <karl@gnu.org>
23842
23843         * config/install-sh: update from automake.
23844
23845 2003-09-25  Bruno Haible  <bruno@clisp.org>
23846
23847         * modules/version-etc-2: New file, from modules/version-etc with
23848         modifications.
23849         * MODULES.html.sh (func_all_modules): Add version-etc-2.
23850
23851 2003-09-25  Bruno Haible  <bruno@clisp.org>
23852
23853         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
23854         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
23855
23856 2003-09-24  Simon Josefsson  <jas@extundo.com>
23857
23858         * modules/xgethostname: Add xgethostname.h.
23859
23860 2003-09-24  Paul Eggert  <eggert@twinsun.com>
23861
23862         * lib/linebuffer.c (freebuffer): Don't free the argument, just
23863         the buffer associated with the argument.  Bug reported by
23864         Simon Josefsson.
23865
23866 2003-09-24  Paul Eggert  <eggert@twinsun.com>
23867
23868         * README: Document assumptions that 'int' is at least 32 bits
23869         wide, that integer arithmetic is 2's complement without overflow,
23870         that there are no holes in integer values, that adding sizes of
23871         two nonoverlapping objects can't overflow, and that all-bits-zero
23872         yields scalar zero.  Fix spelling and capitalization typos.
23873
23874 2003-09-19  Karl Berry  <karl@gnu.org>
23875
23876         * lib/argp.h: update from libc.
23877
23878 2003-09-17  Paul Eggert  <eggert@twinsun.com>
23879
23880         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
23881         to avoid spurious warnings like "AC_RUN_IFELSE was called before
23882         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
23883
23884 2003-09-17  Paul Eggert  <eggert@twinsun.com>
23885
23886         * gnulib-tool: Use "test -h", not "test -L", for portability
23887         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
23888         (tags_regexp): Remove, since \| doesn't conform to POSIX.
23889         (sed_extract_prog): Issue s commands one-by-one, rather than
23890         using \| in one s command.
23891
23892 2003-09-16  Paul Eggert  <eggert@twinsun.com>
23893
23894         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
23895         input error, instead of returning NULL the next time we are called
23896         (and therefore losing track of errno).
23897
23898 2003-09-16  Bruno Haible  <bruno@clisp.org>
23899
23900         * gnulib-tool (func_create_testdir): Warn about duplicated
23901         dependencies.
23902
23903 2003-09-15  Paul Eggert  <eggert@twinsun.com>
23904
23905         * modules/argmatch, modules/fatal, modules/obstack,
23906         modules/xalloc, modules/xgethostname: Sort dependencies by
23907         importance, not alphabetically.
23908
23909 2003-09-15  Paul Eggert  <eggert@twinsun.com>
23910
23911         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
23912         fails, so that the caller gets the proper errno.
23913
23914         * lib/readutmp.c (read_utmp): Likewise.
23915         Check for fstat error.  Close stream and free storage
23916         when failing.
23917
23918 2003-09-14  Karl Berry  <karl@gnu.org>
23919
23920         * config/srclist.txt (strdup.c): disable for c89 changes.
23921
23922 2003-09-14  Jim Meyering  <jim@meyering.net>
23923
23924         * lib/getloadavg.c: Correct cpp indentation.
23925         * lib/strdup.c: Likewise.
23926         * lib/vasnprintf.c: Likewise.
23927
23928 2003-09-14  Bruno Haible  <bruno@clisp.org>
23929
23930         * modules/fwriteerror: New file.
23931         * MODULES.html.sh (func_all_modules): Add fwriteerror.
23932
23933 2003-09-14  Bruno Haible  <bruno@clisp.org>
23934
23935         * lib/fwriteerror.h: New file.
23936         * lib/fwriteerror.c: New file.
23937
23938 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23939
23940         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
23941         modules/xgethostname, modules/xalloc: Depend on exit.
23942
23943 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23944
23945         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
23946
23947         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
23948         and AC_MINIX, too, so that their extensions are available.
23949
23950         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
23951         This macro has been superseded by gl_BACKUPFILE.
23952
23953         More patches to assume C89 or better.
23954
23955         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
23956
23957         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
23958         unconditionally.
23959         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
23960         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
23961         Include <string.h>, <stdlib.h> unconditionally.
23962         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
23963         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
23964         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
23965         headers or for string.h.
23966         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
23967         or strtoul.
23968
23969         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
23970         headers.
23971         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
23972         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23973         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
23974         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
23975         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23976         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
23977         memcpy, memset.
23978         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
23979         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
23980         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
23981         strtol.
23982         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
23983         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
23984         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
23985         strtoul.
23986
23987 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23988
23989         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
23990         * lib/obstack.c [!defined _LIBC]: Likewise.
23991         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
23992         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
23993         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
23994
23995         More changes to assume C89 or better.
23996
23997         * lib/error.c (error_tail): Assume vprintf.
23998
23999         * lib/argmatch.c (getenv): Remove decl.
24000         * lib/progreloc.c (get_full_program_name): Define via prototype.
24001         * lib/setenv.c (clearenv): Likewise.
24002         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
24003         needed.
24004         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
24005         (malloc, memcpy): Remove decls.
24006         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
24007         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
24008         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24009         (memcpy): Remove macro.
24010         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
24011         (__P): Remove.  All uses removed.
24012         (PTR): Remove.  All uses changed to void *.
24013         (CHAR_BIT, NULL): Remove.
24014         (spaces, zeros, memset_space, memset_zero)
24015         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
24016         Remove.
24017         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
24018         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
24019         Define with prototype.
24020         Remove now-unnecessary prototype decl.
24021         (extra_args_spec): Assume ANSI C.  All uses changed.
24022         (extra_args_spec_iso): Remove.
24023         (my_strftime, emacs_strftimeu): Define via prototype.
24024         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
24025         unconditionally.
24026         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
24027         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
24028         (strtoul, strtol): Remove decls.
24029         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
24030         LONG_MAX): Remove.
24031         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24032         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
24033         (LOCALE_PARAM_PROTO): New macro.
24034         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
24035         (INTERNAL (strtol), strtol): Define with a prototype.
24036         (PARAMS): Remove.  All uses removed.
24037         * lib/tempname.c: Include <string.h> unconditionally.
24038         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
24039         * lib/xgethostname.c (main): Define with a prototype.
24040         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
24041         Include <stdlib.h> unconditionally.
24042         (calloc, malloc, realloc, free): Remove decls.
24043         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
24044         Include <stdlib.h> unconditionally.  Sort include file names.
24045         (strtod): Remove.
24046         (xstrtod): Define with a prototype.
24047         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
24048         (strtol, strtoul): Remove decls.
24049
24050 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24051
24052         More patches to assume C89 or better.
24053         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
24054         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
24055         string.h, memchr, STDC_HEADERS.
24056
24057 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24058
24059         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
24060         Include <stdlib.h>, <string.h> unconditionally.
24061         Remove now-unnecessary cast to char *.
24062         * lib/strnlen.c: Include <string.h> unconditionally.
24063         * lib/yesno.c (yesno): Define with a prototype.
24064
24065 2003-09-11  Bruno Haible  <bruno@clisp.org>
24066
24067         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24068
24069 2003-09-10  Jim Meyering  <jim@meyering.net>
24070
24071         * lib/error.c: Correct indentation of cpp directives.
24072
24073 2003-09-10  Bruno Haible  <bruno@clisp.org>
24074
24075         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24076         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24077         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24078         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24079         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24080         <stdlib.h> and <string.h> checks.
24081         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24082         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24083
24084 2003-09-10  Bruno Haible  <bruno@clisp.org>
24085
24086         * lib/strcspn.c: Include <string.h> unconditionally.
24087         * lib/strpbrk.c: Include <string.h> unconditionally.
24088         * lib/strstr.c: Include <string.h> unconditionally.
24089         * lib/unicodeio.c: Include <string.h> unconditionally.
24090         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24091         * lib/unsetenv.c: Likewise.
24092         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24093         * lib/yesno.c: Include <stdlib.h> unconditionally.
24094         (rpmatch): Add prototype.
24095
24096 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24097
24098         More patches to assume C89 or better.
24099         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24100         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24101         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24102         or for string.h.
24103         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24104         stdlib.h.
24105         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24106         C headers.
24107         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24108         string.h.
24109         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24110         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24111         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24112         or for string.h.
24113         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24114         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24115         C headers.
24116         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24117         memcpy.
24118         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24119         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24120         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24121         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24122         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24123         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24124         string.h, free.
24125         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24126         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24127         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24128         C headers, or for string.h.
24129         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24130         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24131         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24132         headers, memory.h, stdlib.h, string.h, strings.h.
24133         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24134         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24135         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24136         strchr.
24137         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24138         headers, memory.h, string.h.
24139         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24140         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24141         free.
24142         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24143         headers.
24144         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24145         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24146         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24147         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24148         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24149
24150 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24151
24152         More K&R removal.
24153
24154         * lib/acosl.c (main): Use a prototype.
24155         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24156         tanl.c: Likewise.
24157
24158         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24159
24160         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24161         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24162         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24163         with a prototype.
24164         * lib/getopt.c (const): Remove macro.
24165         Include <string.h> unconditionally.
24166         (my_index): Remove; all uses changed to strchr.
24167         (strlen): Remove decl.
24168         (exchange): Remove forward decl; no longer needed.
24169         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24170         Define with prototype.
24171         * lib/getopt1.c (const): Remove macro.
24172         (getopt_long, getopt_long_only, main): Define with prototype.
24173
24174         * lib/getugroups.c: Include <string.h> unconditionally.
24175
24176         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24177         (getusershell, setusershell, endusershell, readname, main):
24178         Define with prototypes.
24179
24180         * lib/group-member.c: Include group-member.h first.
24181         Include <stdlib.h> unconditionally.
24182
24183         * lib/hard-locale.c: Include hard-locale.h first.
24184         Include <stdlib.h>, <string.h> unconditionally.
24185
24186         * lib/hash.c (free, malloc): Remove decls.
24187         Include <stdlib.h> unconditionally.
24188
24189         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24190         (getenv): Do not declare.
24191
24192         * lib/idcache.c: Include <string.h> unconditionally.
24193
24194         * lib/long-options.c: Include long-options.h first, to test interface.
24195         Include <stdlib.h> unconditionally.
24196
24197         * lib/makepath.c: Include makepath.h first, to test interface.
24198         Include <stdlib.h> and <string.h> unconditionally.
24199
24200         * lib/linebuffer.c: Include <stdlib.h>.
24201         (free): Remove decl.
24202
24203         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24204         stddef.h. rpl_malloc returns void *, not char *.
24205         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24206         prototype.
24207
24208         * lib/md5.h: Include <limits.h> unconditionally.
24209         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24210         (__P): Remove; all uses removed.
24211         * lib/md5.c: Include "md5.h" first.
24212         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24213         md5_buffer, md5_process_bytes, md5_process_block):
24214         Define with prototypes.
24215         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24216         * lib/sha.c: Include "sha.h" first.
24217         Include <stdlib.h>, <string.h> unconditionally.
24218
24219         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24220         * lib/memcmp.c (__ptr_t): Likewise.
24221         * lib/memrchr.c (__ptr_t): Likewise.
24222         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24223         Include <string.h> unconditionally.
24224         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24225         * lib/memchr.c: Include <stdlib.h> unconditionally.
24226         * lib/memchr.c (LONG_MAX): Remove.
24227         * lib/memrchr.c (LONG_MAX): Likewise.
24228         * lib/memchr.c (__memchr): Define via a prototype.
24229         * lib/memrchr.c (__memrchr): Likewise.
24230         * lib/memcmp.c (__P): Remove, and remove all uses.
24231         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24232         Remove forward decls; no longer needed.
24233         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24234         Use types required by C89 in prototype.
24235
24236         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24237         * lib/savedir.c: Likewise.
24238         * lib/mkdir.c (free): Remove decl.
24239         * lib/rmdir.c (rmdir): Define with a prototype.
24240         * lib/savedir.c: Include savedir.h first, to test interface.
24241
24242         * lib/mktime.c (STDC_HEADERS): Remove.
24243         Include <stdlib.h>, <string.h> unconditionally.
24244
24245         * lib/modechange.c: Include <stdlib.h> unconditionally.
24246         (malloc): Remove decl.
24247
24248         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24249         (free): Remove decl.
24250
24251         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24252         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24253         (This type really should be intptr_t, but that's a C99ism.)
24254         (_obstack_memcpy): Remove: all uses changed to memcpy.
24255         Include <string.h> unconditionally.
24256         (struct obstack): Assume __STDC__ for types of members
24257         chunkfun, freefun, extra_arg.
24258         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24259         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24260         obstack_begin, obstack_specify_allocation,
24261         obstack_specify_allocation_with_arg, obstack_chunkfun,
24262         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24263         Remove unprototyped decls and the macros that use them.
24264         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24265         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24266         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24267         (defined __STDC__ && __STDC__)]:
24268         Remove nonprototyped code.
24269         Include <stdlib.h> unconditionally.
24270         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24271         _obstack_allocated_p, _obstack_free, obstack_free,
24272         _obstack_memory_used, print_and_abort):
24273         Define using prototypes.
24274         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24275         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24276         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24277         obstack_next_free, obstack_object_size, obstack_room) [0]:
24278         Remove unused, unprototyped code.
24279
24280         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24281
24282         * lib/physmem.c (physmem_total, physmem_available, main): Define
24283         with prototypes.
24284
24285         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24286         (main): Define with a prototype.
24287
24288         * lib/posixver.c (getenv): Remove decl.
24289
24290         * lib/putenv.c (malloc): Returns void *, not char *.
24291         Include <string.h> unconditionally.
24292         (strchr, memcpy, NULL): Do not define.
24293
24294         * lib/readtokens.c: Include readtokens.h first, to test interface.
24295         Include <stdlib.h>, <string.h> unconditionally.
24296         (init_tokenbuffer): Define with a prototype.
24297
24298         * lib/regex.c (PARAMS): Remove.  All uses removed.
24299         All uses of _RE_ARGS removed, too.
24300         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24301         unconditionally.
24302         (bzero): Assume memset exists.
24303         (memcmp, memcpy, NULL): Remove.
24304         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24305         char, or assignments to local vars of type signed char.
24306         (init_syntax_once, PREFIX(extract_number_and_incr),
24307         PREFIX(print_partial_compiled_pattern),
24308         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24309         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24310         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24311         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24312         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24313         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24314         wcs_compile_range, byte_compile_range, truncate_wchar,
24315         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24316         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24317         count_mbs_length, wcs_re_match_2_internal,
24318         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24319         PREFIX(alt_match_null_string_p),
24320         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24321         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24322         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24323         now-unnecessary declaration, if any.
24324         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24325         regcomp, regexec):
24326         Remove now-unnecessary casts among pointer types.
24327         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24328
24329         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24330         (free): Remove decl.
24331
24332         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24333
24334         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24335         (free): Remove decl.
24336
24337         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24338         * lib/xgetcwd.c: Likewise.
24339
24340         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24341         (free): Remove decl.
24342
24343         * lib/strchrnul.c (strchrnul): Define with a prototype.
24344         Fix bug: c_in was not converted to char before searching.
24345
24346         The following changes are not K&R related:
24347
24348         * lib/group-member.h: Include <sys/types.h>, so that this file is
24349         self-contained.
24350         * lib/makepath.h: Likewise.
24351
24352         * lib/getusershell.c (readname, default_index, line_size, readname):
24353         Use size_t, not int, for sizes.
24354         (readname): If the size overflows, report an error instead of
24355         looping forever.
24356
24357 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24358
24359         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
24360         libc.
24361
24362 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24363
24364         * README: New section: portability guidelines.
24365
24366 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24367
24368         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
24369         C89 spec.
24370
24371 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24372
24373         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
24374
24375 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24376
24377         Assume C89 or better; remove K&R cruft.
24378         A few of these changes were first proposed by Derek Robert Price
24379         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
24380
24381         * lib/addext.c: Include <string.h> unconditionally.
24382         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
24383         Don't declare getenv or malloc.
24384
24385         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
24386         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
24387         (NULL): Remove.
24388         (find_stack_direction, alloca): Use prototypes.
24389
24390         * lib/atexit.c (atexit): Define using a prototype.
24391
24392         * lib/basename.c, dirname.c, stripslash.c:
24393         Include <string.h> unconditionally.
24394
24395         * lib/bcopy.c: Include <stddef.h>.
24396         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
24397
24398         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
24399
24400         * lib/error.h (error, error_at_line, error_print_progname)
24401         [! (defined (__STDC__) && __STDC__)]: Remove decls.
24402         * lib/error.c: Include error.h first, to check interface.
24403         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24404         (VA_START): Remove; all uses changeed to va_start.
24405         (exit, strerror): Remove decls.
24406         (error_print_progname): Prototype uncondionally.
24407         Don't include <errno.h>; no longer needed.
24408         (private_strerror): Remove.
24409         (error_tail): Always define.
24410         (error, error_at_line): Assume C89 or better; always use prototypes.
24411         * lib/fatal.c: Include "fatal.h" first, to test interface.
24412         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24413         (VA_START): Remove; all uses changed to va_start.
24414         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
24415         this case.
24416         (exit): Remove decl.
24417         (fatal): Prototype unconditionally.  Assume va_start works.
24418         Abort at end, to pacify gcc.
24419
24420         * lib/euidaccess.c (main): Define with a prototype.
24421
24422         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
24423
24424         * lib/exitfail.c: Include <stdlib.h> unconditionally.
24425
24426         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
24427         prototypes.
24428         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
24429         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
24430         (getenv): Remove decl.
24431         (fnmatch): Define using a prototype.
24432         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
24433         (FCT): Define using a prototype.
24434
24435         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
24436
24437         * lib/gethostname.c: Include <stddef.h>.
24438         (gethostname): Define with prototype.  Length is size_t, not int.
24439
24440 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24441
24442         Assume C89 or better; remove K&R cruft.
24443         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
24444         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
24445         string.h, getenv, malloc.
24446         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
24447         headers.
24448         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
24449         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
24450         do not check for strerror.
24451         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
24452         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
24453         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
24454         do not check for doprnt or vprintf.
24455         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
24456         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
24457
24458 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24459
24460         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
24461         getversion.c should have been removed then, but was accidentally
24462         preserved.
24463
24464         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
24465         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
24466
24467 2003-09-08  Karl Berry  <karl@gnu.org>
24468
24469         * config/config.sub, config.guess, srclistvars.sh: update from savannah
24470                 config, forget about prep.
24471
24472         * config/depcomp, missing: update from automake.
24473
24474 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24475
24476         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
24477         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24478
24479 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24480
24481         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
24482         copy_tm_result.  Bug reported by Simon Josefsson in
24483         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24484
24485 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24486
24487         * m4/time_r.m4: New file.
24488         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
24489         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
24490         is. Check for timegm declaration.
24491         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
24492         Do not check for gmtime_r.
24493         Replace mktime if __mktime_internal does not exist and if mktime
24494         hasn't been replaced already.
24495
24496 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24497
24498         * lib/time_r.c, lib/time_r.h: New files.
24499
24500         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
24501         __localtime_r.
24502         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
24503         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
24504
24505         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
24506         __gmtime_r.
24507         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
24508         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
24509         Include <time_r.h>.
24510
24511         * lib/timegm.c: Switch to glibc implementation, with the following
24512         changes:
24513         [defined HAVE_CONFIG_H]: Include <config.h>.
24514         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
24515         (__mktime_internal) [!defined _LIBC]: New decl.
24516         (__gmtime_r) [!defined _LIBC]: New macro and function.
24517         (timegm): Use a prototype, since gnulib assumes C89.
24518         Do not bother declaring tmp to be const, as it's not really usefu.
24519         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
24520         (timegm): Declare only if HAVE_DECL_TIMEGM.
24521
24522 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24523
24524         * MODULES.html.sh (func_all_modules): Add time_r.
24525         * modules/time_r: New file.
24526         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
24527         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
24528
24529 2003-09-03  Paul Eggert  <eggert@twinsun.com>
24530
24531         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
24532         Bug reported by Lute Kamstra in
24533         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
24534
24535         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
24536         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
24537         course with correspondingly smaller numbers for tomorrow and
24538         yesterday.  From Tadayoshi Funaba.  Originally installed into
24539         sh-utils on 1999-08-07, but the patch got lost (I guess during the
24540         coreutils merge?).
24541
24542 2003-08-31  Simon Josefsson  <jas@extundo.com>
24543
24544         * modules/timegm: New file.
24545         * MODULES.html.sh (func_all_modules): Add timegm.
24546
24547 2003-08-31  Simon Josefsson  <jas@extundo.com>
24548
24549         * m4/timegm.m4: New file.
24550
24551 2003-08-31  Simon Josefsson  <jas@extundo.com>
24552
24553         * lib/timegm.h: New file.
24554         * lib/timegm.c: New file.  Based on
24555         wget-1.8.2/src/http.c:mktime_from_utc.
24556
24557 2003-08-31  Karl Berry  <karl@gnu.org>
24558
24559         * lib/argp.h: update from libc.
24560
24561 2003-08-28  Bruno Haible  <bruno@clisp.org>
24562
24563         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
24564         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
24565         followed by '#define fnmatch fnmatch_posix' gives an error.
24566
24567 2003-08-28  Bruno Haible  <bruno@clisp.org>
24568
24569         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
24570         warning on QNX, which defines O_BINARY to 000000.
24571
24572 2003-08-27  Jim Meyering  <jim@meyering.net>
24573
24574         * m4/mkstemp.m4: Require that the system mkstemp be able to create
24575         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
24576         would fail after 32.  Reported by Danny Levinson.  Details here:
24577         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
24578
24579 2003-08-24  Bruno Haible  <bruno@clisp.org>
24580
24581         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
24582         MSVC7 <stdio.h> is included later.
24583
24584 2003-08-22  Simon Josefsson  <jas@extundo.com>
24585
24586         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
24587
24588 2003-08-20  Karl Berry  <karl@gnu.org>
24589
24590         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
24591
24592 2003-08-20  Bruno Haible  <bruno@clisp.org>
24593
24594         * modules/progname: New file.
24595         * MODULES.html.sh (func_all_modules): Add progname.
24596
24597 2003-08-20  Bruno Haible  <bruno@clisp.org>
24598
24599         * lib/progname.h: New file, from GNU gettext.
24600         * lib/progname.c: New file, from GNU gettext.
24601         * lib/progreloc.c: New file, from GNU gettext.
24602
24603 2003-08-19  Jim Meyering  <jim@meyering.net>
24604
24605         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
24606         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
24607
24608 2003-08-19  Bruno Haible  <bruno@clisp.org>
24609
24610         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
24611         more.
24612
24613 2003-08-19  Bruno Haible  <bruno@clisp.org>
24614
24615         * lib/xstrdup.c: Assume <string.h> exists.
24616
24617 2003-08-18  Paul Eggert  <eggert@twinsun.com>
24618
24619         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
24620         in makefile rules.
24621
24622 2003-08-18  Jim Meyering  <jim@meyering.net>
24623
24624         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
24625         * m4/lib-ld.m4: Likewise.
24626
24627 2003-08-18  Jim Meyering  <jim@meyering.net>
24628
24629         * lib/setenv.h: Indent nested cpp directive.
24630         * lib/vasnprintf.c: Remove trailing blanks.
24631
24632 2003-08-17  Simon Josefsson  <jas@extundo.com>
24633
24634         * modules/xstrndup: New file.
24635         * MODULES.html.sh (func_all_modules): Add xstrndup.
24636
24637 2003-08-17  Simon Josefsson  <jas@extundo.com>
24638
24639         * modules/argp: Fix autoconf macro name. Add more dependencies.
24640
24641 2003-08-17  Simon Josefsson  <jas@extundo.com>
24642
24643         * m4/xstrndup.m4: New file.
24644
24645 2003-08-17  Simon Josefsson  <jas@extundo.com>
24646
24647         * m4/argp.m4: New file.
24648
24649 2003-08-17  Simon Josefsson  <jas@extundo.com>
24650             Bruno Haible  <bruno@clisp.org>
24651
24652         * lib/xstrndup.h: New file.
24653         * lib/xstrndup.c: New file.
24654
24655 2003-08-17  Bruno Haible  <bruno@clisp.org>
24656
24657         * modules/strndup (Files, Include): Add lib/strndup.h.
24658
24659 2003-08-17  Bruno Haible  <bruno@clisp.org>
24660
24661         * modules/euidaccess (Files): Add lib/euidaccess.h.
24662
24663 2003-08-17  Bruno Haible  <bruno@clisp.org>
24664
24665         * lib/strndup.h: New file.
24666
24667 2003-08-17  Bruno Haible  <bruno@clisp.org>
24668
24669         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
24670         like AC_GNU_SOURCE.
24671         * modules/extensions (configure.ac): Comment out the invocation of
24672         gl_USE_SYSTEM_EXTENSIONS.
24673
24674 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24675
24676         Merges from coreutils, etc.
24677         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
24678         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
24679         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
24680         fixing a typo.
24681         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
24682         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
24683
24684 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24685
24686         Document merge from coreutils.
24687         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
24688         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
24689         * modules/utime: Add m4/utimes-null.m4.
24690
24691 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24692
24693         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
24694         space, undoing this 2003-08-12 change:
24695         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24696
24697 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24698
24699         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
24700         strtoul.c from libc, undoing this 2003-08-12 change:
24701         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24702
24703 2003-08-16  Jim Meyering  <jim@meyering.net>
24704
24705         Merges from coreutils.
24706         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
24707         prefix.  Adjust cache variables similarly.  Create 500 rather than
24708         just 300 files, to exercise bug on Darwin6.5, too.
24709         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
24710         $missing_dir.
24711         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
24712         AM_SYS_POSIX_TERMIOS.
24713         Reported by mkc@mathdogs.com.
24714         Also change use of $am_cv_sys_posix_termios
24715         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
24716         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
24717         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
24718         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
24719         in /proc/mounts until it finds one with matching device number.  This
24720         is unnecessary when the FILE argument *is* a mount point.  No stat call
24721         is necessary in that case.  So, disable the statvfs-testing code on
24722         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
24723         as RedHat bug# 84846.
24724         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24725         to 1MB, so as not to render systems with no stack size limit (e.g.,
24726         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24727         Include <unistd.h>.  On some systems,
24728         it is required for the definition of _SC_PAGESIZE.
24729
24730 2003-08-16  Jim Meyering  <jim@meyering.net>
24731
24732         Merge from coreutils.
24733         * lib/xstrtoimax.c: #else #if -> #elif.
24734         * lib/xstrtoumax.c: Likewise.
24735
24736 2003-08-16  Jim Meyering  <jim@meyering.net>
24737
24738         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
24739         * m4/utimes.m4: Removed.
24740         * m4/utimes-null.m4: Renamed from utimes.m4.
24741
24742         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24743         to 1MB, so as not to render systems with no stack size limit (e.g.,
24744         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24745         Include <unistd.h>.  On some systems,
24746         it is required for the definition of _SC_PAGESIZE.
24747
24748 2003-08-16  Jim Meyering  <jim@meyering.net>
24749         and Paul Eggert  <eggert@cs.ucla.edu>
24750
24751         Merges from coreutils, etc.
24752
24753         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
24754         using the latest version from cvs.  This avoids problems with #line
24755         directives using a vendor (Sun) compiler.
24756         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
24757         Don't set GETGROUPS_LIB here; now it's
24758         done via getgroups.m4's wrapper function.
24759         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
24760         rather than just in sh-util/configure.in, so that the
24761         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
24762         same.
24763         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
24764         AC_FUNC_GETLOADAVG where to find getloadavg.c.
24765         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
24766         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
24767         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
24768         Remove code that is now done by the newly-required macros.
24769         Append $(EXEEXT) to DF_PROG.
24770         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
24771         Do not invoke or require the following here,
24772         since prereq.m4 or some gnulib .m4 now does this for us:
24773         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
24774         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
24775         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
24776         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
24777         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
24778         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
24779         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
24780         AC_FUNC_OBSTACK.
24781         Do not replace the following functions, as this is now the job
24782         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
24783         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
24784         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
24785         atexit getpass, strdup, getpagesize.
24786         Replace 'raise'.
24787         Do not check for the following functions, as this is now the job
24788         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
24789         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
24790         setregid.
24791         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
24792         Check for sys/sysctl.h.
24793         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
24794         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
24795         of checking for ssize_t ourselves.
24796
24797         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
24798         Require every macro that gnulib/modules/* suggests for us.
24799         (jm_PREREQ_ADDEXT): New macro.
24800         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
24801         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
24802
24803         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
24804         (gl_PHYSMEM): Use it.
24805         Also check for `table' function.
24806         Check for new headers and functions.
24807         Add check for sys/sysmp.h.
24808         With suggestions from Kaveh Ghazi.
24809         Ignore headers that are present but cannot be compiled.  This
24810         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
24811         C 5.4.
24812
24813 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24814
24815         Document merge from coreutils.
24816         * modules/userspec: Depend on posixver.
24817         * modules/strftime: Depend on tzset.
24818
24819 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24820
24821         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
24822         rather than tab, after '#' in shell-script copyright notices.
24823         Suggested by Bruno Haible.
24824
24825 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24826
24827         * config/srclist-update: Use three spaces, rather than tab, after '#'
24828         in shell-script copyright notices.  Suggested by Bruno Haible.
24829         Remove unnecessary parenthesization in regular expression.
24830
24831 2003-08-15  Jim Meyering  <jim@meyering.net>
24832
24833         Merge from coreutils.
24834         * lib/xgethostname.c: Include <stdlib.h>.
24835         (xghostname): Don't exit for anything other than memory-related
24836         failure; just return NULL.
24837         * lib/userspec.c: Include "posixver.h".
24838         (parse_user_spec): Accept `.' as a separator only
24839         in pre-POSIX-200112 mode.
24840         * lib/strtoimax.c: Use #elif rather than #else #if.
24841         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
24842         Remove function, now that we can rely on a working tzset function.
24843         [!_LIBC]: Ensure that the required autoconf test has been run.
24844         [!defined _NL_CURRENT && HAVE_STRFTIME]:
24845         Use underlying_strftime for %r.
24846         * lib/sha.c: Merge in some clean-up and optimization changes from
24847         glibc.
24848         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
24849         Ensure that it is a multiple of 64.
24850         Rearrange loop exit tests so as to avoid performing an
24851         additional fread after encountering an error or EOF.
24852         * lib/realloc.c: Update copyright date.
24853
24854 2003-08-15  Jim Meyering  <jim@meyering.net>
24855         and Paul Eggert  <eggert@twinsun.com>
24856
24857         Merge from coreutils.
24858         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
24859         member but strut utmpx does not.  Needed for AIX 4.3.3.
24860         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
24861
24862 2003-08-15  Jim Meyering  <jim@meyering.net>
24863         and Paul Eggert  <eggert@cs.ucla.edu>
24864
24865         Merges from coreutils, etc.
24866         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
24867         Require gl_FUNC_TZSET_CLOBBER.
24868         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
24869         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
24870         members.
24871
24872 2003-08-14  Paul Eggert  <eggert@twinsun.com>
24873
24874         Help the merge from coreutils.
24875         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
24876         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
24877         * m4/tzset.m4: Use it too.
24878
24879 2003-08-14  Paul Eggert  <eggert@twinsun.com>
24880
24881         * modules/tzset: New file.
24882
24883 2003-08-14  Jim Meyering  <jim@meyering.net>
24884
24885         Merges from coreutils.
24886         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
24887         variable names, rather than @FNMATCH_H@.
24888         * modules/alloca: Likewise for $(ALLOCA_H).
24889
24890         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
24891         the three copies of the literal target, `fnmatch.h'.
24892         * modules/alloca (alloca.h): Likewise.
24893
24894 2003-08-14  Jim Meyering  <jim@meyering.net>
24895
24896         Merge from coreutils.
24897         * m4/tzset.m4: New file.
24898         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
24899         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
24900         otherwise, AIX 5.1 systems would end up using the latter.
24901         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
24902         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
24903         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
24904         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
24905
24906 2003-08-14  Jim Meyering  <jim@meyering.net>
24907
24908         Merge from coreutils.
24909         * lib/obstack.h: Whitespace changes.
24910         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
24911         and xcalloc return values.
24912         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
24913         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
24914         hang on OSF/1 5.1 for DIR on both local and remote file systems.
24915         Reported by (and fix confirmed by) Nelson H. F. Beebe.
24916         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
24917         error from mntctl.
24918         Use mntctl's return value to drive the entry-processing loop, since
24919         we can't rely on the value of the vmt_length member in the last
24920         entry.  On some systems doing so could result in exhausting
24921         virtual memory.  Based in part on a patch from Mike Jetzer.
24922
24923 2003-08-14  Jim Meyering  <jim@meyering.net>
24924         and Paul Eggert  <eggert@twinsun.com>
24925
24926         Merges from coreutils, plus other fixes.
24927         * lib/physmem.c: Merge in portability changes from gcc/libiberty
24928         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
24929         for credits and details.  Thanks to Kaveh Ghazi for helping
24930         to keep these files in sync.
24931         (ARRAY_SIZE): Define it.
24932         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
24933         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
24934         (memcasecmp): Don't assume size_t fits in unsigned int.
24935         Remove casts and duplicate code.
24936         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
24937         (memcpy): Remove definition.
24938         Merge in some clean-up and optimization changes from glibc.
24939         [BLOCKSIZE]: Move definition to top of file.
24940         Ensure that it is a multiple of 64.
24941         Rearrange loop exit tests so as to avoid performing an
24942         additional fread after encountering an error or EOF.
24943         * lib/md5.h (md5_uintptr): Define.
24944         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
24945         return to the initial working directory.  Preserve errno
24946         for caller.
24947         * lib/idcache.c: Include "xalloc.h".
24948         (xmalloc, xrealloc): Remove decls.
24949         (getuser): Remove casts no longer required in C89.
24950         * lib/human.c: Include stdio.h, for sprintf.
24951         * lib/group-member.c: Include "xalloc.h".
24952         (xmalloc, xrealloc): Remove decls.
24953         (get_group_info): Remove casts no longer required in C89.
24954         * lib/getusershell.c (readname): Remove casts no longer required in
24955         C89.
24956         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
24957         * lib/getline.c: Whitespace fix, from coreutils.
24958
24959 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24960
24961         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
24962         Check for isascii.
24963
24964         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24965         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
24966         Undo previous (whitespace-only) change.
24967
24968 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24969
24970         * lib/exclude.c: Include <ctype.h>
24971         (IN_CTYPE_DOMAIN): New macro.
24972         (is_space): New fn.
24973         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
24974         and empty lines.
24975
24976         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
24977         Undo previous (whitespace-only) change.
24978
24979 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24980
24981         * config/srclist-update: Change update back to the old behavior,
24982         leaving whitespace alone.  Use one 'sed' command rather than a
24983         pipeline.
24984         (fixlicense): Now a variable, not a function.
24985         (remove_trailing_blanks): Remove.
24986         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
24987         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24988         Undo previous (whitespace-only) change.
24989
24990 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24991
24992         Merge from coreutils.
24993         * modules/euidaccess: Add lib_SOURCES, include for new
24994         file euidaccess.h
24995
24996 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24997
24998         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24999         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25000         Normalize leading white space and remove trailing white space.
25001
25002         Merge from coreutils
25003         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
25004
25005         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
25006         0.12.1.  These files are now being upgraded automatically by
25007         ../config/srclist-update.
25008
25009 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25010
25011         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25012         Normalize leading white space and remove trailing white space.
25013         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
25014         notice, as per ../config/srclist-update.
25015
25016         Merge from coreutils.
25017         * lib/euidaccess.h: New file.
25018         * lib/euidaccess.c: Include it.
25019         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
25020         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
25021         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
25022
25023 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25024
25025         * config/srclist-update: Add copyright notice.
25026         (remove_id_lines, remove_trailing_blanks): New constants.
25027         (fixfile): Use them to normalize spacing a bit in copied files.
25028         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25029         Normalize leading white space and remove trailing white space.
25030
25031         * config/texinfo.tex: Sync with texinfo.
25032
25033         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
25034         strtoul.c from libc, to merge coreutils whitespace changes.
25035
25036         * config/srclist.txt: Get the following m4 files from gettext:
25037         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
25038         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
25039         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
25040         wint_t.m4.
25041
25042 2003-08-12  Karl Berry  <karl@gnu.org>
25043
25044         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
25045         been made.
25046
25047 2003-08-11  Paul Eggert  <eggert@twinsun.com>
25048
25049         * modules/gnu-source, m4/gnu-source.m4:
25050         Remove; we're assuming Autoconf 2.54 or later now.
25051         Suggested by Bruno Haible.
25052         * MODULES.html.sh (func_all_modules): Remove gnu-source.
25053
25054 2003-08-11  Bruno Haible  <bruno@clisp.org>
25055
25056         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
25057
25058 2003-08-11  Bruno Haible  <bruno@clisp.org>
25059
25060         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
25061         (vasnprintf): Use it instead of wcslen.
25062
25063 2003-08-11  Bruno Haible  <bruno@clisp.org>
25064
25065         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25066         value to ensure that _Bool promotes to int. Use #define for _Bool when
25067         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25068
25069 2003-08-10  Karl Berry  <karl@gnu.org>
25070
25071         * lib/regex.h: update from libc (whitespace fix).
25072
25073 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25074
25075         Merge some files from coreutils.  These changes were
25076         originally made by Jim Meyering.
25077         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25078         many older Unixes require this.
25079         * lib/alloca.c (alloca): Remove cast to argument of free;
25080         no longer needed in C89.
25081         * lib/alloca_.h, regex.h: Fix white space to match
25082         what GNU indent does.
25083
25084 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25085
25086         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25087         apparently Emacs's Unicode mode got confused before my 2003-08-05
25088         checkin.
25089
25090 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25091
25092         * m4/extensions.m4: New file.
25093         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25094         Require gl_USE_SYSTEM_EXTENSIONS.
25095         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25096         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25097
25098 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25099
25100         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25101         * modules/extensions, modules/gnu-source: New files.
25102         * modules/timespec, modules/unlocked-io: Depend on extensions.
25103
25104 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25105
25106         * modules/restrict: New file.
25107         * MODULES.html.sh (func_all_modules): Add restrict.
25108         * modules/regex: Depend on restrict.
25109
25110 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25111
25112         * m4/restrict.m4: New file.
25113         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25114
25115 2003-08-07  Bruno Haible  <bruno@clisp.org>
25116
25117         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25118         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25119
25120 2003-08-07  Bruno Haible  <bruno@clisp.org>
25121
25122         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25123         makes the module 'getndelim2' compatible with the module 'getline'.
25124
25125 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25126
25127         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25128         byte with "\201" to avoid glitches when editing that source file
25129         with multi-gnome-terminal.
25130
25131 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25132
25133         * lib/bumpalloc.h: Remove.
25134
25135 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25136
25137         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25138         * modules/bumpalloc: Remove.
25139
25140 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25141
25142         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25143         GNU coding style.
25144
25145         Merge from coreutils.
25146         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25147         1. From glibc.
25148         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25149         from Karl Berry, implemented by Jim Meyering.
25150         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25151         from Dmitry V. Levin.
25152         Remove anachronistic cast of xrealloc.
25153         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25154         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25155         type. Otherwise, it wouldn't compile with at least /bin/cc on
25156         ymp-cray-unicos9.0.2.X.
25157         Combine two mostly-identical uses of alloca into one.
25158         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25159
25160 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25161
25162         [From Emacs.]
25163
25164         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25165         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25166         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25167         obsolete NLIST_NAME_UNION.
25168         [__GNU__]: Undef BSD and FSCALE.
25169         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25170
25171 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25172
25173         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25174         an enum type, so that it's guaranteed to promote to int.  See:
25175         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25176
25177 2003-08-03  Karl Berry  <karl@gnu.org>
25178
25179         * config/depcomp: update from automake.
25180
25181 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25182
25183         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25184         (strerror): Don't assume that a printable int fits in 14 bytes.
25185
25186 2003-07-31  Bruno Haible  <bruno@clisp.org>
25187
25188         * modules/getpass-gnu: New file.
25189         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25190
25191 2003-07-31  Bruno Haible  <bruno@clisp.org>
25192
25193         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25194
25195 2003-07-24  Karl Berry  <karl@gnu.org>
25196
25197         * config/missing: update from automake.
25198
25199 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25200             Bruno Haible  <bruno@clisp.org>
25201
25202         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25203         * lib/getline.c (getline, getdelim): Likewise.
25204         Remove _GNU_SOURCE define; now it's defined in config.h through
25205         m4/getline.m4.
25206
25207 2003-07-23  Karl Berry  <karl@gnu.org>
25208
25209         * config/config.sub: update from prep.
25210
25211 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25212
25213         * modules/xalloc (Depends-on): Add exitfail.
25214         * modules/xmemcoll: Likewise.
25215
25216 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25217
25218         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25219         over-parenthesization in macros.
25220
25221         Sync with coreutils.
25222
25223         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25224         required by C99.
25225
25226         Use `exit_failure' for xalloc and xmemcoll instead of their own
25227         private exit-failure variables.
25228         * lib/xalloc.h (xalloc_exit_failure): Remove.
25229         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25230         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25231         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25232         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25233         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25234
25235 2003-07-20  Jim Meyering  <jim@meyering.net>
25236
25237         * modules/closeout (Depends-on): Add exitfail.
25238         Suggestion from Bruno Haible.
25239
25240 2003-07-19  Karl Berry  <karl@gnu.org>
25241
25242         * config/config.sub: update from prep.
25243
25244 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25245
25246         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25247         Remove.
25248         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25249         to test that it can stand by itself.  Include "exitfail.h".
25250         Clients should set exit_failure instead.
25251         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25252
25253 2003-07-18  Bruno Haible  <bruno@clisp.org>
25254
25255         * modules/getndelim2: New file.
25256         * modules/getline: Share files with module getndelim2.
25257         * modules/getnline: Depend on getndelim2 instead of sharing files with
25258         it. Add getnline.c to lib_SOURCES.
25259         * MODULES.html.sh (func_all_modules): Add getndelim2.
25260
25261 2003-07-18  Bruno Haible  <bruno@clisp.org>
25262
25263         * m4/getndelim2.m4: New file.
25264         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25265         invoke gl_PREREQ_GETNDELIM2.
25266         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25267         gl_PREREQ_GETNDELIM2.
25268         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25269         gl_GETNDELIM2.
25270
25271 2003-07-18  Bruno Haible  <bruno@clisp.org>
25272
25273         * lib/getndelim2.h: New file.
25274         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25275         getndelim2.h.
25276         (getndelim2): Make non-static. Change return type to ssize_t.
25277         * lib/getline.h: Change argument names.
25278         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25279         * lib/getnline.c: Include getndelim2.h.
25280
25281 2003-07-18  Andreas Schwab  <schwab@suse.de>
25282
25283         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25284
25285 2003-07-17  Karl Berry  <karl@gnu.org>
25286
25287         * config/config.sub: update from prep.
25288
25289 2003-07-17  Bruno Haible  <bruno@clisp.org>
25290
25291         * modules/getnline: New file.
25292         * modules/getline: Add lib/getndelim2.c to source file list.
25293         * MODULES.html.sh (func_all_modules): Add getnline.
25294
25295 2003-07-17  Bruno Haible  <bruno@clisp.org>
25296
25297         * m4/getnline.m4: New file.
25298
25299 2003-07-17  Bruno Haible  <bruno@clisp.org>
25300
25301         * m4/Makefile.am.in: Remove file.
25302         * m4/Makefile.am: Remove file.
25303         * m4/Makefile.in: Remove file.
25304
25305 2003-07-17  Bruno Haible  <bruno@clisp.org>
25306
25307         * lib/getnline.h: New file.
25308         * lib/getnline.c: New file.
25309         * lib/getndelim2.c: New file, extracted from getline.c.
25310         (getndelim2): Renamed from getdelim2, with added nmax argument.
25311         * lib/getline.c: Include getndelim2.c.
25312         (getdelim2): Moved out to getndelim2.c.
25313         (getline, getdelim): Update.
25314
25315 2003-07-17  Bruno Haible  <bruno@clisp.org>
25316
25317         * lib/Makefile.am: Remove file.
25318         * lib/Makefile.in: Remove file.
25319
25320 2003-07-17  Bruno Haible  <bruno@clisp.org>
25321
25322         * configure.in: Remove file.
25323         * Makefile.in: Remove file.
25324
25325 2003-07-17  Bruno Haible  <bruno@clisp.org>
25326
25327         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25328
25329 2003-07-16  Karl Berry  <karl@gnu.org>
25330
25331         * config/srclist-update: was running fixlicense twice, which caused
25332                 texinfo.tex to be nullified for some reason.  Simplify,
25333                 $gplsrc is no longer needed as far as I can see?
25334
25335 2003-07-16  Jim Meyering  <jim@meyering.net>
25336
25337         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25338
25339 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25340
25341         * config/srclist.txt: Get the following files from gettext-runtime/intl
25342         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25343         ref-del.sin.  From Bruno Haible.
25344         * config/srclist-update (fixfile): Change grep pattern again, since the
25345         previous fix didn't work (there was another trailing $).  Use
25346         '[$]' to escape the $s.
25347
25348 2003-07-15  Karl Berry  <karl@gnu.org>
25349
25350         * lib/vasnprintf.c: update from gettext.
25351
25352 2003-07-15  Karl Berry  <karl@gnu.org>
25353
25354         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
25355         gets expanded when surrounded by '$'.
25356
25357 2003-07-15  Jim Meyering  <jim@meyering.net>
25358
25359         * modules/save-cwd: Don't depend on error.  From Derek Price.
25360
25361 2003-07-15  Jim Meyering  <jim@meyering.net>
25362
25363         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
25364
25365 2003-07-14  Simon Josefsson  <jas@extundo.com>
25366
25367         * modules/mempcpy: New file.
25368         * MODULES.html.sh (func_all_modules): Add mempcpy.
25369
25370 2003-07-14  Simon Josefsson  <jas@extundo.com>
25371
25372         * m4/mempcpy.m4: New file.
25373
25374 2003-07-14  Simon Josefsson  <jas@extundo.com>
25375
25376         * lib/mempcpy.h: New file.
25377         * lib/mempcpy.c: New file.
25378
25379 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25380
25381         * modules/getdate, modules/posixtm: Depend on mktime.
25382
25383 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25384
25385         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
25386         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
25387         unicodeio.c, unicodeio.h, unlocked-io.h:
25388         Switch from LGPL to GPL.
25389
25390 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25391
25392         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
25393         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
25394         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
25395         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
25396         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
25397         updated automatically by ../config/srclist-update.  This changes
25398         their license from LPGL to GPL.
25399
25400 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25401
25402         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
25403         assumed to refer to the root of the most recent stable gettext version.
25404         * config/srclistvars.sh: Add defaults for eggert.
25405         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
25406         Match "This program" as well as "The program".  This is needed
25407         for gettext.
25408
25409 2003-07-14  Jim Meyering  <jim@meyering.net>
25410
25411         Don't emit diagnostics.  Let callers do that.
25412         * lib/save-cwd.c: Don't include "error.h".
25413         (save_cwd): Don't call error.  Ensure that errno is valid
25414         when returning nonzero.
25415
25416         * lib/save-cwd.h (restore_cwd): Update prototype.
25417         * lib/save-cwd.c (restore_cwd): Remove two parameters.
25418         Simplify.  Don't call error upon failure.  Let callers do that.
25419         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
25420         when auditing is enabled.  But don't bother updating the #if.
25421
25422 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
25423
25424         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
25425         it breaks C++ compilation.
25426         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
25427
25428 2003-07-10  Simon Josefsson  <jas@extundo.com>
25429
25430         * modules/strchrnul (Makefile.am): Add strchrnul.h.
25431
25432 2003-07-10  Jim Meyering  <jim@meyering.net>
25433
25434         * m4/clock_time.m4: Remove trailing blank.
25435         * m4/intmax_t.m4: Likewise.
25436
25437 2003-07-10  Jim Meyering  <jim@meyering.net>
25438
25439         * lib/vasnprintf.c: Remove trailing blanks.
25440         Make cpp indentation consistent.
25441
25442 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25443
25444         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
25445         posixver.c, strftime.c, strnlen.c, strverscmp.c:
25446         Switch from LGPL to GPL.
25447
25448 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25449
25450         * config/srclist.txt: Sort sublists.  Add
25451         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
25452         that differ from gnulib for one reason or another; we'd like this list
25453         to be smaller but for now let's document what we have.
25454
25455 2003-07-08  Paul Eggert  <eggert@twinsun.com>
25456
25457         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
25458         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
25459         and sweeter "eval x=$x".
25460         * config/srclist.txt: Get lib/argp* from glibc.
25461
25462 2003-07-07  Paul Eggert  <eggert@twinsun.com>
25463
25464         * lib/mktime.c: Fix some boundary cases and remove need for floating
25465         point.
25466
25467         Issue a compile-time diagnostic if time_t is floating point, or if
25468         two's complement arithmetic is not in effect, or if arithmetic
25469         right shift does not propagate the sign.  These assumptions were
25470         all in the original code but they weren't checked.
25471
25472         (TIME_T_MIDPOINT, verify): New macros.
25473         (__isleap): Remove; it has integer overflow problems.
25474         (leapyear): New function, without those problems.
25475         (ydhms_tm_diff): Remove; splitting into two parts.
25476         (ydhms_diff): New function, containing the arithmetic part of
25477         the old ydhms_tm_diff function.  Issue a compile-time
25478         diagnostic if we are not using C99 integer division.
25479         Avoid casts when possible.
25480         (guess_time_tm): New function, containing the checking part of
25481         the old ydhms_tm_diff function.  Return the new value, rather than
25482         the difference between it and the old.  Accept a new argument T
25483         so that *T specifies the old value.  Check for overflow in the result.
25484
25485         (__mktime_internal): Use a time_t offset, not a long int offset.
25486         This undoes the 2003-06-04 change, which is no longer needed now
25487         that we have better overflow checking.
25488         (localtime_offset): Likewise.
25489
25490         (__mktime_internal): Avoid harmful overflow on hosts where time_t
25491         and long are 64-bit but int is only 32-bit.
25492         (ydhms_diff): Use long int to store year1 and yday1.
25493         Issue a compile-time diagnostic if long int is not wide enough.
25494
25495         (__mktime_internal): Use long int to store adjusted year and yday.
25496         Use plain C rather than preprocessor commands, if that doesn't
25497         affect efficiency.
25498         Check for overflow (and try to repair) after each probe
25499         rather than checking only at the very end.  This avoids some bugs
25500         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
25501         does not equal GMT offset at maximum time).
25502         Use integer to check for overflow rather than floating point; this
25503         is more portable to non-IEEE hosts, and is a tad faster.
25504         When we detect that we are oscillating between two values,
25505         don't check whether tm_isdst has the requested value, since
25506         we already know the answer.  When tm_isdst has the wrong value,
25507         use a different heuristic to find the right one, based on the
25508         extreme values actually observed in practice in tz2003a,
25509         rather than the (overly optimistic) "previous 3 calendar quarters".
25510
25511         (not_equal_tm, print_tm, check_result): Use "const T" rather than
25512         "T const" to accommodate glibc style.
25513         (check_result): Use less-confusing report format.  "long" -> "long int.
25514         (main): Likewise.
25515         Don't loop if the iteration overflows time_t.
25516         Allow a negative step in the iteration.
25517
25518 2003-07-06  Karl Berry  <karl@gnu.org>
25519
25520         * config/depcomp: update from automake.
25521         * config/config.sub: update from prep.
25522
25523 2003-07-03  Karl Berry  <karl@gnu.org>
25524
25525         * config/config.guess: update from prep.
25526
25527 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25528
25529         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
25530         xreadlink.c now includes it unconditionally.
25531
25532 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25533
25534         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
25535         having it depend on HAVE_SYS_TYPES_H.
25536
25537 2003-07-01  Bruno Haible  <bruno@clisp.org>
25538
25539         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
25540         <sys/types.h> should be sufficient.
25541         Reported by Paul Eggert.
25542
25543 2003-06-26  Karl Berry  <karl@gnu.org>
25544
25545         * config/depcomp: update from automake.
25546
25547 2003-06-26  Bruno Haible  <bruno@clisp.org>
25548
25549         * modules/human: Depend on module stdbool.
25550
25551 2003-06-25  Bruno Haible  <bruno@clisp.org>
25552
25553         * modules/readlink: New file.
25554         * modules/xreadlink: Depend on it.
25555         * MODULES.html.sh (func_all_modules): Add readlink.
25556
25557 2003-06-25  Bruno Haible  <bruno@clisp.org>
25558
25559         * m4/readlink.m4: New file.
25560
25561 2003-06-25  Bruno Haible  <bruno@clisp.org>
25562
25563         * lib/readlink.c: New file.
25564
25565 2003-06-22  Karl Berry  <karl@gnu.org>
25566
25567         * config/srclist.txt: update mkinstalldirs from automake.
25568         * config/mkinstalldirs: update.
25569
25570 2003-06-22  Bruno Haible  <bruno@clisp.org>
25571
25572         Portability to mingw32.
25573         * m4/ssize_t.m4: New file, from GNU gettext.
25574         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
25575         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
25576
25577 2003-06-22  Bruno Haible  <bruno@clisp.org>
25578
25579         * modules/safe-read: Add m4/ssize_t.m4.
25580         * modules/xreadlink: Add m4/ssize_t.m4.
25581
25582 2003-06-20  Bruno Haible  <bruno@clisp.org>
25583
25584         Assume C89, so PARAMS isn't needed.
25585         * lib/unicodeio.h (PARAMS): Remove.
25586         * lib/unicodeio.c: Don't use PARAMS.
25587
25588 2003-06-18  Karl Berry  <karl@gnu.org>
25589
25590         * config/config.{guess,sub}: update from prep.
25591
25592 2003-06-18  Jim Meyering  <jim@meyering.net>
25593
25594         Merge changes from coreutils.
25595         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
25596         Remove explicit declarations of xmalloc and realloc.
25597         Include xalloc.h.
25598         (read_utmp): Remove anachronistic cast of xmalloc.
25599
25600 2003-06-17  Paul Eggert  <eggert@twinsun.com>
25601
25602         Assume C89, so PARAMS isn't needed.
25603         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
25604         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
25605         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
25606         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
25607         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
25608         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
25609         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
25610         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
25611         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
25612         lib/xstrtod.h, lib/xstrtol.h: Likewise.
25613         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
25614         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
25615         no longer needed. Anyway, config.h should always be included before any
25616         other file.
25617
25618 2003-06-11  Simon Josefsson  <jas@extundo.com>
25619
25620         * modules/sysexits: New file.
25621         * MODULES.html.sh (func_all_modules): Add sysexits.
25622
25623 2003-06-11  Simon Josefsson  <jas@extundo.com>
25624
25625         * lib/sysexit_.h: New file.
25626
25627 2003-06-11  Derek Price  <derek@ximbiot.com>
25628
25629         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
25630         necessary.
25631
25632 2003-06-11  Bruno Haible  <bruno@clisp.org>
25633
25634         * m4/sysexits.m4: New file.
25635
25636 2003-06-10  Simon Josefsson  <jas@extundo.com>
25637
25638         * lib/argp.h: New file, from glibc.
25639         * lib/argp-ba.c: New file, from glibc.
25640         * lib/argp-eexst.c: New file, from glibc.
25641         * lib/argp-fmtstream.c: New file, from glibc.
25642         * lib/argp-fmtstream.h: New file, from glibc.
25643         * lib/argp-fs-xinl.c: New file, from glibc.
25644         * lib/argp-help.c: New file, from glibc.
25645         * lib/argp-namefrob.h: New file, from glibc.
25646         * lib/argp-parse.c: New file, from glibc.
25647         * lib/argp-pv.c: New file, from glibc.
25648         * lib/argp-pvh.c: New file, from glibc.
25649         * lib/argp-xinl.c: New file, from glibc.
25650
25651 2003-06-10  Simon Josefsson  <jas@extundo.com>
25652
25653         * modules/strchrnul: New file.
25654
25655 2003-06-10  Simon Josefsson  <jas@extundo.com>
25656
25657         * modules/argp: New file.
25658
25659 2003-06-10  Simon Josefsson  <jas@extundo.com>
25660
25661         * m4/strchrnul.m4: New file.
25662
25663 2003-06-10  Simon Josefsson  <jas@extundo.com>
25664
25665         * lib/strchrnul.h: New file.
25666         * lib/strchrnul.c: New file.
25667
25668 2003-06-10  Bruno Haible  <bruno@clisp.org>
25669
25670         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
25671
25672 2003-06-07  Karl Berry  <karl@gnu.org>
25673
25674         * config/config.{guess,sub}: update from prep.
25675
25676 2003-06-07  Jim Meyering  <jim@meyering.net>
25677
25678         * modules/strtod: Use $(...) notation, not @...@ for
25679         AC_REPLACE'd variables.
25680         * modules/localcharset: Likewise.
25681
25682 2003-06-07  Jim Meyering  <jim@meyering.net>
25683
25684         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
25685         in place of my name in the copyright comment.
25686         Remove definition and uses of __P.
25687
25688         From coreutils.
25689         * lib/stat.c: Don't declare xmalloc explicitly.
25690         Instead, include "xalloc.h".
25691         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
25692         xrealloc, and xcalloc return values.
25693         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
25694         Improve comment.
25695         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
25696
25697 2003-06-07  Bruno Haible  <bruno@clisp.org>
25698
25699         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
25700         avoid AC_CONFIG_LINKS.
25701         * modules/fnmatch (Makefile.am): Use explicit creation rule for
25702         fnmatch.h, to avoid AC_CONFIG_LINKS.
25703         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
25704
25705 2003-06-07  Bruno Haible  <bruno@clisp.org>
25706
25707         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
25708         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
25709         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25710         directory.
25711         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
25712         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25713         directory.
25714
25715 2003-06-06  Jim Meyering  <jim@meyering.net>
25716
25717         Merge from coreutils.
25718         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
25719         Consolidate declarations and initializations of *_base* locals.
25720
25721         Merge from coreutils.
25722         This avoids a core dump on systems without GNU putenv,
25723         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
25724         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
25725         (unsetenv): New static function, from GNU libc.
25726         (rpl_putenv): Use it.
25727
25728         * lib/modechange.c: Remove trailing blanks.
25729
25730         Merge from coreutils.
25731         * lib/fsusage.c: Remove declaration of statfs.
25732         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
25733
25734         * lib/posixtm.c: Include <stdbool.h> unconditionally.
25735
25736 2003-06-06  Jim Meyering  <jim@meyering.net>
25737
25738         * lib/stdbool_.h: Renamed from stdbool.h.in.
25739
25740 2003-06-06  Jim Meyering  <jim@meyering.net>
25741             Bruno Haible  <bruno@clisp.org>
25742
25743         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
25744         Adjust Makefile.am snippet not to redirect directly to target.
25745         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
25746
25747 2003-06-05  Paul Eggert  <eggert@twinsun.com>
25748
25749         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
25750         mismatch, look in future quarters as well as past.  This fixes a
25751         bug when processing fall-backwards gaps immediately after a long
25752         period of daylight-saving time.
25753
25754         * lib/mktime.c: Assume freestanding C89 or better.
25755         (HAVE_LIMITS_H): Remove.  Assume it's 1.
25756         (__P): Remove; not used.
25757         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
25758         (mktime, not_equal_tm, print_tm, check_result,
25759         main): Use prototypes.  Use const * where appropriate.
25760         (main): Fix typo in testing code that uncovered by above changes.
25761         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
25762
25763 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25764
25765         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
25766         locale.h, localeconv.  This merges changes from coreutils.
25767
25768         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
25769         It can be removed after the next Autoconf is released.
25770         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
25771         needed.
25772
25773 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25774
25775         * lib/mktime.c: Fix Debian bug 177940
25776         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
25777         (localtime_offset): Now long int, not time_t, because we want it
25778         to be guaranteed to be signed.  All uses changed.
25779         (__mktime_internal): If overflow would occur when adding offset,
25780         don't add it.
25781
25782         Merge 'human' changes from coreutils.  Rewrite to support
25783         locale-specific notations like thousands separators.
25784         * lib/human.c: Simplify authorship notice.
25785         Include human.h immediately after config.h.
25786         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
25787         <limits.h>: Do not include, since human.h does.
25788         (SIZE_MAX, UINTMAX_MAX): New macros.
25789         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
25790         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
25791         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
25792         (power_letter): Renamed from suffixes.
25793         (generate_suffix_backwards): Remove.
25794         (adjust_value): Now takes int style (because of human.h changes)
25795         and long double value (for greater precision on some platforms).
25796         (group_number): New function.
25797         (human_readable): Use it.  Use integer options, not enum.
25798         Put the options before the sizes in the arg list.
25799         Support all the new options.
25800         The old human_readable function has been removed;
25801         use inttostr.h instead.
25802         (human_readable, default_block_size, humblock):
25803         Use uintmax_t, not int, for block sizes.
25804         (human_readable_inexact, block_size_types): Remove.
25805         (block_size_opts): New constant.
25806         (human_options): Renamed from human_block_size, with new signature
25807         that allows block sizes up to UINTMAX_MAX.  All callers changed.
25808         * lib/human.h: Add copyright and authorship notice.
25809         Include <limits.h> and <stdbool.h> unconditionally.
25810         (PARAMS): Remove.  All uses removed.
25811         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
25812         (enum human_inexact_style): Remove tag; now a nameless enum.
25813         (human_floor, human_ceiling, human_round_to_even): Now have
25814         values 2, 0, 1 rather than -1, 1, 0.
25815         (human_group_digits, human_suppress_point_zero, human_autoscale,
25816         human_base_1024, human_SI, human_B): New constants.
25817         (human_readable_inexact, human_block_size): Remove.
25818         (human_readable): Size args are now uintmax_t, not int.
25819         (human_options): New decl.
25820
25821         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
25822         unnecessary now that we assume C89 or better.  This change
25823         imported from coreutils.
25824
25825         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
25826         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
25827         in the 2003-05-30 sync from glibc.
25828
25829         .h files should stand alone, but we shouldn't include <sys/types.h>
25830         if we can get away with just <stddef.h>.
25831
25832         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
25833         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
25834         rather than <sys/types.h>, as we merely need size_t.
25835         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
25836         to get size_t.
25837         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
25838         Include <stdio.h>, to get FILE.
25839         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
25840         memcasecmp.h has included <stddef.h> and all we need is size_t.
25841         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
25842         our interface, instead of including <sys/types.h>
25843
25844 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25845
25846         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
25847         now, as glibc mktime is buggy on non-glibc systems.
25848
25849 2003-06-03  Karl Berry  <karl@gnu.org>
25850
25851         * config/config.sub: update from prep.
25852
25853 2003-06-02  Paul Eggert  <eggert@twinsun.com>
25854
25855         [from coreutils]
25856         Fix some minor time-related bugs with POSIX time arguments.
25857         Some valid time stamps were being rejected (notably -1, and
25858         time stamps before 1900 on 64-bit hosts).  And some invalid
25859         time stamps were being accepted, e.g. September 31.
25860
25861         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
25862         that we can return (time_t) -1 successfully.
25863         * lib/posixtm.c: Likewise.
25864         [HAVE_STDBOOL_H]: Include <stdbool.h>.
25865         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
25866         (t): Remove static var.
25867         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
25868         of static var.  All uses changed.
25869         (year): Do not reject years before 1900; they can occur with
25870         64-bit time_t.
25871         (posix_time_parse): Do not check for out-of-range components;
25872         that is now the caller's responsibility, since our checks were
25873         only approximations.
25874         (posixtime): Use mktime to check for out-of-range components,
25875         since it knows them exactly.
25876         If mktime returns (time_t) -1, check whether an error actually occurred
25877         by invoking localtime on -1.
25878         (main) [TEST_POSIXTIME]: Check for input data errors, and report
25879         posixtime failures better.
25880         Improve the test data (in comments only).
25881
25882 2003-06-02  Karl Berry  <karl@gnu.org>
25883
25884         * config/mkinstalldirs (version): new variable.
25885         (--version): new option.
25886         (usage): improve message.
25887
25888 2003-05-30  Karl Berry  <karl@gnu.org>
25889
25890         * lib/mktime.c: update from libc.
25891
25892 2003-05-30  Bruno Haible  <bruno@clisp.org>
25893
25894         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
25895         * config/config.rpath: Upgrade to gettext-0.12.1.
25896
25897 2003-05-30  Bruno Haible  <bruno@clisp.org>
25898
25899         * m4/gettext.m4: Upgrade to gettext-0.12.1.
25900         * m4/nls.m4: New file, from gettext-0.12.1.
25901         * m4/po.m4: New file, from gettext-0.12.1.
25902         * m4/progtest.m4: Upgrade to gettext-0.12.1.
25903
25904 2003-05-30  Bruno Haible  <bruno@clisp.org>
25905
25906         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
25907         * lib/localcharset.h: Likewise.
25908         * lib/localcharset.c: Likewise.
25909
25910 2003-05-29  Karl Berry  <karl@gnu.org>
25911
25912         * config/config.rpath: update from gettext.
25913
25914 2003-05-28  Paul Eggert  <eggert@twinsun.com>
25915
25916         Assume the headers required for C89 freestanding compilers.
25917         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
25918         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
25919         * m4/human.m4 (gl_HUMAN): Likewise.
25920         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
25921         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
25922         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25923         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
25924         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25925         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
25926
25927 2003-05-28  Paul Eggert  <eggert@twinsun.com>
25928
25929         Assume the headers required for C89 freestanding compilers.
25930         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
25931         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
25932         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
25933         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
25934         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
25935         define, since <limits.h> is guaranteed to do that.
25936         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
25937         * lib/exclude.c: Include <stdbool.h> unconditionally.
25938         * lib/tempname.c: Include <stddef.h> unconditionally.
25939         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
25940         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
25941         <stddef.h> does that.
25942         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
25943         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
25944         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
25945         needed.
25946         * lib/xstrtol.c: Likewise.
25947         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
25948         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
25949
25950         * lib/addext.c (addext): Use assignment rather than cast, to avoid
25951         warnings on some platforms.
25952
25953         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
25954         arbitrarily.
25955
25956 2003-05-26  Jim Meyering  <jim@meyering.net>
25957
25958         Merge in a change from coreutils:
25959         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
25960         that is guaranteed to be `no'.  Use `no_such_member' to indicate
25961         that condition, rather than `-1' which is slightly misleading.
25962         Change the name of the cache variable to have the gl_ prefix.
25963         Prompted by a patch from Richard Dawe for DJGPP.
25964
25965 2003-05-24  Karl Berry  <karl@gnu.org>
25966
25967         * config/config.guess: update from prep.
25968
25969 2003-05-22  Karl Berry  <karl@gnu.org>
25970
25971         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
25972
25973 2003-05-20  Karl Berry  <karl@gnu.org>
25974
25975         * config/config.guess: update from prep.
25976
25977 2003-05-18  Karl Berry  <karl@gnu.org>
25978
25979         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
25980         might actually be set by the user.
25981
25982         * config/depcomp, install-sh, mdate-sh: update from automake.
25983
25984 2003-05-17  Bruno Haible  <bruno@clisp.org>
25985
25986         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
25987         invalid expansion for AC_EGREP_CPP.
25988         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
25989         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
25990         Suggested by Akim Demaille <akim@epita.fr> in
25991         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
25992
25993 2003-05-12  Jim Meyering  <jim@meyering.net>
25994
25995         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
25996         the space-padded-by-default conversion specifiers, %e, %k, %l.
25997
25998 2003-05-12  Bruno Haible  <bruno@clisp.org>
25999
26000         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
26001         the string is longer than 4 KB.
26002
26003 2003-05-11  Karl Berry  <karl@gnu.org>
26004
26005         * config/config.{guess,sub}: update from prep.
26006
26007 2003-05-09  Bruno Haible  <bruno@clisp.org>
26008
26009         * modules/error: Add m4/strerror_r.m4 to file list.
26010
26011 2003-05-03  Bruno Haible  <bruno@clisp.org>
26012
26013         Upgrade to Unicode-4.0.
26014         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
26015         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
26016         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
26017         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
26018         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
26019         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
26020         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
26021         Change width of U+E0100..U+E01EF from 1 to 0.
26022
26023 2003-04-25  Jim Meyering  <jim@meyering.net>
26024
26025         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
26026         of type size_t, not int.
26027
26028 2003-04-25  Bruno Haible  <bruno@clisp.org>
26029
26030         * lib/copy-file.c: Include <stddef.h>, for size_t.
26031
26032 2003-04-21  Paul Eggert  <eggert@twinsun.com>
26033
26034         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
26035         code which expansion is under static control.  Patch imported from
26036         Akim Demaille's patch to Bison; see
26037         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
26038
26039 2003-04-14  Bruno Haible  <bruno@clisp.org>
26040
26041         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
26042
26043 2003-04-11  Jim Meyering  <jim@meyering.net>
26044
26045         Merge changes from Coreutils.
26046
26047         2003-03-22  Jim Meyering  <jim@meyering.net>
26048
26049         * lib/strftime.c (widen): Cast alloca return value to proper type.
26050
26051         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
26052
26053         From GNU libc.
26054         * lib/strftime.c (my_strftime): Handle very large width
26055         specifications for numeric values correctly.  Improve checks for
26056         overflow.
26057
26058         2003-01-19  Jim Meyering  <jim@meyering.net>
26059
26060         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
26061         definitions.
26062         (nl_get_alt_digit) [! defined my_strftime]: Define.
26063         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26064         _nl_get_alt_digit and _nl_get_walt_digit.
26065
26066         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26067         libc. These changes have no effect outside of _LIBC.
26068
26069 2003-04-10  Bruno Haible  <bruno@clisp.org>
26070
26071         * modules/findprog: New file.
26072         * MODULES.html.sh (func_all_modules): Add it.
26073
26074 2003-04-10  Bruno Haible  <bruno@clisp.org>
26075
26076         * m4/findprog.m4: New file.
26077         * m4/eaccess.m4: New file.
26078
26079 2003-04-10  Bruno Haible  <bruno@clisp.org>
26080
26081         * lib/findprog.h: New file, from GNU gettext.
26082         * lib/findprog.c: New file, from GNU gettext.
26083
26084 2003-04-05  Jim Meyering  <jim@meyering.net>
26085
26086         Merge changes from Coreutils.
26087
26088         * lib/exclude.h (PARAMS): Remove definition and uses.
26089         * lib/exclude.c: Remove uses of `PARAMS'.
26090
26091         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26092         Add test-cases for DOS filenames. Declare program_name.
26093         (main): Set up program_name.  Patch by Rich Dawe.
26094
26095         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26096         error from mntctl.
26097         Use mntctl's return value to drive the entry-processing loop, since
26098         we can't rely on the value of the vmt_length member in the last
26099         entry.  On some systems doing so could result in exhausting
26100         virtual memory.  Based in part on a patch from Mike Jetzer.
26101
26102 2003-04-04  Bruno Haible  <bruno@clisp.org>
26103
26104         * modules/linebreak: New file.
26105         * MODULES.html.sh (func_all_modules): Add it.
26106
26107 2003-04-04  Bruno Haible  <bruno@clisp.org>
26108
26109         * m4/linebreak.m4: New file.
26110
26111 2003-04-04  Bruno Haible  <bruno@clisp.org>
26112
26113         * lib/linebreak.h: New file, from GNU gettext.
26114         * lib/linebreak.c: New file, from GNU gettext with slight
26115         modifications.
26116         * lib/lbrkprop.h: New file, from GNU gettext.
26117
26118 2003-04-03  Bruno Haible  <bruno@clisp.org>
26119
26120         * modules/utf8-ucs4: New file.
26121         * modules/utf16-ucs4: New file.
26122         * modules/ucs4-utf8: New file.
26123         * modules/ucs4-utf16: New file.
26124         * MODULES.html.sh (func_all_modules): Add them.
26125
26126 2003-04-03  Bruno Haible  <bruno@clisp.org>
26127
26128         * m4/utf-ucs4.m4: New file.
26129         * m4/ucs4-utf.m4: New file.
26130
26131 2003-04-03  Bruno Haible  <bruno@clisp.org>
26132
26133         * lib/utf8-ucs4.h: New file, from GNU gettext.
26134         * lib/utf16-ucs4.h: New file, from GNU gettext.
26135         * lib/ucs4-utf8.h: New file, from GNU gettext.
26136         * lib/ucs4-utf16.h: New file, from GNU gettext.
26137
26138 2003-04-02  Bruno Haible  <bruno@clisp.org>
26139
26140         * modules/binary-io: New file.
26141         * MODULES.html.sh (func_all_modules): Add it.
26142
26143 2003-04-02  Bruno Haible  <bruno@clisp.org>
26144
26145         * lib/binary-io.h: New file, from GNU gettext.
26146
26147 2003-04-01  Bruno Haible  <bruno@clisp.org>
26148
26149         * modules/pathname: New file.
26150         * MODULES.html.sh (func_all_modules): Add it.
26151
26152 2003-04-01  Bruno Haible  <bruno@clisp.org>
26153
26154         * lib/pathname.h: New file, from GNU gettext.
26155         * lib/concatpath.c: New file, from GNU gettext.
26156
26157 2003-03-30  Bruno Haible  <bruno@clisp.org>
26158
26159         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26160
26161 2003-03-30  Bruno Haible  <bruno@clisp.org>
26162
26163         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26164         function chown() doesn't exist.
26165
26166 2003-03-28  Bruno Haible  <bruno@clisp.org>
26167
26168         * modules/copy-file: New file.
26169         * MODULES.html.sh (func_all_modules): Add it.
26170
26171 2003-03-28  Bruno Haible  <bruno@clisp.org>
26172
26173         * m4/copy-file.m4: New file.
26174
26175 2003-03-28  Bruno Haible  <bruno@clisp.org>
26176
26177         * lib/copy-file.h: New file, from GNU gettext.
26178         * lib/copy-file.c: New file, from GNU gettext.
26179
26180 2003-03-18  Jim Meyering  <jim@meyering.net>
26181
26182         * lib/quote.c (quote_n): Fix typo in comment.
26183
26184 2003-03-18  Bruno Haible  <bruno@clisp.org>
26185
26186         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26187         checking.
26188         * m4/onceonly_2_57.m4: Likewise.
26189
26190 2003-03-17  Bruno Haible  <bruno@clisp.org>
26191
26192         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26193         (m4_quote): Remove macro.
26194         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26195
26196 2003-03-14  Jim Meyering  <jim@meyering.net>
26197
26198         Merge changes from Coreutils.
26199         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26200         to be const, in order to avoid warnings.
26201         (obstack_room): Likewise.
26202         (obstack_empty_p): Likewise.
26203
26204 2003-03-14  Bruno Haible  <bruno@clisp.org>
26205
26206         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26207         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26208
26209 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26210
26211         Merge changes from Bison.
26212         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26213         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26214         when compiling Bison 1.875's `bitset bset = obstack_alloc
26215         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26216         * lib/hash.c: Include <stdbool.h> unconditionally.
26217
26218 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26219
26220         * m4/onceonly.m4 (m4_quote): New macro.
26221         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26222         Quote AC_FOREACH variable-expansions properly.
26223
26224 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26225
26226         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26227
26228 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26229
26230         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26231         Reported by Bruce Becker; see:
26232         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26233
26234 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26235             Bruno Haible  <bruno@clisp.org>
26236
26237         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26238         Reported by John Hughes, see
26239         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26240
26241 2003-02-20  Bruno Haible  <bruno@clisp.org>
26242
26243         * MODULES.html.sh (func_all_modules): Add poll.
26244
26245 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26246
26247         * modules/poll: New file.
26248
26249 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26250
26251         * lib/poll_.h: New file.
26252         * lib/poll.c: New file.
26253
26254 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26255
26256         * m4/poll.m4: New file.
26257
26258 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26259
26260         * modules/mathl: New file.
26261
26262 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26263
26264         * lib/mathl.h: New file.
26265         * lib/acosl.c: New file.
26266         * lib/asinl.c: New file.
26267         * lib/atanl.c: New file.
26268         * lib/ceill.c: New file.
26269         * lib/cosl.c: New file.
26270         * lib/expl.c: New file.
26271         * lib/floorl.c: New file.
26272         * lib/frexpl.c: New file.
26273         * lib/ldexpl.c: New file.
26274         * lib/logl.c: New file.
26275         * lib/sincosl.c: New file.
26276         * lib/sinl.c: New file.
26277         * lib/sqrtl.c: New file.
26278         * lib/tanl.c: New file.
26279         * lib/trigl.c: New file.
26280         * lib/trigl.h: New file.
26281
26282 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26283
26284         * m4/mathl.m4: New file.
26285
26286 2003-02-18  Bruno Haible  <bruno@clisp.org>
26287
26288         * MODULES.html.sh (func_all_modules): Add mathl.
26289
26290 2003-02-17  Bruno Haible  <bruno@clisp.org>
26291
26292         * modules/mkdtemp: New module.
26293         * MODULES.html.sh (func_all_modules): Add it.
26294
26295 2003-02-17  Bruno Haible  <bruno@clisp.org>
26296
26297         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26298
26299 2003-02-17  Bruno Haible  <bruno@clisp.org>
26300
26301         * lib/mkdtemp.h: New file, from GNU gettext.
26302         * lib/mkdtemp.c: New file, from GNU gettext.
26303
26304 2003-02-02  Jim Meyering  <jim@meyering.net>
26305
26306         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26307         e.g. glibc-2.2.93.
26308
26309 2003-01-31  Bruno Haible  <bruno@clisp.org>
26310
26311         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26312         'rpl_rename'.
26313         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26314         'rpl_strnlen'.
26315         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26316         'rpl_strtod'.
26317         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26318         'rpl_utime'.
26319
26320 2003-01-31  Bruno Haible  <bruno@clisp.org>
26321
26322         * lib/rename.c: #undef rename before defining rpl_rename.
26323         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26324
26325 2003-01-30  Bruno Haible  <bruno@clisp.org>
26326
26327         * modules/vasnprintf, modules/vasprintf: New modules.
26328         * MODULES.html.sh (func_all_modules): Add them.
26329
26330 2003-01-30  Bruno Haible  <bruno@clisp.org>
26331
26332         * m4/signed.m4: New file, from GNU gettext.
26333         * m4/longdouble.m4: New file, from GNU gettext.
26334         * m4/wchar_t.m4: New file, from GNU gettext.
26335         * m4/wint_t.m4: New file, from GNU gettext.
26336         * m4/vasnprintf.m4: New file.
26337         * m4/vasprintf.m4: New file.
26338
26339 2003-01-30  Bruno Haible  <bruno@clisp.org>
26340
26341         * lib/printf-args.h: New file, from GNU gettext.
26342         * lib/printf-args.c: New file, from GNU gettext.
26343         * lib/printf-parse.h: New file, from GNU gettext.
26344         * lib/printf-parse.c: New file, from GNU gettext.
26345         * lib/vasnprintf.h: New file, from GNU gettext.
26346         * lib/vasnprintf.c: New file, from GNU gettext.
26347         * lib/asnprintf.c: New file, from GNU gettext.
26348         * lib/vasprintf.h: New file, from GNU gettext with modifications.
26349         * lib/vasprintf.c: New file, from GNU gettext.
26350         * lib/asprintf.c: New file, from GNU gettext.
26351
26352 2003-01-29  Bruno Haible  <bruno@clisp.org>
26353
26354         * modules/stpncpy: New module.
26355         * MODULES.html.sh (func_all_modules): Add it.
26356
26357 2003-01-29  Bruno Haible  <bruno@clisp.org>
26358
26359         * m4/stpncpy.m4: New file.
26360
26361 2003-01-29  Bruno Haible  <bruno@clisp.org>
26362
26363         * lib/stpncpy.h: New file, from GNU gettext with modifications.
26364         * lib/stpncpy.c: New file, from GNU gettext with modifications.
26365
26366 2003-01-28  Bruno Haible  <bruno@clisp.org>
26367
26368         * modules/c-ctype: New module.
26369         * MODULES.html.sh (func_all_modules): Add it.
26370
26371 2003-01-28  Bruno Haible  <bruno@clisp.org>
26372
26373         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
26374         Paul Eggert.
26375         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
26376         Paul Eggert.
26377
26378 2003-01-27  Bruno Haible  <bruno@clisp.org>
26379
26380         * modules/xsetenv: New module.
26381         * MODULES.html.sh (func_all_modules): Add it.
26382
26383 2003-01-27  Bruno Haible  <bruno@clisp.org>
26384
26385         * lib/xsetenv.h: New file, from GNU gettext.
26386         * lib/xsetenv.c: New file, from GNU gettext.
26387
26388 2003-01-23  Jim Meyering  <jim@meyering.net>
26389
26390         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
26391         from working on systems without dirfd (at least Irix and OSF1/Tru64).
26392
26393 2003-01-23  Bruno Haible  <bruno@clisp.org>
26394
26395         * modules/minmax: New module.
26396         * MODULES.html.sh (func_all_modules): Add it.
26397
26398 2003-01-23  Bruno Haible  <bruno@clisp.org>
26399
26400         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
26401         Eggert.
26402
26403 2003-01-22  Bruno Haible  <bruno@clisp.org>
26404
26405         * modules/exit: New module.
26406         * MODULES.html.sh (func_all_modules): Add it.
26407
26408 2003-01-22  Bruno Haible  <bruno@clisp.org>
26409
26410         * lib/exit.h: New file, from GNU gettext.
26411
26412 2003-01-19  Bruno Haible  <bruno@clisp.org>
26413
26414         * gnulib-tool: Recognize option --extract-maintainer.
26415         (func_get_maintainer): New function.
26416         * modules/*: Add Maintainer entry.
26417
26418 2003-01-16  Jim Meyering  <jim@meyering.net>
26419
26420         * m4/regex.m4: The `regex' struct is both input and output.
26421         Initialize it before each use.  Patch by Tim Waugh.
26422
26423 2003-01-16  Bruno Haible  <bruno@clisp.org>
26424
26425         * MODULES.html.sh: Add a table of contents. Add the module name as
26426         leftmost column. Add hyperlinks.
26427
26428 2003-01-15  Bruno Haible  <bruno@clisp.org>
26429
26430         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
26431
26432 2003-01-15  Bruno Haible  <bruno@clisp.org>
26433
26434         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
26435         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
26436         suffix.
26437
26438 2003-01-15  Bruno Haible  <bruno@clisp.org>
26439
26440         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
26441
26442 2003-01-15  Bruno Haible  <bruno@clisp.org>
26443
26444         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
26445         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
26446
26447 2003-01-14  Jim Meyering  <jim@meyering.net>
26448
26449         * lib/same.c (same_name): Tweak a comment.
26450
26451 2003-01-14  Bruno Haible  <bruno@clisp.org>
26452
26453         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
26454         when a string comparison is sufficient.
26455
26456 2003-01-14  Bruno Haible  <bruno@clisp.org>
26457
26458         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
26459         'unsigned int'.
26460
26461 2003-01-14  Bruno Haible  <bruno@clisp.org>
26462
26463         * lib/hash-pjw.c: Add comment about low quality of this function.
26464
26465 2003-01-13  Bruno Haible  <bruno@clisp.org>
26466
26467         * modules/stpcpy: Distribute lib/stpcpy.h.
26468         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
26469
26470 2003-01-13  Bruno Haible  <bruno@clisp.org>
26471
26472         * modules/*: Add a description.
26473         * modules/strpbrk: Fix Makefile.am snippet.
26474         * modules/strtoimax: Fix dependencies.
26475         * modules/strtoumax: Likewise.
26476
26477 2003-01-13  Bruno Haible  <bruno@clisp.org>
26478
26479         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
26480         * modules/alloca (Makefile.am): All object files depend on alloca.h.
26481         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
26482
26483 2003-01-13  Bruno Haible  <bruno@clisp.org>
26484
26485         * gnulib-tool (func_create_testdir): Store config/* files in the main
26486         directory.
26487         * config.rpath: Move to ...
26488         * config/config.rpath: ... here.
26489         * modules/gettext: Contains config/config.rpath, not config.rpath.
26490         * modules/iconv: Likewise.
26491
26492 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26493
26494         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26495         to avoid collisions with libcurses and libreadline.
26496
26497         * m4/getstr.m4: Remove.
26498         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
26499
26500 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26501
26502         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26503         to avoid collisions with libcurses and libreadline.
26504
26505         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
26506         * lib/getstr.h, getstr.c: Remove.
26507         * lib/getline.c: Include "getline.h", to check interface.
26508         Move body of old getstr.c here: this defines MIN_CHUNK and
26509         declares getdelim2, which is renamed from getstr.
26510         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
26511
26512         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
26513         All uses changed.
26514         * lib/linebuffer.h: Likewise.
26515         (readline): Remove backward-compatibility macro.
26516
26517 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26518
26519         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26520         to avoid collisions with libcurses and libreadline.
26521         * getstr: Remove.
26522         * MODULES.html.sh: Remove getstr.
26523         * modules/getline: Depend on unlocked-io, not getstr.
26524
26525 2003-01-12  Jim Meyering  <jim@meyering.net>
26526
26527         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
26528
26529 2003-01-10  Bruno Haible  <bruno@clisp.org>
26530
26531         * modules/alloca: Change Makefile.am requirements. Simplify Include
26532         requirements. Add lib/alloca_.h to file list.
26533
26534 2003-01-10  Bruno Haible  <bruno@clisp.org>
26535
26536         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
26537
26538 2003-01-10  Bruno Haible  <bruno@clisp.org>
26539
26540         * lib/alloca_.h: New file.
26541         * lib/getdate.y: Unconditionally include alloca.h.
26542         * lib/makepath.c: Likewise.
26543         * lib/setenv.c: Likewise.
26544         * lib/userspec.c: Likewise.
26545
26546 2003-01-09  Karl Berry  <karl@gnu.org>
26547
26548         * MODULES.html.sh: include `dirname $0` in PATH, to find
26549         gnulib-tool.
26550
26551 2003-01-09  Bruno Haible  <bruno@clisp.org>
26552
26553         * modules/stdbool: Change configure.ac, Makefile.am requirements.
26554         Simplify Include requirements. Add lib/stdbool.h.in to file list.
26555
26556 2003-01-09  Bruno Haible  <bruno@clisp.org>
26557
26558         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
26559
26560 2003-01-09  Bruno Haible  <bruno@clisp.org>
26561
26562         * lib/stdbool.h.in: New file.
26563
26564 2003-01-09  Bruno Haible  <bruno@clisp.org>
26565
26566         * gnulib-tool (func_all_modules): Ignore files ending in ~.
26567         * MODULES.html.sh: Likewise.
26568
26569 2003-01-08  Jim Meyering  <jim@meyering.net>
26570
26571         * lib/full-write.c: Undefine and define-away `const' after inclusion
26572         of errno.h, not before.  Suggestion from Bruno Haible.
26573
26574 2003-01-08  Bruno Haible  <bruno@clisp.org>
26575
26576         * modules/full-read: Depend on full-write.
26577
26578 2003-01-08  Bruno Haible  <bruno@clisp.org>
26579
26580         * lib/safe-read.c: Include specification header first, to ensure its
26581         selfcontainedness.
26582         * lib/full-write.c: Likewise.
26583
26584 2003-01-07  Jim Meyering  <jim@meyering.net>
26585
26586         * lib/full-write.c: Rework so that it may serve to define full_read,
26587         too.
26588         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
26589
26590 2003-01-07  Bruno Haible  <bruno@clisp.org>
26591
26592         * lib/strtoimax.c: Include <stdint.h> as an alternative to
26593         <inttypes.h>.
26594         * lib/xstrtol.h: Likewise.
26595         * lib/xstrtoimax.c: Likewise.
26596         * lib/xstrtoumax.c: Likewise.
26597         * lib/human.h: Likewise.
26598
26599         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
26600         on systems that have <inttypes.h> but not <stdint.h>.
26601
26602 2003-01-07  Bruno Haible  <bruno@clisp.org>
26603
26604         * MODULES.html.sh: Add copyright notice.
26605         (missed_files): Omit CVS directory entries.
26606         (func_module): Make it work with sed-3.02.
26607         * MODULES.txt: Remove file.
26608
26609 2003-01-06  Jim Meyering  <jim@meyering.net>
26610
26611         * lib/version-etc.c: Update year in translatable copyright string.
26612
26613 2003-01-03  Karl Berry  <karl@gnu.org>
26614
26615         * config/config.{guess,sub}: update from prep.
26616
26617 2003-01-02  Karl Berry  <karl@gnu.org>
26618
26619         * doc/COPYING.DOC: belatedly updated to 1.2.
26620
26621 2003-01-01  Karl Berry  <karl@gnu.org>
26622
26623         * gnulib-tool (func_verify_module): report module name $module in
26624         error message, not $1.
26625         * gnulib-tool (create-testdir): don't complain if destdir couldn't
26626         be created, only if it doesn't exist.
26627         * gnulib-tool (last_checkin_date): don't expand the $Date here.
26628
26629 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26630
26631         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
26632
26633 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26634
26635         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
26636         memcmp if strcoll doesn't work.
26637
26638 2002-12-31  Bruno Haible  <bruno@clisp.org>
26639
26640         * lib/utime.c (utime_null): No need to call ftruncate if the file was
26641         nonempty.
26642
26643 2002-12-31  Bruno Haible  <bruno@clisp.org>
26644
26645         * lib/memcoll.c (STRCOLL): New macro.
26646         (memcoll): Use it.
26647
26648 2002-12-31  Bruno Haible  <bruno@clisp.org>
26649
26650         * lib/localcharset.h: New file.
26651         * lib/localcharset.c: Include it.
26652         * lib/unicodeio.c: Likewise.
26653
26654 2002-12-31  Bruno Haible  <bruno@clisp.org>
26655
26656         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
26657         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
26658
26659 2002-12-31  Bruno Haible  <bruno@clisp.org>
26660
26661         * lib/getline.h: Include <stddef.h>, for size_t.
26662
26663         * lib/unicodeio.h: Include <stddef.h>, for size_t.
26664         * lib/unicodeio.c: Don't include <stddef.h>.
26665
26666 2002-12-31  Bruno Haible  <bruno@clisp.org>
26667
26668         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
26669         HAVE_TM_ZONE.
26670
26671 2002-12-24  Karl Berry  <karl@gnu.org>
26672
26673         * config/config.guess: update from prep.
26674
26675 2002-12-24  Bruno Haible  <bruno@clisp.org>
26676
26677         General infrasructure.
26678         * m4/README: Rewritten.
26679         * m4/onceonly.m4: New file.
26680         * m4/onceonly_2_57.m4: New file.
26681
26682         Module atexit.
26683         * m4/atexit.m4: New file.
26684
26685         Module strtod.
26686         * m4/strtod.m4: New file.
26687
26688         Module strtol.
26689         * m4/strtol.m4: New file.
26690
26691         Module strtoul.
26692         * m4/strtoul.m4: New file.
26693
26694         Module memchr.
26695         * m4/memchr.m4: New file.
26696
26697         Module memcmp.
26698         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
26699         (jm_FUNC_MEMCMP): Invoke it.
26700
26701         Module memcpy.
26702         * m4/memcpy.m4: New file.
26703
26704         Module memmove.
26705         * m4/memmove.m4: New file.
26706
26707         Module memset.
26708         * m4/memset.m4: New file.
26709
26710         Module strcspn.
26711         * m4/strcspn.m4: New file.
26712
26713         Module strpbrk.
26714         * m4/strpbrk.m4: New file.
26715
26716         Module strstr.
26717         * m4/strstr.m4: New file.
26718
26719         Module strerror.
26720         * m4/strerror.m4: New file.
26721
26722         Module mktime.
26723         * m4/mktime.m4: Renamed from jm-mktime.m4.
26724         (gl_PREREQ_MKTIME): New macro.
26725         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
26726
26727         Module malloc.
26728         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
26729         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
26730         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
26731
26732         Module realloc.
26733         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
26734         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
26735         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
26736
26737         Module strftime.
26738         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
26739         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
26740         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
26741         gl_TM_GMTOFF.
26742         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
26743
26744         Module xalloc.
26745         * m4/xalloc.m4: New file.
26746
26747         Module alloca.
26748         * m4/alloca.m4: New file.
26749
26750         Module putenv.
26751         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
26752         (jm_FUNC_PUTENV): Invoke it.
26753
26754         Module setenv.
26755         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
26756         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
26757         when invoked twice.
26758         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
26759         gt_FUNC_SETENV.
26760
26761         Module memrchr.
26762         * m4/memrchr.m4: New file.
26763
26764         Module stpcpy.
26765         * m4/stpcpy.m4: New file.
26766
26767         Module strcase.
26768         * m4/strcase.m4: New file.
26769
26770         Module strdup.
26771         * m4/strdup.m4: New file.
26772
26773         Module strnlen.
26774         * m4/strnlen.m4: New file.
26775
26776         Module strndup.
26777         * m4/strndup.m4: New file.
26778
26779         Module xstrtod.
26780         * m4/xstrtod.m4: New file.
26781
26782         Module xstrtol.
26783         * m4/xstrtol.m4: New file.
26784
26785         Module getdate.
26786         * m4/getdate.m4: New file.
26787
26788         Module unlocked-io.
26789         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
26790         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
26791         * m4/jm-glibc-io.m4n: Remove file.
26792
26793         Module long-options.
26794         * m4/long-options.m4: New file.
26795
26796         Module md5.
26797         * m4/md5.m4: New file.
26798
26799         Module sha.
26800         * m4/sha.m4: New file.
26801
26802         Module getstr.
26803         * m4/getstr.m4: New file.
26804
26805         Module getline.
26806         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
26807         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
26808         <sys/types.h>, for size_t. Use the function name gnu_getline, not
26809         simply getline. Infoke gl_PREREQ_GETLINE.
26810
26811         Module obstack.
26812         * m4/obstack.m4: New file.
26813
26814         Module hash.
26815         * m4/hash.m4: New file.
26816
26817         Module readtokens.
26818         * m4/readtokens.m4: New file.
26819
26820         Module strverscmp.
26821         * m4/strverscmp.m4: New file.
26822
26823         Module stdbool.
26824         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
26825         OSF/1.
26826
26827         Module strtoll.
26828         * m4/strtoll.m4: New file.
26829
26830         Module strtoull.
26831         * m4/strtoull.m4: New file.
26832
26833         Module strtoimax.
26834         * m4/strtoimax.m4: New file.
26835
26836         Module strtoumax.
26837         * m4/strtoumax.m4: New file.
26838
26839         Module xstrtoimax.
26840         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
26841         jm_AC_PREREQ_XSTRTOIMAX.
26842         Moved the strtol prerequisites to strtol.m4.
26843         Moved the strtoll prerequisites to strtoll.m4.
26844         Moved the strtoimax prerequisites to strtoimax.m4.
26845
26846         Module xstrtoumax.
26847         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
26848         jm_AC_PREREQ_XSTRTOUMAX.
26849         Moved the strtoul prerequisites to strtoul.m4.
26850         Moved the strtoull prerequisites to strtoull.m4.
26851         Moved the strtoumax prerequisites to strtoumax.m4.
26852
26853         Module chown.
26854         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
26855         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
26856
26857         Module dup2.
26858         * m4/dup2.m4: New file.
26859
26860         Module ftruncate.
26861         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
26862         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
26863
26864         Module getgroups.
26865         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
26866         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
26867
26868         Module gettimeofday.
26869         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
26870         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
26871         gl_PREREQ_GETTIMEOFDAY.
26872
26873         Module mkdir.
26874         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
26875         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
26876
26877         Module mkstemp.
26878         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
26879         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
26880         jm_AC_TYPE_UINTMAX_T.
26881         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
26882
26883         Module stat.
26884         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
26885         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
26886
26887         Module lstat.
26888         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
26889         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
26890
26891         Module timespec.
26892         * m4/timespec.m4 (gl_TIMESPEC): New macro.
26893         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
26894         * m4/st_mtim.m4: Indentation.
26895
26896         Module nanosleep.
26897         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
26898         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
26899         gl_PREREQ_NANOSLEEP.
26900
26901         Module regex.
26902         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
26903         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
26904         (gl_REGEX): New macro.
26905
26906         Module rename.
26907         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
26908         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
26909
26910         Module rmdir.
26911         * m4/rmdir.m4: New file.
26912
26913         Module utime.
26914         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
26915         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
26916         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
26917
26918         Module dirname.
26919         * m4/dirname.m4: New file.
26920
26921         Module getopt.
26922         * m4/getopt.m4: New file.
26923
26924         Module unistd-safer.
26925         * m4/unistd-safer.m4: New file.
26926
26927         Module fnmatch.
26928         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
26929         declaration.
26930         (gl_PREREQ_FNMATCH_EXTRA): New macro.
26931         (gl_FUNC_FNMATCH_POSIX): New macro.
26932         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
26933         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
26934         simply fnmatch.
26935
26936         Module exclude.
26937         * m4/exclude.m4: New file.
26938
26939         Module human.
26940         * m4/human.m4: New file.
26941
26942         Module acl.
26943         * m4/acl.m4: Nop.
26944
26945         Module backupfile.
26946         * m4/backupfile.m4: New file.
26947         * m4/d-ino.m4: Indentation.
26948
26949         Module fsusage.
26950         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
26951         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
26952         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
26953
26954         Module dirfd.
26955         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
26956         requirements.
26957
26958         Module euidaccess.
26959         * m4/euidaccess.m4: New file.
26960
26961         Module file-type.
26962         * m4/file-type.m4: New file.
26963
26964         Module fileblocks.
26965         * m4/fileblocks.m4: New file.
26966
26967         Module filemode.
26968         * m4/filemode.m4: New file.
26969
26970         Module isdir.
26971         * m4/isdir.m4: New file.
26972
26973         Module lchown.
26974         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
26975         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
26976
26977         Module makepath.
26978         * m4/makepath.m4: New file.
26979
26980         Module modechange.
26981         * m4/modechange.m4: New file.
26982
26983         Module mountlist.
26984         * m4/mountlist.m4: New file.
26985         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
26986         Indentation.
26987
26988         Module path-concat.
26989         * m4/path-concat.m4: New file.
26990
26991         Module pathmax.
26992         * m4/pathmax.m4: New file.
26993
26994         Module same.
26995         * m4/same.m4: New file.
26996
26997         Module save-cwd.
26998         * m4/save-cwd.m4: New file.
26999
27000         Module savedir.
27001         * m4/savedir.m4: New file.
27002
27003         Module xgetcwd.
27004         * m4/xgetcwd.m4: New file.
27005         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
27006
27007         Module xreadlink.
27008         * m4/xreadlink.m4: New file.
27009
27010         Module safe-read.
27011         * m4/safe-read.m4: New file.
27012
27013         Module safe-write.
27014         * m4/safe-write.m4: New file.
27015
27016         Module closeout.
27017         * m4/closeout.m4: New file.
27018
27019         Module stdio-safer.
27020         * m4/stdio-safer.m4: New file.
27021
27022         Module getpass.
27023         * m4/getpass.m4: New file.
27024
27025         Module getugroups.
27026         * m4/getugroups.m4: New file.
27027
27028         Module group-member.
27029         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
27030         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
27031
27032         Module idcache.
27033         * m4/idcache.m4: New file.
27034
27035         Module userspec.
27036         * m4/userspec.m4: New file.
27037
27038         Module gettime.
27039         * m4/clock_time.m4: New file.
27040         * m4/gettime.m4: New file.
27041
27042         Module settime.
27043         * m4/settime.m4: New file.
27044
27045         Module posixtm.
27046         * m4/posixtm.m4: New file.
27047
27048         Module gethostname.
27049         * m4/gethostname.m4: New file.
27050
27051         Module canon-host.
27052         * m4/canon-host.m4: New file.
27053
27054         Module gettext.
27055         * m4/codeset.m4: New file, from gettext-0.11.5.
27056         * m4/gettext.m4: New file, from gettext-0.11.5.
27057         * m4/glibc21.m4: New file, from gettext-0.11.5.
27058         * m4/iconv.m4: New file, from gettext-0.11.5.
27059         * m4/intdiv0.m4: New file, from gettext-0.11.5.
27060         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
27061         * m4/inttypes.m4: New file, from gettext-0.11.5.
27062         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27063         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27064         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27065         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27066         * m4/lib-link.m4: New file, from gettext-0.11.5.
27067         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27068         * m4/progtest.m4: New file, from gettext-0.11.5.
27069         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27070         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27071         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27072
27073         Module localcharset.
27074         * m4/localcharset.m4: New file.
27075
27076         Module hard-locale.
27077         * m4/hard-locale.m4: New file.
27078
27079         Module mbswidth.
27080         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27081         onceonly macros.
27082         * m4/mbrtowc.m4: Add comment.
27083
27084         Module memcasecmp.
27085         * m4/memcasecmp.m4: New file.
27086
27087         Module memcoll.
27088         * m4/memcoll.m4: New file.
27089
27090         Module unicodeio.
27091         * m4/unicodeio.m4: New file.
27092
27093         Module rpmatch.
27094         * m4/rpmatch.m4: New file.
27095
27096         Module yesno.
27097         * m4/yesno.m4: New file.
27098
27099         Module exitfail.
27100         * m4/exitfail.m4: New file.
27101
27102         Module c-stack.
27103         * m4/c-stack.m4 (gl_C_STACK): New macro.
27104         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27105
27106         Module error.
27107         * m4/error.m4 (gl_ERROR): New macro.
27108         (jm_PREREQ_ERROR): Use onceonly macros.
27109
27110         Module fatal.
27111         * m4/fatal.m4: New file.
27112
27113         Module getloadavg.
27114         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27115         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27116
27117         Module getpagesize.
27118         * m4/getpagesize.m4: New file.
27119
27120         Module getusershell.
27121         * m4/getusershell.m4: New file.
27122
27123         Module physmem.
27124         * m4/physmem.m4: New file.
27125
27126         Module posixver.
27127         * m4/posixver.m4: New file.
27128
27129         Module quotearg.
27130         * m4/quotearg.m4: New file.
27131
27132         Module quote.
27133         * m4/quote.m4: New file.
27134
27135         Module readutmp.
27136         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27137
27138         Module sig2str.
27139         * m4/sig2str.m4: New file.
27140
27141         Other.
27142         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27143         ulonglong.m4.
27144         * m4/intmax_t.m4: New file.
27145         * m4/d-type.m4: Indentation.
27146         * m4/jm-macros.m4: Update.
27147         * m4/prereq.m4 (jm_PREREQ): Update.
27148         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27149         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27150         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27151         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27152         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27153         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27154         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27155         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27156         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27157         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27158         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27159         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27160         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27161         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27162         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27163         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27164         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27165         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27166         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27167
27168 2002-12-24  Bruno Haible  <bruno@clisp.org>
27169
27170         * MODULES.txt: Update according to m4/ changes.
27171
27172         Module gettext.
27173         * config.rpath: New file, from gettext-0.11.5.
27174
27175         * modules/*: New module descriptions.
27176         * gnulib-tool: New file.
27177         * MODULES.html.sh: New file.
27178
27179 2002-12-21  Karl Berry  <karl@gnu.org>
27180
27181         * doc/fdl.texi: update to version 1.2.
27182
27183 2002-12-19  Karl Berry  <karl@gnu.org>
27184
27185         * config/config.guess: update from prep.
27186
27187 2002-12-18  Bruno Haible  <bruno@clisp.org>
27188
27189         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27190         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27191
27192 2002-12-17  Bruno Haible  <bruno@clisp.org>
27193
27194         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27195         stdlib.h, string.h.
27196
27197 2002-12-17  Bruno Haible  <bruno@clisp.org>
27198
27199         * lib/canon-host.c (strdup): Remove unused declaration.
27200
27201         * lib/fsusage.c: Include full_read.h.
27202         (get_fs_usage): Use full_read instead of safe_read.
27203
27204         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27205
27206 2002-12-12  Karl Berry  <karl@gnu.org>
27207
27208         * config/config.guess: update from prep.
27209
27210 2002-12-11  Bruno Haible  <bruno@clisp.org>
27211
27212         * m4/setenv.m4: New file, from gettext-0.11.5.
27213
27214 2002-12-11  Bruno Haible  <bruno@clisp.org>
27215
27216         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27217         not unsetenv().
27218         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27219         modifications:
27220
27221         2002-12-11  Bruno Haible  <bruno@clisp.org>
27222
27223                 * setenv.c (alloca): Fall back to malloc.
27224                 (freea): New macro.
27225                 (setenv): Use freea() to free memory allocated with alloca().
27226
27227         2002-11-13  Bruno Haible  <bruno@clisp.org>
27228
27229                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27230                 function declarations.
27231                 * unsetenv.c (unsetenv): Likewise.
27232
27233         2002-03-04  Bruno Haible  <bruno@clisp.org>
27234
27235                 Portability to AIX 4.3.3.
27236                 * unsetenv.c: New file, extracted from setenv.c.
27237                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27238
27239         2001-12-20  Bruno Haible  <bruno@clisp.org>
27240
27241                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27242                 use malloc instead. For SunOS 4.
27243
27244         2001-12-11  Bruno Haible  <bruno@clisp.org>
27245
27246                 * setenv.c: Declare alloca.
27247                 (compar_fn_t): New typedef.
27248                 (KNOWN_VALUE, STORE_VALUE): Use it.
27249
27250         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27251         setenv.h.
27252
27253 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27254
27255         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27256         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27257         Choose values that are less likely to collide with system fnmatch
27258         options.
27259         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27260         defined (e.g., a pure POSIX system).
27261         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27262         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27263
27264 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27265
27266         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27267         a pain in practice to deal with generated m4 files.  This change
27268         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27269
27270         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27271         and jm-glibc-io.m4, as they are no longer a special case.
27272         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27273         kludge and the auto-generation stuff.  Check only whether the
27274         functions are declared, not whether they exist, since older hosts
27275         that don't declare the functions can't use the optimization anyway.
27276
27277 2002-12-06  Jim Meyering  <jim@meyering.net>
27278
27279         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27280
27281         Merge in changes from libc's misc/error.c, in preparation
27282         for the merge of gnulib's changes back into libc.
27283
27284         * lib/error.c (_): Define only if not already defined.
27285         Move definition to follow all #include directives.
27286         Include unlocked-io.h only if !_LIBC.
27287         [_LIBC]: Include <libio/libioP.h>.
27288         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27289         (fflush): Tweak definition to use INTUSE.
27290         (putc): Define.
27291
27292 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27293
27294         * lib/alloca.c [defined emacs]: Include "lisp.h".
27295         (xalloc_die) [defined emacs]: New macro.
27296         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27297         [! defined emacs]: Include <xalloc.h>.
27298         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27299         (pointer): Typedef to POINTER_TYPE *.
27300         (malloc): Remove decl; we now always use xmalloc.
27301         (alloca): Use old-style definition, since Emacs needs this.
27302         Check for arithmetic overflow when computing combined size.
27303
27304 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27305
27306         Do not generate unlocked-io.h automatically, since it's easier to
27307         maintain it by hand.
27308
27309         * lib/unlocked-io.h: New file, from GNU diffutils,
27310         but with proper copyright notice and attribution.
27311         * lib/gen-uio: Remove.
27312         * lib/Makefile.am: Add copyright notice.
27313         (libfetish_a_SOURCES): Add unlocked-io.h.
27314         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27315         (DISTCLEANFILES, io_functions): Remove macros.
27316         (EXTRA_DIST): Remove gen_uio.
27317         (unlocked-io.h): Remove rule.
27318
27319 2002-12-04  Jim Meyering  <jim@meyering.net>
27320
27321         Reflect the fact that stat.c and lstat.c are no longer generated.
27322         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27323         (DISTCLEANFILES): Likewise.
27324         (EXTRA_DIST): Likewise.
27325         (all_local): Don't depend on stat.c or lstat.c.
27326         (stat.c, lstat.c): Remove rules.
27327         (EXTRA_DIST): Remove xstat.in.
27328
27329         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27330         * lib/stat.c: New file.  Contents mostly from xstat.in.
27331         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27332         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27333
27334         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27335         too.
27336         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27337
27338 2002-12-03  Jim Meyering  <jim@meyering.net>
27339
27340         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27341         but not semantics, to minimize the differences between these two files.
27342         (safe_read): Change comment to mention SAFE_READ_ERROR.
27343
27344         * lib/safe-read.c (IS_EINTR): Define.
27345         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27346
27347 2002-12-02  Jim Meyering  <jim@meyering.net>
27348
27349         * lib/safe-read.c (EINTR): Define.
27350         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27351         (INT_MAX): Provide fallback.
27352         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
27353
27354         * lib/safe-read.h (SAFE_READ_ERROR): Define.
27355
27356 2002-12-02  Bruno Haible  <bruno@clisp.org>
27357
27358         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
27359         Define, taken from safe-read.c.
27360         (INT_MAX): Provide fallback.
27361         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
27362         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
27363
27364         * lib/safe-read.c (EINTR): Remove definition.
27365         (safe_read): Don't use EINTR if it is absent.
27366
27367 2002-12-01  Jim Meyering  <jim@meyering.net>
27368
27369         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
27370         zero.
27371         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
27372
27373 2002-11-27  Paul Eggert  <eggert@twinsun.com>
27374
27375         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
27376         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
27377         with `if (! (value < limit)) abort ();', for readability.
27378
27379 2002-11-26  Karl Berry  <karl@gnu.org>
27380
27381         * lib/strdup.c: copy from libc again, with jim's ok.
27382         * lib/.cppi-disable: re-add strdup.c
27383
27384 2002-11-25  Karl Berry  <karl@gnu.org>
27385
27386         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
27387         instead of "strtol.c".
27388
27389 2002-11-25  Karl Berry  <karl@gnu.org>
27390
27391         * config/install-sh: update from automake for variable quoting, $0 in
27392         error msgs, etc.
27393
27394         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
27395         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
27396         entry.
27397
27398 2002-11-25  Jim Meyering  <jim@meyering.net>
27399
27400         * lib/mktime.c: Sync from libc, now that it has the latest fix.
27401
27402 2002-11-24  Karl Berry  <karl@gnu.org>
27403
27404         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
27405         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
27406
27407 2002-11-24  Jim Meyering  <jim@meyering.net>
27408
27409         Update from coreutils:
27410
27411         * lib/mktime.c: Merge in changes from libc.
27412
27413         Avoid a link-time failure on some Linux systems.
27414         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
27415         (otherwise).
27416         (__mon_yday): Declare with the STATIC attribute.
27417         (__mktime_internal): Likewise.
27418         Based on a report from Greg Schafer.
27419
27420 2002-11-23  Jim Meyering  <jim@meyering.net>
27421
27422         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
27423         Use `unsigned', not `int', as type of index.
27424
27425         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
27426
27427         * lib/fsusage.c: Remove unneeded parentheses around operands of
27428         `defined'.
27429
27430 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27431
27432         * lib/quotearg.h: Allow multiple inclusion by surrounding with
27433         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
27434         so that we can be included first.
27435         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
27436         * lib/quotearg.c: Include quotearg.h immediately after config.h.
27437         No need to include stddef.h or sys/types.h any more.
27438         Surround local include files with "", not "<>".
27439         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
27440         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
27441         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
27442         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
27443         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
27444         (ISPRINT): Remove; no longer needed now that we assume C89.
27445
27446         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
27447         Preserve errno.
27448
27449         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
27450         quotearg_char): Use SIZE_MAX rather than
27451         (size_t) -1 when we are talking about "infinity".
27452
27453         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
27454
27455 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27456
27457         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
27458         hint that one should use `if (! x) abort ();' rather than `assert
27459         (x);', and anyway it's one less thing to worry about configuring.
27460         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
27461         hash_rehash, hash_insert): Use abort rather than assert.
27462
27463 2002-11-22  Bruno Haible  <bruno@clisp.org>
27464
27465         * lib/safe-read.h: Assume C89. Add comments.
27466         (safe_read): Change return type to size_t.
27467         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
27468         byte counts > SSIZE_MAX correctly.
27469         * lib/safe-write.h: New file.
27470         * lib/safe-write.c: New file.
27471         * lib/full-read.h: New file.
27472         * lib/full-read.c: New file.
27473         * lib/full-write.h: Assume C89. Add comments.
27474         * lib/full-write.c: Include safe-write.h.
27475         (full_write): Rewritten to use safe_write.
27476         Suggested by Jim Meyering and Paul Eggert.
27477
27478 2002-11-21  Jim Meyering  <jim@meyering.net>
27479
27480         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
27481
27482         Merge in changes from the coreutils.
27483
27484         2002-09-25  Paul Eggert  <eggert@twinsun.com>
27485         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
27486         <stdint.h>.
27487         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
27488         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
27489         int.  Work more efficiently if X is the same width as uintmax_t.
27490         Do not compare X to -1, to avoid bogus compiler warning.
27491         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
27492         Don't assume that f_frsize and f_bsize are the same type.
27493
27494         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
27495         warning on FreeBSD.
27496
27497         * lib/makepath.c (make_path): Restore umask *before* creating the final
27498         component.
27499         (make_path): Minor reformatting.
27500
27501         * lib/xmalloc.c: Adjust to work with new autoconf macros,
27502         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
27503         HAVE_MALLOC/HAVE_REALLOC.
27504
27505         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
27506         dummy ones.  At least on GNU/Linux systems, `auto' means something
27507         else.
27508         From Michael Stone.
27509
27510 2002-11-21  Bruno Haible  <bruno@clisp.org>
27511
27512         Remove case insensitive option matching.
27513         * lib/argmatch.h (argcasematch): Remove declaration.
27514         (ARGCASEMATCH): Remove macro.
27515         (__xargmatch_internal): Remove case_sensitive argument.
27516         (XARGMATCH): Update.
27517         (XARGCASEMATCH): Remove macro.
27518         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
27519         case_sensitive argument.
27520         (argcasematch): Remove function.
27521         (__xargmatch_internal): Remove case_sensitive argument.
27522         (main): Use XARGMATCH instead of XARGCASEMATCH.
27523
27524         * lib/xmalloc.c: Change compile-time error message. Add comment about
27525         required autoconf version.
27526
27527 2002-11-20  Paul Eggert  <eggert@twinsun.com>
27528
27529         Merge argmatch cleanups from Bison.  Assume C89.
27530
27531         * lib/argmatch.c: Include config.h here, not in argmatch.h.
27532         Include stdlib.h, for EXIT_FAILURE.
27533         Always include <string.h>, since we assume C89.
27534         (EXIT_FAILURE): Remove pre-C89 bug workaround.
27535         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
27536         Include <stddef.h> instead, since it's all we need for size_t.
27537         (PARAMS): Remove.  All uses removed.
27538         (ARRAY_CARDINALITY): Do not bother to #undef.
27539         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
27540         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27541         Remove unnecessary parentheses.
27542         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27543         Insert necessary parentheses.
27544         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
27545         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
27546
27547 2002-11-19  Bruno Haible  <bruno@clisp.org>
27548
27549         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
27550         * lib/mbswidth.h: Include <stddef.h>, for size_t.
27551
27552         * lib/mbswidth.h (PARAMS): Remove macro.
27553         (mbswidth, mbsnwidth): Use ANSI C function declarations.
27554         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
27555
27556         * lib/gcd.h (PARAMS): Remove macro.
27557         (gcd): Use ANSI C function declarations.
27558         * lib/gcd.c (gcd): Likewise.
27559
27560 2002-11-15  Bruno Haible  <bruno@clisp.org>
27561
27562         * lib/strcspn.c: Include <stddef.h>.
27563         (strcspn): Use ANSI C function declaration. Change return type to
27564         size_t. Use NULL.
27565         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
27566         (strpbrk): Use NULL.
27567         * lib/strpbrk.h (PARAMS): Remove macro.
27568         (strpbrk): Use ANSI C function declaration.
27569         * lib/strstr.c: Don't include <sys/types.h>.
27570         * lib/strstr.h (PARAMS): Remove macro.
27571         (strstr): Use ANSI C function declarations.
27572
27573 2002-11-14  Karl Berry  <karl@gnu.org>
27574
27575         * config/mkinstalldirs: `do' on separate line, instead of
27576         `for var; do'.
27577
27578 2002-11-06  Bruno Haible  <bruno@clisp.org>
27579
27580         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
27581         * lib/gcd.c (gcd): Likewise.
27582
27583 2002-11-05  Bruno Haible  <bruno@clisp.org>
27584
27585         * lib/gcd.h: New file, from gettext-0.11.5.
27586         * lib/gcd.c: New file, from gettext-0.11.5.
27587
27588 2002-11-05  Bruno Haible  <bruno@clisp.org>
27589
27590         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27591         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27592         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27593         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27594
27595         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
27596         <libintl.h>.
27597         * lib/makepath.c: Include gettext.h instead of <locale.h> and
27598         <libintl.h>.
27599
27600         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
27601         * lib/human.c: Include gettext.h instead of <libintl.h>.
27602         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
27603         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
27604         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
27605         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
27606         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
27607         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
27608         (textdomain): Remove definition.
27609         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
27610
27611         * lib/long-options.c: Remove include of <libintl.h> and definition of
27612         _.
27613         * lib/same.c: Remove include of <libintl.h> and definition of _.
27614
27615 2002-11-04  Owen Taylor  <otaylor@redhat.com>
27616
27617         * lib/config.charset: A few additions for Solaris.
27618
27619 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27620
27621         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
27622         * lib/localcharset.c (locale_charset): Declare as extern "C".
27623
27624 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27625
27626         * lib/config.charset: msdos in uk_UA uses CP1125.
27627
27628 2002-11-04  Bruno Haible  <bruno@clisp.org>
27629
27630         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
27631         * lib/strcase.h: New file, from GNU gettext-0.11.5.
27632         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
27633         * lib/strstr.h: New file, from GNU gettext-0.11.5.
27634         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
27635
27636 2002-11-04  Bruno Haible  <bruno@clisp.org>
27637
27638         * lib/localcharset.c (locale_charset): Don't return an empty string.
27639
27640 2002-11-04  Bruno Haible  <bruno@clisp.org>
27641
27642         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
27643         aliases.
27644
27645 2002-11-04  Bruno Haible  <bruno@clisp.org>
27646
27647         * lib/config.charset: Update for newest glibc. Add canonical names
27648         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
27649
27650 2002-11-04  Bruno Haible  <bruno@clisp.org>
27651
27652         * lib/config.charset: Add support for NetBSD.
27653
27654 2002-11-04  Bruno Haible  <bruno@clisp.org>
27655
27656         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
27657
27658 2002-11-01  Bruno Haible  <bruno@clisp.org>
27659
27660         * configure.in: Add AC_CONFIG_AUX_DIR call.
27661         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
27662         test/Makefile.
27663         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
27664
27665 2002-09-28  Karl Berry  <karl@gnu.org>
27666
27667         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
27668         installed automake until the next release, since changes have been
27669         made.
27670
27671 2002-09-25  Karl Berry  <karl@gnu.org>
27672
27673         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
27674         * lib/getopt*: copy from libc/posix.
27675         * lib/gettext.h: copy from gettext.
27676         * lib/.cppi-disable: add strdup.c, gettext.h.
27677
27678 2002-09-25  Karl Berry  <karl@gnu.org>
27679
27680         * config/srclist.txt: enable gettext.h check.
27681         * config/config.{guess,sub}: update from prep.
27682         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
27683                 from automake 1.6.3.
27684         See srclist*.
27685
27686 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
27687
27688         * regex.c (PATFETCH): Remove the translating fetch.
27689         (PATFETCH_RAW): Rename to PATFETCH.
27690         (set_image_of_range): New fun.
27691         (SET_RANGE_TABLE_WORK_AREA): Use it.
27692         (regex_compile): Don't translate the pattern chars so eagerly.
27693         Only do it when inserting an `exactn' bytecode or when handling
27694         a char-range.
27695         (mutually_exclusive_p): Avoid empty statement.
27696
27697 2002-07-06  Jim Meyering  <meyering@lucent.com>
27698
27699         * m4/README: Don't mention Makefile.am.in.
27700         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
27701
27702 2002-07-01  Jim Meyering  <meyering@lucent.com>
27703
27704         * lib/c-stack.c: Include sys/time.h.
27705         From Volker Borchert.
27706
27707 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27708
27709         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
27710
27711 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27712
27713         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
27714         New macro.  Use it uniformly instead of
27715         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
27716         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
27717         reported by Vin Shelton.
27718
27719 2002-06-22  Paul Eggert  <eggert@twinsun.com>
27720
27721         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
27722         Do not assume SA_SIGINFO behavior.
27723         Bug reported by Jim Meyering on NetBSD 1.5.2.
27724
27725 2002-06-22  Jim Meyering  <meyering@lucent.com>
27726
27727         * m4/c-stack.m4: New file, from diffutils-2.8.2.
27728         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
27729
27730         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
27731         now that configure.ac uses AC_GNU_SOURCE.
27732         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
27733         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
27734
27735         Update to latest tools.  Suggestions from Paul Eggert.
27736         * m4/stdbool.m4: New file, from diffutils-2.8.2.
27737         * m4/gnu-source.m4: Update from diffutils-2.8.2.
27738         * m4/fnmatch.m4: Likewise.
27739         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
27740         to AC_HEADER_STDBOOL
27741
27742 2002-06-22  Jim Meyering  <meyering@lucent.com>
27743
27744         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
27745         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
27746
27747 2002-06-22  Jim Meyering  <meyering@lucent.com>
27748
27749         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
27750
27751         * lib/exitfail.c, exitfail.h: Likewise.
27752         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
27753
27754         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
27755         of fnmatch.h.
27756         (EXTRA_DIST): Add fnmatch_loop.c.
27757         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
27758
27759         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
27760         * lib/fnmatch.c: Update from diffutils-2.8.2.
27761         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
27762         * lib/fnmatch.h: Remove file.
27763
27764 2002-06-21  Jim Meyering  <meyering@lucent.com>
27765
27766         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
27767         * m4/mbrtowc.m4: Likewise.
27768
27769         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
27770         * m4/mbswidth.m4: Reflect name change:
27771         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
27772         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27773
27774         * m4/lib-link.m4: Update from gettext-0.11.2.
27775         * m4/gettext.m4: Likewise.
27776
27777         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
27778         From Alfred M. Szmidt.
27779
27780 2002-06-18  Paul Eggert  <eggert@twinsun.com>
27781
27782         * lib/file-type.h: Report an error if neither S_ISREG nor
27783         S_IFREG is defined, instead of using a test specific to glibc
27784         2.2.  This should be safe, since POSIX requires S_ISREG and
27785         Unix Version 7 had S_IFREG.  We don't need to check for
27786         <sys/types.h> since we don't use any symbols that it defines.
27787
27788 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
27789
27790         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
27791         $@-t, so that each temporary file name is unique and valid in the first
27792         8 characters, for operation under DOS.
27793
27794 2002-06-15  Paul Eggert  <eggert@twinsun.com>
27795
27796         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
27797
27798 2002-06-15  Jim Meyering  <meyering@lucent.com>
27799
27800         Work even with DJGPP 2.03, which lacks support for symlinks.
27801         From Richard Dawe.
27802         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
27803         is defined.
27804         * lib/lchown.c (S_ISLNK): Likewise.
27805
27806 2002-06-15  Jim Meyering  <meyering@lucent.com>
27807
27808         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
27809         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
27810         have been included before this file.
27811
27812 2002-06-14  Jim Meyering  <meyering@lucent.com>
27813
27814         * lib/file-type.h: Use the version from diffutils-2.8.2.
27815         * lib/file-type.c: Likewise.
27816
27817 2002-06-07  Jim Meyering  <meyering@lucent.com>
27818
27819         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
27820         They're needed at least for NetBSD 1.5.2.
27821         ($statxfs_includes): Include those same headers.
27822         ($statxfs_includes): Include sys/vfs.h if available.
27823         ($statxfs_includes): Likewise for sys/statvfs.h.
27824         Check for the following members in both structs statfs and statvfs:
27825         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
27826
27827 2002-06-01  Jim Meyering  <meyering@lucent.com>
27828
27829         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
27830         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
27831
27832 2002-05-28  Jim Meyering  <meyering@lucent.com>
27833
27834         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
27835         Reported by Volker Borchert.
27836
27837 2002-05-27  Jim Meyering  <meyering@lucent.com>
27838
27839         Fix a problem seen only on nonconforming systems whereby ls.c's
27840         use of localtime, and then of gettimeofday would cause trouble:
27841         the localtime call used to initialize rpl_gettimeofday's save
27842         mechanism would clobber ls's current local time information so
27843         that in any long listing the first file would always be listed
27844         with date 1970-01-01.  Analysis by Volker Borchert.
27845
27846         * lib/gettimeofday.c (localtime): Undefine.
27847         (rpl_localtime): New function.
27848
27849 2002-05-27  Jim Meyering  <meyering@lucent.com>
27850
27851         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
27852         localtime.
27853
27854         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
27855         use the replacement function; it wouldn't resolve at link time.
27856         Reported by Volker Borchert.
27857
27858 2002-05-22  Jim Meyering  <meyering@lucent.com>
27859
27860         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
27861         file-type.h.
27862         * lib/file-type.h: New file.
27863         * lib/file-type.c (file_type): New file/function.  Extracted from
27864         diffutils.
27865
27866 2002-04-30  Jim Meyering  <meyering@lucent.com>
27867
27868         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
27869
27870 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27871
27872         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
27873
27874 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27875
27876         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
27877         Do not check for alloca.h (no longer used) or stdbool.h (was never
27878         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
27879
27880 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27881
27882         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
27883
27884 2002-04-29  Jim Meyering  <meyering@lucent.com>
27885
27886         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
27887         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
27888         Use AC_FUNC_STRNLEN here instead.
27889
27890         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
27891         With autoconf-2.53a, it's part of AC_PROG_CC.
27892
27893 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27894
27895         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
27896         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
27897
27898 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27899
27900         * lib/sig2str.h, lib/sig2str.c: New files.
27901         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
27902
27903 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27904
27905         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
27906         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
27907         of 127, since 64 is the largest conceivable number for ancient
27908         nonstandard hosts.
27909         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
27910
27911 2002-04-28  Jim Meyering  <meyering@lucent.com>
27912
27913         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
27914
27915 2002-04-24  Jim Meyering  <meyering@lucent.com>
27916
27917         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
27918         (jm_PREREQ): Use it.
27919
27920         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
27921         mach/mach.h fcntl.h.
27922         Check for this function: setlocale.
27923
27924 2002-04-24  Jim Meyering  <meyering@lucent.com>
27925
27926         * lib/gettext.h: New file, from Gettext.
27927         * lib/Makefile.am (INCLUDES): Remove -I../intl.
27928         (libfetish_a_SOURCES): Add gettext.h.
27929
27930 2002-04-16  Jim Meyering  <meyering@lucent.com>
27931
27932         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
27933         ut_pid, ut_id, ut_exit.
27934
27935 2002-04-16  Jim Meyering  <meyering@lucent.com>
27936
27937         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
27938         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
27939         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
27940
27941 2002-04-12  Jim Meyering  <meyering@lucent.com>
27942
27943         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
27944         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
27945         existence of the getmntinfo function.  Needed for Darwin 5.3.
27946
27947         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
27948         This is necessary at least on Darwin 5.3.
27949
27950         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
27951         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
27952         strnlen.o in the library, and that makes some versions of ranlib
27953         object.
27954
27955 2002-04-12  Jim Meyering  <meyering@lucent.com>
27956
27957         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
27958
27959 2002-04-09  Jim Meyering  <meyering@lucent.com>
27960
27961         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
27962         to be more precise.  Rather than saying we're checking whether the
27963         function `works', say what we're testing.
27964         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
27965         Reported by Bruno Haible.
27966
27967 2002-03-10  Jim Meyering  <meyering@lucent.com>
27968
27969         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
27970         Suggestion from Santiago Vila.
27971
27972 2002-03-08  Jim Meyering  <meyering@lucent.com>
27973
27974         * lib/rename.c: Mention that this wrapper is needed also on
27975         mips-dec-ultrix4.4 systems.
27976
27977 2002-03-02  Jim Meyering  <meyering@lucent.com>
27978
27979         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
27980         not HAVE_CLOCK_SETTIME.
27981
27982 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27983
27984         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
27985         Check for clock_settime.
27986
27987 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27988
27989         * lib/nanosleep.h: Rename to....
27990         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
27991
27992         * lib/gettime.c: New file.
27993         * lib/settime.c: New file.
27994         * lib/stime.c: Remove.
27995
27996         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
27997         timespec.h.  Remove nanosleep.h.
27998
27999 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28000
28001         * m4/acl.m4: New file.
28002         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
28003         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
28004
28005 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28006
28007         * lib/acl.c, lib/acl.h: New files.
28008         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
28009
28010 2002-02-24  Jim Meyering  <meyering@lucent.com>
28011
28012         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
28013         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
28014         cause trouble.  Reported by Nelson Beebe.
28015
28016 2002-02-23  Paul Eggert  <eggert@twinsun.com>
28017
28018         * lib/path-concat.c (xpath_concat): Reorder code to pacify
28019         compilers that don't know that xalloc_die never returns.
28020
28021 2002-02-20  Jim Meyering  <meyering@lucent.com>
28022
28023         * lib/getdate.c: Regenerate using bison-1.33.
28024
28025 2002-02-17  Jim Meyering  <meyering@lucent.com>
28026
28027         * config/config.guess (main): Don't use `head -1'; it's no longer
28028         portable. Use `sed 1q' instead.
28029
28030 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
28031
28032         * m4/codeset.m4: Upgrade to gettext-0.11.
28033         * m4/gettext.m4: Upgrade to gettext-0.11.
28034         * m4/glibc21.m4: Upgrade to gettext-0.11.
28035         * m4/iconv.m4: Upgrade to gettext-0.11.
28036         * m4/isc-posix.m4: Upgrade to gettext-0.11.
28037         * m4/lcmessage.m4: Upgrade to gettext-0.11.
28038         * m4/lib-ld.m4: New file, from gettext-0.11.
28039         * m4/lib-link.m4: New file, from gettext-0.11.
28040         * m4/lib-prefix.m4: New file, from gettext-0.11.
28041         * m4/progtest.m4: Upgrade to gettext-0.11.
28042
28043 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28044
28045         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
28046         (jm_PREREQ): Use it.
28047
28048 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28049
28050         * lib/posixver.c, lib/posixver.h: New files.
28051         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28052
28053 2002-02-02  Paul Eggert  <eggert@twinsun.com>
28054             Bruno Haible  <bruno@clisp.org>
28055
28056         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
28057         (fwrite_success_callback): New declaration.
28058         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
28059         print_unicode_char. Call failure callback instead of error.
28060         (fwrite_success_callback): New function.
28061         (exit_failure_callback): New function.
28062         (fallback_failure_callback): New function.
28063         (print_unicode_char): Call unicode_to_mb.
28064
28065 2002-01-26  Jim Meyering  <meyering@lucent.com>
28066
28067         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28068         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28069
28070 2002-01-26  Jim Meyering  <meyering@lucent.com>
28071
28072         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28073
28074 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28075
28076         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28077
28078 2002-01-22  Jim Meyering  <meyering@lucent.com>
28079
28080         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28081         Otherwise, some versions of automake would omit the rule that makes
28082         Makefile from Makefile.in.
28083
28084 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28085
28086         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28087         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28088         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28089         (memcoll): Set errno to zero if there is no error.
28090
28091         * lib/quotearg.c (quotearg_buffer_restyled):
28092         Fix bug with quoting buffers containing NUL when backslashing escapes.
28093         This bug was exposed by the other changes in this patch.
28094         (quotearg_n_options): New arg ARGSIZE.
28095         All callers changed.
28096         (quoting_options_from_style): New function.
28097         (quotearg_n_style): Use it.
28098         (quotearg_n_style_mem): New function.
28099
28100         * lib/quotearg.h (quotearg_n_style_mem): New function.
28101
28102 2002-01-19  Jim Meyering  <meyering@lucent.com>
28103
28104         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28105         Remove useless quotes: DF_PROG="df".
28106         * m4/strnlen.m4: New file.
28107
28108 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28109
28110         * lib/backupfile.c (ISDIGIT): Comment fix.
28111         * lib/getdate.y (ISDIGIT): Likewise.
28112         * lib/posixtm.c (ISDIGIT, year): Likewise.
28113         * lib/strverscmp.c (ISDIGIT): Likewise.
28114         * lib/userspec.c (ISDIGIT): Likewise.
28115
28116 2002-01-16  Jim Meyering  <meyering@lucent.com>
28117
28118         * lib/getdate.y: Add three semicolons, each just before a closing
28119         brace. Bison (as of version 1.31) no longer papers over that mistake.
28120
28121 2002-01-05  Jim Meyering  <meyering@lucent.com>
28122
28123         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28124
28125 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28126
28127         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28128         not silently exit merely because the output buffer happens to
28129         have nothing pending.
28130
28131 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28132
28133         See the big note in ../ChangeLog.
28134         * lib/human.c (suffixes): Prefer K to k for 1024.
28135         (generate_suffix_backwards): New function.
28136         (human_readable_inexact): Use it.
28137         * lib/xstrtol.c (__xstrtol): If there is no number but there
28138         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28139         Accept 'K' as well as 'k'.
28140
28141 2001-12-15  Jim Meyering  <meyering@lucent.com>
28142
28143         * lib/regex.h (__restrict_arr): Update from libc.
28144
28145         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28146         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28147         (STREQ): Define.
28148
28149 2001-12-14  Jim Meyering  <meyering@lucent.com>
28150
28151         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28152         Suggestion from Bruno Haible.
28153
28154 2001-12-10  Jim Meyering  <meyering@lucent.com>
28155
28156         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28157         xrealloc, Instead, include "xalloc.h".
28158         (initbuffer): Don't cast xmalloc return value to char*.
28159         (readline): Reword comment.
28160         Don't cast xrealloc return value to char*
28161         Return NULL, not 0.
28162
28163 2001-12-09  Jim Meyering  <meyering@lucent.com>
28164
28165         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28166         about `signed and unsigned type in conditional expression'.
28167         * lib/posixtm.c (posix_time_parse): Likewise.
28168
28169         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28170
28171         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28172         to avoid a pedantic warning.
28173
28174         * lib/getstr.c: Don't include assert.h.
28175         (getstr): Remove warning-evoking assertions.
28176         Return -1 if offset parameter is out of bounds.
28177         Change the type of a local from int to size_t.
28178
28179         * lib/strftime.c (my_strftime_localtime_r): Include this function
28180         definition in the `#if ! HAVE_TM_GMTOFF' block.
28181
28182         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28183         Include xalloc.h instead.
28184
28185 2001-12-02  Jim Meyering  <meyering@lucent.com>
28186
28187         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28188         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28189         included.
28190
28191         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28192         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28193
28194 2001-11-30  Akim Demaille  <akim@epita.fr>
28195
28196         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28197         before being defined.
28198
28199 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28200
28201         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28202         First arg is int, not unsigned.
28203         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28204         (SIZE_MAX, UINT_MAX): New macros.
28205         (quotearg_n_options): Abort if N is negative.
28206         Avoid overflow check on hosts where size_t is 64 bits and int
28207         is 32 bits, as overflow is impossible there.
28208         Fix off-by-one typo that caused unnecessary reallocation.
28209
28210 2001-11-27  Jim Meyering  <meyering@lucent.com>
28211
28212         * lib/tempname.c: Merge with version from libc.
28213         * lib/regex.c: Likewise.
28214
28215         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28216         systems for which STDC_HEADERS is 0, it was not included, resulting in
28217         a warning about an integer-to-pointer conversion problem with getenv.
28218         Reported by Volker Borchert.
28219
28220 2001-11-26  Jim Meyering  <meyering@lucent.com>
28221
28222         * lib/gtod.h: Remove file.
28223         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28224         * lib/gettimeofday.c: Don't include gtod.h.
28225         (GTOD_init): Remove function.
28226         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28227         Suggestion from Volker Borchert.
28228
28229 2001-11-23  Jim Meyering  <meyering@lucent.com>
28230
28231         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28232         it.
28233         * lib/hash.c (struct hash_table): Define it here instead.
28234
28235 2001-11-22  Jim Meyering  <meyering@lucent.com>
28236
28237         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28238
28239 2001-11-20  Jim Meyering  <meyering@lucent.com>
28240
28241         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28242         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28243
28244 2001-11-19  Jim Meyering  <meyering@lucent.com>
28245
28246         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28247         directory.  Use "conftestXXXXXX" as the template.
28248         Suggestion from Paul Eggert.
28249
28250         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28251         immediately, so the test doesn't mistakenly hit the max-open-files
28252         limit.
28253
28254 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28255
28256         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28257         (TEMPORARIES): New macro.
28258         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28259         removes an artificial limitation (e.g. HP-UX 10.20, where
28260         TMP_MAX is 17576).
28261
28262 2001-11-18  Jim Meyering  <meyering@lucent.com>
28263
28264         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28265
28266 2001-11-18  Jim Meyering  <meyering@lucent.com>
28267
28268         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28269         on SunOS 4.
28270
28271         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28272         files will be created before anything else.
28273
28274 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28275
28276         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28277         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28278
28279 2001-11-17  Jim Meyering  <meyering@lucent.com>
28280
28281         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28282         Prompted by a report from Bob Proulx.
28283
28284         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28285         Instead, require UTILS_FUNC_MKSTEMP.
28286
28287 2001-11-17  Jim Meyering  <meyering@lucent.com>
28288
28289         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28290         Now, that's done as part of AC_FUNC_STRTOD.
28291
28292 2001-11-17  Jim Meyering  <meyering@lucent.com>
28293
28294         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28295         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28296         rather than group writable.  Patch by Juan F. Codagnone.
28297
28298         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28299         xrealloc, Instead, include "xalloc.h".
28300
28301         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28302         Remove explicit declarations of xmalloc, xrealloc,
28303         and xstrdup.  Instead, include "xalloc.h".
28304
28305         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28306         unlocked-io.h.
28307         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28308         Likewise.
28309         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28310
28311         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28312         Reported by Padraig Brady.
28313
28314         * lib/mkstemp.c: #undef mkstemp.
28315         Include config.h.
28316         (rpl_mkstemp): Rename from mkstemp.
28317         Protoize.
28318
28319 2001-11-16  Jim Meyering  <meyering@lucent.com>
28320
28321         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28322         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28323         determine the amount of total physical memory, use pstat_getstatic.
28324         HPUX-11 doesn't define _SC_PHYS_PAGES.
28325         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28326         If sysconf couldn't be used to determine the amount of available
28327         physical memory, use both pstat_getstatic and pstat_getdynamic.
28328         Based on a patch from Bob Proulx.
28329
28330 2001-11-10  Jim Meyering  <meyering@lucent.com>
28331
28332         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28333         (jm_PREREQ): Use it.
28334
28335 2001-11-09  Jim Meyering  <meyering@lucent.com>
28336
28337         * m4/jm-macros.m4: Require autoconf-2.52f.
28338         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28339         Use these AC_-prefixed names, not the AM_-prefixed ones.
28340
28341         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28342
28343 2001-11-05  Jim Meyering  <meyering@lucent.com>
28344
28345         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28346
28347 2001-11-04  Jim Meyering  <meyering@lucent.com>
28348
28349         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
28350         $DEFS.
28351
28352 2001-11-03  Jim Meyering  <meyering@lucent.com>
28353
28354         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
28355         of AC_DEFUN.
28356
28357         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
28358         know the name of the variable in the macro definition.
28359
28360 2001-11-03  Jim Meyering  <meyering@lucent.com>
28361
28362         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
28363         in argmatch_to_argument call.
28364
28365         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
28366         argument.
28367
28368         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
28369         e.g., a fault due to an attempt to free a NULL pointer.
28370
28371 2001-11-01  Jim Meyering  <meyering@lucent.com>
28372
28373         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
28374         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
28375
28376 2001-11-01  Jim Meyering  <meyering@lucent.com>
28377
28378         * lib/dirfd.c, lib/dirfd.h: New files.
28379         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
28380
28381         * lib/hash.c (hash_print) [TESTING]: Clean up.
28382
28383 2001-10-22  Paul Eggert  <eggert@twinsun.com>
28384
28385         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
28386         to avoid a warning if -Wall.
28387
28388 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
28389
28390         * README: New file
28391         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
28392         (per RMS's instructions, this is now the canonical source)
28393         * lgpl/, gpl/: New directories.
28394
28395 2001-10-21  Paul Eggert  <eggert@twinsun.com>
28396
28397         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
28398
28399 2001-10-21  Jim Meyering  <meyering@lucent.com>
28400
28401         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
28402         this code would end up calling gettext even in packages built
28403         with --disable-nls.
28404         * lib/getopt.c (_): Likewise.
28405         * lib/regex.c (_): Likewise.
28406
28407 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28408
28409         * m4/error.m4 (jm_PREREQ_ERROR):
28410         Do not invoke AC_CHECK_FUNCS with strerror_r, as
28411         AC_FUNC_STRERROR_R does that.
28412         Check for strerror declaration.
28413
28414         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
28415         are supposed to have them these days.
28416         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
28417         Merge changes from latest Autoconf CVS.
28418         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
28419         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
28420         POSIX decided to standardize on the int flavor of strerror_r.
28421
28422 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28423
28424         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
28425         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
28426         Use strerror_r that is only a macro, even if it is not a function.
28427         (strerror): Check for HAVE_DECL_STRERROR before declaring.
28428         (private_strerror): Use prototypes, not old-style function definition.
28429         (print_errno_message): New function.
28430         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
28431         char*-flavored one.
28432         (error_tail, error, error_at_line): Use it.
28433
28434 2001-10-11  Jim Meyering  <meyering@lucent.com>
28435
28436         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
28437         and quote_n (1, ... to avoid clobbering a buffer.
28438
28439 2001-10-05  Jim Meyering  <meyering@lucent.com>
28440
28441         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
28442         hash-pjw.h.
28443         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
28444         * lib/hash-pjw.h: New file.
28445
28446 2001-09-30  Jim Meyering  <meyering@lucent.com>
28447
28448         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
28449         `struct fsstat' has the `f_fstypename' member.
28450         Use that to define FS_TYPE, which is now used to make
28451         the getfsstat link test tighter.
28452
28453 2001-09-30  Jim Meyering  <meyering@lucent.com>
28454
28455         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
28456         Include <sys/ucred.h>, for Apple Darwin.
28457         Include sys/mount.h and sys/fs_types.h only if available.
28458         (FS_TYPE): Define.
28459         (read_filesystem_list): Use FS_TYPE.
28460
28461 2001-09-29  Paul Eggert  <eggert@twinsun.com>
28462
28463         * lib/exclude.c (excluded_filename): 0 -> false, since it's
28464         a boolean context.
28465
28466 2001-09-29  Jim Meyering  <meyering@lucent.com>
28467
28468         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28469         [one-argument getmntent function]): Include stdio.h before mntent.h.
28470         SunOS 4.1.x needs it for the declaration of `FILE'.
28471         Patch by Volker Borchert.
28472
28473         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28474         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
28475         sys/fs_types.h, and make the link-test for getfsstat guard #include
28476         directives with appropriate #if HAVE_*_H tests so that we can
28477         detect getfsstat on Apple Darwin1.3.7 systems.
28478         Reported by Nelson Beebe.
28479         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
28480
28481 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28482
28483         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28484         #defines strtoimax.  Also treat the other strto* functions
28485         like strtoimax.
28486
28487         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28488         Check for strtoul and strtoumax,
28489         as those declarations are made even in the signed case.
28490         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
28491         Likewise, for strtol and strtoimax.
28492
28493 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28494
28495         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28496         #defines strtoimax.  Also treat the other strto* functions
28497         like strtoimax.
28498
28499         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
28500         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
28501         (strtoimax, strtoumax): Do not declare if already defined as a macro.
28502
28503 2001-09-26  Jim Meyering  <meyering@lucent.com>
28504
28505         Most macros in unlocked-io.h had the wrong number of arguments.
28506         * lib/gen-uio: New script.
28507         (USE_UNLOCKED_IO): Define to 1 if not already defined.
28508         * lib/unlocked-io.hin: Remove file.
28509         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
28510         rather than trying to embed it here.
28511         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
28512         Reported by Padraig Brady.
28513
28514 2001-09-25  Volker Borchert  <bt@teknon.de>
28515
28516         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
28517         `result'.
28518
28519 2001-09-24  Jim Meyering  <meyering@lucent.com>
28520
28521         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
28522
28523 2001-09-23  Jim Meyering  <meyering@lucent.com>
28524
28525         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
28526         instead of the mere test for existence of mntent.h.  The latter
28527         would get a false-positive on AIX 3.4 systems.
28528         In the outer getmntent if-block, don't die if neither of the getmntent
28529         tests succeeds.  Instead, just fall through and continue with the
28530         remaining tests.
28531
28532 2001-09-23  Jim Meyering  <meyering@lucent.com>
28533
28534         * lib/mountlist.c: Remove useless parentheses in #if directives.
28535         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
28536         the deprecated MOUNTED symbol is no longer defined in mntent.h.
28537
28538 2001-09-22  Jim Meyering  <meyering@lucent.com>
28539
28540         * m4/gettext.m4: New file.  From gettext.
28541         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
28542         * m4/progtest.m4: Likewise
28543         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
28544         * m4/glibc21.m4: Likewise.
28545
28546         * m4/libintl.m4: Remove.  No longer used.
28547
28548 2001-09-22  Jim Meyering  <meyering@lucent.com>
28549
28550         * lib/localcharset.c: Update from latest gettext.
28551         * lib/config.charset: Likewise.
28552
28553 2001-09-20  Jim Meyering  <meyering@lucent.com>
28554
28555         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
28556         strtoimax.
28557         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
28558         strtoumax.
28559
28560 2001-09-20  Jim Meyering  <meyering@lucent.com>
28561
28562         * lib/xstrtol.c (strtoimax): Guard declaration with
28563         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
28564         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
28565         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
28566         (strtoumax): Likewise, for completeness (it wasn't necessary).
28567
28568 2001-09-17  Paul Eggert  <eggert@twinsun.com>
28569
28570         * lib/strtoimax.c (HAVE_LONG_LONG):
28571         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
28572         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
28573         to work around bug in IBM C compiler.
28574
28575 2001-09-17  Jim Meyering  <meyering@lucent.com>
28576
28577         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
28578         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
28579         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
28580         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
28581         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
28582         whenever the right hand side need not be expanded by the shell.
28583
28584 2001-09-16  Paul Eggert  <eggert@twinsun.com>
28585
28586         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
28587         library.  It's not correct, as some older glibcs are buggy.
28588         fnmatch wasn't fixed until glibc 2.2.
28589
28590         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
28591         special shell magic here.
28592
28593 2001-09-16  Jim Meyering  <meyering@lucent.com>
28594
28595         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
28596         * m4/jm-macros.m4: Require it.
28597
28598 2001-09-16  Jim Meyering  <meyering@lucent.com>
28599
28600         * lib/mkdir.c: New file.
28601
28602 2001-09-15  Jim Meyering  <meyering@lucent.com>
28603
28604         * m4/jm-macros.m4: Check for help2man.
28605
28606 2001-09-11  Jim Meyering  <meyering@lucent.com>
28607
28608         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
28609         The body, by Paul Eggert, was moved here from configure.in.
28610         * m4/jm-macros.m4: Require UTILS_HOST_OS.
28611
28612 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28613
28614         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
28615         (jm_PREREQ): Use it.
28616
28617 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28618
28619         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
28620         Use ssize_t, not int, to store result of readlink.
28621         Check for ssize_t overflow as well as size_t overflow,
28622         as POSIX says the result of readlink is implementation-defined
28623         when ssize_t overflows.
28624         Remove unnecessary cast to char*.
28625         Use free+malloc instead of realloc, as the storage doesn't need
28626         to be preserved and it's clearer and can be more efficient that way.
28627         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
28628         * lib/xreadlink.h (xreadlink): Update prototype.
28629
28630 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28631
28632         * lib/xgetcwd.c: Revert some of the previous change; intead,
28633         fix the HAVE_GETCWD_NULL code to behave more like the
28634         !HAVE_GETCWD_NULL code used to.
28635
28636         Include "xalloc.h".
28637         (xgetcwd): Do not return NULL when memory is exhausted; instead,
28638         invoke xalloc_die.
28639
28640 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28641
28642         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
28643         sys/param.h, as pathmax.h includes them.
28644
28645 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28646
28647         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
28648         (jm_PREREQ_XGETCWD): New macro.
28649
28650         * m4/getcwd.m4: New file.
28651
28652 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28653
28654         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
28655         like the HAVE_GETCWD_NULL code.
28656         Include pathmax.h if not HAVE_GETCWD.
28657         Do not include xalloc.h.
28658         (INITIAL_BUFFER_SIZE): New symbol.
28659         Do not use xmalloc / xrealloc, since the caller is responsible for
28660         handling errors.  Preserve errno around `free' during failure.
28661         Do not overrun buffer when using getwd.
28662
28663 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28664
28665         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
28666         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
28667         getcwd (NULL, 0).
28668
28669 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28670
28671         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
28672         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
28673         spotted by Jim Meyering.
28674
28675 2001-09-03  Jim Meyering  <meyering@lucent.com>
28676
28677         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
28678         failure.
28679
28680 2001-09-02  Jim Meyering  <meyering@lucent.com>
28681
28682         * lib/error.c: Update from GNU libc.
28683
28684 2001-09-01  Jim Meyering  <meyering@lucent.com>
28685
28686         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
28687         Used by df.
28688
28689 2001-09-01  Jim Meyering  <meyering@lucent.com>
28690
28691         * lib/xreadlink.c: New file.
28692         * lib/xreadlink.h: New file.
28693         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
28694         xreadlink.h.
28695
28696         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
28697         doesn't conflict with sparc Solaris 7's definition in
28698         /usr/include/sys/int_types.h.
28699
28700         * lib/exclude.c: Use `""', not `<>' to #include non-system header
28701         files.
28702         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
28703         and strncasecmp as r-values.  Unixware didn't have declarations.
28704
28705 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28706
28707         * lib/xstrtol.h: Add copyright notice.
28708         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
28709         LONGINT_INVALID_SUFFIX_CHAR.
28710
28711 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28712
28713         * lib/xstrtol.c (strtoimax): New decl.
28714
28715 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28716
28717         * lib/xgetcwd.c: Don't include pathmax.h.
28718         Include stdlib.h and unistd.h if available.
28719         Include xalloc.h.
28720         (xmalloc, xstrdup, free): Remove decls.
28721         (xgetcwd): Don't assume sizes fit in unsigned.
28722         Check for overflow when computing sizes.
28723         Simplify reallocation code.
28724
28725 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28726
28727         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
28728         a directory's st_size can have an arbitrary value, so the old
28729         usage could waste an arbitrary amount of memory.  All uses
28730         changed.
28731         * lib/savedir.h: Update prototype.
28732
28733 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28734
28735         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
28736
28737         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
28738         old strtoimax.c.
28739
28740         Also, make the following further changes to make this file's
28741         configuration more similar to that of strtol.c:
28742         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
28743         (strtoumax, uintmax_t, strtoull, strtol): Remove.
28744         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
28745         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
28746         changed to signed values.
28747
28748         And make the following changes as well:
28749         Fix copyright notice, as 1999 was missing.
28750         (verify): New macro.
28751         (strtoimax): Check sizes at compile-time, not run-time.
28752         Prefer strtol to strtoll if both work.
28753         (main): Remove; it was not that useful and was a pain to maintain.
28754
28755         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
28756
28757 2001-08-31  Jim Meyering  <meyering@lucent.com>
28758
28759         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
28760         Use an initial, malloc'd, buffer of length 128 rather than
28761         a statically allocated one of length 1024.
28762
28763 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28764
28765         Simplify code, partly by assuming autoconf 2.52 semantics.
28766
28767         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
28768
28769         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
28770         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
28771         All uses removed.
28772         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
28773         Move AC_REQUIRE to next-to-top level, to avoid confusion.
28774         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
28775         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
28776         jm_AC_HEADER_INTTYPES_H.
28777         * m4/jm-macros.m4 (jm_MACROS): Likewise.
28778
28779         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
28780
28781         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28782         Quote first arg of AC_DEFUN.
28783         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
28784         since they are needed to parse the include file even if we need
28785         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
28786         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
28787         but with opposite signedness.
28788
28789 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28790
28791         Merge 'exclude' changes from tar 1.13.22.
28792         This fixes one or two unlikely storage allocation overflow bugs,
28793         but doesn't change user-visible behavior otherwise.
28794
28795 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28796
28797         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
28798         (jm_PREREQ_EXCLUDE): New macro.
28799
28800 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28801
28802         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
28803         tm to be declared.
28804
28805 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28806
28807         * lib/hash.c: Remove '2001' from copyright notice.
28808
28809 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28810
28811         * lib/full-write.h: New file.
28812         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
28813         * lib/full-write.c: Correct credits, as cccp.c no longer
28814         exists and anyway it was so heavily changed from the old cccp
28815         code as to be unrecognizable.  Include full-write.h.
28816         (full_write) Return size_t, with short writes meaning failure.
28817         All callers changed.  This fixes a bug with large buffers
28818         on 64-bit hosts.
28819         * lib/utime.c: Include full-write.h.
28820
28821 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28822
28823         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
28824         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
28825         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
28826         Include if available.
28827         (<xalloc.h>): Include
28828         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
28829         (verify): New macro.  Use it to verify that EXCLUDE macros do not
28830         collide with FNM macros.
28831         (struct patopts): New struct.
28832         (struct exclude): Use it, as exclude patterns now come with options.
28833         (new_exclude): Support above changes.
28834         (new_exclude, add_exclude_file):
28835         Initial size must now be a power of two to simplify overflow checking.
28836         (free_exclude, fnmatch_no_wildcards): New function.
28837         (excluded_filename): No longer requires options arg, as the options
28838         are determined by add_exclude.  Now returns bool, not int.
28839         (excluded_filename, add_exclude):
28840         Add support for the fancy new exclusion options.
28841         (add_exclude, add_exclude_file): Now takes int options arg.
28842         Check for arithmetic overflow when computing sizes.
28843         (add_exclude_file): xrealloc might modify errno, so don't
28844         realloc until after errno might be used.
28845
28846         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
28847         New macros.
28848         (free_exclude): New decl.
28849         (add_exclude, add_exclude_file): Now takes int options arg.
28850         (excluded_filename): No longer requires options arg, as the options
28851         are determined by add_exclude.  Now returns bool, not int.
28852
28853 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28854
28855         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
28856
28857 2001-08-27  Jim Meyering  <meyering@lucent.com>
28858
28859         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
28860
28861         * lib/version-etc.c (N_): Remove definition.
28862         Revert most of last change.
28863         Instead, simply don't mark the `Copyright...' string for translation.
28864         Based on advice from Paul Eggert.
28865
28866         * lib/strtoxmax.c: Tweak comment.
28867
28868 2001-08-26  Jim Meyering  <meyering@lucent.com>
28869
28870         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
28871
28872         * m4/xstrtoimax.m4: New file.
28873         * m4/xstrtoumax.m4: Add comments explaining why we
28874         AC_REPLACE_FUNCS(strtol).
28875
28876 2001-08-26  Jim Meyering  <meyering@lucent.com>
28877
28878         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
28879         of copyright with `%s' so translators don't get an untranslated
28880         message in 2002.
28881         (COPYRIGHT_YEAR): Define.
28882         (version_etc): Use fprintf rather than fputs.
28883         Suggestion from Ulrich Drepper.
28884
28885         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
28886
28887         * lib/strtoll.c: New file, from GNU libc.
28888         * lib/xstrtoimax.c: New file.
28889
28890         * lib/xstrtol.h: Add xstrtoimax.
28891         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
28892         * lib/strtoimax.c: New file.  Likewise, but first define
28893         STRTOUXMAX_SIGNED.
28894
28895         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
28896         ...
28897         * lib/strtoxmax.c: ... then renamed to this.
28898
28899 2001-08-18  Paul Eggert  <eggert@twinsun.com>
28900
28901         * m4/inttypes.m4: Add AC_PREREQ(2.13).
28902         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
28903         (jm_AC_TYPE_INTMAX_T): New macro.
28904         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
28905
28906         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
28907
28908         * m4/longlong.m4: Renamed from ulonglong.m4.
28909         * m4/inttypes.m4: Renamed from inttypes_h.m4.
28910         * m4/uintmax_t.m4: Removed.
28911
28912 2001-08-13  Paul Eggert  <eggert@twinsun.com>
28913
28914         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
28915         Port to Solaris 8, where 'sed' requires a space after the 'r'
28916         command, and where sh dislikes "$/".  Clean up the spacing a bit.
28917         Redirect output to $tmp just once.
28918
28919 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
28920
28921         * lib/addext.c (<errno.h>): Include.
28922         (errno): Declare if not defined.
28923         (addext): Work correctly when pathconf returns -1 and leaves
28924         errno alone because there is no limit.  Also, work even if
28925         pathconf returns a value greater than SIZE_MAX.
28926
28927 2001-08-12  Jim Meyering  <meyering@lucent.com>
28928
28929         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
28930         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
28931         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
28932         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
28933         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
28934         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
28935         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
28936         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
28937         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
28938         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
28939         utime.m4, utimes.m4, xstrtoumax.m4:
28940         Quote the first argument in each use of AC_DEFUN.
28941
28942 2001-08-12  Jim Meyering  <meyering@lucent.com>
28943
28944         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
28945         Simply `return getcwd (NULL, 0);'.
28946         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
28947         Use 1300 as initial value for length, not PATH_MAX.
28948
28949         * lib/pathmax.h: Clean up cpp syntax.
28950
28951 2001-08-12  Jim Meyering  <meyering@lucent.com>
28952
28953         * lib/gettimeofday.c: New file.
28954         * lib/gtod.h: New file.
28955         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
28956
28957 2001-08-05  Jim Meyering  <meyering@lucent.com>
28958
28959         * m4/jm-macros.m4: Require autoconf-2.52.
28960
28961 2001-08-04  Jim Meyering  <meyering@lucent.com>
28962
28963         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
28964         stmt, to get in sync with glibc.
28965
28966 2001-08-03  Paul Eggert  <eggert@twinsun.com>
28967
28968         The following changes are from gettext 0.10.39 as maintained by
28969         Bruno Haible.
28970
28971         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
28972         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
28973         with inverted sense.  All uses changed.
28974
28975         * lib/mbswidth.c: Don't include <limits.h>.
28976         Include <stdlib.h> and <string.h> unconditionally.
28977         (iswcntrl, mbsinit, ISCNTRL): New macros.
28978         (mbsnwidth): Use K&R style function declarations.
28979         Don't bother checking for MB_LEN_MAX == 1, since the compiler
28980         can optimize it when MB_CUR_MAX == 1.
28981         The width of control characters is zero, not 1.
28982
28983 2001-08-03  Paul Eggert  <eggert@twinsun.com>
28984
28985         The following changes are from gettext 0.10.39 as maintained by
28986         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
28987
28988         * m4/codeset.m4: Upgrade to serial AM1.
28989         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
28990         all uses changed.  Quote first arg of AC_DEFUN.
28991         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
28992
28993         * m4/iconv.m4: Upgrade to serial AM2.
28994         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
28995         Add --with-libconv-prefix.
28996         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
28997         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
28998         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
28999         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
29000         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
29001
29002         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
29003         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
29004         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
29005         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
29006         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
29007         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
29008         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
29009         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
29010         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
29011
29012         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
29013         string.h any more.
29014
29015         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
29016         not the default value.
29017
29018         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
29019         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
29020         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
29021         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
29022         Also check for iswcntrl, used for wcwidth fallback.
29023         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
29024         to Autoconf 2.13.
29025
29026 2001-08-03  Jim Meyering  <meyering@lucent.com>
29027
29028         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
29029         as it was in the original.  Reported by Paul Eggert.
29030
29031 2001-07-16  Jim Meyering  <meyering@lucent.com>
29032
29033         * m4/gettimeofday.m4: New file.
29034         Prompted by a report from Bernhard Baehr.
29035
29036 2001-07-15  Jim Meyering  <meyering@lucent.com>
29037
29038         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
29039         stuff. Now it's in ../Makefile.cfg.
29040
29041 2001-07-15  Jim Meyering  <meyering@lucent.com>
29042
29043         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
29044         (BUILT_SOURCES): Add unlocked-io.h.
29045         (io_functions): Define.
29046         (unlocked-io.h): New rule.
29047         (DISTCLEANFILES): Add unlocked-io.h.
29048         (all-local): Depend on unlocked-io.h, to ensure it is created.
29049
29050         * lib/unlocked-io.hin: New file
29051
29052         * lib/regex.c: Update from glibc.
29053
29054 2001-07-05  Jim Meyering  <meyering@lucent.com>
29055
29056         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
29057         recommendation.
29058         (libfetish_a_SOURCES): Put all .h files here instead.
29059         Remove a thus-exposed (better checks in automake) duplicate and
29060         two unnecessary .h files.
29061
29062 2001-07-04  Jim Meyering  <meyering@lucent.com>
29063
29064         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29065         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29066         distcheck failure.
29067
29068 2001-07-02  Jim Meyering  <meyering@lucent.com>
29069
29070         The following changes were prompted by suggestions from Bruno Haible.
29071
29072         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29073         is now generated.
29074         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29075         definition of EXTRA_DIST.
29076         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29077         ensure that the generated file is created/updated whenever the list
29078         of $(unlocked_functions) is changed.
29079         (jm-glibc-io.m4): New rule.
29080         (unlocked-io.h): New rule -- currently unused.
29081
29082 2001-06-24  Jim Meyering  <meyering@lucent.com>
29083
29084         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29085         unmatched right bracket, rather than kludging it with an extra,
29086         falsely-matching quote in a comment.  Patch by Akim Demaille.
29087
29088 2001-06-11  Jim Meyering  <meyering@lucent.com>
29089
29090         * lib/regex.c: Update from GNU libc.
29091
29092 2001-05-27  Jim Meyering  <meyering@lucent.com>
29093
29094         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29095         Check for ut_type in struct utmp.
29096
29097 2001-05-27  Jim Meyering  <meyering@lucent.com>
29098
29099         * lib/readutmp.h (UT_TYPE): Define.
29100
29101 2001-05-24  Jim Meyering  <meyering@lucent.com>
29102
29103         * lib/argmatch.c: Include "quote.h".
29104         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29105         quote function.  Reported by Göran Uddeborg.
29106
29107 2001-05-22  Jim Meyering  <meyering@lucent.com>
29108
29109         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29110         now that we use the package-supplied version unconditionally.
29111         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29112
29113 2001-05-21  Jim Meyering  <meyering@lucent.com>
29114
29115         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29116         shell syntax errors.
29117
29118 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29119
29120         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29121
29122 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29123
29124         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29125         Don't bother to check library strftime, since
29126         we'll be using our own my_strftime function anyway.
29127         Define my_strftime instead of strftime.
29128
29129 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29130
29131         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29132         which is not yet declared.
29133
29134 2001-05-15  Jim Meyering  <meyering@lucent.com>
29135
29136         * m4/regex.m4: Use proper quoting so brackets appear in the test
29137         program.
29138         Reported by, and with help from, Bruno Haible.
29139
29140 2001-05-13  Jim Meyering  <meyering@lucent.com>
29141
29142         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29143         undefined.
29144
29145 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29146
29147         dirname code cleanup.  base_name now behaves more compatibly
29148         with POSIX basename when given file names that have trailing
29149         slashes, and similarly for dir_name.  Add new primitives
29150         base_len and dir_len.  Put the directory-name-related decls
29151         into dirname.h.
29152
29153         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29154         * lib/backupfile.c (base_name): Likewise.
29155         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29156         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29157         * lib/makepath.c (strip_trailing_slashes): Likewise.
29158         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29159         ISSLASH): Likewise.
29160         * lib/rename.c (strip_trailing_slashes): Likewise.
29161         * lib/same.c (base_name): Likewise.
29162         * lib/stripslash.c (ISSLASH): Likewise.
29163
29164         * lib/addext.c: Include <dirname.h> after size_t is defined.
29165         * lib/backupfile.c: Likewise.
29166
29167         * lib/addext.c (addext): Use base_len to trim redundant
29168         trailing slashes instead of doing it ourselves.
29169         But do not trim the last slash if it is not redundant.
29170
29171         * lib/backupfile.c (find_backup_file_name,
29172         max_backup_version): Use base_len instead of rolling it ourselves.
29173         Handle the case of "" and (on DOS) "C:" correctly.
29174
29175         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29176         needed. Include <string.h>, <dirname.h>.
29177         (base_name): Allow file names ending in slashes, other than names
29178         that are all slashes.  In this case, return the basename followed
29179         by the slashes.  This is more general, and can be used in places
29180         where the original base_name purposely had an assertion failure.
29181         (base_len): New function.
29182
29183         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29184         Do not include <assert.h>; no longer needed.
29185         Include xalloc.h.
29186         (memrchr): Remove decl.
29187         (dir_name_r): Remove.
29188         (dir_len): Renamed from dirlen.  All callers changed.
29189         Rewrite in terms of base_name, for simplicity and consistency.
29190         (dir_name): Never return NULL.  All callers changed.
29191         Do not include <stdlib.h> in test program; no longer needed.
29192         return 0; is fine for test program.
29193
29194         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29195         New macros.
29196         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29197
29198         * lib/path-concat.c (path_concat): Use base_len to compute
29199         base length, not strlen; this means we cannot rely on memcpy
29200         to null-terminate.
29201
29202         * lib/same.c (STREQ): Remove.
29203         (same_name): Handle the case where the basename ends in trailing '/'.
29204
29205         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29206         a slash was stripped.  Do not strip the last slash after a
29207         file system prefix.
29208
29209 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29210
29211         * lib/Makefile.am (libfetish_a_SOURCES):
29212         Add strftime.c, since we now compile it on all hosts.
29213
29214         * lib/strftime.c (my_strftime):
29215         Define to nstrftime if emacs, but only if my_strftime is not defined.
29216         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29217         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29218         Add one more extra argument: a nanoseconds value.
29219         All uses changed.
29220         (ns): New macro.
29221         (my_strftime function): Add %N format.
29222         (emacs_strftimeu): Renamed from emacs_strftime,
29223         with extra ut argument.
29224
29225 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29226
29227         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29228
29229 2001-04-21  Jim Meyering  <meyering@lucent.com>
29230
29231         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29232         doesn't interfere.
29233
29234 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29235
29236         * m4/ftruncate.m4: Check for chsize.
29237         Link with ftruncate.o unconditionally if ftruncate is missing.
29238         This was required when cross-compiling to i586-mingw32msvc.
29239
29240 2001-04-08  Jim Meyering  <meyering@lucent.com>
29241
29242         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29243         recomputed; that's necessary when the offset spans a DST transition.
29244         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29245
29246 2001-04-02  Jim Meyering  <meyering@lucent.com>
29247
29248         * lib/regex.h, regex.c: Update from GNU libc.
29249
29250 2001-03-24  Jim Meyering  <meyering@lucent.com>
29251
29252         * m4/jm-macros.m4: Require autoconf-2.49d.
29253
29254 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29255
29256         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29257
29258 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29259
29260         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29261
29262 2001-03-17  Jim Meyering  <meyering@lucent.com>
29263
29264         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29265         now that the version in autoconf is equivalent.
29266         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29267
29268         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29269         Suggestion from Akim Demaille.
29270
29271         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29272         (jm_PREREQ_TEMPNAME): New function.
29273
29274 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29275
29276         * lib/tempname.c (uint64_t): Define to uintmax_t if
29277         not defined, and if UINT64_MAX is not defined.
29278         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29279         Reported by John David Anglin.
29280
29281 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29282
29283         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29284         resolve alias if codeset is empty.
29285         * lib/config.charset (BeOS): Use wildcard syntax.
29286
29287 2001-03-13  Jim Meyering  <meyering@lucent.com>
29288
29289         * lib/path-concat.c (path_concat)
29290         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29291         concatenating e.g., `C:' and `foo'.
29292         From Bruno Haible.
29293
29294 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29295
29296         * lib/localcharset.c (locale_charset): Don't use
29297         setlocale(LC_CTYPE,NULL). Don't return NULL.
29298         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29299
29300 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29301
29302         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29303         support for DOS/DJGPP.
29304
29305 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29306
29307         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29308         lacks mkstemp.  Compile our own tempname.c if we compile our own
29309         mkstemp.c, as mkstemp relies on tempname.
29310
29311 2001-03-01  Jim Meyering  <meyering@lucent.com>
29312
29313         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29314         AH_VERBATIM really does output its argument verbatim.
29315
29316 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29317
29318         * lib/Makefile.am (libfetish_a_SOURCES):
29319         Add dup-safer.c, fopen-safer.c.
29320         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29321
29322         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29323         * lib/unistd-safer.h: New files.
29324
29325 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29326
29327         The mkstemp replacement is taken from glibc 2.2.2, with some
29328         portability fixes for use outside glibc, as follows:
29329
29330         * lib/tempname.c (struct_stat64): New macro.
29331         (direxists, __gen_tempname): Use it.
29332         This avoids a portability problem with Solaris 8.
29333
29334         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29335         (<stddef.h>, <stdint.h>, <string.h>):
29336         Include only if STDC_HEADERS || _LIBC.
29337         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29338         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29339         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29340         (__set_errno): Define this macro if <errno.h> doesn't.
29341         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29342         Define these macros if <stdio.h> doesn't.
29343         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29344         Define these macros if <sys/stat.h>
29345         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29346         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29347         __xstat64): Define if not _LIBC.
29348         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
29349         (__gen_tempname): Invoke gettimeofday only if
29350         HAVE_GETTIMEOFDAY || _LIBC;
29351         otherwise, fall back on plain "time".
29352         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
29353
29354         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
29355
29356         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
29357
29358 2001-02-18  Paul Eggert  <eggert@twinsun.com>
29359
29360         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
29361
29362 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29363
29364         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
29365         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
29366         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
29367         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
29368
29369 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29370
29371         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
29372         Remove workaround macros for hosts that have mbrtowc but not
29373         mbstate_t, as we now insist on proper declarations for both
29374         before using mbrtowc.
29375
29376 2001-02-17  Jim Meyering  <meyering@lucent.com>
29377
29378         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
29379         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
29380         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
29381         UnixWare 7.1.1.
29382
29383         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
29384         rather than AC_CACHE_VAL.
29385
29386 2001-02-17  Jim Meyering  <meyering@lucent.com>
29387
29388         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
29389         around included file name.
29390
29391         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
29392
29393         * lib/strftime.c: Update from GNU libc (the only changes were to
29394         comments).
29395
29396 2001-02-17  Jim Meyering  <meyering@lucent.com>
29397
29398         * lib/regex.c: Update from libc.
29399
29400 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
29401
29402         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
29403         clash.
29404
29405 2001-02-16  Paul Eggert  <eggert@twinsun.com>
29406
29407         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
29408         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
29409         Reported by Mark Hounschell via Paul Eggert.
29410
29411 2001-02-07  Jim Meyering  <meyering@lucent.com>
29412
29413         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
29414
29415 2001-02-05  Jim Meyering  <meyering@lucent.com>
29416
29417         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
29418         it includes the patch required for `large file' support with at least
29419         HP-UX's 10.20 /bin/cc.
29420
29421 2001-02-03  Jim Meyering  <meyering@lucent.com>
29422
29423         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
29424         AS_IF, now that it works once again (mysteriously).
29425         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29426
29427 2001-01-30  Jim Meyering  <meyering@lucent.com>
29428
29429         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
29430         * m4/chown.m4: Rename conftestchown to conftest.chown.
29431         * m4/rename.m4: s/conftestdir/conftest.d1/ and
29432         s/conftestdir2/conftest.d2/.
29433         * m4/utimes.m4: s/conftestdata/conftest.data/
29434         Inspired by Pavel Roskin's change in autoconf.
29435
29436 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
29437
29438         * lib/config.charset: Update for FreeBSD 4.2.
29439
29440 2001-01-27  Jim Meyering  <meyering@lucent.com>
29441
29442         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
29443         a use of AS_IF.
29444         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29445
29446 2001-01-26  Jim Meyering  <meyering@lucent.com>
29447
29448         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
29449         quotearg.c includes it.
29450
29451 2001-01-26  Jim Meyering  <meyering@lucent.com>
29452
29453         * lib/quotearg.c: Include stddef.h.
29454         * lib/quote.c: Include stddef.h.
29455         Reported by Axel Kittenberger.
29456
29457         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
29458         line in double quotes so that it evokes a better diagnostic.
29459         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
29460         Reported by Axel Kittenberger.
29461
29462 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
29463
29464         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
29465         as if it was a `charset'.
29466
29467 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29468
29469         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
29470         has const.
29471
29472 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29473
29474         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
29475         to avoid a warning.  Add back 'const' to inptr.
29476
29477 2001-01-20  Jim Meyering  <meyering@lucent.com>
29478
29479         Be sure that headers are checked before used in code compiled
29480         for the type checks.
29481         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
29482         In place of that, invoke jm_CHECK_ALL_TYPES.
29483         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
29484         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
29485         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
29486         The check for ssize_t was mistakenly run before the test for unistd.h.
29487
29488         The configure-time check for stdbool.h was missing.
29489         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
29490         (jm_PREREQ_HASH): New function.
29491
29492 2001-01-17  Jim Meyering  <meyering@lucent.com>
29493
29494         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
29495         for autoconf-2.49c.
29496         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
29497
29498 2001-01-16  Jim Meyering  <meyering@lucent.com>
29499
29500         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
29501         From Bruno Haible.
29502
29503 2001-01-14  Jim Meyering  <meyering@lucent.com>
29504
29505         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
29506         foo and bar.  Create conftestdir/ in the script, not in the C code.
29507         Remove directories in the script, not in the C code.
29508         Remove conftestdir{,2} before trying to create the directory.
29509         Make the entire configure script fail if the mkdir fails.
29510
29511 2001-01-14  Jim Meyering  <meyering@lucent.com>
29512
29513         * lib/rename.c: New file.  From Volker Borchert.
29514         Include stdlib.h, string.h or strings.h, and xalloc.h.
29515         Use strip_trailing_slashes rather than open-coding it.
29516
29517 2001-01-03  Paul Eggert  <eggert@twinsun.com>
29518
29519         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
29520
29521 2001-01-03  Jim Meyering  <meyering@lucent.com>
29522
29523         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
29524         of local `inptr' to avoid warning with some system declarations of
29525         iconv.
29526
29527 2001-01-02  Volker Borchert  <bt@teknon.de>
29528
29529         * m4/rename.m4: New file.
29530         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
29531
29532 2001-01-01  Jim Meyering  <meyering@lucent.com>
29533
29534         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
29535         even on systems with utmpx.h.  It's necessary for the declaration of
29536         utmp's ut_user member.  Reported by Andreas Jaeger.
29537
29538         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
29539         available. They are required for the declarations of getgrgid and
29540         getpwuid resp.
29541         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
29542         Reported by Andreas Jaeger.
29543
29544 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
29545
29546         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
29547         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
29548         so `make install' also works in VPATH builds.
29549
29550 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
29551
29552         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
29553         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
29554         can be used in subdirectories.
29555
29556 2000-12-29  Paul Eggert  <eggert@twinsun.com>
29557
29558         * lib/modechange.c: Do not assume that mode_t uses the
29559         traditional octal encoding.  E.g. "chmod 1 FOO" should set
29560         the other-execute bit of FOO even if S_IXOTH != 1.
29561
29562         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
29563         WOTH, XOTH, ALLM): New macros.
29564         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
29565          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
29566         Use them.
29567         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
29568         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
29569         (mode_compile):
29570         No need to use uintmax_t; unsigned long is long enough.
29571         Don't bother to get suffix since we don't use it.
29572
29573 2000-12-26  Jim Meyering  <meyering@lucent.com>
29574
29575         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
29576         better with autoheader.
29577
29578 2000-12-24  Jim Meyering  <meyering@lucent.com>
29579
29580         * lib/hash.c (is_prime): Return explicit boolean values.
29581         (hash_get_first): Return NULL to appease Irix5.6's 89.
29582         Reported by Nelson Beebe.
29583
29584 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
29585
29586         * lib/localcharset.c (locale_charset): Add support for Win32.
29587
29588 2000-12-18  Paul Eggert  <eggert@twinsun.com>
29589
29590         * lib/physmem.h, lib/physmem.c: New files.
29591
29592         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
29593         (noinst_HEADERS): Add physmem.h.
29594
29595         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
29596         't' for compatibility with Solaris 8 sort.
29597
29598 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
29599
29600         * lib/config.charset: Add support for BeOS.
29601
29602 2000-12-17  Jim Meyering  <meyering@lucent.com>
29603
29604         * m4/dos.m4 (jm_AC_DOS): New file and macro.
29605         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
29606
29607 2000-12-16  Jim Meyering  <meyering@lucent.com>
29608
29609         This bug had a serious impact on chown: `chown N:M FILE' (for integer
29610         N and M) would have treated it like `chown N:N FILE'.
29611
29612         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
29613
29614 2000-12-16  Jim Meyering  <meyering@lucent.com>
29615
29616         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
29617         SHELLS_FILE to a file name that's useful on djgpp systems.
29618         Include stdlib.h.
29619         (ADDITIONAL_DEFAULT_SHELLS): Define.
29620         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
29621         Based mostly on a patch from Prashant TR.
29622
29623 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
29624
29625         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
29626         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
29627         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
29628
29629 2000-12-08  Andreas Schwab  <schwab@suse.de>
29630
29631         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
29632         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
29633
29634 2000-12-07  Jim Meyering  <meyering@lucent.com>
29635
29636         * lib/stripslash.c (ISSLASH): Define.
29637         (strip_trailing_slashes): Use ISSLASH rather than comparing against
29638         `/'.
29639         From Prashant TR.
29640
29641         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
29642         (dir_name_r): Declare this function as static.
29643         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
29644         manifest itself on a name containing a mix of slashes and
29645         backslashes.
29646         Make this function work with names starting with a DOS-style
29647         drive letter and colon prefix.
29648         (dir_name): Append `.' if necessary.
29649         Based mostly on patches from Prashant TR and Eli Zaretskii.
29650
29651         * lib/dirname.h (dir_name_r): Remove prototype.
29652
29653 2000-12-06  Paul Eggert  <eggert@twinsun.com>
29654
29655         * m4/off_t-format.m4: Remove this file.
29656         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
29657
29658 2000-12-06  Jim Meyering  <meyering@lucent.com>
29659
29660         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
29661         replacement strtoull, we may well need the replacement strtoul, too.
29662         Check for declarations of strtoul and strtoull.
29663         Check for strtol.  Mainly as a cue to cause automake to include
29664         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
29665         Check for limits.h -- strtol.c needs it.
29666
29667 2000-12-05  Jim Meyering  <meyering@lucent.com>
29668
29669         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
29670
29671 2000-12-04  Jim Meyering  <meyering@lucent.com>
29672
29673         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
29674         Also include memory.h, stdlib.h, unistd.h if appropriate.
29675         Reported by Andreas Jaeger (conflicting declaration of malloc).
29676
29677 2000-12-02  Jim Meyering  <meyering@lucent.com>
29678
29679         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
29680         * m4/jm-macros.m4 (jm_MACROS): require it.
29681
29682 2000-12-02  Jim Meyering  <meyering@lucent.com>
29683
29684         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
29685
29686 2000-12-01  Paul Eggert  <eggert@twinsun.com>
29687
29688         * lib/memrchr.c: Include <config.h> before any system include file.
29689
29690 2000-11-30  Jim Meyering  <meyering@lucent.com>
29691
29692         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
29693
29694 2000-11-30  Jim Meyering  <meyering@lucent.com>
29695
29696         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
29697
29698 2000-11-29  Paul Eggert  <eggert@twinsun.com>
29699
29700         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
29701
29702 2000-11-26  Jim Meyering  <meyering@lucent.com>
29703
29704         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
29705
29706 2000-11-22  Paul Eggert  <eggert@twinsun.com>
29707
29708         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
29709         size of (size_t) -1; it's not portable.
29710
29711 2000-11-17  Jim Meyering  <meyering@lucent.com>
29712
29713         * lib/strstr.c: Update from GNU libc.
29714
29715 2000-11-17  Akim Demaille  <akim@epita.fr>
29716
29717         * lib/obstack.h: Formatting changes.
29718         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
29719         prevent type checking.
29720         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
29721         cast the value to (void *): assigning a `foo *' to a `void *'
29722         variable is valid.
29723         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
29724
29725 2000-11-16  Jim Meyering  <meyering@lucent.com>
29726
29727         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
29728
29729 2000-11-11  Jim Meyering  <meyering@lucent.com>
29730
29731         * lib/error.c: Add a couple #includes, merging from GNU libc version.
29732
29733 2000-11-10  Jim Meyering  <meyering@lucent.com>
29734
29735         * lib/obstack.h: Update from GNU libc.
29736         * lib/obstack.c: Likewise.
29737
29738 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
29739
29740         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
29741
29742 2000-11-06  Paul Eggert  <eggert@twinsun.com>
29743
29744         * lib/getusershell.c (setusershell): Use rewind rather than
29745         fseek/fseeko, to avoid configuration hassles with fseeko.
29746         Don't bother opening SHELLS_FILE if shellstream is NULL;
29747         it's not necessary.
29748
29749 2000-11-05  Jim Meyering  <meyering@lucent.com>
29750
29751         * lib/makepath.h (make_dir): Declare.
29752         * lib/makepath.c (make_dir): Remove `static' attribute.
29753         Tweak a comment.
29754
29755 2000-11-04  Jim Meyering  <meyering@lucent.com>
29756
29757         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
29758
29759 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
29760
29761         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
29762         last one in a bucket, advance to the next bucket.
29763
29764 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
29765
29766         * lib/fnmatch.c: Do not comment out all the code if we are using
29767         the GNU C library, because in some cases we are replacing buggy
29768         code in the GNU C library itself.
29769
29770 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
29771
29772         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
29773         (regex_compile): Catch bogus \(\1\).
29774
29775 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29776
29777         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
29778         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
29779         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
29780
29781 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29782
29783         * lib/error.h, getline.h, modechange.h:
29784         Remove "2000" from Copyright line, as the file hasn't been
29785         changed this year other than in the copyright notice.
29786
29787         * lib/xalloc.h: Add "2000" to Copyright line, as this file
29788         was changed this year.
29789
29790 2000-10-29  Jim Meyering  <meyering@lucent.com>
29791
29792         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
29793         renaming.
29794         * m4/ls-mntd-fs.m4: Likewise
29795
29796 2000-10-29  Jim Meyering  <meyering@lucent.com>
29797
29798         * lib/xstat.in: Fix grammar in comment.
29799
29800 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
29801
29802         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
29803         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
29804         doesn't define __restrict_arr.
29805
29806 2000-10-28  Jim Meyering  <meyering@lucent.com>
29807
29808         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
29809         (jm_PREREQ_MEMCHR): New function.
29810
29811 2000-10-28  Jim Meyering  <meyering@lucent.com>
29812
29813         * lib/memchr.c: Update from libc.
29814         Adjust for portability:
29815         [HAVE_STDLIB_H]: Include stdlib.h.
29816         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
29817         Undef __memchr, too.
29818         [!weak_alias]: Define __memchr to memchr.
29819
29820         * lib/regex.c: Update from libc.
29821         * lib/regex.h: Likewise.
29822         * lib/getopt1.c: Likewise.
29823         * lib/memcmp.c: Likewise.
29824
29825         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
29826         Avoid using fseek, when possible -- it's broken by design.
29827         Patch by Ulrich Drepper.
29828
29829 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
29830
29831         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
29832         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
29833         Giving in to popular pressure to shut up the compiler with casts.
29834
29835 2000-10-26  Jim Meyering  <meyering@lucent.com>
29836
29837         * lib/strftime.c: Update from libc.
29838
29839 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
29840
29841         * regex.c: More `unsigned char' -> `re_char' changes.
29842         Also change several `int' into `re_wchar_t'.
29843         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
29844         (PUSH_FAILURE_POINTER): Don't cast any more.
29845         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
29846         We want GCC to complain, since this piece of code makes
29847         re_match non-reentrant, which *should* be fixed.
29848         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
29849         (EXTEND_BUFFER): Use RETALLOC.
29850         (SET_LIST_BIT): Don't cast.
29851         (re_wchar_t): New type.
29852         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
29853         that those two functions will always properly return.
29854         (IMMEDIATE_QUIT_CHECK): Cast to void.
29855         (analyse_first): Use recursion rather than an explicit stack.
29856         (re_compile_fastmap): Can't fail anymore.
29857         (re_search_2): Don't check re_compile_fastmap for failure.
29858         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
29859         Now also sets the new value (passed in a new argument).
29860         (re_match_2_internal): Use it.
29861         Also, use a new var `reg' of type size_t when looping through regs
29862         rather than reuse the inappropriate `mcnt'.
29863
29864 2000-10-25  Jim Meyering  <meyering@lucent.com>
29865
29866         * lib/obstack.c: Update from libc.
29867
29868 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
29869
29870         * regex.c (regex_compile): Change the way of handling a range from
29871         a char less than 256 to a char not less than 256.
29872
29873 2000-10-24  Andrew Innes  <andrewi@gnu.org>
29874
29875         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
29876         NT-Emacs only.
29877         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
29878         so that re_search functions only quit when callers expect them to.
29879
29880 2000-10-23  Jim Meyering  <meyering@lucent.com>
29881
29882         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
29883         wrong.  That set_locale call must not have any side effects.
29884         From Paul Eggert.
29885
29886 2000-10-22  Jim Meyering  <meyering@lucent.com>
29887
29888         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
29889         [CYCLIC]: Remove now-unused definition.
29890
29891         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
29892         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
29893         Suggestion from Ulrich Drepper.
29894
29895 2000-10-21  Jim Meyering  <meyering@lucent.com>
29896
29897         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
29898         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
29899         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
29900
29901 2000-10-21  Jim Meyering  <meyering@lucent.com>
29902
29903         * lib/dirname.c (memrchr): Declare if necessary.
29904         (dir_name): Remove the restriction that there be no
29905         trailing slashes.  Now, this code skips past them, effectively
29906         ignoring them.
29907         [TEST_DIRNAME] (main): New unit tests.
29908
29909         * lib/memrchr.c: New file from GNU libc.
29910         Undef __memrchr, too.
29911         [!weak_alias]: Define __memrchr to memrchr.
29912         Guard weak_alias use with `#ifdef weak_alias'.
29913
29914 2000-10-21  Jim Meyering  <meyering@lucent.com>
29915
29916         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
29917         (dir_name): Use dir_name_r.
29918         * lib/dirname.h (dir_name_r): Declare it.
29919
29920 2000-10-17  Jim Meyering  <meyering@lucent.com>
29921
29922         * lib/quote.h (PARAMS): Define and use.
29923         Reported by Akim Demaille.
29924
29925         * lib/getopt.c: Update from libc.
29926
29927 2000-10-16  Jim Meyering  <meyering@lucent.com>
29928
29929         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
29930         setlocale.
29931         From Jan Fedak.
29932
29933 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
29934
29935         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
29936
29937 2000-09-25  Jim Meyering  <meyering@lucent.com>
29938
29939         * lib/md5.h (rol): Define (from GnuPG).
29940
29941         * lib/sha.c: Give credit (GnuPG) where due.
29942         (M): Use rol rather than open-coding it.
29943         Add a FIXME comment.
29944
29945 2000-09-21  Jim Meyering  <meyering@lucent.com>
29946
29947         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
29948         Reported by Michael Stone.
29949
29950 2000-09-20  Jim Meyering  <meyering@lucent.com>
29951
29952         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
29953         (noinst_HEADERS): Add sha.h.
29954         Based on code from Scott G. Miller and from GnuPG.
29955
29956 2000-09-18  Jim Meyering  <meyering@lucent.com>
29957
29958         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
29959         LIBS. Otherwise, everyone ends up linking with -lelf for some
29960         configurations.
29961         Reported by Mike Stone.
29962
29963 2000-09-15  Jim Meyering  <meyering@lucent.com>
29964
29965         * lib/regex.c: Update from libc.
29966
29967 2000-09-10  Jim Meyering  <meyering@lucent.com>
29968
29969         * lib/getopt.c (_getopt_internal): Update from glibc.
29970
29971 2000-09-09  Jim Meyering  <meyering@lucent.com>
29972
29973         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
29974         think it should be used as a general replacement for isascii.
29975         * lib/fnmatch.c: Likewise.
29976         * lib/mbswidth.c: Likewise
29977         * lib/regex.c: Likewise.
29978
29979         Don't use atoi.
29980         * lib/userspec.c: Include sys/param.h and limits.h.
29981         Include xstrtol.h.
29982         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
29983         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
29984         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
29985         UID, GID.  Check range.
29986
29987 2000-09-06  Jim Meyering  <meyering@lucent.com>
29988
29989         * lib/getopt.c (_getopt_internal): Update from glibc.
29990
29991 2000-08-30  Jim Meyering  <meyering@lucent.com>
29992
29993         * lib/strftime.c: Merge in changes from GNU libc.
29994
29995 2000-08-26  Jim Meyering  <meyering@lucent.com>
29996
29997         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
29998         * m4/fpending.m4: New file.
29999
30000 2000-08-26  Jim Meyering  <meyering@lucent.com>
30001
30002         * lib/closeout.c: Include "__fpending.h".
30003         (close_stdout_status): Return right away if there's nothing to flush.
30004
30005         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
30006         * lib/__fpending.c: New file.
30007         * lib/__fpending.h: New file.
30008
30009 2000-08-20  Jim Meyering  <meyering@lucent.com>
30010
30011         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
30012         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
30013         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
30014
30015 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
30016
30017         Improve fileutils installation on systems where running
30018         programs (like install) can't be unlinked.
30019         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
30020         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
30021
30022 2000-08-07  Paul Eggert  <eggert@twinsun.com>
30023
30024         Standardize on "memory exhausted" instead of "Memory exhausted"
30025         or "virtual memory exhausted".
30026         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
30027         "virtual memory exhausted".
30028         * lib/same.c (same_name): Invoke xalloc_die instead of printing
30029         our own message.
30030         * lib/userspec.c (parse_user_spec): Likewise.
30031         * lib/bumpalloc.h: comment fix
30032         * lib/same.c, userspec.c: Include xalloc.h.
30033
30034         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
30035         not char *const and pointing to a constant array.
30036         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
30037         (xrealloc): Comment fix.
30038
30039         * lib/userspec.c (parse_user_spec):
30040         Don't translate a message until just before returning,
30041         to avoid unnecessary translation.
30042
30043 2000-08-07  Jim Meyering  <meyering@lucent.com>
30044
30045         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
30046         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
30047         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
30048         getgroups.c, gethostname.c, getopt.h, group-member.c,
30049         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
30050         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
30051         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
30052         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
30053         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
30054         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
30055         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
30056         yesno.c: Back out Copyright date changes for each file with no change
30057         this year.  This eases coordination with other programs using the same
30058         source code modules.  From Paul Eggert.
30059
30060 2000-08-06  Paul Eggert  <eggert@twinsun.com>
30061
30062         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30063         not char, for compatibility with glibc 2.1.3 strftime.c.
30064
30065 2000-08-03  Greg McGary  <greg@mcgary.org>
30066
30067         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30068         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30069         (EXTEND_BUFFER): Use them.
30070
30071 2000-08-01  Jim Meyering  <meyering@lucent.com>
30072
30073         * lib/dirname.c (ISSLASH): Define.
30074         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30075         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30076         both `\' and `/' may be use as path separators.
30077         Based on a patch from Prashant TR.
30078
30079 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30080
30081         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30082         slot vector a constant, since it might get modified.
30083
30084 2000-07-31  Jim Meyering  <meyering@lucent.com>
30085
30086         * lib/xmalloc.c: Use `virtual memory exhausted', not
30087         `Memory exhausted'.
30088         * lib/obstack.c (print_and_abort): Likewise.
30089
30090 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30091
30092         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30093         buffer, so that the caller can always quote one small
30094         component of a "memory exhausted" message in slot 0.
30095         From a suggestion by Jim Meyering.
30096
30097 2000-07-30  Jim Meyering  <meyering@lucent.com>
30098
30099         * lib/makepath.c (make_path): Quote the other instance, too.
30100
30101         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30102         (STATIC_BUF_SIZE): Define.
30103         (quotearg_n_options): Use only statically allocated storage when
30104         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30105         than STATIC_BUF_SIZE.
30106
30107 2000-07-29  Jim Meyering  <meyering@lucent.com>
30108
30109         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30110         * lib/dirname.c (dir_name): Likewise.
30111
30112         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30113         `/'.
30114
30115         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30116         (dir_name): Assert that there are no trailing slashes.
30117
30118 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30119
30120         * lib/mbswidth.h (mbswidth): Add a flags argument.
30121         (mbswidth): New declaration.
30122         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30123         * lib/mbswidth.c (mbswidth): Add a flags argument.
30124         (mbsnwidth): New function.
30125
30126 2000-07-24  Jim Meyering  <meyering@lucent.com>
30127
30128         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30129
30130 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30131
30132         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30133
30134 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30135
30136         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30137         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30138         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30139         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30140         invoke multibyte primitives.
30141
30142 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30143
30144         * lib/quotearg.c:
30145         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30146         so that mbstate_t is always defined.
30147
30148         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30149         be 1 in at least one GCC installation, and this configuration
30150         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30151         performance on hosts that have mbrtowc but have only unibyte
30152         locales, but I assume these hosts are rare.
30153
30154 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30155
30156         * lib/mbswidth.c (_XOPEN_SOURCE):
30157         Don't define; this causes problems on Solaris 7.
30158         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30159
30160 2000-07-23  Jim Meyering  <meyering@lucent.com>
30161
30162         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30163         too: getgrgid, getpwuid, getuid.
30164
30165 2000-07-23  Jim Meyering  <meyering@lucent.com>
30166
30167         * lib/basename.c (base_name): Add an assertion.
30168
30169 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30170
30171         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30172         shadow its mbsinit function.
30173
30174 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30175
30176         * lib/mbswidth.h: New file.
30177         * lib/mbswidth.c: New file.
30178         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30179         (noinst_HEADERS): Add mbswidth.h.
30180
30181 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30182
30183         * lib/config.charset: Add support for FreeBSD. Improve support for
30184         HP-UX and IRIX 6.
30185
30186 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30187
30188         * m4/mbswidth.m4: New file.
30189         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30190
30191 2000-07-15  Jim Meyering  <meyering@lucent.com>
30192
30193         * lib/makepath.c: Include quote.h.
30194         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30195         corresponding argument in a `quote (...)' call.
30196         Give better diagnostics.
30197
30198         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30199         (noinst_HEADERS): Add quote.h.
30200
30201         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30202         from tar's src/misc.c.
30203         * lib/quote.h: New file.  Prototypes for same.
30204
30205 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30206
30207         From a suggestion by Bruno Haible.
30208         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30209         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30210         to decide whether to define the BeOS workaround macro;
30211         this adjusts to the change to AC_MBSTATE_T.
30212
30213 2000-07-14  Jim Meyering  <meyering@lucent.com>
30214
30215         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30216         jm_AC_TYPE_UINTMAX_T.
30217
30218 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30219
30220         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30221
30222         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30223         quotearg_buffer_restyled): Add support for
30224         clocale_quoting_style.  Undo previous change to
30225         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30226         and "{RIGHT QUOTATION MARK}" msgids.
30227
30228 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30229
30230         From a suggestion by Bruno Haible.
30231         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30232         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30233         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30234         and mbstate_t, to a single-part test that simply defines mbstate_t.
30235         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30236         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30237
30238 2000-07-10  Jim Meyering  <meyering@lucent.com>
30239
30240         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30241
30242         * m4/gnu-source.m4: Output to confdefs.h directly.
30243         Suggestion from Akim Demaille.
30244
30245 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30246
30247         The old behavior of quoting `like this' doesn't look good with
30248         newer, ISO-style fonts.  See:
30249         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30250
30251         Instead, quote "like this" by default.  Let the translator
30252         tailor the locale-specific quoting behavior by providing
30253         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30254
30255         * lib/quotearg.c (N_): New macro.
30256         (gettext_default): New function.
30257         (quotearg_buffer_restyled): Use
30258         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30259         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30260
30261 2000-07-09  Jim Meyering  <meyering@lucent.com>
30262
30263         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30264         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30265
30266         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30267         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30268
30269 2000-07-09  Jim Meyering  <meyering@lucent.com>
30270
30271         * lib/Most files: Update copyright dates to include 2000.
30272
30273 2000-07-08  Jim Meyering  <meyering@lucent.com>
30274
30275         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30276         if not defined.
30277         (xgethostname): Remove now-unnecessary #ifdef.
30278         Move declaration of `err' into loop where it's used.
30279
30280 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30281         and Bruno Haible  <haible@clisp.cons.org>
30282
30283         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30284         only if the test for an object-type mbstate_t fails.  This
30285         prevents us from mistakenly reporting that mbstate_t is a
30286         system object type after we "#define mbstate_t int" to work
30287         around its lack.
30288
30289 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30290         and Bruno Haible  <haible@clisp.cons.org>
30291
30292         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30293
30294 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30295
30296         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30297         to strerror_r.
30298         Include <ctype.h> for use of isalpha.
30299
30300 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30301
30302         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30303         by allocating a larger buffer. Test the gethostname return value for
30304         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30305         returns an error and ENAMETOOLONG isn't defined.
30306
30307 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30308
30309         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30310         dimension.
30311
30312 2000-07-04  Jim Meyering  <meyering@lucent.com>
30313
30314         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30315         of the deprecated AC_CHECKING.
30316
30317 2000-07-04  Jim Meyering  <meyering@lucent.com>
30318
30319         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30320         Reported by Bruno Haible.
30321
30322 2000-07-04  Jim Meyering  <meyering@lucent.com>
30323
30324         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30325         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30326         lacks mbrtowc.
30327
30328 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30329
30330         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30331         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30332
30333 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30334         and Bruno Haible  <haible@clisp.cons.org>
30335
30336         * lib/quotearg.c (mbrtowc):
30337         Assign to *pwc, and return 1 only if result is nonzero.
30338         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30339
30340 2000-07-03  Jim Meyering  <meyering@lucent.com>
30341
30342         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30343
30344 2000-07-03  Jim Meyering  <meyering@lucent.com>
30345
30346         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30347         This is necessary to get a definition of e.g., UTMP_FILE on
30348         HP-UX 10.20.
30349         From Bob Proulx.
30350
30351 2000-07-02  Jim Meyering  <meyering@lucent.com>
30352
30353         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
30354
30355         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
30356         AC_LIBOBJ(function_name).
30357         * m4/chown.m4: Likewise.
30358         * m4/fnmatch.m4: Likewise.
30359         * m4/ftruncate.m4: Likewise.
30360         * m4/getgroups.m4: Likewise.
30361         * m4/getline.m4: Likewise.
30362         * m4/group-member.m4: Likewise.
30363         * m4/jm-macros.m4: Likewise.
30364         * m4/lstat.m4: Likewise.
30365         * m4/malloc.m4: Likewise.
30366         * m4/memcmp.m4: Likewise.
30367         * m4/nanosleep.m4: Likewise.
30368         * m4/putenv.m4: Likewise.
30369         * m4/realloc.m4: Likewise.
30370         * m4/regex.m4: Likewise.
30371         * m4/stat.m4: Likewise.
30372         * m4/strftime.m4: Likewise.
30373
30374 2000-07-02  Jim Meyering  <meyering@lucent.com>
30375
30376         * lib/quotearg.c (mbstate_t): Don't define here.
30377
30378 2000-07-02  Jim Meyering  <meyering@lucent.com>
30379
30380         * lib/nanosleep.c (SIGCONT): Define if not already defined.
30381
30382 2000-07-01  Jim Meyering  <meyering@lucent.com>
30383
30384         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
30385
30386 2000-07-01  Jim Meyering  <meyering@lucent.com>
30387
30388         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
30389         problem.
30390
30391 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30392
30393         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
30394         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
30395
30396 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30397
30398         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
30399         per change in ../m4/ls-mntd-fs.m4.
30400         (read_filesystem_list): Ignore symbolic links.
30401
30402 2000-06-29  Jim Meyering  <meyering@lucent.com>
30403
30404         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
30405         for declaration of strcmp.
30406
30407         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
30408
30409         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
30410         Avoid warning by casting result to `char *' to remove `const'.
30411
30412 2000-06-28  Jim Meyering  <meyering@lucent.com>
30413
30414         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
30415         included by quotearg.c, for which we perform this test.  From
30416         Bruno Haible.
30417
30418 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30419
30420         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
30421         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
30422         <utmpx.h> exists, put readutmp.o into LIBOBJS.
30423
30424 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30425
30426         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
30427
30428 2000-06-26  Paul Eggert  <eggert@twinsun.com>
30429
30430         savedir now sets errno on failure and invokes xmalloc to get memory.
30431         Fix a couple of other minor bugs while we're at it.
30432
30433         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
30434         (NAMLEN): Remove macro.
30435         (malloc, realloc): Remove decls.
30436         (stpcpy): Likewise.
30437         ("xalloc.h"): Include.
30438         (NAME_SIZE_DEFAULT): New macro.
30439         (savedir): Use xmalloc / xrealloc to allocate memory.
30440         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
30441         Skip "" directory entries.
30442         Use strlen to calculate directory entry length, since the old method
30443         is rarely used these days and isn't worth supporting.
30444         Don't use a pointer after freeing it.
30445         Check for integer overflow when calculating allocation size.
30446         Use memcpy to copy entries, instead of stpcpy.
30447         Set errno properly when returning NULL.
30448         Check for readdir error.
30449
30450 2000-06-26  Jim Meyering  <meyering@lucent.com>
30451
30452         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
30453
30454 2000-06-25  Jim Meyering  <meyering@lucent.com>
30455
30456         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
30457         Linux header bug when _XOPEN_SOURCE is defined to 500.
30458
30459 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30460
30461         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
30462         deficiency.
30463
30464 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30465
30466         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
30467         Include xalloc.h.
30468         Don't include <stdlib.h>.  Don't declare malloc, realloc.
30469
30470 2000-06-24  Jim Meyering  <meyering@lucent.com>
30471
30472         * m4/strerror_r.m4: Revive this file -- to try out an experimental
30473         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
30474         for which strerror does return char*, but which lacks a conveniently
30475         accessible declaration of the function.  If the compile-test says
30476         strerror_r doesn't work, then resort to a `run'-test that works on
30477         BeOS and segfaults on DEC Unix.
30478
30479 2000-06-24  Jim Meyering  <meyering@lucent.com>
30480
30481         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
30482
30483 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30484
30485         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
30486         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
30487
30488 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30489
30490         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
30491         (mbrtowc, mbstate_t): Define substitutes if
30492         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
30493         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
30494         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
30495
30496 2000-06-23  Jim Meyering  <meyering@lucent.com>
30497
30498         * m4/afs.m4: Add missing AC_MSG_RESULT.
30499         Reported by Bruno Haible.
30500
30501         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
30502         Suggestion from Bruno Haible.
30503
30504 2000-06-23  Jim Meyering  <meyering@lucent.com>
30505
30506         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
30507
30508 2000-06-21  Jim Meyering  <meyering@lucent.com>
30509
30510         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
30511
30512 2000-06-21  Jim Meyering  <meyering@lucent.com>
30513
30514         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
30515         (noinst_HEADERS): Add getstr.h.
30516
30517         * lib/getline.c (getstr): Move into a separate file.
30518         * lib/getstr.c (getstr): New file, extracted from getline.c, with
30519         the following changes: new parameter, delim2; both delim[12]
30520         parameters have type `int', not `char'.  The latter would lose
30521         with 8-bit delimiters.
30522         * lib/getstr.h: New file.
30523
30524 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30525
30526         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
30527         than 1024, return a memory chunk of least possible size, instead
30528         of size PATH_MAX + 2. In the loop, increment the size proportionally.
30529         Use free/xmalloc instead of xrealloc to avoid copying for very long
30530         paths.
30531
30532 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30533
30534         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
30535         the empty string.
30536
30537 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30538
30539         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
30540         address, not strdup.  Include <stdlib.h> and don't declare free().
30541
30542 2000-06-19  Jim Meyering  <meyering@lucent.com>
30543
30544         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
30545
30546 2000-06-18  Jim Meyering  <meyering@lucent.com>
30547
30548         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
30549
30550         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
30551         `checking whether...' message to be consistent with that of the
30552         lstat test.
30553
30554 2000-06-18  Jim Meyering  <meyering@lucent.com>
30555
30556         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
30557         Besides, these days every porting target provides a mkdir function.
30558
30559         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
30560         needed. (this snippet comes from src/system.h).
30561
30562 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
30563
30564         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
30565
30566 2000-06-15  Paul Eggert  <eggert@twinsun.com>
30567
30568         * lib/human.c (adjust_value): New function.
30569         (human_readable_inexact): Apply rounding style even when
30570         printing approximate values.
30571
30572 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30573
30574         * lib/human.c (human_readable_inexact): Allow an input block
30575         size that is not a multiple of the output block size, and vice versa.
30576         Reported by Piergiorgio Sartor.
30577
30578 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30579
30580         * lib/getdate.y (get_date): Apply relative times after time
30581         zone indicator, not before.  Reported by Todd A. Jacobs.
30582
30583 2000-06-13  Jim Meyering  <meyering@lucent.com>
30584
30585         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
30586
30587         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
30588
30589 2000-06-12  Paul Eggert  <eggert@twinsun.com>
30590
30591         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
30592
30593 2000-06-12  Jim Meyering  <meyering@lucent.com>
30594
30595         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
30596         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
30597         optional argument.
30598         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
30599         the optional argument, `lib'.
30600
30601 2000-06-08  Jim Meyering  <meyering@lucent.com>
30602
30603         * m4/largefile.m4: Remove file (now that it's part of autoconf).
30604
30605 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30606
30607         Rewrite largefile configuration so that we don't need to run
30608         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
30609         AC_CANONICAL_HOST in configure.in -- jmm]
30610
30611         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
30612         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
30613         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
30614         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
30615         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
30616         All uses changed.
30617         Instead of inspecting the output of getconf, try to compile the
30618         test program without and with the macro definition.
30619         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
30620         for getconf.  Instead, check for the needed flags by compiling
30621         test programs.
30622
30623 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30624
30625         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
30626
30627 2000-06-04  Jim Meyering  <meyering@lucent.com>
30628
30629         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
30630         SunOS 4.1.4 for which gid_t is an unsigned type.
30631
30632 2000-06-03  Jim Meyering  <meyering@lucent.com>
30633
30634         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
30635         now that autoconf requires that.
30636
30637         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
30638         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
30639         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
30640
30641 2000-06-03  Jim Meyering  <meyering@lucent.com>
30642
30643         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
30644
30645 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30646
30647         * m4/glibc21.m4: New file.
30648         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
30649
30650 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30651
30652         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
30653         newer, don't install charset.alias.
30654         * lib/config.charset: Change the Linux/glibc rules so they become empty
30655         on glibc-2.1 or newer.
30656
30657 2000-06-02  Jim Meyering  <meyering@lucent.com>
30658
30659         * lib/mountlist.c: Back out last change.  Instead, do this...
30660         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
30661         me_dummy member using the same `ignore'-testing code.
30662         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
30663         fs_type strings.
30664         From Mark D. Roth.
30665
30666 2000-05-29  Jim Meyering  <meyering@lucent.com>
30667
30668         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
30669         mounts with the `ignore' attribute.  Based on a patch from
30670         Mark D. Roth.
30671
30672 2000-05-28  Jim Meyering  <meyering@lucent.com>
30673
30674         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
30675         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30676         * m4/stat.m4: Likewise.
30677         * m4/lstat.m4: Likewise.
30678         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
30679
30680         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
30681         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
30682
30683 2000-05-26  Jim Meyering  <meyering@lucent.com>
30684
30685         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
30686
30687 2000-05-24  Jim Meyering  <meyering@lucent.com>
30688
30689         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
30690         autoconf requires that.
30691         * m4/lib-check.m4: Likewise.
30692         * m4/jm-macros.m4: Likewise.
30693         * m4/strftime.m4: Likewise.
30694
30695         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
30696         AC_CHECK_DECLS, now that autoconf requires that.
30697
30698 2000-05-22  Jim Meyering  <meyering@lucent.com>
30699
30700         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30701         * m4/lstat.m4: Likewise.
30702
30703 2000-05-22  Jim Meyering  <meyering@lucent.com>
30704
30705         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
30706
30707 2000-05-20  Jim Meyering  <meyering@lucent.com>
30708
30709         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
30710         (jm_PREREQ): Use it.
30711
30712 2000-05-18  Jim Meyering  <meyering@lucent.com>
30713
30714         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
30715         back, too, since it may have been modified by allocate_entry.
30716         (hash_delete): Rewrite to use neither the assignment operator
30717         nor the comma operator in an if-expression.
30718
30719 2000-05-15  Paul Eggert  <eggert@twinsun.com>
30720
30721         * lib/closeout.c:
30722         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
30723         Remove; no longer needed.
30724         "quotearg.h": Add include.
30725         (file_name): Do not bother to explicitly initialize to NULL; it's less
30726         efficient on some hosts.
30727         (close_stdout_status): Remove test as to whether stdout was already
30728         closed; it breaks for the case "echo x | sort >&-".
30729         Quote file name colons.
30730         Do not assume that _("write error") lacks format strings.
30731
30732 2000-05-15  Jim Meyering  <meyering@lucent.com>
30733
30734         * lib/version-etc.c (version_etc_copyright): Update the copyright
30735         string used in all --version output.
30736
30737 2000-05-14  Jim Meyering  <meyering@lucent.com>
30738
30739         * lib/closeout.c (close_stdout_set_file_name): New function.
30740         (close_stdout_status): Use new file-scoped global.
30741         Return right away if fstat says the stdout file descriptor is invalid.
30742         * lib/closeout.h (close_stdout_set_file_name): Declare.
30743
30744 2000-05-10  Jim Meyering  <meyering@lucent.com>
30745
30746         * lib/closeout.c [default_exit_status]: New file-scoped variable.
30747         (close_stdout_set_status): New function.
30748         * lib/closeout.h (close_stdout_set_status): Declare.
30749
30750 2000-05-09  Jim Meyering  <meyering@lucent.com>
30751
30752         * m4/gettext.m4: Rename this...
30753         * m4/libintl.m4: ...to this.
30754
30755 2000-05-08  Jim Meyering  <meyering@lucent.com>
30756
30757         * lib/long-options.c: Don't include closeout.h.
30758         (parse_long_options): Don't call close_stdout for --version.
30759
30760 2000-05-06  Paul Eggert  <eggert@twinsun.com>
30761
30762         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
30763         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
30764         2.1.3 bug.  This avoids a clash when files like regex.c define
30765         _GNU_SOURCE.
30766
30767 2000-05-06  Jim Meyering  <meyering@lucent.com>
30768
30769         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
30770         (AC_REPLACE_FUNCS): Add strnlen.
30771
30772         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
30773         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
30774
30775         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
30776         AC_SEARCH_LIBS call for nanosleep.
30777         (LIB_NANOSLEEP): Set and AC_SUBST.
30778
30779 2000-05-06  Jim Meyering  <meyering@lucent.com>
30780
30781         * lib/strnlen.c: Undefine __strnlen and strnlen.
30782         [!weak_alias]: Define __strnlen to strnlen.
30783
30784         * lib/atexit.c: New file, from libiberty.
30785
30786 2000-05-06  Jim Meyering  <meyering@lucent.com>
30787
30788         * lib/closeout.c (close_stdout_status): Also check for errors on the
30789         stderr stream.
30790
30791 2000-05-05  Jim Meyering  <meyering@lucent.com>
30792
30793         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
30794         AC_SEARCH_LIBS call for clock_gettime.
30795         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
30796
30797         * m4/search-libs.m4: Update from autoconf.
30798
30799         su doesn't work on Solaris 2.6.
30800         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
30801         <shadow.h>.  Reported by Dragos Harabor.
30802
30803 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
30804
30805         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
30806         memcpy instead of xmalloc, xrealloc, path_concat.
30807         (locale_charset): Treat empty environment variables as absent.
30808         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
30809
30810 2000-05-04  Jim Meyering  <meyering@lucent.com>
30811
30812         * lib/getopt.c: Update from glibc.
30813         * lib/obstack.c: Likewise.
30814         * lib/obstack.h: Likewise.
30815         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
30816         file
30817
30818         * lib/regex.h: Likewise.
30819         * lib/strndup.c: Likewise.
30820         * lib/strnlen.c: New file, from glibc.
30821
30822 2000-05-03  Jim Meyering  <meyering@lucent.com>
30823
30824         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
30825
30826 2000-05-02  Paul Eggert  <eggert@twinsun.com>
30827
30828         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
30829         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
30830         compile-time test, rather than inspecting host and OS, to
30831         decide whether to define _LARGEFILE_SOURCE.
30832
30833 2000-05-01  Jim Meyering  <meyering@lucent.com>
30834
30835         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
30836
30837         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
30838         Based on a patch from Bruno Haible.
30839
30840 2000-05-01  Jim Meyering  <meyering@lucent.com>
30841
30842         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
30843
30844 2000-04-29  Jim Meyering  <meyering@lucent.com>
30845
30846         * lib/path-concat.c: Declare strdup only if it's not defined.
30847         * lib/canon-host.c: Likewise.
30848
30849 2000-04-28  Jim Meyering  <meyering@lucent.com>
30850
30851         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
30852         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
30853         is included first, then limits.h is included by locale.h by libintl.h.
30854         From John David Anglin.
30855
30856 2000-04-25  Jim Meyering  <meyering@lucent.com>
30857
30858         * lib/makepath.c (S_IRWXUGO): Define.
30859         (make_path): Always perform explicit chmod if MODE specifies any
30860         of the `special' permission bits.  Prompted by a bug report against
30861         install from Mate Wierdl and Joost van Baal.
30862
30863 2000-04-18  Jim Meyering  <meyering@lucent.com>
30864
30865         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
30866         (jm_PREREQ): Use it.
30867
30868 2000-04-18  Jim Meyering  <meyering@lucent.com>
30869
30870         * lib/README: New file.
30871
30872         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
30873         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
30874
30875 2000-04-17  Jim Meyering  <meyering@lucent.com>
30876
30877         Get it right :-)
30878         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
30879         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
30880         Suggestion from Akim Demaille.
30881
30882 2000-04-17  Jim Meyering  <meyering@lucent.com>
30883
30884         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
30885         the definition of it to rpl_strftime also defined-away the system's
30886         declaration.
30887
30888 2000-04-15  Jim Meyering  <meyering@lucent.com>
30889
30890         Use `C' to denote so-called `contiguous' files, the same way
30891         that tar does.
30892         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
30893         (ftypelet): Use S_ISCTG.
30894         From Michael Deutschmann.
30895
30896 2000-04-14  Jim Meyering  <meyering@lucent.com>
30897
30898         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
30899         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
30900         clobbered.
30901
30902 2000-04-14  Jim Meyering  <meyering@lucent.com>
30903
30904         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
30905
30906 2000-04-13  Jim Meyering  <meyering@lucent.com>
30907
30908         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
30909         AH_VERBATIM to insert required #ifndef into config.h.in.
30910         Suggestion from Akim Demaille.
30911
30912 2000-04-12  Jim Meyering  <meyering@lucent.com>
30913
30914         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
30915         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
30916         Christian Krackowizer.
30917
30918         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
30919         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
30920         (AC_SYS_LARGEFILE): Require.
30921         (AM_C_PROTOTYPES): Require.
30922
30923 2000-04-08  Jim Meyering  <meyering@lucent.com>
30924
30925         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
30926         names don't conflict.  Reported by Eli Zaretskii.
30927
30928 2000-04-07  Jim Meyering  <meyering@lucent.com>
30929
30930         * lib/putenv.c: Move inclusion of errno.h so it follows that of
30931         sys/types.h, to work around system header problems on AIX 3.2.5.
30932         From Bruno Haible.
30933
30934 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
30935
30936         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
30937         bug.  Deal with the different error behavior of Irix iconv.
30938
30939 2000-04-05  Paul Eggert  <eggert@twinsun.com>
30940
30941         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
30942         IRIX if the installer said otherwise.
30943
30944 2000-04-05  Jim Meyering  <meyering@lucent.com>
30945
30946         Portability tweaks required for ultrix4.3.
30947         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
30948         (jm_CHECK_DECLS): Add getutent to the list of functions.
30949         (_jm_DECL_HEADERS): Add utmpx.h.
30950         From John David Anglin.
30951
30952         * m4/strftime.m4: Back out the 2000-04-02 change.
30953         Instead of that change, simply undefine putenv in the test program.
30954
30955 2000-04-05  Jim Meyering  <meyering@lucent.com>
30956
30957         Portability tweaks required for ultrix4.3.
30958         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
30959         getutent.
30960         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
30961         * lib/canon-host.c: Declare strdup.
30962         * lib/path-concat.c: Likewise.
30963         From John David Anglin.
30964
30965 2000-04-04  Jim Meyering  <meyering@lucent.com>
30966
30967         Be more DOS 8.3-friendly.
30968         * lib/ref-add.sin: Renamed from ref-add.sed.in.
30969         * lib/ref-del.sin: Renamed from ref-del.sed.in.
30970         * lib/Makefile.am: Reflect renaming.
30971         Reported by Eli Zaretskii.
30972
30973         Use a temporary file name that won't clash with `charset.alias'
30974         in the DOS 8.3 name space.
30975         * lib/Makefile.am (charset_tmp): Define.
30976         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
30977         (uninstall-local): Likewise.
30978         Reported by Eli Zaretskii.
30979
30980 2000-04-03  Jim Meyering  <meyering@lucent.com>
30981
30982         * m4/gettext.m4: Fix typo in comment.
30983
30984         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
30985         textutils/configure.in).  Suggestion from Paul Eggert.
30986         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
30987
30988 2000-04-02  Paul Eggert  <eggert@twinsun.com>
30989
30990         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
30991         variable in the shell rather than using putenv, which isn't
30992         portable.  This avoids the configure-time inter-test dependency
30993         on the potentially-renamed putenv function.
30994
30995 2000-03-30  Paul Eggert  <eggert@twinsun.com>
30996
30997         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
30998         before checking struct stat.st_blksize, so that
30999         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
31000
31001 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31002
31003         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
31004         since strftime.c uses HAVE_STRFTIME to decide whether to use
31005         the underlying strftime.
31006
31007 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31008
31009         * lib/time/strftime.c (my_strftime): Make sure we call the system
31010         strftime, not ourselves, when invoking the underlying strftime.
31011
31012 2000-03-24  Jim Meyering  <meyering@lucent.com>
31013
31014         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
31015         (charset_alias): Define.
31016         (install-exec-local): Factor out common code.
31017         (uninstall-local): Split lines longer than 80.
31018         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
31019         (SUFFIXES): Define.
31020         (.sed.in.sed): New rule.  Don't redirect directly to $@.
31021         (CLEANFILES): Add ref-add.sed and ref-del.sed.
31022
31023 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
31024
31025         * lib/config.charset: Output a line containing "Packages using this
31026         file".
31027         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
31028         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
31029         ref-del.sed): New rules.
31030
31031 2000-03-17  Jim Meyering  <meyering@lucent.com>
31032
31033         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
31034         Otherwise, include <strings.h>
31035
31036 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
31037
31038         * lib/unicodeio.c (utf8_wctomb): New function.
31039         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
31040         format instead of in UCS-4 with platform dependent endianness.
31041
31042 2000-03-10  Jim Meyering  <meyering@lucent.com>
31043
31044         * m4/lib-check.m4: Look for getspnam in -lgen, too.
31045         From Marco Franzen.
31046
31047 2000-03-07  Paul Eggert  <eggert@twinsun.com>
31048
31049         * lib/savedir.c (savedir): Work even if directory size is
31050         negative; this can happen with some screwy NFS configurations.
31051
31052 2000-03-06  Jim Meyering  <meyering@lucent.com>
31053
31054         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
31055         if it's NULL (because we ran out of memory).  From Bruno Haible.
31056
31057 2000-03-05  Jim Meyering  <meyering@lucent.com>
31058
31059         * lib/localcharset.c ("path-concat.h"): Include.
31060         (get_charset_aliases): Use path_concat instead of ANSI string
31061         concatenation.
31062
31063         * lib/unicodeio.h (PARAMS): Define.
31064         Use it to guard prototype.
31065
31066 2000-03-04  Jim Meyering  <meyering@lucent.com>
31067
31068         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31069         for lib/localcharset.c.
31070
31071 2000-03-04  Jim Meyering  <meyering@lucent.com>
31072
31073         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31074         installing into it.
31075         (uninstall-local): Uncomment this rule so `make distcheck' works
31076         once again.
31077
31078         * lib/unicodeio.c (<errno.h>): Include it.
31079         (errno): Declare if not defined.
31080
31081         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31082
31083         * lib/config.charset: New version, incorporating remarks from a linux
31084         i18n mailing list.  From Bruno Haible.
31085
31086 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31087
31088         * m4/codeset.m4: New file.
31089         * m4/iconv.m4: New file.
31090         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31091
31092 2000-03-03  Jim Meyering  <meyering@lucent.com>
31093
31094         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31095
31096 2000-03-02  Jim Meyering  <meyering@lucent.com>
31097
31098         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31099         the messages come out on separate lines.
31100
31101         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31102         rather than jm_CHECK_DECLARATIONS.
31103         * m4/decl.m4: Remove now-unused file.
31104
31105         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31106         geteuid.
31107
31108 2000-03-02  Jim Meyering  <meyering@lucent.com>
31109
31110         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31111
31112 2000-03-01  Jim Meyering  <meyering@lucent.com>
31113
31114         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31115         * lib/unicodeio.c: Likewise.
31116
31117 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31118
31119         * lib/config.charset: New file.
31120         * lib/localcharset.c: New file.
31121         * lib/unicodeio.h, lib/unicodeio.c: New files.
31122         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31123         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31124         (noinst_HEADERS): Add unicodeio.h.
31125         (all-local, install-exec-local, charset.alias): New targets.
31126
31127 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31128
31129         * lib/quotearg.c (ALERT_CHAR): New macro.
31130         (quotearg_buffer_restyled): Use it.
31131
31132 2000-02-27  Jim Meyering  <meyering@lucent.com>
31133
31134         * m4/check-decl.m4: Add getenv to the list.
31135
31136 2000-02-27  Jim Meyering  <meyering@lucent.com>
31137
31138         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31139         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31140
31141         * lib/backupfile.c: Guard inclusion of stdlib.h with
31142         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31143         Declare malloc if needed.
31144
31145         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31146         `#ifndef HAVE_DECL..'
31147         now that autoconf always defines the HAVE_DECL_ symbols.
31148         * lib/human.c: Likewise.
31149         * lib/same.c: Likewise.
31150         * lib/strtoumax.c: Likewise.
31151
31152         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31153         declaration check was not run.
31154         * lib/hash.c: Likewise.
31155         * lib/human.c: Likewise.
31156         * lib/same.c: Likewise.
31157         * lib/strtoumax.c: Likewise.
31158
31159         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31160         `.', then first look up the entire `.'-containing string as a login
31161         name.
31162
31163 2000-02-23  Jim Meyering  <meyering@lucent.com>
31164
31165         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31166         in place of my hack.
31167
31168 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31169
31170         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31171         (textint): New typedef.
31172         (parser_control): Member year changed from int to textint.
31173         All uses changed.
31174         (YYSTYPE): Removed; replaced by %union with int and textint members.
31175         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31176         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31177         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31178         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31179         (date, number, to_year): Use width of number in digits, not its value,
31180         to determine whether it's a 2-digit year, or a 2-digit time.
31181         (yylex): Store number of digits of numeric tokens.
31182         Reported by John Kendall.
31183
31184         (parser_control): Changed from struct parser_control to typedef (for
31185         consistency).  All uses changed.
31186
31187         (tID): Removed; not used.
31188         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31189
31190 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31191
31192         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31193         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31194
31195 2000-02-12  Jim Meyering  <meyering@lucent.com>
31196
31197         * lib/userspec.c (ISDIGIT): Define it.
31198         (isdigit): Remove definition.
31199         (is_number): Use ISDIGIT, not isdigit.
31200         <libintl.h>: Include.
31201         (_ and N_): Define.
31202         (parse_user_spec): Mark translatable strings.
31203
31204 2000-02-10  Jim Meyering  <meyering@lucent.com>
31205
31206         With these changes, nanosleep.[ch] are finally enough like the other
31207         lib/* replacement files to compile on a few more losing systems.
31208
31209         * lib/nanosleep.h: Don't include config.h.
31210         Remove prototype from declaration of nanosleep.
31211         (PARAMS): Remove now-unneeded definition.
31212         * lib/nanosleep.c: #undef nanosleep.
31213         (rpl_nanosleep): Rename from nanosleep.
31214
31215 2000-02-10  Jim Meyering  <meyering@lucent.com>
31216
31217         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31218         gnu_nanosleep to rpl_nanosleep.
31219
31220 2000-02-09  Jim Meyering  <meyering@lucent.com>
31221
31222         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31223         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31224
31225 2000-02-08  Akim Demaille  <akim@epita.fr>
31226
31227         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31228         `[' and `]' and remove uses of `changequote'.
31229         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31230         (AC_SYS_LARGEFILE): Likewise.
31231         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31232         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31233         of changequote.
31234         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31235         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31236         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31237         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31238
31239 2000-02-05  Jim Meyering  <meyering@lucent.com>
31240
31241         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31242         Remove explicit use of AC_HEADER_TIME.  It is required by
31243         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31244         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31245         in autoconf whereby the expansion of the latter ended up preceding
31246         the expansion of its prerequisite, AC_HEADER_TIME.
31247         Reported by Volker Borchert.
31248
31249 2000-02-03  Jim Meyering  <meyering@lucent.com>
31250
31251         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31252
31253 2000-02-03  Jim Meyering  <meyering@lucent.com>
31254
31255         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31256         rather than with `#if HAVE_UTMPNAME'.
31257
31258 2000-02-02  Jim Meyering  <meyering@lucent.com>
31259
31260         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31261         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31262         Reported by Eli Zaretskii.
31263
31264 2000-02-01  Jim Meyering  <meyering@lucent.com>
31265
31266         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31267
31268 2000-01-31  Jim Meyering  <meyering@lucent.com>
31269
31270         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31271         functions.  Add the time.h and sys/time.h headers along with the
31272         AC_REQUIRE'ment of AC_HEADER_TIME.
31273
31274 2000-01-31  Jim Meyering  <meyering@lucent.com>
31275
31276         * lib/nanosleep.h (nanosleep): Guard declaration with
31277         `#if ! HAVE_DECL_NANOSLEEP'.
31278         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31279         the declaration in that vendor's sys/timers.h.
31280         Reported by Christian Krackowizer.
31281
31282         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31283         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31284         (ISPRINT): Likewise.
31285         Reported by Tom Tromey.
31286
31287 2000-01-30  Jim Meyering  <meyering@lucent.com>
31288
31289         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31290
31291         * m4/prereq.m4 (utmp_includes): Define.
31292         Check for ut_user and ut_name members in both struct utmpx
31293         and struct utmp.
31294
31295 2000-01-30  Jim Meyering  <meyering@lucent.com>
31296
31297         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31298         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31299         header files where only utmpx.ut_user is declared.
31300
31301         * lib/readutmp.h (UT_USER): Define.
31302
31303 2000-01-29  Jim Meyering  <meyering@lucent.com>
31304
31305         * m4/lib-check.m4: New file containing library-related checks from
31306         fileutils and sh-utils (textutils had none).
31307
31308 2000-01-28  Jim Meyering  <meyering@lucent.com>
31309
31310         * m4/perl.m4: Change format of warning message to look more like that
31311         from the missing script.  Suggestion from François Pinard.
31312
31313 2000-01-25  Jim Meyering  <meyering@lucent.com>
31314
31315         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31316         well as time.h in the compile check.
31317         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31318         Fix typo in cross-compiling case: s/yes/no/.
31319
31320 2000-01-23  Jim Meyering  <meyering@lucent.com>
31321
31322         * m4/jm-macros.m4: Move df-related tests here from
31323         fileutils/configure.in
31324
31325         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31326         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31327
31328         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31329         s/space/ac_fsusage_space/.
31330         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31331
31332         * m4/ftruncate.m4: New file (derived from part of
31333         fileutils/configure.in).
31334         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31335         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31336
31337         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31338         AC_SUBST these here, rather than just in sh-util/configure.in, so
31339         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31340         all the same.
31341         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31342         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31343         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31344         (AC_SUBST(POW_LIBM)): Likewise.
31345         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31346
31347 2000-01-23  Jim Meyering  <meyering@lucent.com>
31348
31349         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
31350         obstack.c.
31351
31352 2000-01-22  Jim Meyering  <meyering@lucent.com>
31353
31354         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
31355
31356         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
31357
31358         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
31359         configure.in
31360         (AC_CHECK_HEADERS): Likewise for sh-utils.
31361         (AC_CHECK_HEADERS): Likewise for textutils.
31362         Merge the three lists of headers.
31363
31364         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
31365         from fileutils' configure.in.
31366
31367         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
31368         code. Moved tests into their own function (_jm_DECL_HEADERS) in
31369         check-decl.m4.
31370
31371         * m4/check-decl.m4: Use #if rather than #ifdef.
31372         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
31373         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
31374         (_jm_DECL_HEADERS): Define new function.
31375         (jm_CHECK_DECLARATIONS): Require it.
31376
31377 2000-01-22  Jim Meyering  <meyering@lucent.com>
31378
31379         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
31380         [! HAVE_DECL_STRTOULL]: Declare strtoull.
31381         Required for some AIX systems.  Reported by Christian Krackowizer.
31382         [TESTING] (main): New function.
31383
31384         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
31385         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
31386         letters.
31387
31388         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
31389         iswprint.
31390
31391         * lib/strverscmp.c (ISDIGIT): Define.
31392         (strverscmp): Use ISDIGIT, not isdigit.
31393
31394 2000-01-19  Jim Meyering  <meyering@lucent.com>
31395
31396         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
31397         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
31398         defines `struct timespec' in <sys/time.h>
31399
31400         * m4/c-bs-a.m4: Remove uses of changequote altogether.
31401         Thanks to Akim for explaining.
31402
31403 2000-01-17  Paul Eggert  <eggert@twinsun.com>
31404
31405         * lib/nanosleep.c (nanosleep):
31406         Don't use SA_INTERRUPT to decide whether to call sigaction, as
31407         POSIX.1 doesn't require SA_INTERRUPT and some systems
31408         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
31409         it's been part of POSIX.1 since day 1 (in 1988).
31410
31411 2000-01-17  Jim Meyering  <meyering@lucent.com>
31412
31413         * lib/interlock: Remove unused file.  Reported by François Pinard.
31414
31415 2000-01-16  Paul Eggert  <eggert@twinsun.com>
31416
31417         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
31418         alert, backslash, formfeed, and vertical tab unnecessarily in
31419         shell quoting style.
31420
31421 2000-01-16  Jim Meyering  <meyering@lucent.com>
31422
31423         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
31424         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
31425         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
31426         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
31427
31428 2000-01-16  Jim Meyering  <meyering@lucent.com>
31429
31430         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
31431         because the latter didn't work.
31432
31433 2000-01-15  Jim Meyering  <meyering@lucent.com>
31434
31435         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
31436         (AC_REPLACE_FUNCS): Add memcpy and memset.
31437         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
31438         Add strpbrk.
31439         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
31440
31441 2000-01-12  Jim Meyering  <meyering@lucent.com>
31442
31443         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
31444         (jm_PREREQ): Use it.
31445         (jm_PREREQ_READUTMP): New macro.
31446         (jm_PREREQ): Use it.
31447
31448 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31449
31450         Quote multibyte characters correctly.
31451         * m4/c-bs-a.m4: New file.
31452         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
31453         (jm_PREREQ): Use it.
31454
31455 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31456
31457         * m4/uintmax_t.m4: Port to autoconf 2.13.
31458
31459 2000-01-08  Jim Meyering  <meyering@ascend.com>
31460
31461         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
31462         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
31463
31464 2000-01-04  Jim Meyering  <meyering@ascend.com>
31465
31466         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
31467         jm_STRUCT_DIRENT_D_TYPE.
31468         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
31469         jm_STRUCT_DIRENT_D_INO.
31470         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
31471         jm_STRUCT_UTIMBUF.
31472         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
31473         renamings.
31474         * m4/utime.m4: Likewise.
31475
31476         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
31477         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
31478
31479 2000-01-03  Paul Eggert  <eggert@twinsun.com>
31480
31481         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
31482         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
31483
31484 2000-01-02  Jim Meyering  <meyering@ascend.com>
31485
31486         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
31487         remember if this is necessary.
31488
31489 1999-12-26  Jim Meyering  <meyering@ascend.com>
31490
31491         * m4/jm-macros.m4: Use it here.
31492         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
31493
31494 1999-12-23  Jim Meyering  <meyering@ascend.com>
31495
31496         * m4/jm-macros.m4: Check for clock_gettime (moved from
31497         fileutils/configure.in)
31498         Check for gettimeofday.
31499
31500 1999-12-20  Jim Meyering  <meyering@ascend.com>
31501
31502         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
31503         autoconf-2.14a-1999-12-20.
31504
31505 1999-12-19  Jim Meyering  <meyering@ascend.com>
31506
31507         * m4/lstat-slash.m4: New file.
31508         * m4/jm-macros.m4: Use the new macro:
31509         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31510
31511 1999-12-07  Jim Meyering  <meyering@ascend.com>
31512
31513         * m4/perl.m4: Require that File::Compare be available, too.
31514         Too many systems seem to lack it.
31515
31516         * m4/strftime.m4: Add checks for most of the cpp macros tested in
31517         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
31518
31519 1999-11-18  Paul Eggert  <eggert@twinsun.com>
31520
31521         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
31522         problem with the QNX 4.25 shell, which doesn't propagate exit
31523         status of failed commands inside shell assignments.
31524
31525 1999-11-17  Jim Meyering  <meyering@ascend.com>
31526
31527         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
31528
31529 1999-11-07  Jim Meyering  <meyering@ascend.com>
31530
31531         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
31532
31533 1999-11-06  Jim Meyering  <meyering@ascend.com>
31534
31535         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
31536         * m4/jm-macros.m4 (jm_MACROS): Use it here.
31537
31538 1999-11-05  Jim Meyering  <meyering@ascend.com>
31539
31540         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
31541         configure.in of textutils, fileutils, and sh-utils into this one
31542         (shared between those packages) file.
31543         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
31544         AC_STRUCT_ST_BLKSIZE.
31545
31546 1999-11-03  Jim Meyering  <meyering@ascend.com>
31547
31548         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
31549         of AC_CHECK_TYPE checks includes unistd.h.
31550         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
31551         Suggestion from Akim Demaille.
31552
31553 1999-10-30  Jim Meyering  <meyering@ascend.com>
31554
31555         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
31556         m4-quoted string.
31557         * m4/ls-mntd-fs.m4: Likewise.
31558         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
31559         * m4/jm-winsz1.m4: Likewise.
31560
31561         * m4/const.m4: Remove file, since the fix made it into the experimental
31562         version of autoconf.
31563         * m4/mktime.m4: Likewise.
31564
31565         * m4/check-type.m4: Remove file, now that the latest version of
31566         AC_CHECK_TYPE takes a third arg to specify additional #includes.
31567
31568         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
31569         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
31570         AC_CHECK_TYPE.
31571
31572 1999-10-04  Jim Meyering  <meyering@ascend.com>
31573
31574         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
31575
31576 1999-09-22  Paul Eggert  <eggert@twinsun.com>
31577
31578         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
31579         2.95.1 bug with HP-UX 10.20.
31580
31581 1999-09-17  Jim Meyering  <meyering@ascend.com>
31582
31583         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
31584         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
31585         due to missing strdup (against sh-utils-2.0).
31586
31587 1999-08-29  Jim Meyering  <meyering@ascend.com>
31588
31589         * m4/jm-macros.m4: Require jm_BISON.
31590         * m4/bison.m4: New file.
31591
31592 1999-08-17  Paul Eggert  <eggert@twinsun.com>
31593
31594         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
31595         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
31596
31597 1999-08-05  Jim Meyering  <meyering@ascend.com>
31598
31599         * m4/getline.m4: Rename test file from conftestdata to conftest.data
31600         to avoid conflicts with `conftest' on 8+3 filesystems.
31601         Suggestion from Eli Zaretskii.
31602
31603 1999-08-04  Jim Meyering  <meyering@ascend.com>
31604
31605         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
31606         fileutils and sh-utils (textutils's getline test was inadequate).
31607         (AM_FUNC_GETLINE): Run this test.
31608         (AC_CHECK_FUNCS): Check for getdelim.
31609         Reported by Bob Proulx.
31610
31611 1999-08-02  Jim Meyering  <meyering@ascend.com>
31612
31613         * m4/jm-macros.m4: Add a comment.
31614
31615 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31616
31617         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
31618         <inttypes.h> defines strtoumax as a macro (and not as a
31619         function).
31620
31621 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31622
31623         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
31624         that we can shift, multiply and divide unsigned long long
31625         values; Ultrix cc can't do it.
31626
31627 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31628
31629         * m4/mktime.m4: New file, which is a preview of what should appear
31630         in the next public autoconf release.
31631
31632 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31633
31634         * m4/lfs.m4: Remove this file.
31635         * m4/largefile.m4: New file.  It contains the old contents of
31636         lfs.m4, except that all names with prefix AC_LFS have been
31637         changed to use the prefix AC_SYS_LARGEFILE instead, to be
31638         compatible with future autoconf versions.  Also, some minor m4
31639         quoting problems have been fixed.
31640
31641 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31642
31643         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
31644         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
31645         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
31646         and simplify the shell code.
31647
31648 1999-08-01  Jim Meyering  <meyering@ascend.com>
31649
31650         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
31651         m4.
31652
31653 1999-07-20  Jim Meyering  <meyering@ascend.com>
31654
31655         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
31656
31657 1999-07-15  Jim Meyering  <meyering@ascend.com>
31658
31659         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
31660
31661 1999-05-22  Jim Meyering  <meyering@ascend.com>
31662
31663         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
31664
31665 1999-05-20  Jim Meyering  <meyering@ascend.com>
31666
31667         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
31668         Add a colon after each `then' in case $4 is empty.
31669
31670 1999-05-16  Jim Meyering  <meyering@ascend.com>
31671
31672         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
31673
31674 1999-05-10  Jim Meyering  <meyering@ascend.com>
31675
31676         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
31677
31678         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
31679         AC_FUNC_MKTIME.
31680
31681 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
31682
31683         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
31684
31685 1999-05-04  Paul Eggert  <eggert@twinsun.com>
31686
31687         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
31688         not CPPFLAGS, so that linking works correctly in IRIX.
31689
31690 1999-04-30  Paul Eggert  <eggert@twinsun.com>
31691
31692         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
31693
31694 1999-04-20  Paul Eggert  <eggert@twinsun.com>
31695
31696         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
31697         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
31698         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
31699         jm_AC_TYPE_UNSIGNED_LONG_LONG.
31700         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
31701
31702         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
31703
31704 1999-04-20  Jim Meyering  <meyering@ascend.com>
31705
31706         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
31707         AC_REPLACE xstroull if necessary.  From Paul Eggert.
31708         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
31709
31710 1999-04-18  Jim Meyering  <meyering@ascend.com>
31711
31712         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
31713         * m4/jm-macros.m4: Use it.
31714
31715 1999-04-06  Jim Meyering  <meyering@ascend.com>
31716
31717         * m4/strftime.m4: Remove test for %f.
31718
31719 1999-03-29  Jim Meyering  <meyering@ascend.com>
31720
31721         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
31722         superset of the AC_TYPE_* checks in the textutils, fileutils,
31723         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
31724         AC_TYPE_PID_T.
31725
31726 1999-03-28  Jim Meyering  <meyering@ascend.com>
31727
31728         * m4/jm-macros.m4: Define GNU_PACKAGE here.
31729         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
31730         replaced e.g., in the *.sh files of the sh-utils.
31731
31732 1999-03-20  Jim Meyering  <meyering@ascend.com>
31733
31734         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
31735         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
31736         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
31737
31738 1999-03-19  Jim Meyering  <meyering@ascend.com>
31739
31740         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
31741
31742 1999-03-12  Jim Meyering  <meyering@ascend.com>
31743
31744         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
31745
31746 1999-03-07  Jim Meyering  <meyering@ascend.com>
31747
31748         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
31749         declared.
31750
31751 1999-02-17  Jim Meyering  <meyering@ascend.com>
31752
31753         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
31754         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
31755
31756 1999-02-07  Jim Meyering  <meyering@ascend.com>
31757
31758         * m4/group-member.m4: New file -- extracted from sh-utils'
31759         configure.in.
31760
31761         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
31762         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
31763
31764 1999-02-06  Jim Meyering  <meyering@ascend.com>
31765
31766         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
31767         * m4/fnmatch.m4: Likewise.
31768         * m4/getgroups.m4: Likewise.
31769         * m4/lstat.m4: Likewise.
31770         * m4/malloc.m4: Likewise.
31771         * m4/putenv.m4: Likewise.
31772         * m4/realloc.m4: Likewise.
31773         * m4/regex.m4: Likewise.
31774         * m4/stat.m4: Likewise.
31775         * m4/strftime.m4: Likewise.
31776         Suggestion from Alain Magloire.
31777
31778         * m4/chown.m4: Use `.$ac_objext', not `.o'.
31779         * m4/fnmatch.m4: Likewise.
31780         * m4/getgroups.m4: Likewise.
31781         * m4/getline.m4: Likewise.
31782         * m4/lstat.m4: Likewise.
31783         * m4/malloc.m4: Likewise.
31784         * m4/memcmp.m4: Likewise.
31785         * m4/putenv.m4: Likewise.
31786         * m4/realloc.m4: Likewise.
31787         * m4/regex.m4: Likewise.
31788         * m4/stat.m4: Likewise.
31789         * m4/strftime.m4: Likewise.
31790         Suggestion from Alain Magloire.
31791
31792         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
31793         an argument.
31794
31795         * m4/regex.m4: Add a run-time Test for proper operation of
31796         re_compile_pattern.
31797
31798 1999-01-31  Jim Meyering  <meyering@ascend.com>
31799
31800         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
31801
31802 1999-01-30  Jim Meyering  <meyering@ascend.com>
31803
31804         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
31805
31806         * m4/jm-mktime.m4: Make this a wrapper around the official
31807         AM_FUNC_MKTIME rather than my private copy, now that the official one
31808         is up to date.
31809         * m4/mktime.m4: Remove file.
31810
31811         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
31812         * m4/uptime.m4: Likewise.
31813         * m4/uintmax_t.m4: Likewise.
31814
31815 1999-01-28  Jim Meyering  <meyering@ascend.com>
31816
31817         * m4/jm-macros.m4: Use jm_AFS.
31818         * m4/afs.m4: New file (from fileutils' configure.in).
31819
31820         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
31821         * m4/chown.m4: Likewise.
31822         * m4/d-ino.m4: Likewise.
31823         * m4/d-type.m4: Likewise.
31824         * m4/fnmatch.m4: Likewise.
31825         * m4/getgroups.m4: Likewise.
31826         * m4/gettext.m4: Likewise.
31827         * m4/jm-mktime.m4: Likewise.
31828         * m4/jm-winsz2.m4: Likewise.
31829         * m4/lcmessage.m4: Likewise.
31830         * m4/ls-mntd-fs.m4: Likewise.
31831         * m4/malloc.m4: Likewise.
31832         * m4/memcmp.m4: Likewise.
31833         * m4/putenv.m4: Likewise.
31834         * m4/realloc.m4: Likewise.
31835         * m4/st_mtim.m4: Likewise.
31836         * m4/strftime.m4: Likewise.
31837
31838 1999-01-16  Jim Meyering  <meyering@ascend.com>
31839
31840         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
31841         (ARGMATCH_DIE_DECL): Define.
31842
31843 1999-01-12  Jim Meyering  <meyering@ascend.com>
31844
31845         * m4/Makefile.am.in: Rewrite to avoid using fmt.
31846         Reported by Lars Hecking.
31847
31848 1999-01-10  Jim Meyering  <meyering@ascend.com>
31849
31850         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
31851         gross kludge.
31852         * m4/inttypes_h.m4: Likewise.
31853         * m4/lstat.m4: Likewise.
31854         * m4/malloc.m4: Likewise.
31855         * m4/readdir.m4: Likewise.
31856         * m4/realloc.m4: Likewise.
31857         * m4/st_dm_mode.m4: Likewise.
31858         * m4/stat.m4: Likewise.
31859         * m4/utimbuf.m4: Likewise.
31860         * m4/utimes.m4: Likewise.
31861
31862         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
31863         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
31864         comments in config.h.in are meaningful.
31865
31866         * m4/jm-macros.m4: Require autoconf-2.13 here.
31867
31868         * m4/regex.m4: By default, don't use the included regex.c on systems
31869         with glibc 2.  Suggestion from Uli Drepper.
31870
31871 1999-01-02  Jim Meyering  <meyering@ascend.com>
31872
31873         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
31874
31875 1998-12-18  Jim Meyering  <meyering@ascend.com>
31876
31877         * m4/Makefile.am.in (Makefile.am): Simplify rule.
31878         Based on a suggestion from Lars Hecking.
31879
31880 1998-11-16  Paul Eggert  <eggert@twinsun.com>
31881
31882         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
31883
31884 1998-11-16  Jim Meyering  <meyering@ascend.com>
31885
31886         * m4/lfs.m4: Double-quote the `uname...` expression.
31887
31888 1998-11-14  Jim Meyering  <meyering@ascend.com>
31889
31890         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
31891         * m4/stat.m4: Likewise.
31892
31893 1998-11-03  Jim Meyering  <meyering@ascend.com>
31894
31895         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
31896         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
31897
31898 1998-10-18  Jim Meyering  <meyering@ascend.com>
31899
31900         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
31901
31902 1998-10-17  Jim Meyering  <meyering@ascend.com>
31903
31904         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
31905         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
31906         calls for those previously hard-coded headers.  Instead, take a new
31907         parameter.
31908         (jm_CHECK_DECLARATIONS): Reflect interface change.
31909         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
31910         (jm_CHECK_DECL_LOCALTIME_R): New macro.
31911
31912         * m4/mktime.m4: Test for spring-forward gap before long-running test.
31913
31914 1998-10-14  Jim Meyering  <meyering@ascend.com>
31915
31916         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
31917         instead of "TZ=America/Vancouver".  From Paul Eggert.
31918
31919 1998-10-11  Jim Meyering  <meyering@ascend.com>
31920
31921         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
31922         This adds a test for a recently added compatibility fix for mktime.c.
31923         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
31924
31925 1998-09-27  Jim Meyering  <meyering@ascend.com>
31926
31927         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
31928
31929         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
31930         ../configure.in, including a change from Gordon Matzigkeit to allow
31931         cross-compiling for the Hurd.
31932
31933         * m4/glibc.m4: New file/macro to test for the GNU C Library
31934         versions 1 and 2.  From Gordon Matzigkeit.
31935         Indent.
31936
31937 1998-09-21  Jim Meyering  <meyering@ascend.com>
31938
31939         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
31940
31941 1998-08-18  Paul Eggert  <eggert@twinsun.com>
31942
31943         Port nanosecond-resolution times to UnixWare 2.1.2 and
31944         pedantic Solaris 2.6.
31945
31946         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
31947         AC_STRUCT_ST_MTIM.
31948         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
31949         Generate name of ns member, instead of just 1 or undef.
31950         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
31951
31952 1998-08-15  Jim Meyering  <meyering@ascend.com>
31953
31954         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
31955         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
31956         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
31957         instead of jm_TYPE_SSIZE_T.
31958
31959 1998-08-12  Jim Meyering  <meyering@ascend.com>
31960
31961         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
31962
31963 1998-08-02  Jim Meyering  <meyering@ascend.com>
31964
31965         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
31966         in acconfig.h manually.
31967
31968 1998-07-31  Paul Eggert  <eggert@twinsun.com>
31969
31970         * m4/st_mtim.m4: New file.
31971
31972 1998-07-28  Jim Meyering  <meyering@ascend.com>
31973
31974         * m4/utimes.m4: Undef stat.
31975
31976 1998-07-25  Jim Meyering  <meyering@ascend.com>
31977
31978         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
31979         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
31980
31981 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
31982
31983         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
31984         uid and gid actually remain unchanged.
31985
31986 1998-07-07  Jim Meyering  <meyering@ascend.com>
31987
31988         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
31989
31990 1998-07-04  Jim Meyering  <meyering@ascend.com>
31991
31992         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
31993         to prove that this macro can be used in packages without regex.c.
31994
31995 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
31996
31997         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
31998         is to be used.
31999
32000 1998-07-03  Jim Meyering  <meyering@ascend.com>
32001
32002         * m4/gettext.m4: Add -lintl if it's found to be necessary.
32003
32004         * m4/gettext.m4: New file -- from gettext-0.10.35.
32005         * m4/lcmessage.m4: Likewise.
32006         * m4/progtest.m4: Likewise.
32007
32008         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
32009         * m4/jm-macros.m4: Require the new macro.
32010
32011 1998-06-29  Jim Meyering  <meyering@ascend.com>
32012
32013         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
32014         for the definition of NGROUPS (used in a system header included
32015         by sys/mount.h).
32016
32017 1998-06-28  Jim Meyering  <meyering@ascend.com>
32018
32019         * m4/ls-mntd-fs.m4: New file.
32020         * m4/fstypename.m4: New file.
32021
32022         * m4/jm-macros.m4: Require the new macro.
32023         * m4/jm-glibc-io.m4: New file.
32024
32025 1998-05-19  Jim Meyering  <meyering@ascend.com>
32026
32027         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
32028         * m4/lchown.m4: New file.
32029
32030         * m4/Makefile.am.in: New file.
32031         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
32032
32033 1998-05-14  Jim Meyering  <meyering@ascend.com>
32034
32035         * m4/Makefile.am (EXTRA_DIST): Add them.
32036         * m4/jm-macros.m4: New file.
32037         * m4/utimbuf.m4: New file.
32038
32039 1998-05-12  Jim Meyering  <meyering@ascend.com>
32040
32041         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
32042
32043 1998-05-11  Jim Meyering  <meyering@ascend.com>
32044
32045         * m4/isc-posix.m4: New file.
32046
32047 1998-05-10  Jim Meyering  <meyering@ascend.com>