Tests for module 'uniwidth/u32-width'.
[gnulib.git] / ChangeLog
1 2007-07-07  Bruno Haible  <bruno@clisp.org>
2
3         * tests/uniwidth/test-u32-width.c: New file.
4         * modules/uniwidth/u32-width-tests: New file.
5
6         * lib/uniwidth/u32-width.c: New file.
7         * modules/uniwidth/u32-width: New file.
8
9         * tests/uniwidth/test-u16-width.c: New file.
10         * modules/uniwidth/u16-width-tests: New file.
11
12         * lib/uniwidth/u16-width.c: New file.
13         * modules/uniwidth/u16-width: New file.
14
15         * tests/uniwidth/test-u8-width.c: New file.
16         * modules/uniwidth/u8-width-tests: New file.
17
18         * lib/uniwidth/u8-width.c: New file.
19         * modules/uniwidth/u8-width: New file.
20
21         * tests/uniwidth/test-uc_width.c: New file.
22         * modules/uniwidth/width-tests: New file.
23
24         * lib/uniwidth/width.c: New file, from GNU libiconv.
25         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
26         * modules/uniwidth/width: New file.
27
28         * lib/uniwidth.h: New file, from GNU libiconv.
29         * modules/uniwidth/base: New file.
30
31 2007-07-07  Bruno Haible  <bruno@clisp.org>
32
33         * lib/uniname.h: New file, from GNU gettext.
34         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
35         * lib/uniname/uninames.h: New file, from GNU gettext.
36         * lib/uniname/uniname.c: New file, from GNU gettext.
37         * tests/uniname/test-uninames.sh: New file.
38         * tests/uniname/test-uninames.c: New file, from GNU gettext.
39         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
40         * modules/uniname/base: New file.
41         * modules/uniname/uniname: New file.
42         * modules/uniname/uniname-tests: New file.
43         * MODULES.html.sh (Unicode string functions): Add the new modules.
44
45 2007-07-06  Bruno Haible  <bruno@clisp.org>
46
47         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
48
49 2007-07-06  Bruno Haible  <bruno@clisp.org>
50
51         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
52         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
53         includes <cygwin/sys_time.h> which includes <sys/select.h> which
54         include <sys/time.h>.
55         Reported by Eric Blake.
56
57 2007-07-06  Eric Blake  <ebb9@byu.net>
58
59         Fix testing canonicalize on cygwin.
60         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
61         Revert patch from 2007-06-19.
62         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
63         canonicalize module is also in use.
64         * tests/test-canonicalize.c: New file.
65         * tests/test-canonicalize.sh: Likewise.
66         * modules/canonicalize-tests: Likewise.
67
68 2007-07-06  Jim Meyering  <jim@meyering.net>
69
70         * lib/getugroups.c (getugroups): Detect getgrent failure.
71         Adjust comment to reflect reality: this function may return -1.
72
73 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
74
75         * build-aux/bootstrap (TP_URL,get_translations): Update to use
76         the new TP address.
77         (usage): Fix typo
78         (gnulib_mk): New variable.
79
80 2007-07-05  Jim Meyering  <jim@meyering.net>
81
82         Don't let endgrent clobber errno, no matter how improbable.
83         * lib/getugroups.c (getugroups): Save and restore errno around
84         endgrent call.
85
86         Close the group DB even when failing with 2^31 or more members.
87         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
88
89 2007-07-04  Jim Meyering  <jim@meyering.net>
90
91         * lib/getugroups.h: New file.
92         * lib/getugroups.c: Include "getugroups.h".
93         Remove uses of "register" keyword.
94         Move local variable, "cp", down into scope where used.
95         Give "username" parameter the "const" attribute.
96         * modules/getugroups (Files): Add lib/getugroups.h
97
98 2007-07-04  Karl Berry  <karl@gnu.org>
99
100         * MODULES.html.sh (func_all_modules): Complete rename of
101         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
102
103 2007-07-02  Bruno Haible  <bruno@clisp.org>
104
105         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
106         mode, when inttypes.h comes from gnulib.
107         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
108
109 2007-07-02  Simon Josefsson  <simon@josefsson.org>
110
111         * NEWS: Mention lgpl module name change.
112
113         * modules/lgpl-2.1: Renamed from lgpl.
114
115         * NEWS: Mention gpl module name change.
116
117         * modules/gpl-3.0: New file, based on gpl-2.0.
118
119         * modules/gpl-2.0: Renamed from gpl.
120
121         * modules/gpl: Fix filename, doc/gpl.texi is now found at
122         doc/gpl-2.0.texi.
123
124 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
125
126         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
127         #define __STDC_LIMIT_MACROS temporarily while including
128         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
129         Problem reported by Joel E. Denny in
130         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
131
132 2007-07-01  Bruno Haible  <bruno@clisp.org>
133
134         * lib/unistdio.h: New file.
135         * lib/unistdio/u-asnprintf.h: New file.
136         * lib/unistdio/u-asprintf.h: New file.
137         * lib/unistdio/u-printf-args.c: New file.
138         * lib/unistdio/u-printf-args.h: New file.
139         * lib/unistdio/u-printf-parse.h: New file.
140         * lib/unistdio/u-snprintf.h: New file.
141         * lib/unistdio/u-sprintf.h: New file.
142         * lib/unistdio/u-vasprintf.h: New file.
143         * lib/unistdio/u-vsnprintf.h: New file.
144         * lib/unistdio/u-vsprintf.h: New file.
145         * lib/unistdio/ulc-asnprintf.c: New file.
146         * lib/unistdio/ulc-asprintf.c: New file.
147         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
148         * lib/unistdio/ulc-printf-parse.c: New file.
149         * lib/unistdio/ulc-snprintf.c: New file.
150         * lib/unistdio/ulc-sprintf.c: New file.
151         * lib/unistdio/ulc-vasnprintf.c: New file.
152         * lib/unistdio/ulc-vasprintf.c: New file.
153         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
154         * lib/unistdio/ulc-vsnprintf.c: New file.
155         * lib/unistdio/ulc-vsprintf.c: New file.
156         * lib/unistdio/u8-asnprintf.c: New file.
157         * lib/unistdio/u8-asprintf.c: New file.
158         * lib/unistdio/u8-printf-parse.c: New file.
159         * lib/unistdio/u8-snprintf.c: New file.
160         * lib/unistdio/u8-sprintf.c: New file.
161         * lib/unistdio/u8-vasnprintf.c: New file.
162         * lib/unistdio/u8-vasprintf.c: New file.
163         * lib/unistdio/u8-vsnprintf.c: New file.
164         * lib/unistdio/u8-vsprintf.c: New file.
165         * lib/unistdio/u8-u8-asnprintf.c: New file.
166         * lib/unistdio/u8-u8-asprintf.c: New file.
167         * lib/unistdio/u8-u8-snprintf.c: New file.
168         * lib/unistdio/u8-u8-sprintf.c: New file.
169         * lib/unistdio/u8-u8-vasnprintf.c: New file.
170         * lib/unistdio/u8-u8-vasprintf.c: New file.
171         * lib/unistdio/u8-u8-vsnprintf.c: New file.
172         * lib/unistdio/u8-u8-vsprintf.c: New file.
173         * lib/unistdio/u16-asnprintf.c: New file.
174         * lib/unistdio/u16-asprintf.c: New file.
175         * lib/unistdio/u16-printf-parse.c: New file.
176         * lib/unistdio/u16-snprintf.c: New file.
177         * lib/unistdio/u16-sprintf.c: New file.
178         * lib/unistdio/u16-vasnprintf.c: New file.
179         * lib/unistdio/u16-vasprintf.c: New file.
180         * lib/unistdio/u16-vsnprintf.c: New file.
181         * lib/unistdio/u16-vsprintf.c: New file.
182         * lib/unistdio/u16-u16-asnprintf.c: New file.
183         * lib/unistdio/u16-u16-asprintf.c: New file.
184         * lib/unistdio/u16-u16-snprintf.c: New file.
185         * lib/unistdio/u16-u16-sprintf.c: New file.
186         * lib/unistdio/u16-u16-vasnprintf.c: New file.
187         * lib/unistdio/u16-u16-vasprintf.c: New file.
188         * lib/unistdio/u16-u16-vsnprintf.c: New file.
189         * lib/unistdio/u16-u16-vsprintf.c: New file.
190         * lib/unistdio/u32-asnprintf.c: New file.
191         * lib/unistdio/u32-asprintf.c: New file.
192         * lib/unistdio/u32-printf-parse.c: New file.
193         * lib/unistdio/u32-snprintf.c: New file.
194         * lib/unistdio/u32-sprintf.c: New file.
195         * lib/unistdio/u32-vasnprintf.c: New file.
196         * lib/unistdio/u32-vasprintf.c: New file.
197         * lib/unistdio/u32-vsnprintf.c: New file.
198         * lib/unistdio/u32-vsprintf.c: New file.
199         * lib/unistdio/u32-u32-asnprintf.c: New file.
200         * lib/unistdio/u32-u32-asprintf.c: New file.
201         * lib/unistdio/u32-u32-snprintf.c: New file.
202         * lib/unistdio/u32-u32-sprintf.c: New file.
203         * lib/unistdio/u32-u32-vasnprintf.c: New file.
204         * lib/unistdio/u32-u32-vasprintf.c: New file.
205         * lib/unistdio/u32-u32-vsnprintf.c: New file.
206         * lib/unistdio/u32-u32-vsprintf.c: New file.
207         * tests/unistdio/test-ulc-asnprintf1.c: New file.
208         * tests/unistdio/test-ulc-asnprintf1.h: New file.
209         * tests/unistdio/test-ulc-printf1.h: New file.
210         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
211         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
212         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
213         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
214         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
215         * tests/unistdio/test-ulc-vasprintf1.c: New file.
216         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
217         * tests/unistdio/test-ulc-vsprintf1.c: New file.
218         * tests/unistdio/test-u8-asnprintf1.c: New file.
219         * tests/unistdio/test-u8-asnprintf1.h: New file.
220         * tests/unistdio/test-u8-printf1.h: New file.
221         * tests/unistdio/test-u8-vasnprintf1.c: New file.
222         * tests/unistdio/test-u8-vasnprintf2.c: New file.
223         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
224         * tests/unistdio/test-u8-vasnprintf3.c: New file.
225         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
226         * tests/unistdio/test-u8-vasprintf1.c: New file.
227         * tests/unistdio/test-u8-vsnprintf1.c: New file.
228         * tests/unistdio/test-u8-vsprintf1.c: New file.
229         * tests/unistdio/test-u16-asnprintf1.c: New file.
230         * tests/unistdio/test-u16-asnprintf1.h: New file.
231         * tests/unistdio/test-u16-printf1.h: New file.
232         * tests/unistdio/test-u16-vasnprintf1.c: New file.
233         * tests/unistdio/test-u16-vasnprintf2.c: New file.
234         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
235         * tests/unistdio/test-u16-vasnprintf3.c: New file.
236         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
237         * tests/unistdio/test-u16-vasprintf1.c: New file.
238         * tests/unistdio/test-u16-vsnprintf1.c: New file.
239         * tests/unistdio/test-u16-vsprintf1.c: New file.
240         * tests/unistdio/test-u32-asnprintf1.c: New file.
241         * tests/unistdio/test-u32-asnprintf1.h: New file.
242         * tests/unistdio/test-u32-printf1.h: New file.
243         * tests/unistdio/test-u32-vasnprintf1.c: New file.
244         * tests/unistdio/test-u32-vasnprintf2.c: New file.
245         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
246         * tests/unistdio/test-u32-vasnprintf3.c: New file.
247         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
248         * tests/unistdio/test-u32-vasprintf1.c: New file.
249         * tests/unistdio/test-u32-vsnprintf1.c: New file.
250         * tests/unistdio/test-u32-vsprintf1.c: New file.
251         * modules/unistdio/base: New file.
252         * modules/unistdio/u-printf-args: New file.
253         * modules/unistdio/ulc-asnprintf: New file.
254         * modules/unistdio/ulc-asprintf: New file.
255         * modules/unistdio/ulc-fprintf: New file.
256         * modules/unistdio/ulc-printf-parse: New file.
257         * modules/unistdio/ulc-snprintf: New file.
258         * modules/unistdio/ulc-sprintf: New file.
259         * modules/unistdio/ulc-vasnprintf: New file.
260         * modules/unistdio/ulc-vasprintf: New file.
261         * modules/unistdio/ulc-vfprintf: New file.
262         * modules/unistdio/ulc-vsnprintf: New file.
263         * modules/unistdio/ulc-vsprintf: New file.
264         * modules/unistdio/u8-asnprintf: New file.
265         * modules/unistdio/u8-asprintf: New file.
266         * modules/unistdio/u8-printf-parse: New file.
267         * modules/unistdio/u8-snprintf: New file.
268         * modules/unistdio/u8-sprintf: New file.
269         * modules/unistdio/u8-vasnprintf: New file.
270         * modules/unistdio/u8-vasprintf: New file.
271         * modules/unistdio/u8-vsnprintf: New file.
272         * modules/unistdio/u8-vsprintf: New file.
273         * modules/unistdio/u8-u8-asnprintf: New file.
274         * modules/unistdio/u8-u8-asprintf: New file.
275         * modules/unistdio/u8-u8-snprintf: New file.
276         * modules/unistdio/u8-u8-sprintf: New file.
277         * modules/unistdio/u8-u8-vasnprintf: New file.
278         * modules/unistdio/u8-u8-vasprintf: New file.
279         * modules/unistdio/u8-u8-vsnprintf: New file.
280         * modules/unistdio/u8-u8-vsprintf: New file.
281         * modules/unistdio/u16-asnprintf: New file.
282         * modules/unistdio/u16-asprintf: New file.
283         * modules/unistdio/u16-printf-parse: New file.
284         * modules/unistdio/u16-snprintf: New file.
285         * modules/unistdio/u16-sprintf: New file.
286         * modules/unistdio/u16-vasnprintf: New file.
287         * modules/unistdio/u16-vasprintf: New file.
288         * modules/unistdio/u16-vsnprintf: New file.
289         * modules/unistdio/u16-vsprintf: New file.
290         * modules/unistdio/u16-u16-asnprintf: New file.
291         * modules/unistdio/u16-u16-asprintf: New file.
292         * modules/unistdio/u16-u16-snprintf: New file.
293         * modules/unistdio/u16-u16-sprintf: New file.
294         * modules/unistdio/u16-u16-vasnprintf: New file.
295         * modules/unistdio/u16-u16-vasprintf: New file.
296         * modules/unistdio/u16-u16-vsnprintf: New file.
297         * modules/unistdio/u16-u16-vsprintf: New file.
298         * modules/unistdio/u32-asnprintf: New file.
299         * modules/unistdio/u32-asprintf: New file.
300         * modules/unistdio/u32-printf-parse: New file.
301         * modules/unistdio/u32-snprintf: New file.
302         * modules/unistdio/u32-sprintf: New file.
303         * modules/unistdio/u32-vasnprintf: New file.
304         * modules/unistdio/u32-vasprintf: New file.
305         * modules/unistdio/u32-vsnprintf: New file.
306         * modules/unistdio/u32-vsprintf: New file.
307         * modules/unistdio/u32-u32-asnprintf: New file.
308         * modules/unistdio/u32-u32-asprintf: New file.
309         * modules/unistdio/u32-u32-snprintf: New file.
310         * modules/unistdio/u32-u32-sprintf: New file.
311         * modules/unistdio/u32-u32-vasnprintf: New file.
312         * modules/unistdio/u32-u32-vasprintf: New file.
313         * modules/unistdio/u32-u32-vsnprintf: New file.
314         * modules/unistdio/u32-u32-vsprintf: New file.
315         * modules/unistdio/ulc-asnprintf-tests: New file.
316         * modules/unistdio/ulc-vasnprintf-tests: New file.
317         * modules/unistdio/ulc-vasprintf-tests: New file.
318         * modules/unistdio/ulc-vsnprintf-tests: New file.
319         * modules/unistdio/ulc-vsprintf-tests: New file.
320         * modules/unistdio/u8-asnprintf-tests: New file.
321         * modules/unistdio/u8-vasnprintf-tests: New file.
322         * modules/unistdio/u8-vasprintf-tests: New file.
323         * modules/unistdio/u8-vsnprintf-tests: New file.
324         * modules/unistdio/u8-vsprintf-tests: New file.
325         * modules/unistdio/u16-asnprintf-tests: New file.
326         * modules/unistdio/u16-vasnprintf-tests: New file.
327         * modules/unistdio/u16-vasprintf-tests: New file.
328         * modules/unistdio/u16-vsnprintf-tests: New file.
329         * modules/unistdio/u16-vsprintf-tests: New file.
330         * modules/unistdio/u32-asnprintf-tests: New file.
331         * modules/unistdio/u32-vasnprintf-tests: New file.
332         * modules/unistdio/u32-vasprintf-tests: New file.
333         * modules/unistdio/u32-vsnprintf-tests: New file.
334         * modules/unistdio/u32-vsprintf-tests: New file.
335         * MODULES.html.sh (Unicode string functions): Add the new modules.
336
337 2007-07-01  Bruno Haible  <bruno@clisp.org>
338
339         * lib/sprintf.c (sprintf): Limit the available length estimation,
340         to avoid address wraparound.
341         * lib/vsprintf.c (vsprintf): Likewise.
342         * modules/sprintf-posix (Dependencies): Add stdint.
343         * modules/vsprintf-posix (Dependencies): Likewise.
344
345 2007-07-01  Bruno Haible <bruno@clisp.org>
346
347         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
348         Windows PATH as well. Conservative double-quoting. Comments.
349
350 2007-07-01  Bruno Haible <bruno@clisp.org>
351             Eric Blake  <ebb9@byu.net>
352             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
353
354         * gnulib-tool (self_abspathname): Fix algorithm to cope with
355         empty components in $PATH, denoting '.'.
356
357 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
358
359         * gnulib-tool: Fix indentation.
360         (func_create_megatestdir): Likewise.
361         Report by Bruno Haible.
362
363 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
364
365         Sync from Automake.
366         * build-aux/gnupload: Fix shell portability issues with for loops.
367         Report by Karl Berry.
368
369 2007-06-29  Simon Josefsson  <simon@josefsson.org>
370
371         * build-aux/maint.mk (POURL): Use translationproject.org.
372
373 2007-06-27  Simon Josefsson  <simon@josefsson.org>
374             Bruno Haible  <bruno@clisp.org>
375
376         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
377         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
378         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
379         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
380         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
381
382 2007-06-27  Bruno Haible  <bruno@clisp.org>
383
384         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
385         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
386
387 2007-06-26  Karl Berry  <karl@gnu.org>
388
389         * MODULES.html.sh: remove xreadlink-with-size.
390
391 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
392
393         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
394         method that I hope also handles the double-include problem noted
395         by Bruno Haible in
396         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
397
398 2007-06-23  Bruno Haible  <bruno@clisp.org>
399
400         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
401         Don't let the 'mostlyclean' target fail if the last subdirectory could
402         not be removed.
403         Reported by Karl Berry.
404
405 2007-06-23  Bruno Haible  <bruno@clisp.org>
406
407         * gnulib-tool (echo): Add a speedier workaround for ksh.
408         * tests/test-echo.sh: Likewise.
409
410 2007-06-23  Bruno Haible  <bruno@clisp.org>
411
412         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
413         * tests/test-echo.sh: Likewise.
414
415 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
416
417         * gnulib-tool (IFS): Initialize early, so we don't set it to
418         empty later.
419         (self_abspathname): Rewrite algorithm to set it, reindent.
420         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
421         (func_create_megatestdir): Merge some sed scripts.
422
423 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
424
425         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
426         exposed by Sun Studio 11 cc on Solaris 8.
427
428 2007-06-22  Bruno Haible  <bruno@clisp.org>
429
430         * gnulib-tool (echo): Ensure the echo primitive does not interpret
431         backslashes.
432         * tests/test-echo.sh: New file.
433
434 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
435
436         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
437         simplify `sed_replace_build_aux' scripts, they are portable but
438         echoing them with `echo' is not.
439         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
440
441 2007-06-21  Karl Berry  <karl@gnu.org>
442
443         * config/srclist.txt: guess we can't handle the licenses via
444         srclist at the moment.
445
446 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
447
448         * MODULES.html.sh: Add include_next.
449         * modules/include_next: New file.
450
451 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
452
453         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
454         INCLUDE_NEXT.
455         (gl_CHECK_NEXT_HEADERS): New macro.
456         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
457         the obsolescent gl_ABSOLUTE_HEADER.
458         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
459         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
460         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
461         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
462         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
463         * m4/math_h.m4 (gl_MATH_H): Likewise.
464         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
465         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
466         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
467         * m4/stdint.m4 (gl_STDINT_H): Likewise.
468         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
469         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
470         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
471         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
472         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
473         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
474         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
475         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
476         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
477         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
478         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
479         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
480         * m4/inttypes.m4 (gl_INTTYPES_H): Define
481         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
482         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
483         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
484         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
485         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
486         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
487         * lib/float_.h: Likewise.
488         * lib/inttypes_.h: Likewise.
489         * lib/math_.h: Likewise.
490         * lib/search_.h: Likewise.
491         * lib/signal_.h: Likewise.
492         * lib/stdint_.h: Likewise.
493         * lib/stdio_.h: Likewise.
494         * lib/stdlib_.h: Likewise.
495         * lib/string_.h: Likewise.
496         * lib/sys_stat_.h: Likewise.
497         * lib/sys_time_.h: Likewise.
498         * lib/time_.h: Likewise.
499         * lib/unistd_.h: Likewise.
500         * lib/wchar_.h: Likewise.
501         * lib/wctype_.h: Likewise.
502         * lib/dirent_.h: Likewise.
503         * lib/iconv_.h: Likewise.
504         * lib/locale_.h: Likewise.
505         * lib/netinet_in_.h: Likewise.
506         * lib/sys_select_.h: Likewise.
507         * lib/sys_socket_.h: Likewise.
508         * lib/sysexits_.h: Likewise.
509         * modules/fcntl (Depends-on): Depend on include_next, not
510         absolute_header.
511         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
512         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
513         * modules/fchdir: Likewise.
514         * modules/float: Likewise.
515         * modules/iconv_open: Likewise.
516         * modules/inttypes: Likewise.
517         * modules/locale: Likewise.
518         * modules/math: Likewise.
519         * modules/netinet_in: Likewise.
520         * modules/search: Likewise.
521         * modules/signal: Likewise.
522         * modules/stdint: Likewise.
523         * modules/stdio: Likewise.
524         * modules/stdlib: Likewise.
525         * modules/string: Likewise.
526         * modules/sys_select: Likewise.
527         * modules/sys_socket: Likewise.
528         * modules/sys_stat: Likewise.
529         * modules/sys_time: Likewise.
530         * modules/sysexits: Likewise.
531         * modules/time: Likewise.
532         * modules/unistd: Likewise.
533         * modules/wchar: Likewise.
534         * modules/wctype: Likewise.
535         * modules/sys_stat: Change maintainer to "all".
536         * modules/unistd: Likewise.
537
538 2007-06-20  Karl Berry  <karl@gnu.org>
539
540         * config/srclist.txt: track www changes in license files.
541
542 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
543
544         * build-aux/bootstrap: Remove stray dot.
545         Make sure build_aux settings are honored when linking
546         gnulib_extra_files.
547
548 2007-06-19  Eric Blake  <ebb9@byu.net>
549
550         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
551         Allow compilation on cygwin.
552
553 2007-06-19  Jim Meyering  <jim@meyering.net>
554
555         xreadlink-with-size: Remove module.  No longer used.
556         Ex-callers now use xreadlink or mreadlink-with-size.
557         * modules/xreadlink-with-size: Remove module.
558         * lib/xreadlink-with-size.c: Remove file.
559         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
560         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
561         just before the function definition *is* accurate.
562
563         Eliminate one way canonicalize_filename_mode could exit.
564         * lib/canonicalize.c (canonicalize_filename_mode):
565         Use mreadlink_with_size, not xreadlink_with_size.
566
567 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
568
569         Detect porting problems to FreeBSD/arm, which has time_t wider than
570         long int.  Original problem reported for GNU diff by Xin Li in
571         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
572         * modules/getdate (Depends-on): Add intprops, verify.
573         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
574         is an integer type no wider than long int.
575
576 2007-06-18  Jim Meyering  <jim@meyering.net>
577
578         New module: mreadlink-with-size.
579         * MODULES.html.sh: Add mreadlink-with-size.
580         * modules/mreadlink-with-size: New module
581         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
582         not xreadlink-with-size.
583         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
584
585 2007-06-16  Bruno Haible  <bruno@clisp.org>
586
587         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
588         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
589         Reported by Gary V. Vaughan <gary@gnu.org>.
590
591 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
592
593         Revamp lchown so that it lives in unistd.h where it belongs.
594         * lib/lchown.h: Remove.
595         * lib/dirchownmod.c: Don't include lib/lchown.h.
596         * lib/fchownat.c: Likewise.
597         * lib/openat.c: Likewise.
598         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
599         does not follow symlinks.
600         (EOPNOTSUPP): Define if not defined.
601         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
602         is defined to 0.
603         (lchown): New decl.
604         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
605         Do not check for lchown decl.
606         Set REPLACE_LCHOWN.
607         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
608         REPLACE_LCHOWN.
609         * modules/chown: Make it clear it follows symlinks.
610         * modules/lchown: Make it clear it doesn't follow symlinks.
611         (Files): Remove lib/lchown.h
612         (Depends-on): Add unistd.
613         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
614         (Include): Include <unistd.h>, not "lchown.h".
615         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
616         REPLACE_LCHOWN.
617
618 2007-06-15  Jim Meyering  <jim@meyering.net>
619
620         Change license (GPL to LGPL) of fsusage and dependents.
621         * modules/fsusage (License): Change to LGPL.
622         * modules/full-read (License): Likewise.
623         * modules/full-write (License): Likewise.
624         * modules/safe-read (License): Likewise.
625         * modules/safe-write (License): Likewise.
626
627 2007-06-14  Ben Pfaff  <blp@gnu.org>
628
629         Missing part of allocsa -> malloca transition.
630         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
631         gl_MALLOCA.
632
633 2007-06-12  Bruno Haible  <bruno@clisp.org>
634
635         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
636         to ia64, x86_64, i386.
637         Reported by Eric Blake.
638
639 2007-06-12  Bruno Haible  <bruno@clisp.org>
640
641         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
642         cross-compiling to x86_64.
643
644 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
645
646         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
647         glitch reported by Ralf Wildenhues in
648         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
649
650         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
651         Vin Shelton.
652
653 2007-06-11  Bruno Haible  <bruno@clisp.org>
654
655         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
656         replacement string.
657         Reported by Eric Blake.
658
659 2007-06-10  Bruno Haible  <bruno@clisp.org>
660
661         Prepare vasnprintf code for use with Unicode strings.
662         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
663         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
664         TYPE_U32_STRING.
665         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
666         a_u32_string variants.
667         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
668         * lib/printf-args.c: Don't include config.h and the specification
669         header if PRINTF_FETCHARGS is already defined.
670         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
671         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
672         TYPE_U16_STRING, TYPE_U32_STRING.
673         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
674         u16_directive, u16_directives, u32_directive, u32_directives): New
675         types.
676         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
677         New declarations.
678         * lib/printf-parse.c: Don't include config.h and the specification
679         header if PRINTF_PARSE is already defined. Eliminate the set of
680         parameters for WIDE_CHAR_VERSION; the user of this file must provide
681         them now. Include c-ctype.h.
682         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
683         directive and CHAR_T_ONLY_ASCII.
684         * lib/vasnprintf.c: Don't include config.h and the specification header
685         if VASNPRINTF is already defined.
686         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
687         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
688         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
689         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
690         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
691         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
692         code accordingly.
693         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
694         pad_ourselves also in this case, with the 'c' and 's' directives, and
695         with a different notion of "width".
696         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
697
698 2007-06-10  Bruno Haible  <bruno@clisp.org>
699
700         * modules/unistr/u32-mbsnlen: New file.
701         * lib/unistr/u32-mbsnlen.c: New file.
702
703         * modules/unistr/u16-mbsnlen: New file.
704         * lib/unistr/u16-mbsnlen.c: New file.
705
706         * modules/unistr/u8-mbsnlen: New file.
707         * lib/unistr/u8-mbsnlen.c: New file.
708
709         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
710         declarations.
711
712 2007-06-10  Bruno Haible  <bruno@clisp.org>
713
714         * lib/string_.h (mbsnlen): New declaration.
715         * lib/mbsnlen.c: New file.
716         * m4/mbsnlen.m4: New file.
717         * modules/mbsnlen: New file.
718         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
719         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
720         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
721
722 2007-06-10  Bruno Haible  <bruno@clisp.org>
723
724         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
725
726 2007-06-10  Bruno Haible  <bruno@clisp.org>
727
728         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
729         * lib/mbuiter.h: Likewise.
730
731 2007-06-10  Bruno Haible  <bruno@clisp.org>
732
733         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
734         declaration.
735
736 2007-06-10  Karl Berry  <karl@gnu.org>
737
738         * config/srclist.txt: remove gettext entries, Bruno prefers
739         to update individually.
740
741 2007-06-10  Bruno Haible  <bruno@clisp.org>
742
743         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
744         'maxlen'. Ensure only length + width bytes are allocated, not
745         length + 1 + width.
746
747 2007-06-09  Bruno Haible  <bruno@clisp.org>
748
749         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
750         (CHAR_T): Remove macro.
751         (VASNPRINTF): Update.
752
753 2007-06-09  Bruno Haible  <bruno@clisp.org>
754
755         * MODULES.html.sh (Unicode string functions): Add the new modules.
756
757         * modules/uniconv/u32-conv-to-enc: New file.
758         * lib/uniconv/u32-conv-to-enc.c: New file.
759         * modules/uniconv/u32-conv-to-enc-tests: New file.
760         * tests/uniconv/test-u32-conv-to-enc.c: New file.
761
762         * modules/uniconv/u16-conv-to-enc: New file.
763         * lib/uniconv/u16-conv-to-enc.c: New file.
764         * lib/uniconv/u-conv-to-enc.h: New file.
765         * modules/uniconv/u16-conv-to-enc-tests: New file.
766         * tests/uniconv/test-u16-conv-to-enc.c: New file.
767
768         * modules/uniconv/u8-conv-to-enc: New file.
769         * lib/uniconv/u8-conv-to-enc.c: New file.
770         * modules/uniconv/u8-conv-to-enc-tests: New file.
771         * tests/uniconv/test-u8-conv-to-enc.c: New file.
772
773         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
774         u32_conv_to_encoding): New declarations.
775
776 2007-06-09  Bruno Haible  <bruno@clisp.org>
777
778         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
779
780 2007-06-09  Bruno Haible  <bruno@clisp.org>
781
782         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
783         * modules/malloca: Renamed from modules/allocsa, updated.
784         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
785         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
786         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
787         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
788         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
789         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
790         * modules/xmalloca: Renamed from modules/xallocsa, updated.
791         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
792         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
793         * modules/c-strcasestr (Depends-on): Update.
794         * lib/c-strcasestr.c: Update.
795         * modules/c-strstr (Depends-on): Update.
796         * lib/c-strstr.c: Update.
797         * modules/canonicalize-lgpl (Depends-on): Update.
798         * lib/canonicalize-lgpl.c: Update.
799         * modules/clean-temp (Depends-on): Update.
800         * lib/clean-temp.c: Update.
801         * modules/csharpcomp (Depends-on): Update.
802         * lib/csharpcomp.c: Update.
803         * modules/csharpexec (Depends-on): Update.
804         * lib/csharpexec.c: Update.
805         * modules/javacomp (Depends-on): Update.
806         * lib/javacomp.c: Update.
807         * modules/javaexec (Depends-on): Update.
808         * lib/javaexec.c: Update.
809         * modules/mbscasestr (Depends-on): Update.
810         * lib/mbscasestr.c: Update.
811         * modules/mbsstr (Depends-on): Update.
812         * lib/mbsstr.c: Update.
813         * modules/setenv (Depends-on): Update.
814         * lib/setenv.c: Update.
815         * modules/strcasestr (Depends-on): Update.
816         * lib/strcasestr.c: Update.
817         * modules/striconveha (Depends-on): Update.
818         * lib/striconveha.c: Update.
819         * modules/relocatable-prog-wrapper (Files): Update.
820         * lib/relocwrapper.c: Update.
821         * build-aux/install-reloc: Update.
822         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
823
824 2007-06-08  Bruno Haible  <bruno@clisp.org>
825
826         Port to uClibc.
827         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
828         * lib/fpurge.c (fpurge): Likewise.
829         * lib/freading.c (freading): Likewise.
830         * lib/fseeko.c (rpl_fseeko): Likewise.
831         * lib/fseterr.c (fseterr): Likewise.
832         * lib/fwriting.c (fwriting): Likewise.
833         * tests/test-fflush.c (main): Avoid a failure on uClibc.
834
835 2007-06-08  Bruno Haible  <bruno@clisp.org>
836
837         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
838         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
839         * modules/gettext (Files): Add m4/intlmacosx.m4.
840
841 2007-06-07  Bruno Haible  <bruno@clisp.org>
842
843         * modules/localename-tests: New file.
844         * tests/test-localename.c: New file.
845
846         New module 'localename'.
847         * lib/localename.h: New file.
848         * lib/localename.c: New file, from GNU gettext.
849         * m4/localename.m4: New file.
850         * modules/localename: New file.
851
852 2007-06-07  Bruno Haible  <bruno@clisp.org>
853
854         Work around the lack of <wchar.h> on some builds of uClibc.
855         * doc/headers/wchar.texi: Update.
856         * lib/wchar_.h: Include <wchar.h> only if it exists.
857         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
858         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
859         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
860         doesn't exist.
861         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
862         * modules/mbfile (Depends-on): Add wchar.
863         * modules/mbiter (Depends-on): Likewise.
864         * modules/mbuiter (Depends-on): Likewise.
865         Reported by Simon Josefsson.
866
867 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
868
869         Work around problem reported by Steven M. Schweda in
870         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
871         Tru64 5.1B with the Compaq compiler environment installed declares
872         an 'isblank' function but does not define it in the C library.
873         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
874         * lib/regex_internal.h (isblank): Likewise.
875         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
876         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
877
878 2007-06-05  Bruno Haible  <bruno@clisp.org>
879
880         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
881         ia64.
882         * modules/printf-safe: New file.
883         * modules/fprintf-posix (Depends-on): Add printf-safe.
884         * modules/printf-posix (Depends-on): Likewise.
885         * modules/snprintf-posix (Depends-on): Likewise.
886         * modules/sprintf-posix (Depends-on): Likewise.
887         * modules/vasnprintf-posix (Depends-on): Likewise.
888         * modules/vasprintf-posix (Depends-on): Likewise.
889         * modules/vfprintf-posix (Depends-on): Likewise.
890         * modules/vprintf-posix (Depends-on): Likewise.
891         * modules/vsnprintf-posix (Depends-on): Likewise.
892         * modules/vsprintf-posix (Depends-on): Likewise.
893         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
894         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
895         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
896         "no" on i386, x86_64, ia64.
897         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
898         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
899         on i386, x86_64, ia64.
900         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
901         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
902         on i386, x86_64, ia64.
903         * tests/test-vasnprintf-posix.c: Include float.h.
904         (LDBL80_WORDS): New macro.
905         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
906         on i386, x86_64, ia64.
907         * tests/test-vasprintf-posix.c: Include float.h.
908         (LDBL80_WORDS): New macro.
909         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
910         on i386, x86_64, ia64.
911         * tests/test-snprintf-posix.c: Include float.h.
912         * tests/test-sprintf-posix.c: Likewise.
913         * tests/test-vsnprintf-posix.c: Likewise.
914         * tests/test-vsprintf-posix.c: Likewise.
915
916 2007-06-05  Bruno Haible  <bruno@clisp.org>
917
918         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
919         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
920         non-IEEE numbers on i386, x86_64, ia64.
921         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
922         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
923         * tests/test-isnanl.h: Include float.h.
924         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
925
926 2007-06-05  Bruno Haible  <bruno@clisp.org>
927
928         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
929         also the %a / %A. Handle the %a / %A code before this extra handling.
930
931 2007-06-05  Bruno Haible  <bruno@clisp.org>
932
933         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
934         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
935
936 2007-06-05  Bruno Haible  <bruno@clisp.org>
937
938         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
939         typo in variable name.
940
941 2007-06-05  Eric Blake  <ebb9@byu.net>
942
943         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
944         Reported by Simon Josefsson.
945
946 2007-06-04  Bruno Haible  <bruno@clisp.org>
947
948         Avoid test failures on some PowerPC platforms.
949         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
950         Define differently for PowerPC.
951         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
952         Reported by Gary V. Vaughan <gary@gnu.org>.
953
954 2007-06-02  Bruno Haible  <bruno@clisp.org>
955
956         Fix test-stdint failure on FreeBSD/ia64.
957         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
958         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
959         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
960         * doc/headers/stdint.texi: Update.
961
962 2007-06-01  Bruno Haible  <bruno@clisp.org>
963
964         * tests/test-binary-io.c (main): Pass a third argument to open().
965         Reported by Gary V. Vaughan <gary@gnu.org>.
966
967 2007-06-01  Bruno Haible  <bruno@clisp.org>
968
969         * doc/functions/frexpl.texi: Update for mingw.
970
971 2007-06-01  Bruno Haible  <bruno@clisp.org>
972
973         * tests/test-lseek.c (main): Disable test of errno for invalid third
974         argument.
975         * doc/functions/lseek.texi: Update.
976         Reported by Gary V. Vaughan <gary@gnu.org>.
977
978 2007-05-28  Bruno Haible  <bruno@clisp.org>
979
980         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
981
982 2007-05-31  Eric Blake  <ebb9@byu.net>
983
984         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
985         cross compiling.
986
987 2007-05-30  Eric Blake  <ebb9@byu.net>
988         and Bruno Haible  <bruno@clisp.org>
989
990         Work around mingw test failures exposed by m4-1.4.9b.
991         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
992         * tests/test-unistd.c: Disable uid_t and git_t tests for the
993         moment.
994
995 2007-05-30  Bruno Haible  <bruno@clisp.org>
996
997         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
998         assuming that they are closed. Needed on HP-UX 11.
999
1000 2007-05-29  Bruno Haible  <bruno@clisp.org>
1001
1002         Fix a problem with #include_next.
1003         * lib/dirent_.h: Split the double-inclusion guard.
1004         * lib/fcntl_.h: Likewise.
1005         * lib/float_.h: Likewise.
1006         * lib/iconv_.h: Likewise.
1007         * lib/inttypes_.h: Likewise.
1008         * lib/locale_.h: Likewise.
1009         * lib/math_.h: Likewise.
1010         * lib/netinet_in_.h: Likewise.
1011         * lib/search_.h: Likewise.
1012         * lib/signal_.h: Likewise.
1013         * lib/stdint_.h: Likewise.
1014         * lib/stdio_.h: Likewise.
1015         * lib/stdlib_.h: Likewise.
1016         * lib/string_.h: Likewise.
1017         * lib/sys_select_.h: Likewise.
1018         * lib/sys_socket_.h: Likewise.
1019         * lib/sys_stat_.h: Likewise.
1020         * lib/sys_time_.h: Likewise.
1021         * lib/sysexits_.h: Likewise.
1022         * lib/time_.h: Likewise.
1023         * lib/unistd_.h: Likewise.
1024         * lib/wchar_.h: Likewise.
1025         * lib/wctype_.h: Likewise.
1026
1027 2007-05-29  Bruno Haible  <bruno@clisp.org>
1028
1029         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1030         for the moment.
1031
1032 2007-05-29  Bruno Haible  <bruno@clisp.org>
1033
1034         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1035         invocation.
1036         Reported by Eric Blake.
1037
1038 2007-05-29  Bruno Haible  <bruno@clisp.org>
1039
1040         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1041         compiling case.
1042
1043 2007-05-29  Eric Blake  <ebb9@byu.net>
1044             Bruno Haible  <bruno@clisp.org>
1045
1046         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1047         cross compiles.
1048
1049 2007-05-28  Eric Blake  <ebb9@byu.net>
1050
1051         * modules/closein-tests (test_closein_LDADD): Support test on
1052         cygwin with libtool.
1053
1054 2007-05-28  Bruno Haible  <bruno@clisp.org>
1055
1056         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1057         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1058         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1059         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1060         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1061         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1062         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1063         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1064         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1065
1066 2007-05-28  Eric Blake  <ebb9@byu.net>
1067
1068         Unconditionally include <config.h> in unit tests.
1069         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1070         * tests/test-allocsa.c, tests/test-arcfour.c,
1071         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1072         tests/test-array_list.c, tests/test-array_oset.c,
1073         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1074         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1075         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1076         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1077         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1078         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1079         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1080         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1081         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1082         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1083         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1084         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1085         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1086         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1087         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1088         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1089         test-md5.c, test-memmem.c, test-printf-posix.c,
1090         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1091         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1092         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1093         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1094         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1095         test-vasnprintf-posix2.c, test-vasnprintf.c,
1096         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1097         test-vfprintf-posix.c, test-vprintf-posix.c,
1098         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1099         test-xvasprintf.c: Likewise.
1100
1101 2007-05-28  Bruno Haible  <bruno@clisp.org>
1102
1103         * gnulib-tool (func_import): Remember the --with-tests command-line
1104         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1105         Reported by Eric Blake.
1106
1107 2007-05-28  Bruno Haible  <bruno@clisp.org>
1108
1109         * modules/ftell-tests: New file.
1110         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1111         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1112
1113         * lib/ftell.c: New file.
1114         * modules/ftell: New file.
1115         * m4/ftell.m4: New file.
1116         * doc/functions/ftell.texi: Update.
1117         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1118         REPLACE_FTELL.
1119         * lib/stdio_.h (rpl_ftell): New declaration.
1120         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1121         REPLACE_FTELL.
1122
1123 2007-05-28  Eric Blake  <ebb9@byu.net>
1124
1125         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1126
1127 2007-05-28  Bruno Haible  <bruno@clisp.org>
1128
1129         * modules/fseek-tests: New file.
1130         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1131         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1132
1133         * lib/fseek.c: New file.
1134         * modules/fseek: New file.
1135         * m4/fseek.m4: New file.
1136         * doc/functions/fseek.texi: Update.
1137         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1138         REPLACE_FSEEK.
1139         * lib/stdio_.h (rpl_fseek): New declaration.
1140         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1141         REPLACE_FSEEK.
1142
1143 2007-05-28  Bruno Haible  <bruno@clisp.org>
1144
1145         * lib/stdio_.h (fflush): More comments.
1146
1147 2007-05-28  Bruno Haible  <bruno@clisp.org>
1148
1149         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1150         runtime test.
1151
1152 2007-05-28  Eric Blake  <ebb9@byu.net>
1153
1154         Improve lseek module.
1155         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1156         * lib/unistd_.h (lseek): Scale back link warning message.
1157         * tests/test-lseek.c: Beef up test.
1158         * tests/test-lseek.sh: Exercise more facets of lseek.
1159         Reported by Bruno Haible.
1160
1161 2007-05-28  Bruno Haible  <bruno@clisp.org>
1162
1163         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1164         to define.
1165
1166 2007-05-27  Bruno Haible  <bruno@clisp.org>
1167
1168         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1169
1170 2007-05-27  Bruno Haible  <bruno@clisp.org>
1171
1172         * modules/openmp: New file.
1173         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1174         Noah Misch.
1175
1176 2007-05-26  Bruno Haible  <bruno@clisp.org>
1177
1178         * modules/chdir-long (Depends-on): Add fchdir.
1179         * modules/chdir-safer (Depends-on): Likewise.
1180         * modules/fts (Depends-on): Likewise.
1181         * modules/fts-lgpl (Depends-on): Likewise.
1182         * modules/openat (Depends-on): Likewise.
1183         * modules/savewd (Depends-on): Likewise.
1184
1185 2007-05-24  Eric Blake  <ebb9@byu.net>
1186
1187         Fix lseek on mingw.
1188         * modules/lseek: New module.
1189         * m4/lseek.m4: New file.
1190         * lib/lseek.c: New file.
1191         * modules/lseek-tests: New file.
1192         * tests/test-lseek.c: New file.
1193         * tests/test-lseek.sh: New file.
1194         * MODULES.html.sh: Document lseek module.
1195         * modules/fflush (Depends-on): Add lseek, fseeko.
1196         * modules/fseeko (Depends-on): Likewise.
1197         * modules/ftello (Depends-on): Likewise.
1198         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1199         broken.
1200         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1201         broken.
1202         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1203         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1204         * lib/ftello.c (rpl_ftello): Likewise.
1205         * tests/test-fseeko.c (main): Test this.
1206         * tests/test-fseeko.sh: Likewise.
1207         * tests/test-ftello.c (main): Likewise.
1208         * tests/test-ftello.sh: Likewise.
1209         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1210         implies replacing fseek.
1211         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1212         HAVE_FTELLO.
1213         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1214         * modules/unistd (Makefile.am): Likewise.
1215         * lib/unistd_.h (lseek): Declare a replacement.
1216         * doc/functions/lseek.texi (lseek): Document this fix.
1217         * doc/functions/fseek.texi (fseek): Likewise.
1218         * doc/functions/ftell.texi (ftell): Likewise.
1219
1220 2007-05-24  Bruno Haible  <bruno@clisp.org>
1221
1222         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1223         in the printed representation of a NaN.
1224         * tests/test-vasprintf-posix.c (test_function): Likewise.
1225         * tests/test-snprintf-posix.h (test_function): Likewise.
1226         * tests/test-sprintf-posix.h (test_function): Likewise.
1227         Reported by Eric Blake.
1228
1229 2007-05-23  Eric Blake  <ebb9@byu.net>
1230
1231         Fix fseeko/ftello on cygwin 1.5.24.
1232         * doc/functions/fseeko.texi (fseeko): Document the fix.
1233         * doc/functions/ftello.texi (ftello): Document the fix.
1234         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1235         * doc/functions/stdout.text (stdout): New file.
1236         * doc/functions/stderr.text (stderr): New file.
1237         * doc/gnulib.texi (Function Substitutes): Use new files.
1238         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1239         prior to 1.7.0.
1240         * tests/test-ftello.c (main): Likewise for ftello.
1241         * tests/test-fseeko.sh: New file.
1242         * tests/test-ftello.sh: New file.
1243         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1244         with seekable stdin.
1245         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1246         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1247         (gl_REPLACE_FSEEKO): New macro.
1248         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1249         * modules/fseeko (Files): Distribute fseeko.c.
1250         * modules/ftello (Files): Distribute ftello.c.
1251         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1252         mode.
1253         * lib/ftello.c (rpl_ftello): New file.
1254         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1255         fseeko, ftello.
1256         (gl_STDIN_LARGE_OFFSET): New macro.
1257         * modules/stdio (Makefile.am): Perform the replacement.
1258         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1259
1260 2007-05-23  Bruno Haible  <bruno@clisp.org>
1261
1262         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1263         GNULIB_POSIXCHECK is defined.
1264
1265 2007-05-21  Bruno Haible  <bruno@clisp.org>
1266
1267         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1268         Check also the output for NaN arguments. When cross-compiling, guess
1269         no on IRIX.
1270         * lib/vasnprintf.c: Update comments.
1271         * tests/test-vasnprintf-posix.c (strisnan): New function.
1272         (test_function): Use it.
1273         * tests/test-vasprintf-posix.c (strisnan): New function.
1274         (test_function): Use it.
1275         * tests/test-snprintf-posix.h (strisnan): New function.
1276         (test_function): Use it.
1277         * tests/test-sprintf-posix.h (strisnan): New function.
1278         (test_function): Use it.
1279         Reported by Eric Blake.
1280
1281 2007-05-20  Bruno Haible  <bruno@clisp.org>
1282
1283         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1284         numbers that fails on BeOS.
1285         * doc/functions/frexpl.texi: Update.
1286
1287 2007-05-20  Jim Meyering  <jim@meyering.net>
1288
1289         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
1290         forced upon us by glibc-2.6.
1291
1292 2007-05-20  Bruno Haible  <bruno@clisp.org>
1293
1294         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
1295         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
1296         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
1297         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
1298         NEED_PRINTF_INFINITE.
1299         (is_infinitel): New function.
1300         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
1301         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
1302         gl_PREREQ_VASNPRINTF_INFINITE.
1303         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
1304         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1305         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
1306         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
1307         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
1308         gl_PREREQ_VASNPRINTF_INFINITE.
1309         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1310         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1311         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1312         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1313         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1314         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1315         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1316         * doc/functions/fprintf.texi: Update.
1317         * doc/functions/printf.texi: Update.
1318         * doc/functions/snprintf.texi: Update.
1319         * doc/functions/sprintf.texi: Update.
1320         * doc/functions/vfprintf.texi: Update.
1321         * doc/functions/vprintf.texi: Update.
1322         * doc/functions/vsnprintf.texi: Update.
1323         * doc/functions/vsprintf.texi: Update.
1324
1325 2007-05-20  Bruno Haible  <bruno@clisp.org>
1326
1327         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
1328         was not found in libc.
1329         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
1330
1331 2007-05-20  Bruno Haible  <bruno@clisp.org>
1332
1333         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1334         printed as "-nan" instead of "nan".
1335         * tests/test-vasprintf-posix.c (test_function): Likewise.
1336         * tests/test-snprintf-posix.h (test_function): Likewise.
1337         * tests/test-sprintf-posix.h (test_function): Likewise.
1338         Needed for HP-UX 11.
1339
1340 2007-05-20  Jim Meyering  <jim@meyering.net>
1341
1342         Fix buggy test for the fchownat-deref bug.
1343         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
1344         symlink required for the run-test.  Without it, this test would
1345         always declare that fchownat doesn't work, and client code would
1346         unnecessarily use the replacement function with fixed libc.
1347         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
1348         Reported by Greg Schafer.
1349
1350 2007-05-19  Bruno Haible  <bruno@clisp.org>
1351
1352         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
1353         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
1354         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
1355         Needed for IRIX 6.5 and Solaris 2.5.1.
1356
1357 2007-05-19  Bruno Haible  <bruno@clisp.org>
1358
1359         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
1360         (test_function): Skip tests involving -0.0 on platforms where
1361         -0.0 = 0.0.
1362         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
1363         (test_function): Skip tests involving -0.0 on platforms where
1364         -0.0 = 0.0.
1365         * tests/test-snprintf-posix.h (have_minus_zero): New function.
1366         (test_function): Skip tests involving -0.0 on platforms where
1367         -0.0 = 0.0.
1368         * tests/test-sprintf-posix.h (have_minus_zero): New function.
1369         (test_function): Skip tests involving -0.0 on platforms where
1370         -0.0 = 0.0.
1371         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
1372         tests.
1373         * tests/test-printf-posix.h (test_function): Likewise.
1374         * tests/test-printf-posix.output: Remove all -0.0 related results.
1375         Needed for IRIX 6.5.
1376
1377 2007-05-19  Bruno Haible  <bruno@clisp.org>
1378
1379         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1380         printed as "nan0x7fffffff" instead of "nan".
1381         * tests/test-vasprintf-posix.c (test_function): Likewise.
1382         * tests/test-snprintf-posix.h (test_function): Likewise.
1383         * tests/test-sprintf-posix.h (test_function): Likewise.
1384         * tests/test-fprintf-posix.h (NaN): Remove macro.
1385         (test_function): Remove all NaN related tests.
1386         * tests/test-printf-posix.h (NaN): Remove macro.
1387         (test_function): Remove all NaN related tests.
1388         * tests/test-printf-posix.output: Remove all NaN related results.
1389         Needed for IRIX 6.5.
1390
1391 2007-05-19  Bruno Haible  <bruno@clisp.org>
1392
1393         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
1394         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
1395
1396 2007-05-19  Bruno Haible  <bruno@clisp.org>
1397
1398         * lib/float_.h: New file.
1399         * m4/float_h.m4: New file.
1400         * modules/float: New file.
1401         * modules/isnanl (Dependencies): Add float.
1402         * modules/isnanl-nolibm (Dependencies): Likewise.
1403         * modules/mathl (Dependencies): Likewise.
1404         * modules/printf-frexpl (Dependencies): Likewise.
1405         * modules/signbit (Dependencies): Likewise.
1406         * modules/vasnprintf (Dependencies): Likewise.
1407         * doc/headers/float.texi: Update.
1408
1409 2007-05-19  Jim Meyering  <jim@meyering.net>
1410
1411         * lib/utimens.c (gl_futimens): Rename from futimens,
1412         now that glibc-2.6 declares futimens.
1413         * lib/utimens.h: Likewise.
1414
1415 2007-05-19  Bruno Haible  <bruno@clisp.org>
1416
1417         Avoid test failures on mingw.
1418         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
1419         * tests/test-printf-posix.sh: Likewise.
1420         * tests/test-vfprintf-posix.sh: Likewise.
1421         * tests/test-vprintf-posix.sh: Likewise.
1422
1423 2007-05-19  Bruno Haible  <bruno@clisp.org>
1424
1425         Fix *printf result for NaN, Inf, -0.0 on mingw.
1426         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
1427         * lib/vasnprintf.c: Include math.h and isnan.h.
1428         (is_infinite_or_zero): New function.
1429         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
1430         values in the %f, %F, %e, %E, %g, %G directives.
1431         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
1432         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1433         gl_PRINTF_INFINITE and test its result. Invoke
1434         gl_PREREQ_VASNPRINTF_INFINITE.
1435         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1436         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1437         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1438         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1439         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1440         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1441         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1442         * doc/functions/fprintf.texi: Update.
1443         * doc/functions/printf.texi: Update.
1444         * doc/functions/snprintf.texi: Update.
1445         * doc/functions/sprintf.texi: Update.
1446         * doc/functions/vfprintf.texi: Update.
1447         * doc/functions/vprintf.texi: Update.
1448         * doc/functions/vsnprintf.texi: Update.
1449         * doc/functions/vsprintf.texi: Update.
1450
1451 2007-05-19  Bruno Haible  <bruno@clisp.org>
1452
1453         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
1454         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
1455         Instead of multiplying with 10^k, set extra_zeroes to k.
1456         (scale10_round_long_double): Remove function.
1457
1458 2007-05-18  Bruno Haible  <bruno@clisp.org>
1459
1460         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
1461         introduced on 2007-05-06.
1462
1463 2007-05-18  Bruno Haible  <bruno@clisp.org>
1464
1465         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
1466         %g directives.
1467         * tests/test-vasprintf-posix.c (test_function): Likewise.
1468         * tests/test-snprintf-posix.h (test_function): Likewise.
1469         * tests/test-sprintf-posix.h (test_function): Likewise.
1470
1471 2007-05-18  Bruno Haible  <bruno@clisp.org>
1472
1473         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
1474         (strmatch): New function.
1475         (test_function): Test the %f directive on numbers of various exponents.
1476         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
1477         (strmatch): New function.
1478         (test_function): Test the %f directive on numbers of various exponents.
1479         * tests/test-snprintf-posix.h (strmatch): New function.
1480         (test_function): Test the %f directive on numbers of various exponents.
1481         * tests/test-sprintf-posix.h (strmatch): New function.
1482         (test_function): Test the %f directive on numbers of various exponents.
1483         * tests/test-snprintf-posix.c (SIZEOF): New macro.
1484         * tests/test-sprintf-posix.c (SIZEOF): New macro.
1485         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
1486         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
1487
1488 2007-05-18  Bruno Haible  <bruno@clisp.org>
1489
1490         Add support for 'long double' number output.
1491         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
1492         * lib/vasnprintf.c: Include math.h and float+.h.
1493         (mp_limb_t): New type.
1494         (GMP_LIMB_BITS): New macro.
1495         (mp_twolimb_t): New type.
1496         (GMP_TWOLIMB_BITS): New macro.
1497         (mpn_t): New type.
1498         (multiply, divide, convert_to_decimal, decode_long_double,
1499         scale10_round_long_double, scale10_round_decimal_long_double,
1500         floorlog10l): New functions.
1501         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
1502         for the %f, %F, %e, %E, %g, %G directives.
1503         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
1504         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1505         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
1506         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
1507         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1508         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1509         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1510         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1511         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1512         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1513         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1514         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
1515         * modules/snprintf-posix (Depends-on): Likewise.
1516         * modules/sprintf-posix (Depends-on): Likewise.
1517         * modules/vasnprintf-posix (Depends-on): Likewise.
1518         * modules/vasprintf-posix (Depends-on): Likewise.
1519         * modules/vfprintf-posix (Depends-on): Likewise.
1520         * modules/vsnprintf-posix (Depends-on): Likewise.
1521         * modules/vsprintf-posix (Depends-on): Likewise.
1522         * modules/vasnprintf (Files): Add lib/float+.h.
1523         * doc/functions/fprintf.texi: Update.
1524         * doc/functions/printf.texi: Update.
1525         * doc/functions/snprintf.texi: Update.
1526         * doc/functions/sprintf.texi: Update.
1527         * doc/functions/vfprintf.texi: Update.
1528         * doc/functions/vprintf.texi: Update.
1529         * doc/functions/vsnprintf.texi: Update.
1530         * doc/functions/vsprintf.texi: Update.
1531
1532 2007-05-18  Bruno Haible  <bruno@clisp.org>
1533
1534         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
1535
1536 2007-05-18  Bruno Haible  <bruno@clisp.org>
1537
1538         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
1539         for printing 64-bit integers. Needed for mingw.
1540
1541 2007-05-18  Bruno Haible  <bruno@clisp.org>
1542
1543         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1544         gl_FUNC_FREXPL_WORKS.
1545         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
1546
1547 2007-05-18  Bruno Haible  <bruno@clisp.org>
1548
1549         * modules/frexpl-nolibm-tests: New file.
1550
1551         * modules/frexpl-nolibm: New file.
1552         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
1553
1554 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
1555
1556         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
1557         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1558         GCC 4.2, which otherwise issues a lot of warnings.
1559         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
1560         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
1561         Likewise.
1562         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
1563         * modules/iconv_open (iconv.h): Likewise.
1564         * modules/locale (locale.h): Likewise.
1565         * modules/netinet_in (netinet/in.h): Likewise.
1566         * modules/sys_select (sys_select.h): Likewise.
1567         * modules/sys_socket (sys/socket.h): Likewise.
1568         * modules/sys_stat (sys/stat.h): Likewise.
1569         * modules/sysexits (sysexits.h): Likewise.
1570         * modules/unistd (unistd.h): Likewise.
1571
1572 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1573
1574         * modules/closein-tests (Makefile.am): Distribute
1575         `test-closein.sh'.
1576
1577 2007-05-17  Bruno Haible  <bruno@clisp.org>
1578
1579         * tests/test-printf-posix.output: Renamed from
1580         tests/test-fprintf-posix.out.
1581         * modules/fprintf-posix-tests: Update.
1582         * modules/printf-posix-tests: Update.
1583         * modules/vfprintf-posix-tests: Update.
1584         * modules/vprintf-posix-tests: Update.
1585         * tests/test-fprintf-posix.sh: Update.
1586         * tests/test-printf-posix.sh: Update.
1587         * tests/test-vfprintf-posix.sh: Update.
1588         * tests/test-vprintf-posix.sh: Update.
1589         Reported by Ralf Wildenhues.
1590
1591 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
1592
1593         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
1594         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1595         GCC 4.2, which otherwise issues a lot of warnings.
1596         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
1597         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
1598         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
1599         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
1600         it should no longer be needed.
1601         * lib/string_.h: Likewise.
1602         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
1603         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
1604         * modules/inttypes (inttypes.h): Likewise.
1605         * modules/math (math.h): Likewise.
1606         * modules/search (search.h): Likewise.
1607         * modules/signal (signal.h): Likewise.
1608         * modules/stdint (stdint.h): Likewise.
1609         * modules/stdio (stdio.h): Likewise.
1610         * modules/stdlib (stdlib.h): Likewise.
1611         * modules/string (string.h): Likewise.
1612         * modules/sys_time (sys/time.h): Likewise.
1613         * modules/time (time.h): Likewise.
1614         * modules/wchar (wchar.h): Likewise.
1615         * modules/wctype (wtype.h): Likewise.
1616
1617 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
1618
1619         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
1620
1621 2007-05-13  Bruno Haible  <bruno@clisp.org>
1622
1623         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
1624         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1625         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
1626         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1627         (gl_PREREQ_STRTOK_R): Don't require it here.
1628
1629 2007-05-13  Bruno Haible  <bruno@clisp.org>
1630
1631         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
1632         when used in C++ mode.
1633
1634 2007-05-12  Bruno Haible  <bruno@clisp.org>
1635
1636         * lib/linebuffer.h: Tweak doc.
1637         * lib/linebuffer.c: Likewise.
1638
1639 2007-05-12  James Youngman  <jay@gnu.org>
1640
1641         * lib/linebuffer.c (readlinebuffer_delim): New function,
1642         like readlinebuffer, but use a caller-specified delimiter.
1643         (readlinebuffer): Just call readlinebuffer_delim with '\n'
1644         as the delimiter.
1645         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
1646
1647 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1648
1649         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
1650         * modules/openat (Files): Remove openat-die.c.
1651         (Depends-on): Add openat-die.
1652         * modules/openat-die: New module.
1653
1654 2007-05-06  Bruno Haible  <bruno@clisp.org>
1655
1656         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
1657         Update with info about Cygwin.
1658         * doc/functions/fprintf.texi: Update.
1659         * doc/functions/printf.texi: Update.
1660         * doc/functions/snprintf.texi: Update.
1661         * doc/functions/sprintf.texi: Update.
1662         * doc/functions/vfprintf.texi: Update.
1663         * doc/functions/vprintf.texi: Update.
1664         * doc/functions/vsnprintf.texi: Update.
1665         * doc/functions/vsprintf.texi: Update.
1666         Reported by Eric Blake.
1667
1668 2007-05-06  Bruno Haible  <bruno@clisp.org>
1669
1670         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
1671         padding ourselves for the floating-point directives.
1672         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
1673         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
1674         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1675         gl_PRINTF_FLAG_ZERO and test its result. Invoke
1676         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
1677         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1678         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1679         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1680         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1681         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1682         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1683         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1684         * tests/test-snprintf-posix.h (test_function): Also check the width
1685         and some flags in the %f directive.
1686         * tests/test-sprintf-posix.h (test_function): Likewise.
1687         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1688         * tests/test-vasprintf-posix.c (test_function): Likewise.
1689         * doc/functions/fprintf.texi: Update.
1690         * doc/functions/printf.texi: Update.
1691         * doc/functions/snprintf.texi: Update.
1692         * doc/functions/sprintf.texi: Update.
1693         * doc/functions/vfprintf.texi: Update.
1694         * doc/functions/vprintf.texi: Update.
1695         * doc/functions/vsnprintf.texi: Update.
1696         * doc/functions/vsprintf.texi: Update.
1697
1698 2007-05-06  Bruno Haible  <bruno@clisp.org>
1699
1700         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
1701         pass the ' flag character to sprintf or snprintf.
1702         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
1703         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
1704         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1705         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
1706         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
1707         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1708         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1709         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1710         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1711         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1712         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1713         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1714         * tests/test-snprintf-posix.h (test_function): Also check the grouping
1715         flag.
1716         * tests/test-sprintf-posix.h (test_function): Likewise.
1717         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1718         * tests/test-vasprintf-posix.c (test_function): Likewise.
1719         * doc/functions/fprintf.texi: Update.
1720         * doc/functions/printf.texi: Update.
1721         * doc/functions/snprintf.texi: Update.
1722         * doc/functions/sprintf.texi: Update.
1723         * doc/functions/vfprintf.texi: Update.
1724         * doc/functions/vprintf.texi: Update.
1725         * doc/functions/vsnprintf.texi: Update.
1726         * doc/functions/vsprintf.texi: Update.
1727
1728 2007-05-01  Bruno Haible  <bruno@clisp.org>
1729
1730         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
1731
1732 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
1733
1734         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
1735         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
1736
1737 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
1738
1739         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
1740         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
1741         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
1742
1743 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
1744
1745         * lib/argp-help.c (struct hol_entry): New member `ord'.
1746         (HOL_ENTRY_PTRCMP): Use ord for comparison
1747         (hol_sort): Initialize ord.
1748
1749 2007-05-01  Bruno Haible  <bruno@clisp.org>
1750
1751         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
1752         Reported by Eric Blake.
1753         * doc/gnulib.texi (Function Substitutes): Update.
1754
1755 2007-05-01  Bruno Haible  <bruno@clisp.org>
1756
1757         * doc/functions.texi: Remove file, now redundant through
1758         doc/functions/*.texi.
1759
1760 2007-05-01  Bruno Haible  <bruno@clisp.org>
1761
1762         * modules/argp (Depends-on): Add sleep.
1763
1764 2007-05-01  Bruno Haible  <bruno@clisp.org>
1765
1766         * modules/sleep-tests: New file.
1767         * tests/test-sleep.c: New file.
1768
1769         * modules/sleep: New file.
1770         * lib/sleep.c: New file.
1771         * m4/sleep.m4: New file.
1772         * lib/unistd_.h (sleep): New declaration.
1773         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
1774         HAVE_SLEEP.
1775         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
1776         * doc/functions/sleep.texi: Document the sleep module.
1777
1778 2007-05-01  Bruno Haible  <bruno@clisp.org>
1779
1780         * lib/sigprocmask.h: Remove file.
1781         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
1782         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
1783         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
1784         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
1785         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
1786         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
1787         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
1788         HAVE_SIGSET_T as a shell variable.
1789         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
1790         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
1791         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
1792         (Depends-on): Add signal. Remove verify.
1793         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
1794         (Include): Mention <signal.h> instead of sigprocmask.h.
1795         * NEWS: Mention the change.
1796         * lib/fatal-signal.c: Don't include sigprocmask.h.
1797
1798 2007-05-01  Bruno Haible  <bruno@clisp.org>
1799
1800         * modules/signal: New file.
1801         * lib/signal_.h: New file.
1802         * m4/signal_h.m4: New file.
1803
1804 2007-05-01  Bruno Haible  <bruno@clisp.org>
1805
1806         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
1807         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
1808         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
1809         HAVE_WCTYPE_CTMP_BUG into wctype.h.
1810
1811 2007-05-01  Bruno Haible  <bruno@clisp.org>
1812
1813         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
1814         configure time.
1815         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
1816         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
1817         * modules/sys_stat (Makefile.am): Substitute their values into
1818         sys/stat.h.
1819
1820 2007-05-01  Bruno Haible  <bruno@clisp.org>
1821
1822         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
1823         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
1824         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
1825
1826 2007-05-01  Bruno Haible  <bruno@clisp.org>
1827
1828         * doc/header/assert.texi: Undo last change: don't mention the gnulib
1829         'assert' module here.
1830
1831 2007-05-01  Bruno Haible  <bruno@clisp.org>
1832
1833         * doc/functions/*.texi: New files.
1834         * doc/functions/google-ranking.txt: New file.
1835         * doc/gnulib.texi (Function Substitutes): New chapter.
1836         (ctime, inet_ntoa): Remove sections.
1837         * doc/ctime.texi: Remove file.
1838         * doc/inet_ntoa.texi: Remove file.
1839         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
1840         dependencies.
1841         (%.info): New rule, specifying a --reference-limit.
1842
1843 2007-05-01  Bruno Haible  <bruno@clisp.org>
1844
1845         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
1846
1847 2007-05-01  Bruno Haible  <bruno@clisp.org>
1848
1849         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
1850         the portability of 'mkdir' to mingw systems.
1851
1852 2007-05-01  Bruno Haible  <bruno@clisp.org>
1853
1854         * doc/headers/google-ranking.txt: New file.
1855
1856 2007-04-30  Eric Blake  <ebb9@byu.net>
1857
1858         Prefer fseeko to fseek.
1859         * modules/getpass (Depends-on): Add fseeko.
1860         * lib/getpass.c (getpass): Use fseeko, not fseek.
1861
1862 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
1863
1864         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
1865         assumes the sorting is stable, while most qsort implementations
1866         are not.  Use argument addresses to ensure they never compare as
1867         equal.
1868
1869         * tests/test-argp-2.sh (usage-indent test): Fix output
1870         (func_compare): Restore diff options
1871         * tests/test-argp.c: Restore #include "progname.h"
1872
1873 2007-04-29  Bruno Haible  <bruno@clisp.org>
1874
1875         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
1876         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1877         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
1878         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1879         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
1880         (configure.ac): Define CHECK_SNPRINTF_POSIX.
1881         (TESTS, check_PROGRAMS): Add test-snprintf.
1882         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
1883         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
1884         (TESTS, check_PROGRAMS): Add test-vsnprintf.
1885         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
1886         assertions that fail on HP-UX, OSF/1, or IRIX.
1887         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
1888
1889 2007-04-29  Bruno Haible  <bruno@clisp.org>
1890
1891         * MODULES.html.sh (posix_functions): Remove 'contents'.
1892
1893 2007-04-29  Karl Berry  <karl@gnu.org>
1894
1895         * config/srclist.txt (gendocs_template_min): new entry.
1896
1897 2007-04-29  Bruno Haible  <bruno@clisp.org>
1898
1899         Work around fpurge bug on BSD systems.
1900         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
1901         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
1902         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
1903         fpurge to rpl_fpurge if the system already has this function.
1904         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
1905         the case where the system already has this function. Correct invariants
1906         on BSD systems.
1907         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
1908         BSD systems.
1909
1910 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
1911
1912         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
1913         proposed by Sven Verdoolaege.
1914
1915         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
1916         options.
1917         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
1918         (usage and help tests): Update
1919
1920 2007-04-29  Bruno Haible  <bruno@clisp.org>
1921
1922         * tests/test-fflush.c (main): Use a file of size 17, not 10.
1923         Print more information in case of failure. Disable a test on BeOS.
1924
1925 2007-04-29  Bruno Haible  <bruno@clisp.org>
1926
1927         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
1928         This helps debugging on systems on which no gdb is available.
1929
1930 2007-04-29  Bruno Haible  <bruno@clisp.org>
1931
1932         * lib/freading.h: Improve comments.
1933         * lib/fwriting.h: Likewise.
1934         * tests/test-freading.c (main): Don't check freading immediately after
1935         repositioning. Needed for glibc.
1936
1937 2007-04-29  Bruno Haible  <bruno@clisp.org>
1938
1939         * lib/freading.c (freading): Trivial simplification.
1940
1941 2007-04-28  Bruno Haible  <bruno@clisp.org>
1942
1943         * tests/test-fwriting.c (main): Also test the interaction between
1944         fflush and fwriting.
1945         * modules/fwriting-tests (Depends-on): Add fflush.
1946
1947         * tests/test-freading.c (main): Also test the interaction between
1948         fflush and freading.
1949         * modules/freading-tests (Depends-on): Add fflush.
1950
1951 2007-04-28  Bruno Haible  <bruno@clisp.org>
1952
1953         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
1954         fseeko and ftello.
1955         Suggested by Eric Blake.
1956
1957 2007-04-28  Jim Meyering  <jim@meyering.net>
1958
1959         Avoid false-negative in gl_STDINT_H's C99 conformance test.
1960         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
1961         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
1962
1963 2007-04-27  Eric Blake  <ebb9@byu.net>
1964
1965         * doc/headers/assert.texi (assert.h): Document assert module use.
1966
1967 2007-04-27  Bruno Haible  <bruno@clisp.org>
1968
1969         * doc/headers/*.texi: New files.
1970         * doc/gnulib.texi (Header File Substitutes): New chapter.
1971         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
1972         dependencies.
1973         (standards.info ,standards.html, standards.dvi): Update dependencies.
1974         (mostlyclean, clean): New targets.
1975
1976 2007-04-27  Bruno Haible  <bruno@clisp.org>
1977
1978         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
1979         * modules/sysexits (Files, Makefile.am): Update.
1980
1981         * lib/sys_socket_.h: Renamed from lib/socket_.h.
1982         * modules/sys_socket (Files, Makefile.am): Update.
1983
1984         * lib/sys_stat_.h: Renamed from lib/stat_.h.
1985         * modules/sys_stat (Files, Makefile.am): Update.
1986
1987 2007-04-27  Eric Blake  <ebb9@byu.net>
1988
1989         * lib/freading.h: Improve comments.
1990         * lib/fwriting.h: Likewise.
1991         * lib/fflush.c: Likewise.
1992
1993         Fix closein for mingw.
1994         * modules/closein-tests: Add tests for closein.
1995         * tests/test-closein.c: New file.
1996         * tests/test-closein.sh: Likewise.
1997         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
1998         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
1999
2000 2007-04-27  Bruno Haible  <bruno@clisp.org>
2001
2002         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2003         version is < 6.
2004         * lib/math_.h [__DECC]: Likewise.
2005         * lib/stdio_.h [__DECC]: Likewise.
2006         * lib/stdlib_.h [__DECC]: Likewise.
2007         * lib/string_.h [__DECC]: Likewise.
2008         * lib/time_.h [__DECC]: Likewise.
2009         * lib/wchar_.h [__DECC]: Likewise.
2010         * lib/wctype_.h [__DECC]: Likewise.
2011
2012 2007-04-27  Bruno Haible  <bruno@clisp.org>
2013
2014         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2015
2016 2007-04-27  Bruno Haible  <bruno@clisp.org>
2017
2018         * lib/fflush.c: Add comments.
2019         * modules/fpurge-tests (Depends-on): Add fflush.
2020         * modules/freadable-tests (Depends-on): Likewise.
2021         * modules/fwritable-tests (Depends-on): Likewise.
2022
2023 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2024
2025         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2026         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2027         Report by Bruno Haible <bruno@clisp.org>.
2028
2029 2007-04-26  Eric Blake  <ebb9@byu.net>
2030
2031         Fix fflush on mingw.
2032         * modules/fflush (Depends-on): Add freading.
2033         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2034         but unread data.
2035
2036 2007-04-26  Eric Blake  <ebb9@byu.net>
2037         and Bruno Haible  <bruno@clisp.org>
2038
2039         Implement freading and fwriting.
2040         * lib/freading.c: New file.
2041         * lib/freading.h: Likewise.
2042         * m4/freading.m4: Likewise.
2043         * modules/freading: Likewise.
2044         * modules/freading-tests: Likewise.
2045         * tests/test-freading.c: Likewise.
2046         * lib/fwriting.c: New file.
2047         * lib/fwriting.h: Likewise.
2048         * m4/fwriting.m4: Likewise.
2049         * modules/fwriting: Likewise.
2050         * modules/fwriting-tests: Likewise.
2051         * tests/test-fwriting.c: Likewise.
2052         * MODULES.html.sh (File stream based Input/Output): Mention them.
2053
2054 2007-04-26  Bruno Haible  <bruno@clisp.org>
2055
2056         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2057         'long' when we assume it.
2058         Suggested by Eric Blake.
2059
2060 2007-04-26  Bruno Haible  <bruno@clisp.org>
2061
2062         Ensure fseeko, ftello are declared on glibc systems.
2063         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2064         * modules/fseeko (configure.ac-early): Likewise.
2065         * modules/ftello (configure.ac-early): Likewise.
2066         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2067         AC_FUNC_FSEEKO for this.
2068         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2069         (gl_CHECK_FSEEKO): Remove macro.
2070
2071 2007-04-26  Bruno Haible  <bruno@clisp.org>
2072
2073         * tests/test-fflush.c (main): Also check the ftell result after
2074         fflush and fseek/fseeko.
2075         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2076         file descriptor position cache in the stream.
2077         * lib/fseeko.c (rpl_fseeko): Likewise.
2078
2079 2007-04-26  Bruno Haible  <bruno@clisp.org>
2080
2081         * modules/fflush-tests (Depends-on): Add fseeko.
2082
2083 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2084             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2085
2086         * lib/argz_.h: ensure error_t definition is obtained in same
2087         mechanism system argz.h would have.
2088         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2089         argz facilities are known bad.  Err on the side of caution if
2090         cross-compiling.
2091
2092 2007-04-25  Eric Blake  <ebb9@byu.net>
2093
2094         * lib/fpurge.c (includes): Use stdlib.h for free.
2095         * tests/test-fflush.c (main): Also test fflush-fseeko.
2096
2097 2007-04-25  Bruno Haible  <bruno@clisp.org>
2098
2099         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2100         * lib/fseeko.c: New file.
2101         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2102         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2103         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2104         gl_FUNC_FSEEKO.
2105         (gl_FUNC_FSEEKO): Invoke it.
2106         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2107         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2108         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2109
2110 2007-04-25  Bruno Haible  <bruno@clisp.org>
2111
2112         * modules/fflush (Depends-on): Add ftello.
2113
2114 2007-04-25  Bruno Haible  <bruno@clisp.org>
2115
2116         * modules/ftello-tests: New file.
2117         * tests/test-ftello.c: New file.
2118
2119         * modules/ftello: New file.
2120         * m4/ftello.m4: New file.
2121         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2122         HAVE_FTELLO.
2123         * lib/stdio_.h (ftello): New declaration.
2124         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2125         HAVE_FTELLO.
2126
2127 2007-04-25  Bruno Haible  <bruno@clisp.org>
2128
2129         * modules/fseeko-tests: New file.
2130         * tests/test-fseeko.c: New file.
2131
2132         * modules/fseeko: New file.
2133         * m4/fseeko.m4: New file.
2134         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2135         HAVE_FSEEKO.
2136         * lib/stdio_.h (fseeko): New declaration.
2137         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2138         HAVE_FSEEKO.
2139
2140 2007-04-25  Bruno Haible  <bruno@clisp.org>
2141
2142         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2143
2144 2007-04-25  Bruno Haible  <bruno@clisp.org>
2145
2146         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2147         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2148         * tests/test-unistd.c: Likewise.
2149         * tests/test-fcntl.c: Likewise.
2150
2151 2007-04-23  Eric Blake  <ebb9@byu.net>
2152
2153         * lib/fflush.c: Fix missing include.
2154         Reported by Bruno Haible.
2155
2156 2007-04-23  Bruno Haible  <bruno@clisp.org>
2157
2158         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2159         Reported by Eric Blake.
2160
2161 2007-04-23  Bruno Haible  <bruno@clisp.org>
2162
2163         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2164
2165 2007-04-23  Bruno Haible  <bruno@clisp.org>
2166
2167         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2168
2169 2007-04-23  Bruno Haible  <bruno@clisp.org>
2170
2171         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2172         Needed on HP-UX 11.
2173
2174 2007-04-16  Eric Blake  <ebb9@byu.net>
2175
2176         Make fflush rely on fpurge.
2177         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2178         open coding all variants.
2179         * modules/fflush (Depends-on): Add fpurge and unistd.
2180         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2181         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2182
2183         Fix --with-tests compilation on cygwin.
2184         * modules/argmatch-tests (Makefile.am): List gnulib library first
2185         in LDADD.
2186         * modules/argp-tests (Makefile.am): Likewise.
2187         * modules/array-list-tests (Makefile.am): Likewise.
2188         * modules/array-oset-tests (Makefile.am): Likewise.
2189         * modules/avltree-list-tests (Makefile.am): Likewise.
2190         * modules/avltree-oset-tests (Makefile.am): Likewise.
2191         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2192         * modules/carray-list-tests (Makefile.am): Likewise.
2193         * modules/dirname-tests (Makefile.am): Likewise.
2194         * modules/frexp-tests (Makefile.am): Likewise.
2195         * modules/isnanl-tests (Makefile.am): Likewise.
2196         * modules/linked-list-tests (Makefile.am): Likewise.
2197         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2198         * modules/lock-tests (Makefile.am): Likewise.
2199         * modules/rbtree-list-tests (Makefile.am): Likewise.
2200         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2201         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2202         * modules/tls-tests (Makefile.am): Likewise.
2203         * modules/tsearch-tests (Makefile.am): Likewise.
2204         * modules/xvasprintf-tests (Makefile.am): Likewise.
2205
2206         Fix fpurge for cygwin.
2207         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2208         value.
2209         * modules/fpurge-tests (Depends-on): Clean up trash.
2210
2211 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2212
2213         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2214
2215         * m4/autobuild.m4: Re-indent.
2216
2217 2007-04-13  Bruno Haible  <bruno@clisp.org>
2218
2219         * modules/fpurge-tests: New file.
2220         * tests/test-fpurge.c: New file.
2221
2222         * modules/fpurge: New file.
2223         * lib/fpurge.h: New file.
2224         * lib/fpurge.c: New file.
2225         * m4/fpurge.m4: New file.
2226
2227 2007-04-13  Bruno Haible  <bruno@clisp.org>
2228
2229         * modules/fbufmode-tests: New file.
2230         * tests/test-fbufmode.c: New file.
2231
2232         * modules/fbufmode: New file.
2233         * lib/fbufmode.h: New file.
2234         * lib/fbufmode.c: New file.
2235         * m4/fbufmode.m4: New file.
2236
2237 2007-04-13  Bruno Haible  <bruno@clisp.org>
2238
2239         * modules/fwritable-tests: New file.
2240         * tests/test-fwritable.c: New file.
2241
2242         * modules/fwritable: New file.
2243         * lib/fwritable.h: New file.
2244         * lib/fwritable.c: New file.
2245         * m4/fwritable.m4: New file.
2246
2247 2007-04-13  Bruno Haible  <bruno@clisp.org>
2248
2249         * modules/freadable-tests: New file.
2250         * tests/test-freadable.c: New file.
2251
2252         * modules/freadable: New file.
2253         * lib/freadable.h: New file.
2254         * lib/freadable.c: New file.
2255         * m4/freadable.m4: New file.
2256
2257 2007-04-13  Bruno Haible  <bruno@clisp.org>
2258
2259         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2260         MOSTLYCLEANFILES.
2261
2262 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2263
2264         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2265         gzip bootstrap.conf to avoid dragging in i18n machinery.
2266         (gnulib_tool_option): Use it.
2267
2268 2007-04-13  Bruno Haible  <bruno@clisp.org>
2269
2270         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2271         %F directives.
2272         * tests/test-vasprintf-posix.c (test_function): Likewise.
2273         * tests/test-snprintf-posix.h (test_function): Likewise.
2274         * tests/test-sprintf-posix.h (test_function): Likewise.
2275         * tests/test-fprintf-posix.h (test_function): Likewise.
2276         * tests/test-printf-posix.h (test_function): Likewise.
2277         * tests/test-fprintf-posix.out: Likewise.
2278
2279 2007-04-13  Bruno Haible  <bruno@clisp.org>
2280
2281         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2282         * modules/tls-tests (configure.ac): Likewise.
2283         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2284
2285 2007-04-13  Bruno Haible  <bruno@clisp.org>
2286
2287         * lib/tls.c (glthread_tls_get): Fix return type.
2288         Patch by Arto C. Nirkko <anirkko@insel.ch>.
2289
2290 2007-04-12  Eric Blake  <ebb9@byu.net>
2291
2292         * modules/gettime (Depends-on): Remove gettime.
2293         Reported by Dmitry V. Levin.
2294
2295 2007-04-12  Bruno Haible  <bruno@clisp.org>
2296
2297         * modules/fflush (Include): Mention <stdio.h>.
2298         * modules/strtoimax (Include): Mention <inttypes.h>.
2299         * modules/strtoumax (Include): Likewise.
2300
2301 2007-04-12  Eric Blake  <ebb9@byu.net>
2302
2303         * .cvsignore: New file.
2304         * .gitignore: Likewise.
2305
2306 2007-04-12  Bruno Haible  <bruno@clisp.org>
2307
2308         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
2309         not before, since $(LDADD) often contains libgnu.a.
2310         * modules/striconv-tests (test_striconv_LDADD): Likewise.
2311         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
2312         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
2313         Needed on Cygwin.
2314
2315 2007-04-12  Eric Blake  <ebb9@byu.net>
2316
2317         Work around glibc's failure to flush stdin on fclose.
2318         * lib/closein.c (close_stdin): Flush stdin before closing.
2319
2320         Work around glibc's failure to reset seekable stdin on exit.
2321         * modules/closein: New module.
2322         * lib/closein.c: New file.
2323         * lib/closein.h: Likewise.
2324         * m4/closein.m4: Likewise.
2325         * MODULES.html.sh (File stream based Input/Output): Document it.
2326
2327 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2328
2329         * gnulib-tool: Rename generated 'autobuild' script to
2330         'do-autobuild' in --create-megatestdir output.
2331
2332         * doc/gnulib.texi (Build robot for gnulib): Fix.
2333
2334 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2335
2336         * modules/sysexits (Depends-on): Add absolute-header.
2337
2338 2007-04-12  Eric Blake  <ebb9@byu.net>
2339
2340         No need to preserve errno on success.
2341         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
2342         Reported by Bruno Haible.
2343
2344 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2345
2346         * MODULES.html.sh (Support for maintaining and releasing
2347         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
2348
2349 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2350
2351         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
2352
2353 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2354
2355         * modules/autobuild: New module.
2356
2357         * m4/autobuild.m4: New file.
2358
2359 2007-04-11  Bruno Haible  <bruno@clisp.org>
2360
2361         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
2362         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
2363         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
2364         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
2365         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2366         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2367         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2368         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2369         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2370         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2371         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
2372         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2373         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2374         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
2375         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2376         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2377         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
2378         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2379         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2380         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
2381         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2382         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2383         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
2384         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2385         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2386         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
2387         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2388         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2389         Reported by Eric Blake.
2390
2391 2007-04-11  Bruno Haible  <bruno@clisp.org>
2392
2393         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
2394
2395 2007-04-10  Bruno Haible  <bruno@clisp.org>
2396
2397         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
2398         for NaN and Infinity. Needed on FreeBSD 6.1.
2399         * tests/test-vasnprintf-posix.c (test_function): Undo last change
2400         regarding results for "%010a" of Infinity and NaN.
2401         * tests/test-vasprintf-posix.c (test_function): Likewise.
2402         * tests/test-snprintf-posix.h (test_function): Likewise.
2403         * tests/test-sprintf-posix.h (test_function): Likewise.
2404         * tests/test-fprintf-posix.h (test_function): Likewise.
2405         * tests/test-printf-posix.h (test_function): Likewise.
2406         * tests/test-fprintf-posix.out: Likewise.
2407
2408 2007-04-10  Bruno Haible  <bruno@clisp.org>
2409
2410         * modules/locale-tests: New file.
2411         * tests/test-locale.c: New file.
2412
2413         * modules/locale: New file.
2414         * lib/locale_.h: New file.
2415         * m4/locale_h.m4: New file.
2416
2417 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2418             Bruno Haible  <bruno@clisp.org>
2419
2420         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
2421         be determined, test for availability of the copysignf, copysign,
2422         copysignl functions.
2423         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
2424         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
2425         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
2426
2427 2007-04-09  Eric Blake  <ebb9@byu.net>
2428
2429         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
2430         * modules/stdio (Makefile.am): Support fflush.
2431         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
2432         * modules/fflush: New file.
2433         * lib/fflush.c: Likewise.
2434         * m4/fflush.m4: Likewise.
2435         * modules/fflush-tests: New test.
2436         * tests/test-fflush.c: Likewise.
2437         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
2438
2439 2007-04-06  Bruno Haible  <bruno@clisp.org>
2440
2441         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
2442         (VASNPRINTF): Use signbit for faster determination whether to print a
2443         minus sign.
2444         * modules/vasnprintf (Files): Remove lib/float+.h.
2445         * modules/fprintf-posix (Depends-on): Add signbit.
2446         * modules/snprintf-posix (Depends-on): Likewise.
2447         * modules/sprintf-posix (Depends-on): Likewise.
2448         * modules/vasnprintf-posix (Depends-on): Likewise.
2449         * modules/vasprintf-posix (Depends-on): Likewise.
2450         * modules/vfprintf-posix (Depends-on): Likewise.
2451         * modules/vsnprintf-posix (Depends-on): Likewise.
2452         * modules/vsprintf-posix (Depends-on): Likewise.
2453
2454 2007-04-06  Bruno Haible  <bruno@clisp.org>
2455
2456         * tests/test-frexp.c (main): Test also the sign bit of zero results.
2457         * tests/test-frexpl.c (main): Likewise.
2458         * tests/test-ldexpl.c (main): Likewise.
2459         * modules/frexp-tests (Depends-on): Add signbit.
2460         * modules/frexpl-tests (Depdends-on): Likewise.
2461         * modules/ldexpl-tests (Depdends-on): Likewise.
2462
2463 2007-04-06  Bruno Haible  <bruno@clisp.org>
2464
2465         * modules/signbit-tests: New file.
2466         * tests/test-signbit.c: New file.
2467
2468         * modules/signbit: New file.
2469         * lib/signbitf.c: New file.
2470         * lib/signbitd.c: New file.
2471         * lib/signbitl.c: New file.
2472         * m4/signbit.m4: New file.
2473         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
2474         (signbit): New macro.
2475         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
2476         REPLACE_SIGNBIT.
2477         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
2478         REPLACE_FREXPL into math.h.
2479
2480 2007-04-06  Bruno Haible  <bruno@clisp.org>
2481
2482         * modules/isnanf-nolibm-tests: New file.
2483         * tests/test-isnanf.c: New file.
2484
2485         * modules/isnanf-nolibm: New file.
2486         * lib/isnanf.h: New file.
2487         * lib/isnanf.c: New file.
2488         * lib/isnan.c: Consider the USE_FLOAT macro.
2489         * m4/isnanf.m4: New file.
2490
2491 2007-04-06  Bruno Haible  <bruno@clisp.org>
2492
2493         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
2494         (Link): New section.
2495
2496         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
2497
2498 2007-04-06  Bruno Haible  <bruno@clisp.org>
2499
2500         Assume the 'long double' type.
2501         * m4/longdouble.m4: Remove file.
2502         * config/srclist.txt: Don't mention longdouble.m4.
2503         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
2504         * lib/float+.h: Likewise.
2505         * lib/frexp.c: Likewise.
2506         * lib/printf-args.h: Likewise.
2507         * lib/printf-args.c: Likewise.
2508         * lib/printf-frexp.c: Likewise.
2509         * lib/printf-parse.c: Likewise.
2510         * lib/vasnprintf.c: Likewise.
2511         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
2512         * m4/intl.m4: Likewise.
2513         * m4/isnanl.m4: Likewise.
2514         * m4/printf.m4: Likewise.
2515         * m4/printf-frexpl.m4: Likewise.
2516         * m4/vasnprintf.m4: Likewise.
2517         * modules/allocsa (Files): Remove m4/longdouble.m4.
2518         * modules/gettext (Files): Likewise.
2519         * modules/relocatable-prog-wrapper (Files): Likewise.
2520         * modules/vasnprintf (Files): Likewise.
2521         * modules/isnanl (Files): Likewise.
2522         (Include): Simplify.
2523         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
2524         (Include): Simplify.
2525         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
2526         (Include): Simplify.
2527         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
2528         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2529         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
2530         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2531         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2532         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2533         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
2534         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2535         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2536         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2537         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
2538         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2539         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
2540         * tests/test-isnanl.c: Likewise.
2541         * tests/test-snprintf-posix.h: Likewise.
2542         * tests/test-sprintf-posix.h: Likewise.
2543         * tests/test-vasnprintf-posix.c: Likewise.
2544         * tests/test-vasnprintf-posix2.c: Likewise.
2545         * tests/test-vasprintf-posix.c: Likewise.
2546
2547 2007-04-06  Bruno Haible  <bruno@clisp.org>
2548
2549         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
2550         * lib/math_.h [__DECC]: Include the overridden include file through
2551         #include_next, outside the double-inclusion guard.
2552         * lib/stdio_.h [__DECC]: Likewise.
2553         * lib/stdlib_.h [__DECC]: Likewise.
2554         * lib/string_.h [__DECC]: Likewise.
2555         * lib/time_.h [__DECC]: Likewise.
2556         * lib/wchar_.h [__DECC]: Likewise.
2557         * lib/wctype_.h [__DECC]: Likewise.
2558         * lib/inttypes_.h [__DECC]: Likewise.
2559         Reported by Albert Chin <china@thewrittenword.com> in
2560         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
2561
2562 2007-04-04  Eric Blake  <ebb9@byu.net>
2563
2564         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
2565         1.5.x.
2566
2567 2007-04-04  Bruno Haible  <bruno@clisp.org>
2568
2569         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
2570         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
2571
2572 2007-04-04  Bruno Haible  <bruno@clisp.org>
2573
2574         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
2575         results for "%010a" of Infinity and NaN.
2576         * tests/test-vasprintf-posix.c (test_function): Likewise.
2577         * tests/test-snprintf-posix.h (test_function): Likewise.
2578         * tests/test-sprintf-posix.h (test_function): Likewise.
2579         * tests/test-fprintf-posix.h (test_function): Remove these tests.
2580         * tests/test-printf-posix.h (test_function): Likewise.
2581         * tests/test-fprintf-posix.out: Update.
2582         Needed for FreeBSD 6.1.
2583
2584 2007-04-04  Bruno Haible  <bruno@clisp.org>
2585
2586         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
2587         directly used by the gnulib modules nor by gnulib-tool.
2588
2589 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
2590
2591         * DEPENDENCIES: Give overall description of version dependency
2592         desirability.  Use more-typical names for apps.
2593         Add shell, coreutils, diffutils, grep, tar, gzip.
2594
2595 2007-04-04  Simon Josefsson  <simon@josefsson.org>
2596
2597         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
2598
2599 2007-04-04  Karl Berry  <karl@gnu.org>
2600
2601         * MODULES.html.sh (func_module): missing '.
2602
2603 2007-04-03  Bruno Haible  <bruno@clisp.org>
2604
2605         * modules/argmatch-tests (Makefile.am): New variable
2606         test_argmatch_LDADD.
2607         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
2608         * modules/array-list-tests (Makefile.am): New variable
2609         test_array_list_LDADD.
2610         * modules/array-oset-tests (Makefile.am): New variable
2611         test_array_oset_LDADD.
2612         * modules/avltree-list-tests (Makefile.am): New variable
2613         test_avltree_list_LDADD.
2614         * modules/avltree-oset-tests (Makefile.am): New variable
2615         test_avltree_oset_LDADD.
2616         * modules/avltreehash-list-tests (Makefile.am): New variable
2617         test_avltreehash_list_LDADD.
2618         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
2619         test_canonicalize_lgpl_LDADD.
2620         * modules/carray-list-tests (Makefile.am): New variable
2621         test_carray_list_LDADD.
2622         * modules/dirname-tests (Makefile.am): New variable
2623         test_dirname_LDADD.
2624         * modules/linked-list-tests (Makefile.am): New variable
2625         test_linked_list_LDADD.
2626         * modules/linkedhash-list-tests (Makefile.am): New variable
2627         test_linkedhash_list_LDADD.
2628         * modules/rbtree-list-tests (Makefile.am): New variable
2629         test_rbtree_list_LDADD.
2630         * modules/rbtree-oset-tests (Makefile.am): New variable
2631         test_rbtree_oset_LDADD.
2632         * modules/rbtreehash-list-tests (Makefile.am): New variable
2633         test_rbtreehash_list_LDADD.
2634         * modules/xvasprintf-tests (Makefile.am): New variable
2635         test_xvasprintf_LDADD.
2636         Reported by Eric Blake.
2637
2638 2007-04-03  Eric Blake  <ebb9@byu.net>
2639
2640         * DEPENDENCIES: Weaken m4 requirements.
2641
2642 2007-04-03  Bruno Haible  <bruno@clisp.org>
2643
2644         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
2645         * modules/isnanl-tests (configure.ac): Likewise.
2646
2647 2007-04-03  Ben Pfaff  <blp@gnu.org>
2648
2649         * modules/iconv_open: Add $(srcdir)/ to source directory
2650         references in Makefile fragments that call gperf, to fix VPATH
2651         builds.
2652
2653 2007-04-03  Bruno Haible  <bruno@clisp.org>
2654
2655         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
2656         * lib/ldexpl.c: Undo last change.
2657
2658 2007-04-03  Bruno Haible  <bruno@clisp.org>
2659
2660         * modules/printf-frexpl (Depends-on): Undo last change.
2661         (Files): Add m4/ldexpl.m4.
2662
2663 2007-04-03  Bruno Haible  <bruno@clisp.org>
2664
2665         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
2666         * modules/isnanl (Link): New section.
2667
2668         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
2669         * modules/frexp (Link): New section.
2670
2671         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
2672         * modules/frexpl (Link): New section.
2673
2674         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
2675         * modules/ldexpl (Link): New section.
2676
2677 2007-04-03  Bruno Haible  <bruno@clisp.org>
2678
2679         * modules/TEMPLATE-EXTENDED: New file.
2680         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
2681
2682 2007-04-03  Bruno Haible  <bruno@clisp.org>
2683
2684         * DEPENDENCIES: New file.
2685         Suggested by Simon Josefsson.
2686
2687 2007-04-03  Bruno Haible  <bruno@clisp.org>
2688
2689         * doc/gnulib.texi: Escape @.
2690
2691 2007-04-03  James Youngman  <jay@gnu.org>
2692         and Paul Eggert  <eggert@cs.ucla.edu>
2693
2694         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
2695         birthtime on all systems that have birthtime, not just those which
2696         use st_birthtimensec rather than st_birthtim.  Putting zero in
2697         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
2698         that the birth time is not available for files on an NFS mount.
2699
2700 2007-04-03  Simon Josefsson  <simon@josefsson.org>
2701
2702         * modules/memxor: Move back from crypto/, suggested by Bruno.
2703         * modules/crypto/hmac-sha1: Fix memxor dependency.
2704
2705         * modules/crypto/gc: Moved from ../.
2706
2707 2007-04-02  Eric Blake  <ebb9@byu.net>
2708
2709         * lib/ldexpl.c (includes): Avoid libm.
2710
2711         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
2712
2713 2007-04-02  Bruno Haible  <bruno@clisp.org>
2714
2715         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
2716         on IRIX.
2717
2718 2007-04-02  Bruno Haible  <bruno@clisp.org>
2719
2720         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
2721         x86 or x86_64 platforms running MacOS X.
2722         Reported by Ryan Schmidt <@ryandesign.com>.
2723
2724 2007-04-02  Bruno Haible  <bruno@clisp.org>
2725
2726         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
2727         i386.
2728
2729 2007-04-01  Simon Josefsson  <simon@josefsson.org>
2730
2731         * modules/crypto/arcfour: Moved from ../.
2732         * modules/crypto/arcfour-tests: Moved from ../.
2733         * modules/crypto/arctwo: Moved from ../.
2734         * modules/crypto/arctwo-tests: Moved from ../.
2735         * modules/crypto/des: Moved from ../.
2736         * modules/crypto/des-tests: Moved from ../.
2737         * modules/crypto/gc-arcfour: Moved from ../.
2738         * modules/crypto/gc-arcfour-tests: Moved from ../.
2739         * modules/crypto/gc-arctwo: Moved from ../.
2740         * modules/crypto/gc-arctwo-tests: Moved from ../.
2741         * modules/crypto/gc-des: Moved from ../.
2742         * modules/crypto/gc-des-tests: Moved from ../.
2743         * modules/crypto/gc-hmac-md5: Moved from ../.
2744         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
2745         * modules/crypto/gc-hmac-sha1: Moved from ../.
2746         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
2747         * modules/crypto/gc-md2: Moved from ../.
2748         * modules/crypto/gc-md2-tests: Moved from ../.
2749         * modules/crypto/gc-md4: Moved from ../.
2750         * modules/crypto/gc-md4-tests: Moved from ../.
2751         * modules/crypto/gc-md5: Moved from ../.
2752         * modules/crypto/gc-md5-tests: Moved from ../.
2753         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
2754         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
2755         * modules/crypto/gc-random: Moved from ../.
2756         * modules/crypto/gc-rijndael: Moved from ../.
2757         * modules/crypto/gc-rijndael-tests: Moved from ../.
2758         * modules/crypto/gc-sha1: Moved from ../.
2759         * modules/crypto/gc-sha1-tests: Moved from ../.
2760         * modules/crypto/gc-tests: Moved from ../.
2761         * modules/crypto/hmac-md5: Moved from ../.
2762         * modules/crypto/hmac-md5-tests: Moved from ../.
2763         * modules/crypto/hmac-sha1: Moved from ../.
2764         * modules/crypto/hmac-sha1-tests: Moved from ../.
2765         * modules/crypto/md2: Moved from ../.
2766         * modules/crypto/md2-tests: Moved from ../.
2767         * modules/crypto/md4: Moved from ../.
2768         * modules/crypto/md4-tests: Moved from ../.
2769         * modules/crypto/md5: Moved from ../.
2770         * modules/crypto/md5-tests: Moved from ../.
2771         * modules/crypto/memxor: Moved from ../.
2772         * modules/crypto/rijndael: Moved from ../.
2773         * modules/crypto/rijndael-tests: Moved from ../.
2774         * modules/crypto/sha1: Moved from ../.
2775
2776 2007-03-30  James Youngman  <jay@gnu.org>
2777
2778         * tests/test-stat-time.c (prepare_test): use chmod() rather than
2779         rename() to change the ctime of a file (because ctime is unaffected
2780         by rename on jfs2 on AIX 5.1).
2781         (main): Start by doing cleanup, in case a previous run failed leaving
2782         test files behind.
2783
2784 2007-03-31  Bruno Haible  <bruno@clisp.org>
2785
2786         Support old proprietary implementations of iconv.
2787         * modules/iconv_open: New file.
2788         * lib/iconv_.h: New file.
2789         * m4/iconv_h.m4: New file.
2790         * lib/iconv_open.c: New file.
2791         * lib/iconv_open-aix.gperf: New file.
2792         * lib/iconv_open-hpux.gperf: New file.
2793         * lib/iconv_open-irix.gperf: New file.
2794         * lib/iconv_open-osf.gperf: New file.
2795         * m4/iconv_open.m4: New file.
2796         * modules/linebreak (Depends-on): Add iconv_open.
2797         * modules/striconv (Depends-on): Likewise.
2798         * modules/striconveh (Depends-on): Likewise.
2799         * modules/unicodeio (Depends-on): Likewise.
2800         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
2801         (iconv_t)(-1).
2802         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
2803         conversion if cd is (iconv_t)(-1).
2804         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
2805         is not possible.
2806
2807 2007-03-31  Bruno Haible  <bruno@clisp.org>
2808
2809         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2810         work on Solaris either. Protect also second use of "autodetect_jp".
2811
2812 2007-03-31  Bruno Haible  <bruno@clisp.org>
2813
2814         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
2815         the function is not present.
2816
2817 2007-03-31  Bruno Haible  <bruno@clisp.org>
2818
2819         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
2820         the function is not present.
2821
2822 2007-03-31  Bruno Haible  <bruno@clisp.org>
2823
2824         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
2825         a bug in HP-UX iconv_open().
2826
2827 2007-03-31  Bruno Haible  <bruno@clisp.org>
2828
2829         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
2830         (Mathematics <math.h>): New section, add fpieee.
2831         (Input/output <stdio.h>): Add fseterr.
2832         (Mathematics <math.h>): New section, add printf-frexp.
2833         (Container data structures): Add sublist.
2834         (Core language properties): Add fpucw, inline.
2835         (Functions for greatest-width integer types <inttypes.h>): Add
2836         imaxabs, imaxdiv, inttypes.
2837         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
2838         isnanl-nolibm, ldexp.
2839         (Mathematics <math.h>): New section, add printf-frexpl.
2840         (Support for systems lacking POSIX:2001): Add fprintf-posix,
2841         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
2842         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
2843         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
2844         (Unicode string functions): Add unistr/u*-mbtoucr.
2845         (Java): Add javacomp-script, javaexec-script.
2846         (C#): Add csharpcomp-script, csharpexec-script.
2847         (Support for building libraries and executables): Add havelib,
2848         relocatable-*.
2849         (Support for maintaining and releasing projects): Renamed from
2850         'Support for maintaining and release projects'. Add announce-gen.
2851
2852 2007-03-31  Bruno Haible  <bruno@clisp.org>
2853
2854         * README: Talk primarily about git.
2855         (git and CVS): Renamed from CVS.
2856         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
2857         gnulib is available through git.
2858         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
2859
2860 2007-03-30  Bruno Haible  <bruno@clisp.org>
2861
2862         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
2863         * lib/poll_.h: Likewise.
2864         * lib/stat_.h: Likewise.
2865         * lib/sys_time_.h: Likewise.
2866         * lib/sysexit_.h: Likewise.
2867         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
2868         * lib/stdbool_.h: Likewise.
2869         * lib/byteswap_.h: Add double-inclusion guard.
2870
2871 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
2872
2873         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
2874
2875 2007-03-30  Karl Berry  <karl@gnu.org>
2876
2877         * config/srclist-update: double space after USA in the license
2878         substitution, since that's how it's usually (?) written.
2879
2880 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
2881
2882         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
2883         reported by Bruno Haible.
2884
2885 2007-03-29  Bruno Haible  <bruno@clisp.org>
2886
2887         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
2888         a bug in AIX iconv().
2889
2890 2007-03-29  Bruno Haible  <bruno@clisp.org>
2891
2892         * modules/ldexpl-tests: New file.
2893         * tests/test-ldexpl.c: New file.
2894
2895 2007-03-29  Bruno Haible  <bruno@clisp.org>
2896
2897         * lib/ldexpl.c: Include fpucw.h.
2898         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
2899         multiplication.
2900         * modules/ldexpl (Depends-on): Add fpucw.
2901
2902 2007-03-29  Bruno Haible  <bruno@clisp.org>
2903
2904         * modules/ldexpl: New file.
2905         * m4/ldexpl.m4: New file.
2906         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
2907         set.
2908         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
2909         REPLACE_LDEXPL.
2910         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
2911         REPLACE_LDEXPL.
2912         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2913         gl_FUNC_LDEXPL_WORKS.
2914         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
2915         * modules/mathl (Files): Remove lib/ldexpl.c.
2916         (Depends-on): Add ldexpl.
2917
2918 2007-03-29  Bruno Haible  <bruno@clisp.org>
2919
2920         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
2921
2922 2007-03-29  Bruno Haible  <bruno@clisp.org>
2923
2924         * tests/test-striconveh.c (main): Don't assume that a direct conversion
2925         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
2926         and possibly also HP-UX.
2927         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2928         work on AIX, IRIX, HP-UX, OSF/1.
2929         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
2930         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
2931         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
2932         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
2933         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
2934         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
2935
2936 2007-03-29  Bruno Haible  <bruno@clisp.org>
2937
2938         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
2939
2940 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2941
2942         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
2943         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
2944
2945 2007-03-29  Eric Blake  <ebb9@byu.net>
2946
2947         * lib/acl-internal.h: Remove redundant include.
2948         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
2949         Cygwin when a file is locked.
2950
2951 2007-03-29  Bruno Haible  <bruno@clisp.org>
2952
2953         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
2954         file.
2955         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
2956
2957 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2958
2959         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
2960         try to remove a parent directory if the child couldn't be removed
2961         (except for the first rmdir, which could fail because the child
2962         doesn't exist).  Problem reported by Jeff Blaine in
2963         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
2964
2965 2007-03-28  Bruno Haible  <bruno@clisp.org>
2966
2967         * lib/striconveh.c (utf8conv_carefully): New function.
2968         (mem_cd_iconveh_internal): Invoke it.
2969
2970 2007-03-28  Bruno Haible  <bruno@clisp.org>
2971
2972         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
2973         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
2974         input.
2975         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
2976         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
2977         unistr/u8-uctomb.
2978
2979 2007-03-28  Bruno Haible  <bruno@clisp.org>
2980
2981         * modules/unistr/u8-mbtoucr: New file.
2982         * lib/unistr/u8-mbtoucr.c: New file.
2983         * modules/unistr/u16-mbtoucr: New file.
2984         * lib/unistr/u16-mbtoucr.c: New file.
2985         * modules/unistr/u16-mbtoucr: New file.
2986         * lib/unistr/u16-mbtoucr.c: New file.
2987         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
2988
2989 2007-03-27  Simon Josefsson  <simon@josefsson.org>
2990             Bruno Haible  <bruno@clisp.org>
2991
2992         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
2993         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
2994         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
2995
2996         * m4/stdio_h.m4: Add stubs for vasprintf too.
2997
2998         * modules/stdio: Support vasprintf in sed command.
2999
3000         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3001         vasprintf.h.  Add stdio module indicator.
3002
3003         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3004         vasprintf.h.
3005
3006         * lib/vasprintf.h: File removed.
3007
3008         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3009         * lib/vasprintf.c: Ditto.
3010         * lib/xvasprintf.c: Ditto.
3011         * tests/test-vasprintf-posix.c: Ditto.
3012         * tests/test-vasprintf.c: Ditto.
3013
3014 2007-03-27  Bruno Haible  <bruno@clisp.org>
3015
3016         Make vasnprintf multithread-safe.
3017         * lib/vasnprintf.c (decimal_point_char): New function.
3018         (VASNPRINTF): Use it.
3019         Suggested by Simon Josefsson.
3020
3021 2007-03-27  Eric Blake  <ebb9@byu.net>
3022
3023         Support sub-second birthtime on cygwin.
3024         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3025         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3026         (get_stat_birthtime): Also work with st_birthtim.
3027
3028 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3029
3030         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3031         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3032         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3033         (get_stat_birthtime_ns): Simplify compile-time tests.
3034         (get_stat_birthtime): Change the API to look like
3035         get_stat_mtime etc., except return a negative tv_nsec on error.
3036         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3037         Don't check for "spare" fields.
3038         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3039         or for struct stat.st_birthtime, as these tests aren't used.
3040         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3041
3042 2007-03-27  Bruno Haible  <bruno@clisp.org>
3043
3044         * lib/stat-time.h: Include <sys/stat.h>.
3045
3046 2007-03-27  James Youngman  <jay@gnu.org>
3047
3048         * lib/stat-time.h (get_stat_birthtime): New function for
3049           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3050         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3051           and its variants.
3052         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3053         * modules/stat-time-test: New file.
3054         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3055
3056 2007-03-26  Bruno Haible  <bruno@clisp.org>
3057
3058         Better support of signalling NaNs.
3059         * lib/atanl.c: Include isnanl.h.
3060         (atanl): Perform test for NaN at the beginning of the function and
3061         through a call to isnanl.
3062         * lib/cosl.c: Include isnanl.h.
3063         (cosl): Perform test for NaN at the beginning of the function and
3064         through a call to isnanl.
3065         * lib/ldexpl.c: Include isnanl.h.
3066         (ldexpl): Perform test for NaN through a call to isnanl.
3067         * lib/logl.c: Include isnanl.h.
3068         (logl): Perform test for NaN at the beginning of the function and
3069         through a call to isnanl.
3070         * lib/sinl.c: Include isnanl.h.
3071         (sinl): Perform test for NaN at the beginning of the function and
3072         through a call to isnanl.
3073         * lib/sqrtl.c: Include isnanl.h.
3074         (sqrtl): Perform test for NaN at the beginning of the function and
3075         through a call to isnanl.
3076         * lib/tanl.c: Include isnanl.h.
3077         (tanl): Perform test for NaN at the beginning of the function and
3078         through a call to isnanl.
3079         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3080         * modules/mathl (Depends-on): Add isnanl.
3081
3082 2007-03-26  Eric Blake  <ebb9@byu.net>
3083
3084         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3085         regression in logic sense of previous patch.
3086
3087 2007-03-26  Bruno Haible  <bruno@clisp.org>
3088
3089         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3090         unportable shell command "if ! ...".
3091         Reported by Ralf Wildenhues.
3092
3093 2007-03-25  Bruno Haible  <bruno@clisp.org>
3094
3095         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3096         <sysexits.h> file, and only add EX_CONFIG.
3097         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3098         absolute file name and whether it is sufficient. Substitute also
3099         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3100         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3101         ABSOLUTE_SYSEXITS_H into sysexits.h.
3102
3103 2007-03-25  Bruno Haible  <bruno@clisp.org>
3104
3105         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3106         hints is NULL.
3107
3108 2007-03-25  Bruno Haible  <bruno@clisp.org>
3109
3110         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3111         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3112
3113 2007-03-25  Bruno Haible  <bruno@clisp.org>
3114
3115         * lib/vasnprintf.c: Include langinfo.h.
3116         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3117         multithread-safe.
3118         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3119         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3120         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3121         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3122         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3123         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3124         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3125         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3126         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3127         Reported by Simon Josefsson.
3128
3129 2007-03-25  Bruno Haible  <bruno@clisp.org>
3130
3131         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3132         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3133         * modules/vasnprintf (Depends-on): Add stdint.
3134
3135 2007-03-25  Bruno Haible  <bruno@clisp.org>
3136
3137         * modules/fpieee: New file.
3138         * m4/fpieee.m4: New file.
3139         * modules/isnan-nolibm (Depends-on): Add fpieee.
3140         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3141         * modules/isnanl (Depends-on): Add fpieee.
3142
3143 2007-03-25  Bruno Haible  <bruno@clisp.org>
3144
3145         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3146
3147 2007-03-25  Bruno Haible  <bruno@clisp.org>
3148
3149         Avoid test failures on IRIX 6.5.
3150         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3151         (main): Use it.
3152         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3153         macros.
3154         (main): Use them.
3155
3156 2007-03-25  Bruno Haible  <bruno@clisp.org>
3157
3158         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3159         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3160         exists but doesn't work.
3161         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3162         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3163         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3164         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3165
3166 2007-03-25  Bruno Haible  <bruno@clisp.org>
3167
3168         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3169         returns inf. Needed on IRIX 6.5.
3170
3171 2007-03-25  Bruno Haible  <bruno@clisp.org>
3172
3173         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3174         (main): Use isnanl instead of x != x idiom.
3175         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3176
3177         * tests/test-frexp.c: Include isnan.h.
3178         (main): Use isnan instead of x != x idiom.
3179         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3180
3181 2007-03-25  Bruno Haible  <bruno@clisp.org>
3182
3183         * tests/test-frexp.c (NaN): New function/macro.
3184         (main): Use it instead of 0.0 / 0.0.
3185         * tests/test-isnan.c (NaN): New function/macro.
3186         (main): Use it instead of 0.0 / 0.0.
3187         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3188         (test_function): Use it instead of 0.0 / 0.0.
3189         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3190         (test_function): Use it instead of 0.0 / 0.0.
3191         * tests/test-snprintf-posix.h (NaN): New function/macro.
3192         (test_function): Use it instead of 0.0 / 0.0.
3193         * tests/test-sprintf-posix.h (NaN): New function/macro.
3194         (test_function): Use it instead of 0.0 / 0.0.
3195         * tests/test-fprintf-posix.h (NaN): New function/macro.
3196         (test_function): Use it instead of 0.0 / 0.0.
3197         * tests/test-printf-posix.h (NaN): New function/macro.
3198         (test_function): Use it instead of 0.0 / 0.0.
3199
3200         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3201
3202 2007-03-25  Bruno Haible  <bruno@clisp.org>
3203
3204         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3205
3206 2007-03-25  Bruno Haible  <bruno@clisp.org>
3207
3208         * lib/regexec.c (merge_state_with_log): Make static.
3209
3210 2007-03-25  Bruno Haible  <bruno@clisp.org>
3211
3212         * lib/trigl.c (kernel_rem_pio2): Make static.
3213
3214 2007-03-25  Bruno Haible  <bruno@clisp.org>
3215
3216         * lib/sincosl.c (sincosl_table): Make static.
3217
3218 2007-03-25  Bruno Haible  <bruno@clisp.org>
3219
3220         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3221         if the compiler does not support C99.
3222
3223 2007-03-25  Bruno Haible  <bruno@clisp.org>
3224
3225         * modules/time (Makefile.am): Ensure all rule action lines start with a
3226         tab.
3227
3228 2007-03-24  Bruno Haible  <bruno@clisp.org>
3229
3230         * modules/tsearch-tests: New file.
3231         * tests/test-tsearch.sh: New file.
3232         * tests/test-tsearch.c: New file, mostly copied from glibc.
3233
3234         * modules/search-tests: New file.
3235         * tests/test-search.c: New file.
3236
3237         * modules/search: New file.
3238         * lib/search_.h: New file, incorporating lib/tsearch.h.
3239         * m4/search_h.m4: New file.
3240         * lib/tsearch.h: Remove file.
3241         * lib/tsearch.c: Include search.h instead of tsearch.h.
3242         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3243         HAVE_TSEARCH.
3244         * modules/tsearch (Files): Remove lib/tsearch.h.
3245         (Depends-on): Add search.
3246         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3247         (Include): Change tsearch.h into search.h.
3248
3249 2007-03-24  Bruno Haible  <bruno@clisp.org>
3250
3251         * modules/fpucw: New file.
3252         * lib/fpucw.h: New file.
3253         * lib/frexp.c: Include fpucw.h.
3254         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3255         (FUNC): Use them.
3256         * lib/printf-frexp.c: Include fpucw.h.
3257         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3258         (FUNC): Use them.
3259         * lib/vasnprintf.c: Include fpucw.h.
3260         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3261         'long double' calculations.
3262         * tests/test-frexpl.c: Include fpucw.h.
3263         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3264         * tests/test-printf-frexpl.c: Include fpucw.h.
3265         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3266         * modules/frexpl (Depends-on): Add fpucw.
3267         * modules/printf-frexpl (Depends-on): Likewise.
3268         * modules/fprintf-posix (Depends-on): Likewise.
3269         * modules/snprintf-posix (Depends-on): Likewise.
3270         * modules/sprintf-posix (Depends-on): Likewise.
3271         * modules/vasnprintf-posix (Depends-on): Likewise.
3272         * modules/vasprintf-posix (Depends-on): Likewise.
3273         * modules/vfprintf-posix (Depends-on): Likewise.
3274         * modules/vsnprintf-posix (Depends-on): Likewise.
3275         * modules/vsprintf-posix (Depends-on): Likewise.
3276         * modules/frexpl-tests (Depends-on): Likewise.
3277         * modules/printf-frexpl-tests (Depends-on): Likewise.
3278
3279 2007-03-24  Bruno Haible  <bruno@clisp.org>
3280
3281         * lib/float+.h: New file.
3282         * lib/isnan.c: Include float+.h.
3283         (SIZE): New macro.
3284         (FUNC): Compare only SIZE bytes of the value.
3285         * lib/vasnprintf.c: Include float+.h.
3286         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
3287         SIZEOF_LDBL or SIZEOF_DBL bytes.
3288         * modules/isnan-nolibm (Files): Add lib/float+.h.
3289         * modules/isnanl-nolibm (Files): Add lib/float+.h.
3290         * modules/isnanl (Files): Add lib/float+.h.
3291         * modules/vasnprintf (Files): Add lib/float+.h.
3292
3293 2007-03-24  Bruno Haible  <bruno@clisp.org>
3294
3295         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
3296         include isnanl-nolibm.h.
3297
3298 2007-03-24  Bruno Haible  <bruno@clisp.org>
3299
3300         * tests/test-read-file.c (main): Don't produce spurious output for
3301         expected situations. Make the test fail if it encountered unexpected
3302         results.
3303
3304 2007-03-24  Bruno Haible  <bruno@clisp.org>
3305
3306         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
3307         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
3308
3309 2007-03-24  Bruno Haible  <bruno@clisp.org>
3310
3311         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
3312
3313 2007-03-24  Bruno Haible  <bruno@clisp.org>
3314
3315         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
3316         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
3317
3318         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
3319         * modules/utf8-ucs4: Turn into a symbolic link to module
3320         unistr/u8-mbtouc.
3321
3322         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
3323         utf8-ucs4-unsafe.
3324         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
3325         unistr/u8-mbtouc-unsafe.
3326
3327         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
3328         * modules/utf16-ucs4: Turn into a symbolic link to module
3329         unistr/u16-mbtouc.
3330
3331         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
3332         utf16-ucs4-unsafe.
3333         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
3334         unistr/u16-mbtouc-unsafe.
3335
3336         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
3337         * modules/ucs4-utf8: Turn into a symbolic link to module
3338         unistr/u8-ubtomb.
3339
3340         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
3341         * modules/ucs4-utf16: Turn into a symbolic link to module
3342         unistr/u16-ubtomb.
3343
3344 2007-03-24  Bruno Haible  <bruno@clisp.org>
3345
3346         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
3347         Enable the function only if HAVE_INLINE.
3348         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
3349         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3350         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
3351         Enable the function only if HAVE_INLINE.
3352         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
3353         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3354         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
3355         Enable the function only if HAVE_INLINE.
3356         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
3357         Enable the function only if HAVE_INLINE.
3358         * modules/utf8-ucs4: Update.
3359         * modules/utf8-ucs4-unsafe: Update.
3360         * modules/utf16-ucs4: Update.
3361         * modules/utf16-ucs4-unsafe: Update.
3362         * modules/ucs4-utf8: Update.
3363         * modules/ucs4-utf16: Update.
3364
3365 2007-03-24  Bruno Haible  <bruno@clisp.org>
3366
3367         * lib/utf8-ucs4.h: Remove file.
3368         * lib/utf8-ucs4-unsafe.h: Remove file.
3369         * lib/utf16-ucs4.h: Remove file.
3370         * lib/utf16-ucs4-unsafe.h: Remove file.
3371         * lib/ucs4-utf8.h: Remove file.
3372         * lib/ucs4-utf16.h: Remove file.
3373         * lib/unistr.h: Include their previous contents.
3374         * m4/utf-ucs4.m4: Remove file.
3375         * m4/ucs4-utf.m4: Remove file.
3376         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
3377         (Depends-on): Add unistr/base.
3378         (configure.ac): Remove gl_UTF_UCS4.
3379         (Makefile.am): Update.
3380         (Include): Change to unistr.h.
3381         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
3382         (Depends-on): Add unistr/base.
3383         (configure.ac): Remove gl_UTF_UCS4.
3384         (Makefile.am): Update.
3385         (Include): Change to unistr.h.
3386         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
3387         (Depends-on): Add unistr/base.
3388         (configure.ac): Remove gl_UTF_UCS4.
3389         (Makefile.am): Update.
3390         (Include): Change to unistr.h.
3391         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
3392         (Depends-on): Add unistr/base.
3393         (configure.ac): Remove gl_UTF_UCS4.
3394         (Makefile.am): Update.
3395         (Include): Change to unistr.h.
3396         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
3397         (Depends-on): Add unistr/base.
3398         (configure.ac): Remove gl_UCS4_UTF.
3399         (Makefile.am): Update.
3400         (Include): Change to unistr.h.
3401         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
3402         (Depends-on): Add unistr/base.
3403         (configure.ac): Remove gl_UCS4_UTF.
3404         (Makefile.am): Update.
3405         (Include): Change to unistr.h.
3406         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
3407         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
3408         utf8-ucs4-unsafe.h.
3409         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
3410         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
3411         utf16-ucs4-unsafe.h.
3412         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
3413         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
3414         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
3415         * lib/unistr/u8-strchr.c: Likewise.
3416         * lib/unistr/u8-strrchr.c: Likewise.
3417         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
3418         * lib/unistr/u16-strchr.c: Likewise.
3419         * lib/unistr/u16-strrchr.c: Likewise.
3420         * lib/striconveh.c: Update.
3421         * lib/linebreak.c: Update.
3422
3423 2007-03-24  Bruno Haible  <bruno@clisp.org>
3424
3425         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
3426         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
3427
3428 2007-03-22  Bruno Haible  <bruno@clisp.org>
3429
3430         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
3431
3432 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
3433
3434         * MODULES.html.sh (File system functions): New module write-any-file.
3435         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
3436         * m4/write-any-file.m4: New files.
3437
3438 2007-03-23  Eric Blake  <ebb9@byu.net>
3439
3440         * gnulib-tool: Rearrange space-tab sequences, since some editors
3441         like to eat them.
3442
3443 2007-03-23  Eric Blake  <ebb9@byu.net>
3444
3445         * lib/version-etc.c (version_etc_va): Update license wording to
3446         be more concise.  Recommended by Richard Stallman.
3447
3448 2007-03-22  Bruno Haible  <bruno@clisp.org>
3449
3450         * lib/poll.c (MSG_PEEK): New fallback definition.
3451
3452 2007-03-22  Bruno Haible  <bruno@clisp.org>
3453
3454         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
3455         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
3456         (main): Update.
3457         Fixes a compilation error on BeOS.
3458
3459 2007-03-22  Bruno Haible  <bruno@clisp.org>
3460
3461         * modules/frexpl-tests: New file.
3462         * tests/test-frexpl.c: New file.
3463
3464         * modules/frexpl: New file.
3465         * m4/frexpl.m4: New file.
3466         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
3467         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
3468         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
3469         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
3470         (Depends-on): Add frexpl. Remove isnanl-nolibm.
3471         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
3472
3473 2007-03-22  Bruno Haible  <bruno@clisp.org>
3474
3475         * lib/frexpl.c: Share code with lib/frexp.c.
3476         * modules/mathl (Files): Add lib/frexp.c.
3477         (Depends-on): Add isnanl-nolibm.
3478
3479 2007-03-22  Bruno Haible  <bruno@clisp.org>
3480
3481         * modules/printf-frexp (Files): Add m4/frexp.m4.
3482         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
3483         only if the found frexp function actually works.
3484
3485 2007-03-22  Bruno Haible  <bruno@clisp.org>
3486
3487         * lib/frexp.c: Remove older implementation that uses divisions.
3488
3489 2007-03-21  Bruno Haible  <bruno@clisp.org>
3490
3491         * modules/frexp-tests: New file.
3492         * tests/test-frexp.c: New file.
3493
3494         * modules/frexp: New file.
3495         * lib/frexp.c: New file.
3496         * m4/frexp.m4: New file.
3497         * lib/math_.h (frexp): New declaration.
3498         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
3499         REPLACE_FREXP.
3500         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
3501
3502 2007-03-21  Bruno Haible  <bruno@clisp.org>
3503
3504         * modules/isnanl-tests: New file.
3505         * tests/test-isnanl.c: New file.
3506
3507         * modules/isnanl: New file.
3508         * lib/isnanl.h: New file.
3509         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
3510         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
3511         gl_FUNC_ISNANL_WORKS.
3512         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
3513         New macros.
3514
3515 2007-03-21  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
3518         lib/isnanl.h.
3519         (Include): Update.
3520         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
3521         * lib/vasnprintf.c: Update.
3522         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
3523         tests/test-isnanl.h, remove tests/test-isnanl.c.
3524         (Makefile.am): Update.
3525         * tests/test-isnanl-nolibm.c: New file.
3526         * tests/test-isnanl.h: New file.
3527         * tests/test-isnanl.c: Remove file.
3528
3529 2007-03-21  Jim Meyering  <jim@meyering.net>
3530
3531         When trying to open ".", treat ESTALE like EACCES.
3532         * lib/savewd.c (savewd_save): Resort to forking not just upon
3533         failure with EACCES, but also when errno is ESTALE.
3534
3535 2007-03-20  Bruno Haible  <bruno@clisp.org>
3536
3537         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
3538         Needed on AIX 5.1. Reported by Matthew Woehlke.
3539
3540 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3541
3542         Suggestions by Bruno Haible:
3543         * lib/acl-internal.h: Include "gettext.h" rather than rolling
3544         our own.
3545         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
3546         * modules/acl (Depends-on): Add gettext.
3547
3548 2007-03-19  Bruno Haible  <bruno@clisp.org>
3549
3550         * modules/iconvme: Remove file.
3551         * lib/iconvme.h: Remove file.
3552         * lib/iconvme.c: Remove file.
3553         * m4/iconvme.m4: Remove file.
3554
3555 2007-03-19  Bruno Haible  <bruno@clisp.org>
3556
3557         * doc/relocatable-maint.texi: Break long shell script line.
3558         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3559
3560 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3561
3562         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
3563         handle file_has_acl.
3564         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
3565         * lib/acl.c: Move header inclusions and related macro defns into
3566         lib/acl-internal.h.
3567         (S_ISLNK): Remove defn, since that's now done for us.
3568         (file_has_acl): Move to lib/file-has-acl.c.
3569         Call acl_trivial if available.  This is the crucial part of the fix.
3570         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
3571         shared within the library.  Rewrite a bit, partly to make it compatible
3572         with the GNU coding style.
3573         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
3574         Remove unnecessary double-quotes.
3575         Don't test for acl_to_text; the build will catch that.
3576         Replace acl_entries if it doesn't exist and it is needed.
3577         Check for -lsec and acl_trivial (as used on Solaris 10).
3578         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
3579         lib/file-has-acl.c.
3580         (Depends-on): Add sys_stat, for S_ISLNK.
3581
3582 2007-03-19  Ben Pfaff  <blp@gnu.org>
3583
3584         * doc/gnulib.texi: Fix typos.
3585         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3586
3587 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3588
3589         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
3590         If size is zero here, buf must be zero.
3591
3592 2007-03-19  Simon Josefsson  <simon@josefsson.org>
3593
3594         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
3595         <bruno@clisp.org>.
3596
3597 2007-03-18  Bruno Haible  <bruno@clisp.org>
3598
3599         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
3600         Suggested by Eric Blake.
3601
3602 2007-03-18  Ben Pfaff  <blp@gnu.org>
3603
3604         * doc/relocatable.texi: Recommend using as prefix a directory
3605         that does not exist and will never be created.  Based on
3606         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
3607         and others.
3608
3609 2007-03-17  Bruno Haible  <bruno@clisp.org>
3610
3611         * lib/fchownat.c: Include lchown.h.
3612
3613 2007-03-17  Bruno Haible  <bruno@clisp.org>
3614
3615         Fix endless loop when the given allocated size was > INT_MAX.
3616         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
3617         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
3618         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
3619         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
3620         * lib/sprintf.c (sprintf): Likewise.
3621
3622 2007-03-17  Bruno Haible  <bruno@clisp.org>
3623
3624         * tests/test-argp-2.sh (func_compare): Output a context diff.
3625
3626 2007-03-17  Bruno Haible  <bruno@clisp.org>
3627
3628         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
3629         locale's decimal-point character.
3630
3631 2007-03-17  Bruno Haible  <bruno@clisp.org>
3632
3633         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
3634         before comparing it. Needed because on some platforms (e.g. x86) a
3635         'long double' occupies less bytes than sizeof (long double).
3636
3637 2007-03-17  Bruno Haible  <bruno@clisp.org>
3638
3639         * tests/test-crc.c (main): Make printf statements 64-bit clean.
3640         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
3641         * tests/test-getaddrinfo.c (simple): Likewise.
3642         * tests/test-read-file.c (main): Likewise.
3643
3644 2007-03-17  Bruno Haible  <bruno@clisp.org>
3645
3646         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
3647
3648 2007-03-17  Bruno Haible  <bruno@clisp.org>
3649
3650         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
3651         unused variable.
3652
3653 2007-03-17  Bruno Haible  <bruno@clisp.org>
3654
3655         * tests/test-c-strcasecmp.c: Include c-strcase.h.
3656         * tests/test-c-strncasecmp.c: Likewise.
3657
3658 2007-03-17  Bruno Haible  <bruno@clisp.org>
3659
3660         * modules/stdlib (Depends-on): Add unistd.
3661         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
3662         Needed for MacOS X 10.3.
3663
3664 2007-03-17  Bruno Haible  <bruno@clisp.org>
3665
3666         * lib/unistr/u-strdup.h: Include <stdlib.h>.
3667
3668 2007-03-17  Bruno Haible  <bruno@clisp.org>
3669
3670         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
3671
3672 2007-03-17  Bruno Haible  <bruno@clisp.org>
3673
3674         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
3675         to reflect files copied from gnulib (with or without modifications).
3676         Suggested by Jim Meyering.
3677
3678 2007-03-17  Eric Blake  <ebb9@byu.net>
3679
3680         * NEWS: Document stdlib change from 2007-02-18.
3681
3682 2007-03-17  Jim Meyering  <jim@meyering.net>
3683
3684         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
3685         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
3686         someone uses a name containing shell meta-characters.
3687         Reported by Alfred M. Szmidt.
3688
3689         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
3690
3691 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3692
3693         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
3694         and copy gettext configuration files only if configure.ac contains
3695         a use of AM_GNU_GETTEXT_VERSION.
3696
3697 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3698
3699         * build-aux/bootstrap (gnulib_name): New variable.
3700         (gnulib_tool_options): Use it.
3701
3702 2007-03-13  Simon Josefsson  <simon@josefsson.org>
3703
3704         * tests/test-des.c: Use new namespace.
3705
3706 2007-03-15  Bruno Haible  <bruno@clisp.org>
3707
3708         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
3709         Reported by James Youngman <jay@gnu.org>.
3710
3711 2007-03-15  Bruno Haible  <bruno@clisp.org>
3712
3713         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
3714         declared prototype. Needed with cc on OSF/1 5.1.
3715
3716 2007-03-15  Bruno Haible  <bruno@clisp.org>
3717
3718         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
3719         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
3720         (struct gl_list_implementation): Add dispose_fn argument to the
3721         'create_empty', 'create' methods.
3722         (struct gl_list_impl_base): Add field 'dispose_fn'.
3723         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
3724         argument.
3725         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
3726         dispose_fn argument.
3727         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
3728         dispose_fn on the dropped values.
3729         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
3730         dispose_fn argument.
3731         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
3732         dropped values.
3733         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
3734         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3735         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
3736         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3737         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
3738         argument.
3739         (gl_tree_list_free): Call dispose_fn on the dropped values.
3740         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
3741         the dropped values.
3742         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3743         Add dispose_fn argument.
3744         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
3745         Call dispose_fn on the dropped values.
3746         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
3747         Add dispose_fn argument.
3748         (gl_sublist_create): Initialize the 'dispose_fn' field.
3749         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
3750         * tests/test-array_list.c (main): Update.
3751         * tests/test-carray_list.c (main): Update.
3752         * tests/test-avltree_list.c (main): Update.
3753         * tests/test-rbtree_list.c (main): Update.
3754         * tests/test-avltreehash_list.c (main): Update.
3755         * tests/test-rbtreehash_list.c (main): Update.
3756         * tests/test-linked_list.c (main): Update.
3757         * tests/test-linkedhash_list.c (main): Update.
3758         * tests/test-array_oset.c (main): Update.
3759
3760 2007-03-15  Bruno Haible  <bruno@clisp.org>
3761
3762         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
3763         (gl_oset_create_empty): Add dispose_fn argument.
3764         (struct gl_oset_implementation): Add dispose_fn argument to
3765         'create_empty' method.
3766         (struct gl_oset_impl_base): Add dispose_fn field.
3767         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
3768         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
3769         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
3770         values.
3771         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
3772         (gl_tree_oset_free): Call dispose_fn on the dropped values.
3773         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
3774         dropped value.
3775         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
3776         dropped value.
3777         * tests/test-array_oset.c (main): Update.
3778         * tests/test-avltree_oset.c (main): Update.
3779         * tests/test-rbtree_oset.c (main): Update.
3780         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
3781
3782 2007-03-13  Bruno Haible  <bruno@clisp.org>
3783
3784         * tests/test-stdbool.c (i): Update after last patch.
3785
3786 2007-03-12  Bruno Haible  <bruno@clisp.org>
3787
3788         * lib/quotearg.c: Include <wctype.h> early, before the definition of
3789         the iswprint macro. Needed on Solaris 2.5.1.
3790
3791 2007-03-12  Bruno Haible  <bruno@clisp.org>
3792
3793         * tests/test-printf-frexp.c (main): Declare x as volatile.
3794
3795 2007-03-12  Simon Josefsson  <simon@josefsson.org>
3796
3797         * doc/gnulib.texi (Build robot for gnulib): New section.
3798
3799 2007-03-12  Jim Meyering  <jim@meyering.net>
3800
3801         * build-aux/bootstrap: New file.
3802         * build-aux/bootstrap.conf: New file, from coreutils.
3803
3804 2007-03-11  Bruno Haible  <bruno@clisp.org>
3805
3806         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
3807
3808 2007-03-12  Simon Josefsson  <simon@josefsson.org>
3809
3810         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
3811         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
3812         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
3813
3814 2007-03-11  Bruno Haible  <bruno@clisp.org>
3815
3816         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
3817         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
3818
3819 2007-03-11  Bruno Haible  <bruno@clisp.org>
3820
3821         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
3822         formula. Needed for SunPRO C 5.0.
3823
3824 2007-03-11  Bruno Haible  <bruno@clisp.org>
3825
3826         * modules/long-options (Depends-on): Add getopt.
3827
3828 2007-03-11  Bruno Haible  <bruno@clisp.org>
3829
3830         * modules/modechange (Depends-on): Add stdbool.
3831
3832 2007-03-11  Bruno Haible  <bruno@clisp.org>
3833
3834         * modules/i-ring (Depends-on): Add stdbool.
3835
3836 2007-03-11  Bruno Haible  <bruno@clisp.org>
3837
3838         * modules/gc-des (Depends-on): Add stdbool.
3839
3840 2007-03-11  Bruno Haible  <bruno@clisp.org>
3841
3842         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
3843
3844 2007-03-11  Bruno Haible  <bruno@clisp.org>
3845
3846         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
3847
3848 2007-03-11  Bruno Haible  <bruno@clisp.org>
3849
3850         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
3851
3852 2007-03-11  Bruno Haible  <bruno@clisp.org>
3853
3854         * lib/vasnprintf.c (sprintf): Undefine.
3855
3856 2007-03-11  Bruno Haible  <bruno@clisp.org>
3857
3858         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
3859         initializers in SunPRO C and Compaq C compilers.
3860
3861 2007-03-11  Bruno Haible  <bruno@clisp.org>
3862
3863         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
3864         decrementing code ANSI C compliant.
3865
3866 2007-03-11  Bruno Haible  <bruno@clisp.org>
3867
3868         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
3869         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
3870
3871 2007-03-11  Bruno Haible  <bruno@clisp.org>
3872
3873         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
3874         <stdbool.h> substitute doesn't pass.
3875
3876 2007-03-11  Bruno Haible  <bruno@clisp.org>
3877
3878         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
3879
3880 2007-03-11  Bruno Haible  <bruno@clisp.org>
3881
3882         * gnulib-tool (func_create_megatestdir): Create also an autobuild
3883         script, for submission to autobuild.josefsson.org.
3884
3885 2007-03-10  Bruno Haible  <bruno@clisp.org>
3886
3887         * modules/canonicalize-lgpl-tests: New file.
3888         * tests/test-canonicalize-lgpl.sh: New file.
3889         * tests/test-canonicalize-lgpl.c: New file.
3890
3891         * modules/c-strcase-tests: New file.
3892         * tests/test-c-strcase.sh: New file.
3893         * tests/test-c-strcasecmp.c: New file.
3894         * tests/test-c-strncasecmp.c: New file.
3895
3896         * modules/atexit-tests: New file.
3897         * tests/test-atexit.sh: New file.
3898         * tests/test-atexit.c: New file.
3899
3900 2007-03-10  Bruno Haible  <bruno@clisp.org>
3901
3902         * tests/test-binary-io.sh: Use temporary filenames that are not so
3903         likely to clash with those of other tests (in a parallel make).
3904         * tests/test-binary-io.c: Likewise.
3905
3906 2007-03-10  Bruno Haible  <bruno@clisp.org>
3907
3908         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
3909         fallback; use #error instead.
3910         Suggested by Simon Josefsson.
3911
3912 2007-03-10  Bruno Haible  <bruno@clisp.org>
3913
3914         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
3915         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
3916         first and the last.
3917
3918 2007-03-10  Bruno Haible  <bruno@clisp.org>
3919
3920         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
3921
3922 2007-03-10  Bruno Haible  <bruno@clisp.org>
3923
3924         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
3925         "make distcheck".
3926         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
3927         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
3928         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
3929
3930 2007-03-10  Bruno Haible  <bruno@clisp.org>
3931
3932         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
3933         variable.
3934         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
3935         variable.
3936
3937 2007-03-09  Eric Blake  <ebb9@byu.net>
3938         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
3939
3940         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
3941         types are not being provided by gnulib.
3942         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
3943         types are supported.
3944
3945 2007-03-10  Bruno Haible  <bruno@clisp.org>
3946
3947         * lib/stdio_.h (__attribute__): New macro.
3948         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
3949         vsprintf): Specify __attribute__ __format__ for GCC.
3950         Suggested by Eric Blake.
3951
3952 2007-03-09  Bruno Haible  <bruno@clisp.org>
3953
3954         * modules/printf-posix-tests: New file.
3955         * tests/test-printf-posix.sh: New file.
3956         * tests/test-printf-posix.c: New file.
3957
3958         * modules/printf-posix: New file.
3959         * lib/printf.c: New file.
3960         * m4/printf-posix-rpl.m4: New file.
3961         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
3962         REPLACE_PRINTF.
3963         * lib/stdio_.h (printf): New declaration.
3964         (format, __format__, ____printf____, ____scanf____, ____strftime____,
3965         ____strfmon____): New macros.
3966         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
3967         REPLACE_PRINTF.
3968
3969 2007-03-09  Bruno Haible  <bruno@clisp.org>
3970
3971         * tests/test-vasnprintf-posix2.sh: New file.
3972         * tests/test-vasnprintf-posix2.c: New file.
3973         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
3974         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
3975         (Makefile.am): Activate test-vasnprintf-posix2.sh.
3976
3977         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
3978         a locale dependent decimal point, rather than always '.'.
3979
3980 2007-03-09  Eric Blake  <ebb9@byu.net>
3981
3982         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
3983         spite of platforms like Tandem/NSK that define it to -1.
3984
3985 2007-03-08  Bruno Haible  <bruno@clisp.org>
3986
3987         * modules/vprintf-posix-tests: New file.
3988         * tests/test-vprintf-posix.sh: New file.
3989         * tests/test-vprintf-posix.c: New file.
3990         * tests/test-printf-posix.h: New file.
3991
3992         * modules/vprintf-posix: New file.
3993         * lib/vprintf.c: New file.
3994         * m4/vprintf-posix.m4: New file.
3995         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
3996         REPLACE_VPRINTF.
3997         * lib/stdio_.h (vprintf): New declaration.
3998         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
3999         REPLACE_VPRINTF.
4000
4001 2007-03-08  Bruno Haible  <bruno@clisp.org>
4002
4003         * modules/fprintf-posix-tests: New file.
4004         * tests/test-fprintf-posix.sh: New file.
4005         * tests/test-fprintf-posix.c: New file.
4006
4007         * modules/fprintf-posix: New file.
4008         * lib/fprintf.c: New file.
4009         * m4/fprintf-posix.m4: New file.
4010         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4011         REPLACE_FPRINTF.
4012         * lib/stdio_.h (fprintf): New declaration.
4013         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4014         REPLACE_FPRINTF.
4015
4016 2007-03-08  Bruno Haible  <bruno@clisp.org>
4017
4018         * modules/vfprintf-posix-tests: New file.
4019         * tests/test-vfprintf-posix.sh: New file.
4020         * tests/test-vfprintf-posix.c: New file.
4021         * tests/test-fprintf-posix.h: New file.
4022         * tests/test-fprintf-posix.out: New file.
4023
4024         * modules/vfprintf-posix: New file.
4025         * lib/vfprintf.c: New file.
4026         * m4/vfprintf-posix.m4: New file.
4027         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4028         REPLACE_VFPRINTF.
4029         * lib/stdio_.h (vfprintf): New declaration.
4030         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4031         REPLACE_VFPRINTF.
4032
4033 2007-03-08  Bruno Haible  <bruno@clisp.org>
4034
4035         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4036
4037 2007-03-08  Bruno Haible  <bruno@clisp.org>
4038
4039         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4040         instead of 'expr' invocations.
4041         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4042         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4043         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4044         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4045         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4046         Suggested by Paul Eggert.
4047
4048 2007-03-08  Bruno Haible  <bruno@clisp.org>
4049
4050         * modules/fseterr-tests: New file.
4051         * tests/test-fseterr.c: New file.
4052
4053         * modules/fseterr: New file.
4054         * lib/fseterr.h: New file.
4055         * lib/fseterr.c: New file.
4056
4057 2007-03-08  Bruno Haible  <bruno@clisp.org>
4058
4059         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4060         * lib/getopt_.h: Likewise.
4061         * lib/mbswidth.h: Likewise.
4062         * lib/setenv.h: Likewise.
4063         * lib/vasnprintf.h: Likewise.
4064         * lib/vasprintf.h: Likewise.
4065         * lib/verror.h: Likewise.
4066         * lib/xsetenv.h: Likewise.
4067         * lib/xvasprintf.h: Likewise.
4068
4069 2007-03-08  Jim Meyering  <jim@meyering.net>
4070
4071         * users.txt: Add parted.
4072
4073         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4074
4075 2007-03-07  Bruno Haible  <bruno@clisp.org>
4076
4077         * m4/printf.m4: Make the shell script snippets copy&pastable.
4078
4079 2007-03-02  Bruno Haible  <bruno@clisp.org>
4080
4081         * lib/netinet_in_.h: New file.
4082         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4083         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4084         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4085         (Depends-on): Add absolute-header.
4086         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4087         into netinet/in.h.
4088
4089 2007-03-03  Bruno Haible  <bruno@clisp.org>
4090
4091         * lib/sys_select_.h: New file.
4092         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4093         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4094         * modules/sys_select (Files): Add lib/sys_select_.h.
4095         (Depends-on): Add absolute-header.
4096         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4097         into sys/select.h.
4098
4099 2007-03-02  Bruno Haible  <bruno@clisp.org>
4100
4101         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4102         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4103         values.
4104         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4105         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4106         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4107         * modules/sys_socket (Depends-on): Add absolute-header.
4108         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4109         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4110         (Include): Remove requirement of inclusion of <sys/types.h>.
4111
4112 2007-03-02  Bruno Haible  <bruno@clisp.org>
4113
4114         * lib/byteswap_.h (bswap_32): Fix formula.
4115
4116 2007-03-06  Bruno Haible  <bruno@clisp.org>
4117
4118         * modules/sprintf-posix-tests: New file.
4119         * tests/test-sprintf-posix.c: New file.
4120
4121         * modules/sprintf-posix: New file.
4122         * lib/sprintf.c: New file.
4123         * m4/sprintf-posix.m4: New file.
4124         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4125         REPLACE_SPRINTF.
4126         * lib/stdio_.h (sprintf): New declaration.
4127         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4128         REPLACE_SPRINTF.
4129
4130 2007-03-06  Bruno Haible  <bruno@clisp.org>
4131
4132         * modules/vsprintf-posix-tests: New file.
4133         * tests/test-vsprintf-posix.c: New file.
4134         * tests/test-sprintf-posix.h: New file.
4135
4136         * modules/vsprintf-posix: New file.
4137         * lib/vsprintf.c: New file.
4138         * m4/vsprintf-posix.m4: New file.
4139         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4140         REPLACE_VSPRINTF.
4141         * lib/stdio_.h (vsprintf): New declaration.
4142         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4143         REPLACE_VSPRINTF.
4144
4145 2007-03-06  Bruno Haible  <bruno@clisp.org>
4146
4147         * modules/vsnprintf (Depend-on): Remove minmax.
4148
4149 2007-03-06  Bruno Haible  <bruno@clisp.org>
4150
4151         * modules/snprintf-posix-tests: New file.
4152         * tests/test-snprintf-posix.c: New file.
4153
4154         * modules/snprintf-posix: New file.
4155         * m4/snprintf-posix.m4: New file.
4156         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4157         gl_FUNC_SNPRINTF.
4158         (gl_FUNC_SNPRINTF): Invoke it.
4159         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4160         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4161         is set.
4162         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4163
4164 2007-03-06  Bruno Haible  <bruno@clisp.org>
4165
4166         * modules/vsnprintf-posix-tests: New file.
4167         * tests/test-vsnprintf-posix.c: New file.
4168         * tests/test-snprintf-posix.h: New file.
4169
4170         * modules/vsnprintf-posix: New file.
4171         * m4/vsnprintf-posix.m4: New file.
4172         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4173         gl_FUNC_VSNPRINTF.
4174         (gl_FUNC_VSNPRINTF): Invoke it.
4175         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4176         * lib/stdio_.h (vsnprintf): Define as a replacement if
4177         REPLACE_VSNPRINTF is set.
4178         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4179
4180 2007-03-06  Bruno Haible  <bruno@clisp.org>
4181
4182         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4183         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4184
4185 2007-03-06  Bruno Haible  <bruno@clisp.org>
4186
4187         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4188         (asinl): Declare also if HAVE_DECL_ASINL is set.
4189         (atanl): Declare also if HAVE_DECL_ATANL is set.
4190         (ceill): Declare also if HAVE_DECL_CEILL is set.
4191         (cosl): Declare also if HAVE_DECL_COSL is set.
4192         (expl): Declare also if HAVE_DECL_EXPL is set.
4193         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4194         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4195         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4196         (logl): Declare also if HAVE_DECL_LOGL is set.
4197         (sinl): Declare also if HAVE_DECL_SINL is set.
4198         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4199         (tanl): Declare also if HAVE_DECL_TANL is set.
4200         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4201         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4202         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4203         declaration of frexpl, ldexpl.
4204         * modules/printf-frexpl (Depends-on): Add math.
4205         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4206
4207 2007-03-05  Bruno Haible  <bruno@clisp.org>
4208
4209         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4210         frexpl and ldexpl are declared.
4211         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4212
4213 2007-03-05  Bruno Haible  <bruno@clisp.org>
4214
4215         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4216         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4217
4218 2007-03-05  Bruno Haible  <bruno@clisp.org>
4219
4220         * lib/stdio_.h: Include <stddef.h>.
4221
4222 2007-03-05  Bruno Haible  <bruno@clisp.org>
4223
4224         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4225
4226 2007-03-05  Bruno Haible  <bruno@clisp.org>
4227
4228         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4229         NetBSD 4, from Ralf Wildenhues.
4230
4231 2007-03-04  Bruno Haible  <bruno@clisp.org>
4232
4233         * lib/vasprintf.h: Update #if logic for the case when the functions
4234         exist but are overridden.
4235
4236 2007-03-04  Bruno Haible  <bruno@clisp.org>
4237
4238         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4239         implementations: glibc-2.4 and MacOS X 10.3.
4240         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4241         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4242         * tests/test-vasprintf-posix.c (test_function): Likewise.
4243
4244 2007-03-04  Bruno Haible  <bruno@clisp.org>
4245
4246         * modules/vasprintf-posix-tests: New file.
4247         * tests/test-vasprintf-posix.c: New file.
4248
4249         * modules/vasprintf-posix: New file.
4250         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4251         defined.
4252         * m4/vasprintf-posix.m4: New file.
4253         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4254         gl_FUNC_VASPRINTF.
4255         (gl_FUNC_VASPRINTF): Invoke it.
4256         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4257         here.
4258         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4259
4260 2007-03-04  Bruno Haible  <bruno@clisp.org>
4261
4262         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4263         REPLACE_GETTIMEOFDAY.
4264         * modules/sys_time (Makefile.am): Likewise.
4265         * m4/sys_time_h.m4: Likewise.
4266         * m4/gettimeofday.m4: Likewise.
4267
4268 2007-03-04  Bruno Haible  <bruno@clisp.org>
4269
4270         * modules/vasnprintf-posix-tests: New file.
4271         * tests/test-vasnprintf-posix.c: New file.
4272
4273         * modules/vasnprintf-posix: New file.
4274         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4275         printf-frexpl.h.
4276         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4277         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4278         REPLACE_VASNPRINTF is defined.
4279         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4280         gl_FUNC_VASNPRINTF.
4281         (gl_FUNC_VASNPRINTF): Invoke it.
4282         * m4/vasnprintf-posix.m4: New file.
4283         * m4/printf.m4: New file.
4284
4285 2007-03-04  Bruno Haible  <bruno@clisp.org>
4286
4287         Compile progreloc.c only if --enable-relocatable is specified.
4288         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
4289         if --enable-relocatable was specified.
4290         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
4291         lib_SOURCES.
4292
4293 2007-03-04  Jim Meyering  <jim@meyering.net>
4294
4295         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
4296         Use it consistently, rather than enumerating errno constants.
4297
4298 2007-03-04  Bruno Haible  <bruno@clisp.org>
4299
4300         * modules/xvasprintf-tests: New file.
4301         * tests/test-xvasprintf.c: New file.
4302
4303         * modules/vasprintf-tests: New file.
4304         * tests/test-vasprintf.c: New file.
4305
4306         * modules/vasnprintf-tests: New file.
4307         * tests/test-vasnprintf.c: New file.
4308
4309         * modules/vsnprintf-tests: New file.
4310         * tests/test-vsnprintf.c: New file.
4311
4312         * modules/snprintf-tests: New file.
4313         * tests/test-snprintf.c: New file.
4314
4315 2007-03-04  Bruno Haible  <bruno@clisp.org>
4316
4317         Compile relocatable.c only if --enable-relocatable is specified.
4318         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
4319         gl_RELOCATABLE_LIBRARY.
4320         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
4321         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
4322         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
4323         gl_RELOCATABLE_LIBRARY.
4324         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
4325         (Makefile.am): Remove lib_SOURCES.
4326         * modules/relocatable-lib-lgpl (configure.ac): Invoke
4327         gl_RELOCATABLE_LIBRARY.
4328         (Makefile.am): Remove lib_SOURCES.
4329         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
4330         always.
4331         * modules/relocatable-prog-wrapper (configure.ac): Invoke
4332         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
4333
4334 2007-03-04  Bruno Haible  <bruno@clisp.org>
4335
4336         * modules/argmatch-tests: New file.
4337         * tests/test-argmatch.c: New file.
4338
4339         * tests/test-allocsa.c (main): Halve the number of loop runs.
4340
4341         * modules/alloca-opt-tests: New file.
4342         * tests/test-alloca-opt.c: New file.
4343
4344 2007-03-04  Jim Meyering  <jim@meyering.net>
4345
4346         Work around difference between Linux ACLs and Solaris 10 ZFS.
4347         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
4348         for EINVAL.
4349
4350 2007-03-03  Bruno Haible  <bruno@clisp.org>
4351
4352         * modules/relocatable-prog (Depends-on): Add back progreloc's
4353         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
4354
4355 2007-03-03  Bruno Haible  <bruno@clisp.org>
4356
4357         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
4358         * modules/relocatable-lib: New file.
4359
4360 2007-03-03  Bruno Haible  <bruno@clisp.org>
4361
4362         * modules/relocatable-prog: Renamed from modules/relocatable.
4363         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
4364
4365 2007-03-03  Bruno Haible  <bruno@clisp.org>
4366
4367         * modules/relocatable-script (Files): Add doc/relocatable.texi,
4368         m4/relocatable-lib.m4.
4369         (Depends-on): Remove 'relocatable'.
4370         (configure.ac): Add gl_RELOCATABLE_NOP.
4371
4372 2007-03-03  Bruno Haible  <bruno@clisp.org>
4373
4374         * modules/relocatable-prog-wrapper: New file.
4375         * modules/relocatable (Depends-on): Add it. Remove all other
4376         dependencies except progname.
4377         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
4378
4379         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
4380         (gl_FUNC_STRERROR): Nop.
4381         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
4382
4383         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
4384         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
4385
4386         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
4387         (gl_FUNC_READLINK): Update.
4388
4389         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
4390
4391 2007-03-03  Bruno Haible  <bruno@clisp.org>
4392
4393         * lib/xreadlink.c: Include <unistd.h> unconditionally.
4394         * modules/xreadlink (Depends-on): Add unistd.
4395         * modules/xreadlink-with-size (Depends-on): Likewise.
4396
4397 2007-03-03  Bruno Haible  <bruno@clisp.org>
4398
4399         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
4400         extracted from gt_FUNC_SETENV.
4401         (gt_FUNC_SETENV): Remove macro.
4402         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
4403         remove gt_FUNC_SETENV.
4404
4405 2007-03-03  Bruno Haible  <bruno@clisp.org>
4406
4407         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4408         ENABLE_RELOCATABLE here.
4409         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
4410
4411 2007-03-03  Bruno Haible  <bruno@clisp.org>
4412
4413         * modules/rbtreehash-list-tests (Depends-on): Add progname.
4414         * tests/test-rbtreehash_list.c: Include progname.h.
4415         (main): Call set_program_name.
4416
4417         * modules/rbtree-oset-tests (Depends-on): Add progname.
4418         * tests/test-rbtree_oset.c: Include progname.h.
4419         (main): Call set_program_name.
4420
4421         * modules/rbtree-list-tests (Depends-on): Add progname.
4422         * tests/test-rbtree_list.c: Include progname.h.
4423         (main): Call set_program_name.
4424
4425         * modules/linked-list-tests (Depends-on): Add progname.
4426         * tests/test-linked_list.c: Include progname.h.
4427         (main): Call set_program_name.
4428
4429 2007-03-03  Bruno Haible  <bruno@clisp.org>
4430
4431         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
4432         All uses of __restrict changed to _Restrict_.
4433         * lib/glob_.h (__restrict): Remove macro.
4434
4435 2007-03-02  Bruno Haible  <bruno@clisp.org>
4436
4437         * modules/gettext (configure.ac): Require gettext infrastructure
4438         from version 0.16.1.
4439
4440 2007-03-02  Bruno Haible  <bruno@clisp.org>
4441
4442         * modules/linkedhash-list-tests (Depends-on): Add progname.
4443         * tests/test-linkedhash_list.c: Include progname.h.
4444         (main): Call set_program_name.
4445
4446         * modules/carray-list-tests (Depends-on): Add progname.
4447         * tests/test-carray_list.c: Include progname.h.
4448         (main): Call set_program_name.
4449
4450         * modules/avltreehash-list-tests (Depends-on): Add progname.
4451         * tests/test-avltreehash_list.c: Include progname.h.
4452         (main): Call set_program_name.
4453
4454         * modules/avltree-oset-tests (Depends-on): Add progname.
4455         * tests/test-avltree_oset.c: Include progname.h.
4456         (main): Call set_program_name.
4457
4458         * modules/avltree-list-tests (Depends-on): Add progname.
4459         * tests/test-avltree_list.c: Include progname.h.
4460         (main): Call set_program_name.
4461
4462         * modules/array-oset-tests (Depends-on): Add progname.
4463         * tests/test-array_oset.c: Include progname.h.
4464         (main): Call set_program_name.
4465
4466         * modules/array-list-tests (Depends-on): Add progname.
4467         * tests/test-array_list.c: Include progname.h.
4468         (main): Call set_program_name.
4469
4470         * modules/argp-tests (Depends-on): Add progname.
4471         * tests/test-argp.c: Include argp.h first. Include progname.h.
4472         (main): Call set_program_name.
4473
4474 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
4475
4476         * doc/gnulib-tool.texi (Initial import): Reword description of
4477         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
4478         limited effect even if defined after the first system include.
4479
4480 2007-03-01  Bruno Haible  <bruno@clisp.org>
4481
4482         * build-aux/config.libpath: Update to libtool-1.5.22.
4483         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
4484
4485 2007-03-01  Bruno Haible  <bruno@clisp.org>
4486
4487         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
4488         foo_CFLAGS.
4489         Reported by Ralf Wildenhues.
4490
4491 2007-03-01  Bruno Haible  <bruno@clisp.org>
4492
4493         * build-aux/install-reloc: Remove object files left over by some
4494         compilers.
4495         Reported by Ralf Wildenhues.
4496
4497 2007-03-01  Bruno Haible  <bruno@clisp.org>
4498
4499         * build-aux/install-reloc: Break long lines.
4500
4501 2007-03-01  Bruno Haible  <bruno@clisp.org>
4502
4503         * doc/relocatable.texi: Document that it may not work on OpenBSD.
4504         Reported by Ralf Wildenhues.
4505
4506 2007-03-01  Bruno Haible  <bruno@clisp.org>
4507
4508         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
4509         include ordering constraints.
4510
4511 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
4512
4513         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
4514         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
4515         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
4516         as another example.
4517         * lib/time_.h: Fix misspelling.
4518         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4519         Require gl_HEADER_TIME_H_DEFAULTS.
4520         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
4521         * m4/time_r.m4 (gl_TIME_R): Likewise.
4522         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
4523
4524 2007-03-01  Bruno Haible  <bruno@clisp.org>
4525
4526         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
4527         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4528
4529 2007-03-01  Jim Meyering  <jim@meyering.net>
4530
4531         * modules/xreadlink (Maintainer): Add my name.
4532         * modules/xreadlink-with-size (Depends-on): Alphabetize.
4533
4534 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
4535             Bruno Haible  <bruno@clisp.org>
4536
4537         * build-aux/install-reloc: Compile also c-ctype.c.
4538         * build-aux/relocatable.sh.in: New file.
4539         * doc/relocatable.texi: New file.
4540         * doc/relocatable-maint.texi: New file.
4541         * doc/gnulib.texi: Include relocatable-maint.texi.
4542         * lib/progreloc.c: Include unistd.h unconditionally.
4543         * lib/relocwrapper.c: Include unistd.h unconditionally.
4544         Include c-ctype.h.
4545         (add_dotbin): Use c_tolower.
4546         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
4547         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
4548         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
4549         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
4550         to m4/relocatable-lib.m4.
4551         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
4552         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
4553         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
4554         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
4555         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
4556         * modules/relocatable: New file.
4557         * modules/relocatable-lib: New file.
4558         * modules/relocatable-script: New file.
4559
4560 2007-02-28  Bruno Haible  <bruno@clisp.org>
4561
4562         Import --enable-relocatable infrastructure.
4563         * build-aux/config.libpath: New file, from GNU gettext.
4564         * build-aux/install-reloc: New file, from GNU gettext.
4565         * build-aux/reloc-ldflags: New file, from GNU gettext.
4566         * lib/relocatable.h: New file, from GNU gettext.
4567         * lib/relocatable.c: New file, from GNU gettext.
4568         * lib/relocwrapper.c: New file, from GNU gettext.
4569         * m4/relocatable.m4: New file, from GNU gettext.
4570
4571 2007-02-28  Bruno Haible  <bruno@clisp.org>
4572
4573         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
4574
4575         * modules/xreadlink: New file, from GNU gettext with modifications.
4576         * lib/xreadlink.c: New file, from GNU gettext.
4577         * lib/xreadlink.h: Add comments.
4578         (xreadlink): New declaration.
4579
4580         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
4581         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
4582         lib/xreadlink-with-size.c.
4583         (configure.ac): Remove gl_XREADLINK invocation.
4584         (Makefile.am): Augment lib_SOURCES.
4585         * m4/xreadlink.m4: Remove file.
4586         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
4587         (xreadlink_with_size): Renamed from xreadink.
4588         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
4589         * modules/canonicalize (Depends-on): Replace xreadlink with
4590         xreadlink-with-size.
4591         * lib/canonicalize.c (canonicalize_filename_mode): Update.
4592
4593 2007-02-25  Jim Meyering  <jim@meyering.net>
4594
4595         * build-aux/announce-gen: When complaining about excess arguments,
4596         list them.
4597
4598 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
4599
4600         * README: Document signed integer overflow situation more
4601         accurately.
4602
4603 2007-02-25  Bruno Haible  <bruno@clisp.org>
4604
4605         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
4606         'a' or 'A' conversion.
4607
4608 2007-02-25  Bruno Haible  <bruno@clisp.org>
4609
4610         * modules/filename: Renamed from modules/pathname.
4611         (Files): Replace lib/pathname.h with lib/filename.h. Replace
4612         lib/concatpath.c with lib/concat-filename.c.
4613         (Makefile.am): Update.
4614         (Include): Replace pathname.h with filename.h.
4615         * lib/filename.h: Renamed from lib/pathname.h.
4616         (concatenated_filename): Renamed from concatenated_pathname.
4617         * lib/concat-filename.c: Renamed from lib/concatpath.c.
4618         (concatenated_filename): Renamed from concatenated_pathname.
4619         * lib/findprog.c: Include filename.h instead of pathname.h.
4620         (find_in_path): Update.
4621         * lib/javacomp.c: Include filename.h instead of pathname.h.
4622         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
4623         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
4624         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
4625         is_oldgcj_14_13_usable, is_javac_usable): Update.
4626         * lib/javaexec.c: Include filename.h instead of pathname.h.
4627         (execute_java_class): Update.
4628         * modules/findprog: Update.
4629         * modules/javacomp: Update.
4630         * modules/javaexec: Update.
4631         * MODULES.html.sh (File system functions): Add 'filename', remove
4632         'pathname'.
4633
4634 2007-02-25  Bruno Haible  <bruno@clisp.org>
4635
4636         * modules/printf-frexpl-tests: New file.
4637         * tests/test-printf-frexpl.c: New file.
4638
4639         * modules/printf-frexpl: New file.
4640         * lib/printf-frexpl.h: New file.
4641         * lib/printf-frexpl.c: New file.
4642         * m4/printf-frexpl.m4: New file.
4643
4644 2007-02-25  Bruno Haible  <bruno@clisp.org>
4645
4646         * modules/printf-frexp-tests: New file.
4647         * tests/test-printf-frexp.c: New file.
4648
4649         * modules/printf-frexp: New file.
4650         * lib/printf-frexp.h: New file.
4651         * lib/printf-frexp.c: New file.
4652         * m4/printf-frexp.m4: New file.
4653
4654 2007-02-25  Bruno Haible  <bruno@clisp.org>
4655
4656         Assume automake >= 1.10 for the tests.
4657         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
4658         * modules/arctwo-tests: Likewise.
4659         * modules/argp-tests: Likewise.
4660         * modules/avltree-list-tests: Likewise.
4661         * modules/avltree-oset-tests: Likewise.
4662         * modules/avltreehash-list-tests: Likewise.
4663         * modules/carray-list-tests: Likewise.
4664         * modules/crc-tests: Likewise.
4665         * modules/des-tests: Likewise.
4666         * modules/gc-arcfour-tests: Likewise.
4667         * modules/gc-arctwo-tests: Likewise.
4668         * modules/gc-des-tests: Likewise.
4669         * modules/gc-hmac-md5-tests: Likewise.
4670         * modules/gc-hmac-sha1-tests: Likewise.
4671         * modules/gc-md2-tests: Likewise.
4672         * modules/gc-md4-tests: Likewise.
4673         * modules/gc-md5-tests: Likewise.
4674         * modules/gc-pbkdf2-sha1-tests: Likewise.
4675         * modules/gc-rijndael-tests: Likewise.
4676         * modules/gc-sha1-tests: Likewise.
4677         * modules/gc-tests: Likewise.
4678         * modules/getaddrinfo-tests: Likewise.
4679         * modules/hmac-md5-tests: Likewise.
4680         * modules/hmac-sha1-tests: Likewise.
4681         * modules/linked-list-tests: Likewise.
4682         * modules/linkedhash-list-tests: Likewise.
4683         * modules/lock-tests: Likewise.
4684         * modules/md2-tests: Likewise.
4685         * modules/md4-tests: Likewise.
4686         * modules/md5-tests: Likewise.
4687         * modules/rbtree-list-tests: Likewise.
4688         * modules/rbtree-oset-tests: Likewise.
4689         * modules/rbtreehash-list-tests: Likewise.
4690         * modules/read-file-tests: Likewise.
4691         * modules/rijndael-tests: Likewise.
4692         * modules/stdint-tests: Likewise.
4693         * modules/tls-tests: Likewise.
4694
4695 2007-02-24  Bruno Haible  <bruno@clisp.org>
4696
4697         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
4698         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
4699         function; instead check whether isnan with a double argument links.
4700         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
4701         function; instead check whether isnan with a 'long double' argument
4702         links.
4703         Reported by Eric Blake <ebb9@byu.net>.
4704
4705 2007-02-24  Bruno Haible  <bruno@clisp.org>
4706
4707         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
4708         defined.
4709         * lib/isnanl.c: Remove all code. Just include isnan.c.
4710         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
4711
4712 2007-02-25  Jim Meyering  <jim@meyering.net>
4713
4714         Avoid conflicting types for 'unsetenv' on FreeBSD.
4715         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
4716         conflicting with FreeBSD's (5.0 and 6.1) function declaration
4717         in stdlib.h.
4718
4719 2007-02-24  Bruno Haible  <bruno@clisp.org>
4720
4721         * modules/isnanl-nolibm-tests: New file.
4722         * tests/test-isnanl.c: New file.
4723
4724         * modules/isnanl-nolibm: New file.
4725         * lib/isnanl.h: New file.
4726         * lib/isnanl.c: New file.
4727         * m4/isnanl.m4: New file.
4728
4729 2007-02-24  Bruno Haible  <bruno@clisp.org>
4730
4731         * modules/isnan-nolibm-tests: New file.
4732         * tests/test-isnan.c: New file.
4733
4734         * modules/isnan-nolibm: New file.
4735         * lib/isnan.h: New file.
4736         * lib/isnan.c: New file.
4737         * m4/isnan.m4: New file.
4738
4739 2007-02-24  Bruno Haible  <bruno@clisp.org>
4740
4741         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
4742         assume that an exponent fits in 20 bits.
4743
4744 2007-02-24  Jim Meyering  <jim@meyering.net>
4745
4746         * m4/regex.m4: Update the description of the configure-time option,
4747         --without-included-regex, to state accurately what the defaults are,
4748         and perhaps to give people an idea why using this option is risky.
4749
4750 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
4751
4752         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
4753         loops on small arguments.  This attempts to avoid the problem
4754         Bruno Haible reported for AIX 4.3.2 in
4755         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
4756
4757 2007-02-23  Bruno Haible  <bruno@clisp.org>
4758
4759         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
4760         Needed for help2man.
4761
4762 2007-02-23  Karl Berry  <karl@gnu.org>
4763
4764         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
4765         exists, foo.h should be cvs-ignored, not committed.
4766
4767 2007-02-23  Eric Blake  <ebb9@byu.net>
4768
4769         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
4770         * lib/stat-time.h (includes): Likewise.
4771         * lib/utimecmp.c (includes): Likewise.
4772         * lib/utimens.h (includes): Likewise.
4773         * lib/getdate.y (includes): Also include "timespec.h" for use
4774         internal to the module.
4775         * modules/utimens (Depends-on): Revert yesterday's patch.
4776         * modules/nanosleep (Depends-on): Add missing dependency.
4777
4778 2007-02-22  Bruno Haible  <bruno@clisp.org>
4779
4780         * lib/glob.c: Don't include getlogin_r.h.
4781
4782 2007-02-22  Jim Meyering  <jim@meyering.net>
4783
4784         * modules/utimens (Depends-on): Add timespec, required for
4785         utimens.h's inclusion of timespec.h.
4786
4787 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
4788
4789         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
4790         long unreadable paths in GNU/Linux.  Problem reported by Andreas
4791         Schwab in
4792         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
4793         I'll try to think of a better way to fix the Solaris problem.
4794
4795         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
4796         like glibc; on Solaris 10, it fails with errno == EINVAL.
4797         POSIX says the behavior is unspecified if the first argument is NULL,
4798         so play it safe and never pass NULL to the system getcwd.
4799
4800 2007-02-21  Jim Meyering  <jim@meyering.net>
4801
4802         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
4803         of gettimeofday.  It would conflict with the one now always
4804         provided via sys_time_.h.  Reported by Matthew Woehlke, as
4805         an IRIX 6.5 build failure.
4806
4807 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
4808
4809         Minor fixups to port to Solaris 10 with Sun C 5.8.
4810         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
4811         * modules/getcwd (Depends-on): Add dirfd.
4812         * lib/putenv.c (putenv): #undef it.
4813         (rpl_putenv): New decl.
4814         (malloc, free): Include <stdlib.h> rather than prototyping separately.
4815
4816 2007-02-20  Bruno Haible  <bruno@clisp.org>
4817
4818         * modules/stdio-tests: New file.
4819         * tests/test-stdio.c: New file.
4820
4821         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
4822         (Depends-on): Add stdio.
4823         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
4824         (Include): Use <stdio.h> instead of vsnprintf.h.
4825         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
4826         HAVE_DECL_VSNPRINTF.
4827         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
4828
4829         * modules/snprintf (Files): Remove lib/snprintf.h.
4830         (Depends-on): Add stdio.
4831         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
4832         (Include): Use <stdio.h> instead of snprintf.h.
4833         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
4834         HAVE_DECL_SNPRINTF.
4835         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
4836         * lib/getaddrinfo.c: Likewise.
4837
4838         * modules/stdio: New file.
4839         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
4840         * lib/snprintf.h: Remove file.
4841         * lib/vsnprintf.h: Remove file.
4842         * lib/.cppi-disable: Remove snprintf.h.
4843         * m4/stdio_h.m4: New file.
4844         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
4845
4846 2007-02-20  Jim Meyering  <jim@meyering.net>
4847
4848         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
4849         used by e.g., mingw.  From Bruno Haible.
4850
4851 2007-02-19  Bruno Haible  <bruno@clisp.org>
4852
4853         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
4854         warnings.
4855         Reported by Ben Pfaff <blp@cs.stanford.edu>.
4856
4857 2007-02-19  Bruno Haible  <bruno@clisp.org>
4858
4859         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
4860         from mingw users.
4861
4862 2007-02-19  Bruno Haible  <bruno@clisp.org>
4863
4864         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
4865         warnings.
4866         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
4867
4868 2007-02-19  Jim Meyering  <jim@meyering.net>
4869
4870         Don't use FD after a successful "fdopendir (fd)".
4871         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
4872         Reset it by calling dirfd on the just-obtained DIR*.
4873
4874         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
4875         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
4876
4877 2007-02-18  Bruno Haible  <bruno@clisp.org>
4878
4879         * lib/readlink.c: Include <unistd.h>.
4880         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
4881         HAVE_READLINK.
4882         * modules/readlink (Depends-on): Add unistd.
4883         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4884         (Include): Add <unistd.h>.
4885
4886         * lib/getlogin_r.h: Remove file.
4887         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
4888         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
4889         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
4890         HAVE_DECL_GETLOGIN_R.
4891         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
4892         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4893         (Include): Use <unistd.h> instead of getlogin_r.h.
4894
4895         * lib/getcwd.h: Remove file.
4896         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
4897         * lib/xgetcwd.c: Likewise.
4898         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
4899         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
4900         * modules/getcwd (Files): Remove lib/getcwd.h.
4901         (Depends-on): Add unistd.
4902         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4903         (Include): Use <unistd.h> instad of getcwd.h.
4904
4905         * lib/ftruncate.c: Include <unistd.h> first.
4906         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
4907         Set HAVE_FTRUNCATE.
4908         * modules/ftruncate (Depends-on): Add unistd.
4909         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4910
4911         * lib/fchdir.c: Include <unistd.h> first.
4912         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
4913         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
4914         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
4915         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4916         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
4917
4918         * lib/dup2.c: Include <unistd.h> first.
4919         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
4920         HAVE_DUP2.
4921         * modules/dup2 (Depends-on): Add unistd.
4922         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4923
4924         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
4925         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
4926         REPLACE_CHOWN. Don't define chown as a macro here.
4927         * modules/chown (Depends-on): Add unistd.
4928         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4929
4930         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
4931         Add definition for GL_LINK_WARNING.
4932         (chown, dup2): New declarations.
4933         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
4934         link warning.
4935         (ftruncate): New declaration.
4936         (getcwd): New declaration, taken from old getcwd.h.
4937         (getlogin_r): New declaration, taken from old getlogin_r.h.
4938         (readlink): New declaration.
4939         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
4940         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
4941         (gl_PREREQ_UNISTD): Remove macro.
4942         (gl_UNISTD_MODULE_INDICATOR): New macro.
4943         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
4944         many new variables. Don't set UNISTD_H.
4945         * modules/unistd (Description): Change.
4946         (Depends-on): Add link-warning.
4947         (configure.ac): Update.
4948         (Makefile.am): Create unistd.h always. Substitute many new variables
4949         into it.
4950
4951 2007-02-18  Bruno Haible  <bruno@clisp.org>
4952
4953         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
4954         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
4955         HAVE_GETSUBOPT.
4956         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
4957         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
4958         * lib/getsubopt.h: Remove file.
4959         * modules/getsubopt (Files): Remove lib/getsubopt.h.
4960         (Depends-on): Add stdlib.
4961         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4962         (Includes): Use <stdlib.h> instead of getsubopt.h.
4963         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
4964         Set HAVE_GETSUBOPT.
4965         * lib/getsubopt.c: Don't include getsubopt.h.
4966
4967 2007-02-18  Bruno Haible  <bruno@clisp.org>
4968
4969         * modules/fchdir (Depends-on): Add dup2.
4970
4971 2007-02-18  Bruno Haible  <bruno@clisp.org>
4972
4973         * lib/stdlib_.h: Handle glibc's special invocation convention
4974         specially.
4975
4976 2007-02-18  Bruno Haible  <bruno@clisp.org>
4977
4978         * modules/stdlib-tests: New file.
4979         * tests/test-stdlib.c: New file.
4980
4981         * modules/mkstemp (Files): Remove lib/mkstemp.h.
4982         (Depends-on): Add stdlib.
4983         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4984         (Includes): Use <stdlib.h> instead of mkstemp.h.
4985         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
4986         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
4987         * lib/mkstemp.c: Don't include mkstemp.h.
4988         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
4989         * lib/stdlib--.h: Don't include mkstemp.h.
4990
4991         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
4992         (Depends-on): Add stdlib.
4993         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4994         (Includes): Use <stdlib.h> instead of mkdtemp.h.
4995         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
4996         HAVE_MKDTEMP.
4997         * lib/mkdtemp.c: Don't include mkdtemp.h.
4998         * lib/clean-temp.c: Don't include mkdtemp.h.
4999
5000         * modules/exit (Files): Remove lib/exit.h.
5001         (Depends-on): Add stdlib.
5002         (Makefile.am): Remove lib_SOURCES.
5003         (Include): Use <stdlib.h> instead of exit.h.
5004         * lib/argmatch.c: Don't include exit.h.
5005         * lib/execute.c: Likewise.
5006         * lib/pagealign_alloc.c: Likewise.
5007         * lib/pipe.c: Likewise.
5008         * lib/wait-process.c: Likewise.
5009         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5010         * lib/exitfail.c: Likewise.
5011         * lib/savewd.c: Likewise.
5012         * lib/xsetenv.c: Likewise.
5013
5014         * modules/stdlib: New file.
5015         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5016         and extra comments about mkstemp().
5017         * lib/exit.h: Remove file.
5018         * lib/mkdtemp.h: Remove file.
5019         * lib/mkstemp.h: Remove file.
5020         * m4/stdlib_h.m4: New file.
5021         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5022
5023 2007-02-18  Bruno Haible  <bruno@clisp.org>
5024
5025         * modules/math-tests: New file.
5026         * tests/test-math.c: New file.
5027
5028         * modules/math: New file.
5029         * modules/mathl (Files): Remove lib/mathl.h.
5030         (Depends-on): Add math.
5031         (Makefile.am): Don't mention mathl.h.
5032         (Include): Use <math.h> instead of mathl.h.
5033         * lib/math_.h: New file.
5034         * lib/mathl.h: Remove file.
5035         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5036         mathl.h.
5037         * lib/asinl.c: Likewise.
5038         * lib/atanl.c: Likewise.
5039         * lib/ceill.c: Likewise.
5040         * lib/cosl.c: Likewise.
5041         * lib/expl.c: Likewise.
5042         * lib/floorl.c: Likewise.
5043         * lib/frexpl.c: Likewise.
5044         * lib/ldexpl.c: Likewise.
5045         * lib/logl.c: Likewise.
5046         * lib/sincosl.c: Likewise.
5047         * lib/sinl.c: Likewise.
5048         * lib/sqrtl.c: Likewise.
5049         * lib/tanl.c: Likewise.
5050         * lib/trigl.c: Likewise.
5051         * m4/math_h.m4: New file.
5052         * MODULES.html.sh (Mathematics): Add math.
5053
5054 2007-02-17  Bruno Haible  <bruno@clisp.org>
5055
5056         * modules/wctype-tests: New file.
5057         * tests/test-wctype.c: New file.
5058
5059         * modules/wchar-tests: New file.
5060         * tests/test-wchar.c: New file.
5061
5062         * modules/unistd-tests: New file.
5063         * tests/test-unistd.c: New file.
5064
5065         * modules/time-tests: New file.
5066         * tests/test-time.c: New file.
5067
5068         * modules/sysexits-tests: New file.
5069         * tests/test-sysexits.c: New file.
5070
5071         * modules/sys_time-tests: New file.
5072         * tests/test-sys_time.c: New file.
5073
5074         * modules/sys_stat-tests: New file.
5075         * tests/test-sys_stat.c: New file.
5076
5077         * modules/sys_socket-tests: New file.
5078         * tests/test-sys_socket.c: New file.
5079
5080         * modules/sys_select-tests: New file.
5081         * tests/test-sys_select.c: New file.
5082
5083         * modules/string-tests: New file.
5084         * tests/test-string.c: New file.
5085
5086         * modules/stdbool-tests: New file.
5087         * tests/test-stdbool.c: New file.
5088
5089         * modules/netinet_in-tests: New file.
5090         * tests/test-netinet_in.c: New file.
5091
5092         * modules/inttypes-tests: New file.
5093         * tests/test-inttypes.c: New file.
5094
5095         * modules/fcntl-tests: New file.
5096         * tests/test-fcntl.c: New file.
5097
5098         * modules/byteswap-tests: New file.
5099         * tests/test-byteswap.c: New file.
5100
5101         * modules/arpa_inet-tests: New file.
5102         * tests/test-arpa_inet.c: New file.
5103
5104 2007-02-17  Bruno Haible  <bruno@clisp.org>
5105
5106         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5107         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5108         if the corresponding module is not enabled. Emit link warnings if
5109         the function is used nevertheless.
5110         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5111         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5112         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5113         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5114         * modules/inttypes (Depends-on): Add link-warning.
5115         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5116         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5117         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5118         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5119         * modules/imaxdiv (configure.ac): Likewise.
5120         * modules/strtoimax (configure.ac): Likewise.
5121         * modules/strtoumax (configure.ac): Likewise.
5122
5123 2007-02-17  Bruno Haible  <bruno@clisp.org>
5124
5125         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5126         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5127         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5128         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5129
5130 2007-02-17  Bruno Haible  <bruno@clisp.org>
5131
5132         * modules/link-warning: New file.
5133         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5134         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5135         * modules/string (Depends-on): Add link-warning.
5136         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5137         string.h.
5138         * MODULES.html.sh (Support for building libraries and executables): Add
5139         link-warning.
5140
5141 2007-02-17  Bruno Haible  <bruno@clisp.org>
5142
5143         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5144         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5145         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5146         long lines.
5147
5148 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5149             Bruno Haible  <bruno@clisp.org>
5150
5151         * modules/tmpfile: New file.
5152         * lib/tmpfile.c: New file.
5153         * m4/tmpfile.m4: New file.
5154         * MODULES.html.sh (func_all_modules): New section "Input/output".
5155
5156 2007-02-15  Bruno Haible  <bruno@clisp.org>
5157
5158         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5159         (supports_delete_on_close): New function.
5160         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5161
5162 2007-02-14  Bruno Haible  <bruno@clisp.org>
5163
5164         * modules/mbspcasecmp-tests: New file.
5165         * tests/test-mbspcasecmp.sh: New file.
5166         * tests/test-mbspcasecmp.c: New file.
5167
5168         New module mbspcasecmp.
5169         * modules/mbspcasecmp: New file.
5170         * lib/mbspcasecmp.c: New file.
5171         * lib/string_.h (strncasecmp): Change warning message.
5172         (mbspcasecmp): New declaration.
5173         * m4/mbspcasecmp.m4: New file.
5174         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5175         GNULIB_MBSPCASECMP.
5176         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5177         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5178
5179 2007-02-14  Bruno Haible  <bruno@clisp.org>
5180
5181         * modules/mbsncasecmp-tests: New file.
5182         * tests/test-mbsncasecmp.sh: New file.
5183         * tests/test-mbsncasecmp.c: New file.
5184
5185         New module mbsncasecmp.
5186         * modules/mbsncasecmp: New file.
5187         * lib/mbsncasecmp.c: New file.
5188         * lib/string_.h (mbsncasecmp): New declaration.
5189         * m4/mbsncasecmp.m4: New file.
5190         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5191         GNULIB_MBSNCASECMP.
5192         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5193         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5194
5195 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5196
5197         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5198         Verify that it doesn't overlap with our flags.
5199         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5200         do not have the desired effect in multibyte locales; instead, use
5201         mbscasecmp.
5202         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5203         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5204         we don't require GNU fnmatch ourselves (if our users require it, they
5205         should do so explicitly).
5206
5207         Fix regex code so it doesn't rely on strcasecmp.
5208         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5209         Otherwise, include gnulib's langinfo.h.
5210         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5211         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5212         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5213         * modules/regex (FILES): Remove m4/codeset.m4.
5214         (Depends-on): Add localcharset.  Remove strcase.
5215
5216 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5217
5218         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5219         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5220
5221 2007-02-13  Bruno Haible  <bruno@clisp.org>
5222
5223         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5224         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5225
5226 2007-02-12  Bruno Haible  <bruno@clisp.org>
5227
5228         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5229         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5230         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5231         time warning rather than a link error.
5232
5233 2007-02-12  Bruno Haible  <bruno@clisp.org>
5234
5235         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5236         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5237         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5238
5239 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5240
5241         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5242         args, not 2.
5243
5244 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5245
5246         New module 'time', so that apps can include <time.h> as per
5247         POSIX and GNU instead of separate include files like time_r.h
5248         and timegm.h.  This implementation tries out a simpler approach
5249         for replacing decls in standard include files (as compared to
5250         the string module), somewhat as an experiment.
5251
5252         * config/srclist.txt: Comment out mktime.c for now.
5253         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5254         since it doesn't apply any more.  Use generic wording instead.
5255         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5256         'time'.
5257         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5258         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5259         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5260         Don't include <sys/types.h>; no longer needed since we assume C89.
5261         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5262         * lib/strftime.c: Likewise.
5263         * lib/time_r.c: Likewise.
5264         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5265         * lib/nanosleep.c: Include <time.h> first, to check interface.
5266         * lib/strptime.c: Likewise.
5267         * lib/time_r.c: Likewise.
5268         * lib/timegm.c: Likewise.
5269         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5270         needed.
5271         * lib/timegm.c: Don't include timegm.h; no longer needed.
5272         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5273         time.h now handles any problems in that area.
5274         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5275         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5276         that time.h defines struct timespec.
5277         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5278         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5279         handles that.
5280         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5281         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5282         needed.  Set REPLACE_LOCALTIME.
5283         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5284         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
5285         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
5286         nanosleep; time_h.m4 now does that.  Don't require
5287         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
5288         module handles this now.
5289         * modules/getdate (Depends-on): Remove timespec.  Add time.
5290         * modules/nanosleep (Depends-on): Likewise.
5291         * modules/stat-time (Depends-on): Likewise.
5292         * modules/nanosleep (Include): Include time.h, not timespec.h.
5293         * modules/strptime (Files): Remove lib/strptime.h.
5294         (Depends-on): Add extensions, time.
5295         (Include): Include time.h, not strptime.h.
5296         * modules/time_r (Files): Remove lib/time_r.h.
5297         (Depends-on): Add time.
5298         (Include): Include time.h, not time_r.h.
5299         * modules/timegm: Likewise.
5300         * modules/timespec (Description): Now does timespec-related decls
5301         of our own, instead of struct timespec itself.
5302         (Depends-on): Add time; remove extensions.
5303         (Maintainer): Add self.
5304         * modules/utimecmp (Depends-on): Add time; remove timespec.
5305         * modules/utimens (Depends-on): Likewise.
5306         * modules/xnanosleep (Depends-on): Likewise.
5307
5308 2007-02-11  Bruno Haible  <bruno@clisp.org>
5309
5310         * lib/c-strstr.c: Include allocsa.h.
5311         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5312         * lib/c-strcasestr.c: Include allocsa.h.
5313         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5314         * lib/strcasestr.c: Include allocsa.h.
5315         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5316         * lib/mbsstr.c: Include allocsa.h.
5317         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5318         allocsa/freesa instead of malloc/free.
5319         * lib/mbscasestr.c: Include allocsa.h.
5320         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5321         allocsa/freesa instead of malloc/free.
5322         * modules/c-strstr (Depends-on): Add allocsa.
5323         * modules/c-strcasestr (Depends-on): Likewise.
5324         * modules/strcasestr (Depends-on): Likewise.
5325         * modules/mbsstr (Depends-on): Likewise.
5326         * modules/mbscasestr (Depends-on): Likewise.
5327
5328 2007-02-11  Bruno Haible  <bruno@clisp.org>
5329
5330         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
5331
5332         * modules/mbsspn-tests: New file.
5333         * tests/test-mbsspn.sh: New file.
5334         * tests/test-mbsspn.c: New file.
5335
5336 2007-02-11  Bruno Haible  <bruno@clisp.org>
5337
5338         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
5339
5340         * modules/mbspbrk-tests: New file.
5341         * tests/test-mbspbrk.sh: New file.
5342         * tests/test-mbspbrk.c: New file.
5343
5344 2007-02-11  Bruno Haible  <bruno@clisp.org>
5345
5346         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
5347         unneeded cast.
5348
5349         * modules/mbscspn-tests: New file.
5350         * tests/test-mbscspn.sh: New file.
5351         * tests/test-mbscspn.c: New file.
5352
5353 2007-02-11  Bruno Haible  <bruno@clisp.org>
5354
5355         * modules/mbscasecmp-tests: New file.
5356         * tests/test-mbscasecmp.sh: New file.
5357         * tests/test-mbscasecmp.c: New file.
5358
5359 2007-02-11  Bruno Haible  <bruno@clisp.org>
5360
5361         Ensure O(n) worst-case complexity of mbscasestr.
5362         * lib/mbscasestr.c: Include stdbool.h.
5363         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5364         functions.
5365         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
5366         the bookkeeping indicates that it's worth it.
5367         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
5368
5369         * modules/mbscasestr-tests: New file.
5370         * tests/test-mbscasestr1.c: New file.
5371         * tests/test-mbscasestr2.sh: New file.
5372         * tests/test-mbscasestr2.c: New file.
5373         * tests/test-mbscasestr3.sh: New file.
5374         * tests/test-mbscasestr3.c: New file.
5375         * tests/test-mbscasestr4.sh: New file.
5376         * tests/test-mbscasestr4.c: New file.
5377         * m4/locale-tr.m4: New file.
5378
5379 2007-02-11  Bruno Haible  <bruno@clisp.org>
5380
5381         Ensure O(n) worst-case complexity of mbsstr.
5382         * lib/mbsstr.c: Include stdbool.h.
5383         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5384         functions.
5385         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
5386         bookkeeping indicates that it's worth it.
5387         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
5388
5389         * modules/mbsstr-tests: New file.
5390         * tests/test-mbsstr1.c: New file.
5391         * tests/test-mbsstr2.sh: New file.
5392         * tests/test-mbsstr2.c: New file.
5393         * tests/test-mbsstr3.sh: New file.
5394         * tests/test-mbsstr3.c: New file.
5395         * m4/locale-fr.m4: New file.
5396
5397 2007-02-11  Bruno Haible  <bruno@clisp.org>
5398
5399         * lib/mbsrchr.c (mbsrchr): Fix bug.
5400
5401         * modules/mbsrchr-tests: New file.
5402         * tests/test-mbsrchr.sh: New file.
5403         * tests/test-mbsrchr.c: New file.
5404
5405 2007-02-11  Bruno Haible  <bruno@clisp.org>
5406
5407         * lib/mbschr.c (mbschr): Fix bug.
5408
5409         * modules/mbschr-tests: New file.
5410         * tests/test-mbschr.sh: New file.
5411         * tests/test-mbschr.c: New file.
5412         * m4/locale-zh.m4: New file.
5413
5414 2007-02-11  Bruno Haible  <bruno@clisp.org>
5415
5416         Support for copying multibyte string iterators.
5417         * lib/mbiter.h: Include <string.h>.
5418         (mbiter_multi_copy): New function.
5419         (mbi_copy): New macro.
5420         * lib/mbuiter.h: Include <string.h>.
5421         (mbuiter_multi_copy): New function.
5422         (mbui_copy): New macro.
5423
5424 2007-02-11  Bruno Haible  <bruno@clisp.org>
5425
5426         New module mbslen.
5427         * modules/mbslen: New file.
5428         * lib/mbslen.c: New file.
5429         * lib/string_.h (mbslen): New declaration.
5430         * m4/mbslen.m4: New file.
5431         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5432         GNULIB_MBSLEN.
5433         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
5434         * MODULES.html.sh (Internationalization functions): Add mbslen.
5435
5436 2007-02-11  Bruno Haible  <bruno@clisp.org>
5437
5438         Ensure O(n) worst-case complexity of strcasestr substitute.
5439         * lib/strcasestr.c: Include stdbool.h.
5440         (knuth_morris_pratt): New function.
5441         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5442         bookkeeping indicates that it's worth it.
5443         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
5444
5445         * modules/strcasestr-tests: New file.
5446         * tests/test-strcasestr.c: New file.
5447
5448 2007-02-11  Bruno Haible  <bruno@clisp.org>
5449
5450         Ensure O(n) worst-case complexity of c_strcasestr.
5451         * lib/c-strcasestr.c: Include stdbool.h, string.h.
5452         (knuth_morris_pratt): New function.
5453         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
5454         the bookkeeping indicates that it's worth it.
5455         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
5456
5457         * modules/c-strcasestr-tests: New file.
5458         * tests/test-c-strcasestr.c: New file.
5459
5460 2007-02-11  Bruno Haible  <bruno@clisp.org>
5461
5462         Ensure O(n) worst-case complexity of c_strstr.
5463         * lib/c-strstr.c: Include stdbool.h, string.h.
5464         (knuth_morris_pratt): New function.
5465         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5466         bookkeeping indicates that it's worth it.
5467         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
5468
5469         * lib/c-strstr.c: Complete rewrite for maintainability.
5470
5471         * modules/c-strstr-tests: New file.
5472         * tests/test-c-strstr.c: New file.
5473
5474 2007-02-11  Bruno Haible  <bruno@clisp.org>
5475
5476         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
5477         5.2.1 and earlier, whereby \055 was treated just like the range
5478         delimiter '-'.
5479         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
5480
5481 2007-02-08  Bruno Haible  <bruno@clisp.org>
5482
5483         * modules/regex (Depends-on): Add stdbool.
5484         Reported by Dalibor Topic <robilad@kaffe.org>.
5485
5486 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5487
5488         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
5489         Prefer returning from main to exiting from it.
5490         Remove unnecessary parens after sizeof.
5491
5492 2007-02-05  Bruno Haible  <bruno@clisp.org>
5493
5494         New module mbssep.
5495         * modules/mbssep: New file.
5496         * lib/mbssep.c: New file.
5497         * lib/string_.h (strsep): Add a conditional link warning.
5498         (mbssep): New declaration.
5499         * m4/mbssep.m4: New file.
5500         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5501         GNULIB_MBSSEP.
5502         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
5503         * MODULES.html.sh (Internationalization functions): Add mbssep.
5504
5505 2007-02-05  Bruno Haible  <bruno@clisp.org>
5506
5507         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
5508         Optimize search in case of 1 delimiter.
5509
5510 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5511
5512         * lib/acl.h: Include sys/types.h before sys/acl.h.
5513
5514 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5515
5516         Merge upstream fix for glibc bugzilla #3957:
5517
5518         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
5519
5520         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
5521         bit for RE_HAT_LISTS_NOT_NEWLINE.
5522         (build_charclass_op): Remove bogus comment.
5523
5524 2007-02-05  Simon Josefsson  <simon@josefsson.org>
5525
5526         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
5527
5528 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5529
5530         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
5531         * lib/memmem.c [!defined _LIBC]: Include config.h.
5532
5533 2007-02-04  Bruno Haible  <bruno@clisp.org>
5534
5535         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
5536         warning message.
5537
5538 2007-02-04  Bruno Haible  <bruno@clisp.org>
5539
5540         New module mbstok_r.
5541         * modules/mbstok_r: New file.
5542         * lib/mbstok_r.c: New file.
5543         * lib/string_.h (strtok_r): Change argument names to match the
5544         comments. Add a conditional link warning.
5545         (mbstok_r): New declaration.
5546         * m4/mbstok_r.m4: New file.
5547         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5548         GNULIB_MBSTOK_R.
5549         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
5550         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
5551
5552 2007-02-04  Bruno Haible  <bruno@clisp.org>
5553
5554         New module mbsspn.
5555         * modules/mbsspn: New file.
5556         * lib/mbsspn.c: New file.
5557         * lib/string_.h (strspn): Add a conditional link warning.
5558         (mbsspn): New declaration.
5559         * m4/mbsspn.m4: New file.
5560         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5561         GNULIB_MBSSPN.
5562         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
5563         * MODULES.html.sh (Internationalization functions): Add mbsspn.
5564
5565 2007-02-04  Bruno Haible  <bruno@clisp.org>
5566
5567         New module mbspbrk.
5568         * modules/mbspbrk: New file.
5569         * lib/mbspbrk.c: New file.
5570         * lib/string_.h (strpbrk): Add a conditional link warning.
5571         (mbspbrk): New declaration.
5572         * m4/mbspbrk.m4: New file.
5573         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5574         GNULIB_MBSPBRK.
5575         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
5576         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
5577
5578 2007-02-04  Bruno Haible  <bruno@clisp.org>
5579
5580         New module mbscspn.
5581         * modules/mbscspn: New file.
5582         * lib/mbscspn.c: New file.
5583         * lib/string_.h (strcspn): Add a conditional link warning.
5584         (mbscspn): New declaration.
5585         * m4/mbscspn.m4: New file.
5586         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5587         GNULIB_MBSCSPN.
5588         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
5589         * MODULES.html.sh (Internationalization functions): Add mbscspn.
5590
5591 2007-02-04  Bruno Haible  <bruno@clisp.org>
5592
5593         New module mbscasestr, reduced goal of strcasestr.
5594         * modules/mbscasestr: New file.
5595         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
5596         (mbscasestr): Renamed from strcasestr.
5597         * lib/strcasestr.c: Don't include mbuiter.h.
5598         (strcasestr): Remove support for multibyte locales.
5599         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
5600         Change the conditional link warning.
5601         (mbscasestr): New declaration.
5602         * m4/mbscasestr.m4: New file.
5603         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
5604         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
5605         REPLACE_STRCASESTR.
5606         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
5607         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5608         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5609         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
5610         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
5611         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5612         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
5613         (Depends-on): Remove mbuiter.
5614         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
5615
5616 2007-02-04  Bruno Haible  <bruno@clisp.org>
5617
5618         Simplify handling of strncasecmp.
5619         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
5620         the conditional link warning.
5621         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5622         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
5623         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
5624         * modules/strcase (configure.ac): Don't invoke
5625         gl_STRING_MODULE_INDICATOR.
5626         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
5627
5628 2007-02-04  Bruno Haible  <bruno@clisp.org>
5629
5630         New module mbscasecmp, reduced goal of strcasecmp.
5631         * modules/mbscasecmp: New file.
5632         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
5633         (mbscasecmp): Renamed from strcasecmp.
5634         * lib/strcasecmp.c: Don't include mbuiter.h.
5635         (strcasecmp): Remove support for multibyte locales.
5636         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
5637         Change the conditional link warning.
5638         (mbscasecmp): New declaration.
5639         * m4/mbscasecmp.m4: New file.
5640         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
5641         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
5642         REPLACE_STRCASECMP.
5643         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
5644         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5645         GNULIB_MBSCASECMP.
5646         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
5647         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
5648         * modules/strcase (Files): Remove m4/mbrtowc.m4.
5649         (Depends-on): Remove mbuiter.
5650         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
5651
5652 2007-02-04  Bruno Haible  <bruno@clisp.org>
5653
5654         New module mbsstr. Remove module strstr.
5655         * modules/mbsstr: New file.
5656         * modules/strstr: Remove file.
5657         * lib/mbsstr.c: Renamed from lib/strstr.c.
5658         (mbsstr): Renamed from strstr.
5659         * lib/string_.h (strstr): Remove declaration. Change the conditional
5660         link warning.
5661         (mbsstr): New declaration.
5662         * m4/mbsstr.m4: New file.
5663         * m4/strstr.m4: Remove file.
5664         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
5665         REPLACE_STRSTR.
5666         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
5667         Don't initialize GNULIB_STRSTR.
5668         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
5669         substitute GNULIB_STRSTR and REPLACE_STRSTR.
5670         * MODULES.html.sh (Internationalization functions): Add mbsstr.
5671         (Support for systems lacking ANSI C 89): Remove strstr.
5672
5673 2007-02-04  Bruno Haible  <bruno@clisp.org>
5674
5675         New module mbsrchr.
5676         * modules/mbsrchr: New file.
5677         * lib/mbsrchr.c: New file.
5678         * lib/string_.h (strrchr): Add a conditional link warning.
5679         (mbsrchr): New declaration.
5680         * m4/mbsrchr.m4: New file.
5681         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5682         GNULIB_MBSRCHR.
5683         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
5684         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
5685
5686 2007-02-04  Bruno Haible  <bruno@clisp.org>
5687
5688         New module mbschr.
5689         * modules/mbschr: New file.
5690         * lib/mbschr.c: New file.
5691         * lib/string_.h (strchr): Add a conditional link warning.
5692         (mbschr): New declaration.
5693         * m4/mbschr.m4: New file.
5694         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5695         GNULIB_MBSCHR.
5696         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
5697         * MODULES.html.sh (Internationalization functions): Add mbschr.
5698
5699 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5700
5701         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
5702
5703         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
5704
5705 2007-02-04  Bruno Haible  <bruno@clisp.org>
5706
5707         New module description section 'configure.ac-early'.
5708         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
5709         (func_get_autoconf_early_snippet): New function.
5710         (func_import, func_create_testdir): Use it. Remove special cases for
5711         modules 'extensions' and 'lock'.
5712         * modules/extensions (configure.ac-early): Require
5713         gl_USE_SYSTEM_EXTENSIONS.
5714         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
5715
5716 2007-02-04  Bruno Haible  <bruno@clisp.org>
5717
5718         Make use of gcj-4.3's -fsource and -ftarget option.
5719         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
5720         and if so try the options -fsource and -ftarget.
5721         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
5722         source_version, ftarget_option, target_version arguments.
5723         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
5724         (is_envjavac_oldgcj_14_14_usable): Renamed from
5725         is_envjavac_gcj_14_14_usable.
5726         (is_envjavac_oldgcj_14_13_usable): Renamed from
5727         is_envjavac_gcj_14_13_usable.
5728         (is_gcj_present): Update.
5729         (is_gcj_43, is_gcj43_usable): New functions.
5730         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
5731         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
5732         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
5733         try the options -fsource and -ftarget.
5734
5735 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
5736
5737         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
5738         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
5739         larger value.
5740
5741 2007-02-03  Jim Meyering  <jim@meyering.net>
5742
5743         Give tools a better chance to allocate space for very large buffers.
5744         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
5745
5746         Make pwd and readlink work also when run with an unreadable parent dir
5747         on systems with openat support.
5748         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
5749         provided getcwd function, even when we have openat support.
5750         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
5751
5752 2007-02-02  Bruno Haible  <bruno@clisp.org>
5753
5754         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5755         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
5756         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
5757         portability problems if one of these functions is only used on specific
5758         platforms.
5759         Reported by Paul Eggert.
5760
5761 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
5762
5763         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
5764         is causing more trouble than it's curing.
5765         * lib/regex_internal.h (__mempcpy): Remove.
5766         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
5767         (and make the code a tad smaller to boot).
5768         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
5769
5770 2007-02-02  Jim Meyering  <jim@meyering.net>
5771
5772         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
5773         section, not in the Makefile.am: one.
5774
5775 2007-02-02  Eric Blake  <ebb9@byu.net>
5776
5777         * lib/strchrnul.c: Always include config.h first.
5778
5779         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
5780         gnulib strstr is not necessary here.
5781
5782 2007-02-02  Simon Josefsson  <simon@josefsson.org>
5783
5784         * m4/socklen.m4: Fix typo.
5785
5786 2007-02-02  Eric Blake  <ebb9@byu.net>
5787
5788         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
5789         * modules/netinet_in (Makefile.am): Likewise.
5790
5791 2007-02-01  Bruno Haible  <bruno@clisp.org>
5792
5793         * lib/string_.h (GL_LINK_WARNING): New macro.
5794         (strcasecmp, strstr, strcasestr): If provided by the system,
5795         conditionally define as a macro that leads to a warning instead of to
5796         an error.
5797         (strncasecmp): Conditionally define as a macro that leads to a warning.
5798
5799 2007-02-01  Karl Berry  <karl@gnu.org>
5800
5801         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
5802
5803 2007-02-01  Bruno Haible  <bruno@clisp.org>
5804
5805         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
5806         renamings.
5807
5808 2007-02-01  Eric Blake  <ebb9@byu.net>
5809
5810         * modules/regex (Depends-on): Revert dependence on mempcpy.
5811         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
5812         module's definition of mempcpy.
5813         Reported by Paul Eggert.
5814
5815 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
5816
5817         * lib/string_.h: If the gnulib module XYZ is not present, undefine
5818         the symbol XYZ before redefining it.  This fixes a problem with
5819         programs that don't use XYZ, when compiled on systems that define
5820         XYZ to something else.
5821
5822 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
5823
5824         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
5825         occurs when "mkdir -m foo" creates a setgid directory that is (1)
5826         writeable to group or other and (2) is intended to have a special
5827         mode bit that is set or cleared.  In such a case, the directory
5828         should be neither group- nor other-writeable until the special
5829         mode bits are right.
5830
5831 2007-01-31  Eric Blake  <ebb9@byu.net>
5832
5833         * modules/mountlist (Depends-on): Add strstr.
5834
5835         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
5836         bug.
5837         * modules/string (Makefile.am): Remove redundant replacement.
5838         * modules/regex (Depends-on): Add mempcpy.
5839
5840 2007-01-31  Bruno Haible  <bruno@clisp.org>
5841
5842         New module description field 'Link'.
5843         * gnulib-tool (func_usage): Document --extract-link-directive.
5844         (sed_extract_prog): Recognize 'Link' directive.
5845         (func_get_link_directive): New function.
5846         (func_import): Show summary of link directives.
5847         Handle --extract-link-directive option.
5848         * modules/acl (Link): New section.
5849         * modules/clock-time (Link): New section.
5850         * modules/euidaccess (Link): New section.
5851         * modules/gettext (Link): New section.
5852         * modules/iconv (Link): New section.
5853         * modules/lock (Link): New section.
5854         * modules/nanosleep (Link): New section.
5855         * modules/readline (Link): New section.
5856
5857 2007-01-27  Bruno Haible  <bruno@clisp.org>
5858
5859         Enforce the use of gnulib modules for unportable <string.h> functions.
5860         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
5861         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
5862         (gl_HEADER_STRING_H_BODY): Require it.
5863         * lib/string_.h: If the gnulib module XYZ is not present, redefine
5864         the symbol XYZ to one that gives a link error.
5865         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
5866         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
5867         * modules/mempcpy (configure.ac): Likewise.
5868         * modules/memrchr (configure.ac): Likewise.
5869         * modules/stpcpy (configure.ac): Likewise.
5870         * modules/stpncpy (configure.ac): Likewise.
5871         * modules/strcase (configure.ac): Likewise.
5872         * modules/strcasestr (configure.ac): Likewise.
5873         * modules/strchrnul (configure.ac): Likewise.
5874         * modules/strdup (configure.ac): Likewise.
5875         * modules/strndup (configure.ac): Likewise.
5876         * modules/strnlen (configure.ac): Likewise.
5877         * modules/strpbrk (configure.ac): Likewise.
5878         * modules/strsep (configure.ac): Likewise.
5879         * modules/strstr (configure.ac): Likewise.
5880         * modules/strtok_r (configure.ac): Likewise.
5881
5882 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
5883
5884         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
5885
5886 2007-01-30  Jim Meyering  <jim@meyering.net>
5887
5888         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
5889
5890 2007-01-29  Bruno Haible  <bruno@clisp.org>
5891
5892         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
5893         * lib/execute.c: Likewise.
5894         * lib/pipe.c: Likewise.
5895         * lib/printf-args.h: Likewise.
5896         * lib/printf-args.c: Likewise.
5897         * lib/printf-parse.c: Likewise.
5898         * lib/vasnprintf.c: Likewise.
5899
5900 2007-01-29  Eric Blake  <ebb9@byu.net>
5901
5902         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
5903         declaration.
5904
5905 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
5906
5907         * lib/strptime.h (strptime): Use 'restrict' for args where
5908         POSIX requires this.
5909         * lib/strptime.c (strptime): Likewise.
5910         Change license notice from LGPL to GPL, since gnulib-tool will
5911         change this as needed.
5912         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
5913         defined.
5914         Include "strptime.h" first, to check interface.
5915         Do not #undef _LIBC and _NL_CURRENT.
5916         Do not include <stdlib.h>; no longer needed.
5917         Include "time_r.h" and declare ptime_locale_status
5918         only if _LIBC is not defined.
5919         (__P): Remove unused macro.
5920         (match_string): Bring back glibc version, but use it only if _LIBC
5921         is defined.
5922         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
5923         Remove unnecessary assertion and abort() call.
5924         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
5925         * m4/strptime.m4: Fix serial number comment.
5926         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
5927         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
5928         (Depends-on): Add time_r.
5929
5930 2007-01-29  Bruno Haible  <bruno@clisp.org>
5931
5932         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5933         strptime.
5934         * modules/strptime (Depends-on): Add stdbool.
5935         * lib/strptime.h: Include <time.h> always. Add comments.
5936
5937 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
5938
5939         * modules/strptime: New file.
5940         * lib/strptime.h: New file.
5941         * lib/strptime.c: New file.
5942         * m4/strptime.m4: New file.
5943
5944 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
5945
5946         * MODULES.html.sh: New module mpsort.
5947         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
5948
5949         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
5950         a circularity problem with HP-UX ia64 reported by Bob Proulx in
5951         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
5952         All uses changed.
5953         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
5954         All uses changed.
5955         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
5956         to _Restrict_.
5957         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
5958         the parameter matches the prototype.
5959
5960 2007-01-28  Jim Meyering  <jim@meyering.net>
5961
5962         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
5963         sys/time.h here, reverting that part of the previous patch:
5964         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
5965
5966 2007-01-28  Bruno Haible  <bruno@clisp.org>
5967
5968         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
5969         value of $(SYS_TIME_H).
5970         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
5971         remove it conditionally, too. [added by Jim Meyering]
5972         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
5973         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
5974         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
5975         GETTIMEOFDAY_REPLACEMENT to 1.
5976
5977 2007-01-28  Bruno Haible  <bruno@clisp.org>
5978
5979         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
5980         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
5981         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
5982         Set UNISTD_H instead of UNISTD_H2.
5983         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
5984
5985 2007-01-28  Bruno Haible  <bruno@clisp.org>
5986
5987         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
5988         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
5989
5990 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5991
5992         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
5993         (func_create_testdir): Ensure C locale for `grep' and `tr'
5994         character ranges.
5995         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
5996         ACLOCAL_AMFLAGS parsing state machine.
5997
5998 2007-01-27  Bruno Haible  <bruno@clisp.org>
5999
6000         * modules/unistr/base: Update.
6001
6002 2007-01-27  Bruno Haible  <bruno@clisp.org>
6003
6004         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6005         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6006         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6007         modules/unistr/u32-mbtouc.
6008         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6009         * lib/unistr.h: Update.
6010         * lib/linebreak.c: Update.
6011         * modules/unistr/u32-mbtouc: Renamed from
6012         modules/unistr/u32-mbtouc-safe.
6013         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6014         * lib/unistr.h: Update.
6015         * lib/unistr/u32-to-u8.c: Update.
6016         * lib/unistr/u32-to-u16.c: Update.
6017
6018 2007-01-27  Bruno Haible  <bruno@clisp.org>
6019
6020         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6021         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6022         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6023         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6024         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6025         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6026         modules/unistr/u16-mbtouc.
6027         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6028         * lib/unistr.h: Update.
6029         * lib/linebreak.c: Update.
6030         * modules/linebreak: Update.
6031         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6032         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6033         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6034         * modules/unistr/u16-mbtouc: Renamed from
6035         modules/unistr/u16-mbtouc-safe.
6036         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6037         * lib/unistr.h: Update.
6038         * lib/unistr/u16-to-u8.c: Update.
6039         * modules/unistr/u16-to-u8: Update.
6040         * lib/unistr/u16-to-u32.c: Update.
6041         * modules/unistr/u16-to-u32: Update.
6042
6043 2007-01-27  Bruno Haible  <bruno@clisp.org>
6044
6045         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6046         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6047         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6048         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6049         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6050         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6051         modules/unistr/u8-mbtouc.
6052         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6053         * lib/unistr.h: Update.
6054         * lib/striconveh.c: Update.
6055         * modules/striconveh: Update.
6056         * lib/linebreak.c: Update.
6057         * modules/linebreak: Update.
6058         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6059         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6060         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6061         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6062         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6063         * lib/unistr.h: Update.
6064         * lib/striconveh.c: Update.
6065         * modules/striconveh: Update.
6066         * lib/unistr/u8-to-u16.c: Update.
6067         * modules/unistr/u8-to-u16: Update.
6068         * lib/unistr/u8-to-u32.c: Update.
6069         * modules/unistr/u8-to-u32: Update.
6070
6071 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6072
6073         Sync from Libtool.
6074         * lib/argz.c: Do not include strings.h nor memory.h, include
6075         string.h unconditionally.  Patch by Simon Josefsson.
6076
6077 2007-01-27  Bruno Haible  <bruno@clisp.org>
6078
6079         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6080         from gl_HEADER_STRING_H_BODY.
6081         (gl_HEADER_STRING_H_BODY): Require it.
6082         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6083         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6084         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6085         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6086         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6087         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6088         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6089         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6090         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6091         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6092         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6093         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6094         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6095         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6096         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6097
6098 2007-01-27  Bruno Haible  <bruno@clisp.org>
6099
6100         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6101         check_PROGRAMS into noinst_PROGRAMS.
6102         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6103         check_PROGRAMS in this case.
6104         (func_import): Set for_test to false.
6105         (func_create_testdir): Set for_test to true.
6106
6107 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6108             Bruno Haible  <bruno@clisp.org>
6109
6110         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6111         (Depends-on): Add string.
6112         (Includes): Use <string.h> instead of strcasestr.h.
6113         * modules/string (Makefile.am): Also substitute the value of
6114         REPLACE_STRCASESTR.
6115         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6116         assume strcasestr is declared in <string.h> not <strings.h>. Also
6117         set REPLACE_STRCASESTR.
6118         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6119         REPLACE_STRCASESTR.
6120         * lib/strcasestr.h: Remove file.
6121         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6122         * lib/string_.h (strcasestr): New declaration.
6123
6124 2007-01-27  Bruno Haible  <bruno@clisp.org>
6125
6126         * lib/string_.h: Use 'extern'.
6127
6128 2007-01-27  Jim Meyering  <jim@meyering.net>
6129
6130         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6131         of set-but-not-used local, "q".
6132
6133         * lib/mempcpy.c: Include <config.h> before <string.h>.
6134         This fixes a compilation error on HP-UX, due to the system's
6135         "restrict"-using mempcpy prototype.
6136
6137 2007-01-26  Bruno Haible  <bruno@clisp.org>
6138
6139         Small optimization.
6140         * lib/javacomp.c: Include c-strstr.h.
6141          (is_envjavac_gcj): Use c_strstr instead of strstr.
6142         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6143
6144 2007-01-26  Bruno Haible  <bruno@clisp.org>
6145
6146         * MODULES.html.sh (Unicode string functions): Add the new modules.
6147
6148         * modules/uniconv/u32-strconv-to-locale: New file.
6149         * lib/uniconv/u32-strconv-to-locale.c: New file.
6150
6151         * modules/uniconv/u16-strconv-to-locale: New file.
6152         * lib/uniconv/u16-strconv-to-locale.c: New file.
6153
6154         * modules/uniconv/u8-strconv-to-locale: New file.
6155         * lib/uniconv/u8-strconv-to-locale.c: New file.
6156
6157         * modules/uniconv/u32-strconv-from-locale: New file.
6158         * lib/uniconv/u32-strconv-from-locale.c: New file.
6159
6160         * modules/uniconv/u16-strconv-from-locale: New file.
6161         * lib/uniconv/u16-strconv-from-locale.c: New file.
6162
6163         * modules/uniconv/u8-strconv-from-locale: New file.
6164         * lib/uniconv/u8-strconv-from-locale.c: New file.
6165
6166         * modules/uniconv/u32-strconv-to-enc: New file.
6167         * lib/uniconv/u32-strconv-to-enc.c: New file.
6168         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6169         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6170
6171         * modules/uniconv/u16-strconv-to-enc: New file.
6172         * lib/uniconv/u16-strconv-to-enc.c: New file.
6173         * lib/uniconv/u-strconv-to-enc.h: New file.
6174         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6175         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6176
6177         * modules/uniconv/u8-strconv-to-enc: New file.
6178         * lib/uniconv/u8-strconv-to-enc.c: New file.
6179         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6180         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6181
6182         * modules/uniconv/u32-strconv-from-enc: New file.
6183         * lib/uniconv/u32-strconv-from-enc.c: New file.
6184         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6185         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6186
6187         * modules/uniconv/u16-strconv-from-enc: New file.
6188         * lib/uniconv/u16-strconv-from-enc.c: New file.
6189         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6190         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6191
6192         * modules/uniconv/u8-strconv-from-enc: New file.
6193         * lib/uniconv/u8-strconv-from-enc.c: New file.
6194         * lib/uniconv/u-strconv-from-enc.h: New file.
6195         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6196         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6197
6198         * modules/uniconv/u32-conv-from-enc: New file.
6199         * lib/uniconv/u32-conv-from-enc.c: New file.
6200         * modules/uniconv/u32-conv-from-enc-tests: New file.
6201         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6202
6203         * modules/uniconv/u16-conv-from-enc: New file.
6204         * lib/uniconv/u16-conv-from-enc.c: New file.
6205         * lib/uniconv/u-conv-from-enc.h: New file.
6206         * modules/uniconv/u16-conv-from-enc-tests: New file.
6207         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6208
6209         * modules/uniconv/u8-conv-from-enc: New file.
6210         * lib/uniconv/u8-conv-from-enc.c: New file.
6211         * modules/uniconv/u8-conv-from-enc-tests: New file.
6212         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6213
6214         * modules/uniconv/base: New file.
6215         * lib/uniconv.h: New file.
6216
6217 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6218
6219         * doc/gnulib-tool.texi (Initial import): Update to match current
6220         behavior with strdup module.
6221         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6222         * lib/memmem.h: Remove; all uses removed.  This is now done
6223         by <string.h>.
6224         * lib/mempcpy.h: Likewise.
6225         * lib/memrchr.h: Likewise.
6226         * lib/stpcpy.h: Likewise.
6227         * lib/stpncpy.h: Likewise.
6228         * lib/strcase.h: Likewise.
6229         * lib/strchrnul.h: Likewise.
6230         * lib/strdup.h: Likewise.
6231         * lib/strndup.h: Likewise.
6232         * lib/strnlen.h: Likewise.
6233         * lib/strpbrk.h: Likewise.
6234         * lib/strsep.h: Likewise.
6235         * lib/strstr.h: Likewise.
6236         * lib/strtok_r.h: Likewise.
6237         * lib/string_.h: New file.
6238         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6239         Rely on <string.h> instead.
6240         * lib/canon-host.c: Likewise.
6241         * lib/chdir-long.c: Likewise.
6242         * lib/concatpath.c: Likewise.
6243         * lib/exclude.c: Likewise.
6244         * lib/fchdir.c: Likewise.
6245         * lib/getaddrinfo.c: Likewise.
6246         * lib/getcwd.c: Likewise.
6247         * lib/getsubopt.c: Likewise.
6248         * lib/glob.c: Likewise.
6249         * lib/hard-locale.c: Likewise.
6250         * lib/iconvme.c: Likewise.
6251         * lib/javacomp.c: Likewise.
6252         * lib/mempcpy.c: Likewise.
6253         * lib/memrchr.c: Likewise.
6254         * lib/regex_internal.h: Likewise.
6255         * lib/stpncpy.c: Likewise.
6256         * lib/strcasecmp.c: Likewise.
6257         * lib/strchrnul.c: Likewise.
6258         * lib/strdup.c: Likewise.
6259         * lib/striconv.c: Likewise.
6260         * lib/striconveh.c: Likewise.
6261         * lib/striconveha.c: Likewise.
6262         * lib/strncasecmp.c: Likewise.
6263         * lib/strndup.c: Likewise.
6264         * lib/strnlen.c: Likewise.
6265         * lib/strsep.c: Likewise.
6266         * lib/strstr.c: Likewise.
6267         * lib/strtok_r.c: Likewise.
6268         * lib/userspec.c: Likewise.
6269         * lib/w32spawn.h: Likewise.
6270         * lib/xstrndup.c: Likewise.
6271         * lib/mountlist.c (strstr): Remove decl.
6272         * m4/string_h.m4: New file.
6273         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6274         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6275         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6276         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6277         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6278         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6279         Set REPLACE_STRCASECMP if necessary.
6280         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6281         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6282         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6283         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6284         HAVE_DECL_STRDUP if necessary.
6285         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
6286         since gl_FUNC_STRNDUP does that now.
6287         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
6288         Check for decl here...
6289         (gl_PREREQ_STRNLEN): ... not here.
6290         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
6291         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
6292         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
6293         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
6294         necessary.
6295         * modules/string: New file.
6296         * modules/memmem (Files): Remove special-purpose include file.
6297         (Depends-on): Add string.
6298         (Include): Include <string.h>, not the removed file.
6299         * modules/mempcpy: Likewise.
6300         * modules/memrchr: Likewise.
6301         * modules/stpcpy: Likewise.
6302         * modules/stpncpy: Likewise.
6303         * modules/strcase: Likewise.
6304         * modules/strchrnul: Likewise.
6305         * modules/strdup: Likewise.
6306         * modules/strndup: Likewise.
6307         * modules/strnlen: Likewise.
6308         * modules/strpbrk: Likewise.
6309         * modules/strsep: Likewise.
6310         * modules/strstr: Likewise.
6311         * modules/strtok_r: Likewise.
6312         * tests/test-dirname.c: Don't include "strdup.h", since
6313         <string.h> now suffices.
6314         * tests/test-memmem.c: Don't include "memmem.h", since
6315         <string.h> now suffices.
6316
6317 2007-01-25  Bruno Haible  <bruno@clisp.org>
6318
6319         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
6320         *resultp is 0.
6321
6322         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
6323         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
6324         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
6325         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
6326
6327         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
6328         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
6329         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
6330         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
6331         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
6332         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
6333
6334 2007-01-24  Bruno Haible  <bruno@clisp.org>
6335
6336         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
6337         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
6338         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
6339         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
6340         gl_FUNC_FTS_CORE.
6341         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
6342         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
6343         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
6344         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
6345         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
6346         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
6347         gl_FUNC_FCHOWNAT.
6348         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
6349         gl_FUNC_STRFTIME.
6350         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
6351         Reported by Ralf Wildenhues.
6352
6353 2007-01-24  Bruno Haible  <bruno@clisp.org>
6354
6355         Drop AC_REQUIRE calls that are redundant with the module dependencies.
6356         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
6357         gl_GETADDRINFO.
6358         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
6359         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
6360         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
6361
6362 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6363
6364         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
6365         Don't use 'exit'; just return from 'main'.
6366         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
6367
6368         * lib/fnmatch_.h: Readjust white space and comments to match
6369         glibc, to avoid spurious diffs.
6370
6371 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6372
6373         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
6374         2004-12-01 change by Jakub Jelinek, since this code won't compile
6375         if !LIBC.  Problem reported by Bob Proulx.
6376
6377 2007-01-23  Bruno Haible  <bruno@clisp.org>
6378
6379         * lib/striconveh.c: Include c-strcaseeq.h.
6380         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
6381         * modules/striconveh (Depends-on): Add c-strcaseeq.
6382
6383 2007-01-23  Bruno Haible  <bruno@clisp.org>
6384
6385         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
6386
6387         * modules/c-strcaseeq: New file.
6388         * lib/c-strcaseeq.h: New file.
6389
6390         * modules/streq: New file.
6391         * lib/streq.h: New file.
6392
6393 2007-01-23  Bruno Haible  <bruno@clisp.org>
6394
6395         * modules/striconveha-tests: New file.
6396         * tests/test-striconveha.c: New file.
6397
6398         * lib/striconveha.h: Include <stdbool.h>.
6399         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
6400         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
6401         (mem_iconveha_notranslit): Renamed from mem_iconveha.
6402         (mem_iconveha): New function.
6403         (str_iconveha_notranslit): Renamed from str_iconveha.
6404         (str_iconveha): New function.
6405         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
6406         c-strcase.
6407
6408 2007-01-23  Bruno Haible  <bruno@clisp.org>
6409
6410         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
6411         encodings without forgiving before trying any encoding with handler.
6412         (str_iconveha): Try all encodings without forgiving before trying any
6413         encoding with handler.
6414
6415 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6416
6417         Import the following changes from libc.
6418
6419         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6420
6421         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
6422
6423         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6424
6425         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
6426         normal_bracket label.
6427
6428         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
6429
6430         [BZ #361]
6431         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
6432         to normal_bracket after fetching the next character.
6433
6434 2007-01-22  Bruno Haible  <bruno@clisp.org>
6435
6436         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
6437         argument.
6438         * lib/striconveh.c (iconv_carefully_1): New function.
6439         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
6440         argument.
6441         (str_cd_iconveh): Update.
6442         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
6443         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
6444         * tests/test-striconveh.c (MAGIC): New macro.
6445         (new_offsets): New function.
6446         (main): Test call with and without offsets.
6447
6448 2007-01-22  Bruno Haible  <bruno@clisp.org>
6449
6450         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
6451         * modules/sys_select (Makefile.am): Likewise.
6452         * modules/sys_socket (Makefile.am): Likewise.
6453         * modules/sys_time (Makefile.am): Likewise.
6454
6455 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6456
6457         * modules/gettimeofday (License): Change from GPL to LGPL, since
6458         gettimeofday is a library function.
6459
6460 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6461
6462         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
6463
6464 2007-01-21  Bruno Haible  <bruno@clisp.org>
6465
6466         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
6467
6468 2007-01-21  Bruno Haible  <bruno@clisp.org>
6469
6470         * modules/striconveha: New file.
6471         * lib/striconveha.h: New file.
6472         * lib/striconveha.c: New file.
6473         * MODULES.html.sh (Internationalization functions): Add striconveha.
6474         * lib/striconv.c (str_iconv): Optimize the case of an empty input
6475         string.
6476         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
6477
6478 2007-01-21  Bruno Haible  <bruno@clisp.org>
6479
6480         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
6481         * lib/striconveh.c (str_iconveh): Likewise.
6482
6483 2007-01-21  Bruno Haible  <bruno@clisp.org>
6484
6485         * lib/striconveh.h (mem_iconveh): New declaration.
6486         * lib/striconveh.c (mem_iconveh): New function.
6487         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
6488
6489 2007-01-21  Bruno Haible  <bruno@clisp.org>
6490
6491         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
6492
6493         * lib/striconveh.h (mem_cd_iconveh): Change specification.
6494         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
6495         original result buffer.
6496         (str_cd_iconveh): Update.
6497         * tests/test-striconveh.c (main): Update.
6498
6499         * lib/striconv.h (mem_cd_iconv): Change specification.
6500         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
6501         result buffer.
6502         (str_cd_iconv): Update.
6503         * tests/test-striconv.c (main): Update.
6504
6505 2007-01-21  Bruno Haible  <bruno@clisp.org>
6506
6507         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
6508
6509 2007-01-20  Jim Meyering  <jim@meyering.net>
6510
6511         * lib/userspec.c (parse_with_separator): If a user or group string
6512         starts with "+", skip the corresponding name-to-ID look-up, since
6513         such a look-up must fail: user and group names may not include "+".
6514
6515 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
6516
6517         * lib/poll.c: Include sys/time.h and time.h unconditionally,
6518         since we now assume the sys_time module.
6519         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
6520         check for sys/time.h; no longer needed.
6521         * modules/poll (Depends-on): Depend on sys_time.
6522
6523 2007-01-18  Bruno Haible  <bruno@clisp.org>
6524
6525         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
6526         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6527
6528         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
6529         gettimeofday.
6530
6531         * tests/test-gettimeofday.c: Include <time.h>.
6532         (dummy): Remove variable.
6533
6534         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
6535         gl_HEADER_SYS_TIME_H.
6536         (gl_HEADER_SYS_TIME_H): New macro.
6537
6538         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
6539         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6540         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
6541         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
6542         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6543         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
6544         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
6545         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6546         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
6547         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
6548         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6549
6550         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
6551         last change; it caused a compilation error when cross-compiling to
6552         Cygwin.
6553
6554 2007-01-18  Jim Meyering  <jim@meyering.net>
6555
6556         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
6557         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
6558         than the race-prone "test -d sys || mkdir sys".
6559         (configure.ac): Use AC_PROG_MKDIR_P.
6560         * modules/sys_select: Likewise.
6561         * modules/sys_socket: Likewise.
6562         * modules/sys_time: Likewise.
6563
6564 2007-01-18  Eric Blake  <ebb9@byu.net>
6565
6566         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
6567         replace gettimeofday.
6568         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6569         name, to avoid infinite recursion.
6570
6571 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
6572
6573         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
6574         module sys_time.
6575         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
6576         assume timespec.h defines struct timeval.
6577         * lib/settime.c: Likewise.
6578         * lib/utimens.c: Likewise.
6579         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
6580         since we now assume the gettimeofday module.
6581         * lib/tempname.c (__gen_tempname): Likewise.
6582         * lib/gettimeofday.h: Remove.
6583         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
6584         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
6585         Include <time.h>, for 'time()'.
6586         (localtime_buffer_addr): Also use this workaround if
6587         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
6588         to simplify the uses.  All uses changed.
6589         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
6590         that #undef is inside {}, and 'const' follows type name consistently.
6591         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
6592         (gettimeofday): Do not use the maximum possible value for
6593         tv->tv_usec, since that might break usages other than ls.c.
6594         Instead, we'll leave ls.c alone.  This undoes today's patch
6595         by Bruno.  Add a compile-time warning for 1s-clock resolution;
6596         we've never observed the problem but might as well keep the
6597         canary.
6598         * lib/nanosleep.c: Include timespec.h first, for interface check.
6599         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
6600         now assume the sys_time module.
6601         * lib/tempname.c: Likewise.
6602         * lib/timespec.h: Likewise.
6603         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
6604         needed.
6605         * lib/strftime.c: Likewise.
6606         * lib/timespec.h: Likewise.
6607         * lib/posixtm.c: Include posixtm.h first, for interface check.
6608         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
6609         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
6610         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
6611         * lib/sys_time_.h: New file.
6612         * lib/timespec.h (struct timespec): Use long int, not long.
6613         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6614         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
6615         Remove obsolescent call to AC_HEADER_TIME.
6616         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
6617         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6618         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6619         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
6620         Likewise.
6621         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
6622         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
6623         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
6624         into the sys_time module.  Check for gettimeofday just once.
6625         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
6626         for gettimeofday signature to just check the signature.  Merely
6627         compile it, since linking doesn't test signature.  Improve test for
6628         whether gettimeofday.o is actually needed.
6629         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
6630         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
6631         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
6632         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6633         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
6634         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
6635         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
6636         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
6637         than worrying about sys/time.h.
6638         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6639         Don't bother worrying about TIME_WITH_SYS_TIME.
6640         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
6641         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
6642         * m4/sys_time_h.m4: New file.
6643         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
6644         Don't include sys/time.h.  Return from main rather than exiting.
6645         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
6646         all uses changed.
6647         * modules/gethrxtime (Depends-on): Add sys_time.
6648         * modules/gettime (Depends-on): Likewise.
6649         * modules/gettimeofday (Depends-on): Likewise.
6650         * modules/nanosleep (Depends-on): Likewise.
6651         * modules/settime (Depends-on): Likewise.
6652         * modules/tempname (Depends-on): Likewise.
6653         * modules/utimens (Depends-on): Likewise.
6654         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
6655         (Include:) Change back to <sys/time.h>.
6656         (Maintainer:) Add self.
6657         * modules/sys_time: New file.
6658         * modules/tempname (Depends-on): Add gettimeofday.
6659         * tests/test-gettimeofday.c: Include <sys/time.h>
6660         rather than gettimeofday.h.
6661
6662 2007-01-17  Bruno Haible  <bruno@clisp.org>
6663
6664         * gnulib-tool (func_get_license): Revert last patch. Instead, let
6665         the license default to GPL.
6666         (func_create_testdir): Don't complain if a module is LGPL and its
6667         tests module depends on GPLed modules.
6668
6669 2007-01-17  Bruno Haible  <bruno@clisp.org>
6670
6671         * lib/gettimeofday.c (gettimeofday): Add code for the case
6672         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
6673         maximum possible value for tv->tv_usec, rather than the minimum one.
6674
6675 2005-10-08  Martin Lambers  <marlam@marlam.de>
6676 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6677 2007-01-16  Bruno Haible  <bruno@clisp.org>
6678
6679         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
6680         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
6681         gl_FUNC_GETTIMEOFDAY.
6682         (Include): Add gettimeofday.h.
6683         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
6684         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
6685         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
6686         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
6687         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
6688         * lib/gettimeofday.h: New file.
6689         * lib/gettimeofday.c: Include <sys/timeb.h>.
6690         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
6691         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6692         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
6693         fall back on time().
6694
6695         * tests/test-gettimeofday.c: New file.
6696         * modules/gettimeofday-tests: New file.
6697
6698 2007-01-16  Eric Blake  <ebb9@byu.net>
6699
6700         * modules/fnmatch (Depends-on): Depend on wchar.
6701         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
6702         * m4/fnmatch.m4: Likewise.
6703         * modules/mbchar (Makefile.am): Assume <wchar.h>.
6704         * m4/mbchar.m4: Likewise.
6705         * modules/mbswidth (Depends-on): Depend on wchar.
6706         * lib/mbswidth.c: Assume <wchar.h>.
6707         * m4/mbswidth.m4: Likewise.
6708         * modules/quotearg (Depends-on): Depend on wchar.
6709         * lib/quotearg.c: Assume <wchar.h>.
6710         * m4/quotearg.m4: Likewise.
6711         * modules/regex (Depends-on): Depend on wchar.
6712         * lib/regex_internal.h: Assume <wchar.h>.
6713         * m4/regex.m4: Likewise.
6714         * modules/stdint (Depends-on): Depend on wchar.
6715         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
6716         * m4/stdint.m4: Likewise.
6717         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
6718         * modules/strftime (Depends-on): Depend on wchar.
6719         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
6720         * modules/strtol (Depends-on): Depend on wchar.
6721         * lib/strtol.c: Assume <wchar.h>.
6722         * modules/wcwidth (Depends-on): Depend on wchar.
6723         * lib/wcwidth.h: Assume <wchar.h>.
6724         * m4/wcwidth.m4: Likewise.
6725
6726 2007-01-16  Bruno Haible  <bruno@clisp.org>
6727
6728         * modules/csharpexec-script: New, created from...
6729         * modules/csharpexec: ... this.
6730
6731 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
6732
6733         * modules/javaexec-script: New, created from...
6734         * modules/javaexec: ... this.
6735
6736 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6737
6738         * modules/poll (Dependencies): Add sys_select.
6739
6740 2007-01-15  Jim Meyering  <jim@meyering.net>
6741
6742         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
6743         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
6744         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
6745         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
6746
6747 2007-01-15  Bruno Haible  <bruno@clisp.org>
6748
6749         * modules/striconveh: New file.
6750         * lib/striconveh.h: New file.
6751         * lib/striconveh.c: New file.
6752         * MODULES.html.sh (Internationalization functions): Add striconveh.
6753
6754         * modules/striconveh-tests: New file.
6755         * tests/test-striconveh.c: New file.
6756
6757 2007-01-15  Bruno Haible  <bruno@clisp.org>
6758
6759         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
6760         not from GNU libiconv or GNU libc.
6761
6762 2007-01-15  Bruno Haible  <bruno@clisp.org>
6763
6764         * doc/gnulib-intro.texi (Copyright): Explain the different license
6765         terms for module descriptions, autoconf macros, tests, documentation.
6766
6767 2007-01-14  Bruno Haible  <bruno@clisp.org>
6768
6769         * modules/striconv-tests: New file.
6770         * tests/test-striconv.c: New file.
6771
6772 2007-01-14  Bruno Haible  <bruno@clisp.org>
6773
6774         * modules/iconv-tests: New file.
6775         * tests/test-iconv.c: New file.
6776
6777 2007-01-14  Bruno Haible  <bruno@clisp.org>
6778
6779         * gnulib-tool (func_get_license): For test modules, use the license of
6780         the main module.
6781
6782 2007-01-14  Bruno Haible  <bruno@clisp.org>
6783
6784         * modules/iconv (Include): Clarify that <iconv.h> can only be included
6785         if iconv is found to exist.
6786
6787 2007-01-14  Bruno Haible  <bruno@clisp.org>
6788
6789         * modules/c-ctype-tests: New file.
6790         * tests/test-c-ctype.c: New file.
6791
6792 2007-01-14  Bruno Haible  <bruno@clisp.org>
6793
6794         * modules/binary-io-tests: New file.
6795         * tests/test-binary-io.sh: New file.
6796         * tests/test-binary-io.c: New file.
6797
6798 2007-01-14  Bruno Haible  <bruno@clisp.org>
6799
6800         * modules/array-oset-tests: New file.
6801         * tests/test-array_oset.c: New file.
6802
6803 2007-01-14  Bruno Haible  <bruno@clisp.org>
6804
6805         * modules/array-list-tests: New file.
6806         * tests/test-array_list.c: New file.
6807
6808 2007-01-14  Bruno Haible  <bruno@clisp.org>
6809
6810         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
6811         and make.
6812         Reported by Simon Josefsson in
6813         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
6814
6815 2007-01-14  Bruno Haible  <bruno@clisp.org>
6816
6817         * modules/allocsa-tests: New file.
6818         * tests/test-allocsa.c: New file.
6819
6820 2007-01-14  Bruno Haible  <bruno@clisp.org>
6821
6822         * modules/fchdir (Depends-on): Add absolute-header.
6823         * modules/unistd (Depends-on): Likewise.
6824
6825 2006-12-30  Bruno Haible  <bruno@clisp.org>
6826
6827         * modules/fchdir: New file.
6828         * modules/unistd (Files): Add lib/unistd_.h.
6829         (Makefile.am): Generate unistd.h from unistd_.h.
6830         * lib/fchdir.c: New file.
6831         * lib/dirent_.h: New file.
6832         * lib/unistd_.h: New file.
6833         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
6834         * m4/fchdir.m4: New file.
6835         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
6836         (gl_HEADER_UNISTD): Invoke it.
6837         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
6838         function.
6839         * lib/backupfile.c (opendir, closedir): Undefine.
6840         * lib/chown.c (open, close): Undefine.
6841         * lib/clean-temp.c (open, close): Undefine.
6842         * lib/copy-file.c (open, close): Undefine.
6843         * lib/execute.c (open, close): Undefine.
6844         * lib/fsusage.c (open, close): Undefine.
6845         * lib/gc-gnulib.c (open, close): Undefine.
6846         * lib/getcwd.c (opendir, closedir): Undefine.
6847         * lib/glob.c (opendir, closedir): Undefine.
6848         * lib/javacomp.c (open, close): Undefine.
6849         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
6850         * lib/openat-proc.c (open, close): Undefine.
6851         * lib/pagealign_alloc.c (open, close): Undefine.
6852         * lib/pipe.c (open, close): Undefine.
6853         * lib/progreloc.c (open, close): Undefine.
6854         * lib/savedir.c (opendir, closedir): Undefine.
6855         * lib/utime.c (open, close): Undefine.
6856         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
6857
6858 2007-01-10  Bruno Haible  <bruno@clisp.org>
6859
6860         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
6861
6862 2007-01-12  Eric Blake  <ebb9@byu.net>
6863
6864         Provide a robust <wchar.h>.  Further simplifications are now
6865         possible in other modules, but not included here.
6866         * modules/wchar: New module.
6867         * m4/wchar.m4: New file.
6868         * lib/wchar_.h: Likewise.
6869         * modules/mbchar (Depends-on): Depend on wchar, as the first use
6870         of the new module.
6871         * MODULES.html.sh (Extended multibyte and wide character utilities):
6872         New section.
6873
6874 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
6875
6876         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
6877         to a reasonable default for memory allocation.
6878         (xreadlink): Don't allocate a huge buffer, to work around a buggy
6879         file system that reports garbage st_size values for symlinks.
6880         Problem reported by Liyang Hu.
6881
6882 2007-01-11  Simon Josefsson  <simon@josefsson.org>
6883
6884         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
6885         Emacs .#* auto-save files).
6886
6887 2007-01-11  Bruno Haible  <bruno@clisp.org>
6888
6889         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
6890         directory.
6891
6892 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6893
6894         Use @...@ consistently in lib/wctype_.h.
6895         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
6896         on it being set to 1 or 0.
6897         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
6898         go back to AC_SUBSTing it.
6899         * modules/wctype (Makefile.am): Undo previous change.
6900
6901 2007-01-10  Eric Blake  <ebb9@byu.net>
6902
6903         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
6904         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
6905         * modules/wctype (Makefile.am): Likewise.
6906         Reported by Chris McGuire.
6907
6908 2007-01-10  Jim Meyering  <jim@meyering.net>
6909
6910         fts.c: a small readability/maintainability improvement
6911         * lib/fts.c (fts_read): Make this code slightly more readable and
6912         maintainable by hoisting the "sp->fts_cur = p" assignments to
6913         immediately follow the statements that set P.  Derived from
6914         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
6915
6916 2007-01-10  Eric Blake  <ebb9@byu.net>
6917
6918         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
6919         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
6920         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
6921         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
6922         Reported by Chris McGuire.
6923
6924 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6925
6926         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
6927         in sed script.
6928
6929 2007-01-09  Bruno Haible  <bruno@clisp.org>
6930
6931         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
6932         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
6933         variables.
6934         (func_module): Use them.
6935
6936 2007-01-09  Bruno Haible  <bruno@clisp.org>
6937
6938         * modules/unistr/base: New file.
6939         * lib/unistr.h: New file.
6940
6941         * modules/unistr/u8-to-u16: New file.
6942         * lib/unistr/u8-to-u16.c: New file.
6943
6944         * modules/unistr/u8-to-u32: New file.
6945         * lib/unistr/u8-to-u32.c: New file.
6946
6947         * modules/unistr/u16-to-u8: New file.
6948         * lib/unistr/u16-to-u8.c: New file.
6949
6950         * modules/unistr/u16-to-u32: New file.
6951         * lib/unistr/u16-to-u32.c: New file.
6952
6953         * modules/unistr/u32-to-u8: New file.
6954         * lib/unistr/u32-to-u8.c: New file.
6955
6956         * modules/unistr/u32-to-u16: New file.
6957         * lib/unistr/u32-to-u16.c: New file.
6958
6959         * modules/unistr/u8-check: New file.
6960         * modules/unistr/u16-check: New file.
6961         * modules/unistr/u32-check: New file.
6962         * lib/unistr/u8-check.c: New file.
6963         * lib/unistr/u16-check.c: New file.
6964         * lib/unistr/u32-check.c: New file.
6965
6966         * modules/unistr/u8-chr: New file.
6967         * modules/unistr/u16-chr: New file.
6968         * modules/unistr/u32-chr: New file.
6969         * lib/unistr/u8-chr.c: New file.
6970         * lib/unistr/u16-chr.c: New file.
6971         * lib/unistr/u32-chr.c: New file.
6972
6973         * modules/unistr/u8-cmp: New file.
6974         * modules/unistr/u16-cmp: New file.
6975         * modules/unistr/u32-cmp: New file.
6976         * lib/unistr/u8-cmp.c: New file.
6977         * lib/unistr/u16-cmp.c: New file.
6978         * lib/unistr/u32-cmp.c: New file.
6979
6980         * modules/unistr/u8-cpy: New file.
6981         * modules/unistr/u16-cpy: New file.
6982         * modules/unistr/u32-cpy: New file.
6983         * lib/unistr/u8-cpy.c: New file.
6984         * lib/unistr/u16-cpy.c: New file.
6985         * lib/unistr/u32-cpy.c: New file.
6986         * lib/unistr/u-cpy.h: New file.
6987
6988         * modules/unistr/u8-cpy-alloc: New file.
6989         * modules/unistr/u16-cpy-alloc: New file.
6990         * modules/unistr/u32-cpy-alloc: New file.
6991         * lib/unistr/u8-cpy-alloc.c: New file.
6992         * lib/unistr/u16-cpy-alloc.c: New file.
6993         * lib/unistr/u32-cpy-alloc.c: New file.
6994         * lib/unistr/u-cpy-alloc.h: New file.
6995
6996         * modules/unistr/u8-endswith: New file.
6997         * modules/unistr/u16-endswith: New file.
6998         * modules/unistr/u32-endswith: New file.
6999         * lib/unistr/u8-endswith.c: New file.
7000         * lib/unistr/u16-endswith.c: New file.
7001         * lib/unistr/u32-endswith.c: New file.
7002         * lib/unistr/u-endswith.h: New file.
7003
7004         * modules/unistr/u8-mblen: New file.
7005         * modules/unistr/u16-mblen: New file.
7006         * modules/unistr/u32-mblen: New file.
7007         * lib/unistr/u8-mblen.c: New file.
7008         * lib/unistr/u16-mblen.c: New file.
7009         * lib/unistr/u32-mblen.c: New file.
7010
7011         * modules/unistr/u8-mbtouc: New file.
7012         * modules/unistr/u16-mbtouc: New file.
7013         * modules/unistr/u32-mbtouc: New file.
7014         * lib/unistr/u8-mbtouc.c: New file.
7015         * lib/unistr/u16-mbtouc.c: New file.
7016         * lib/unistr/u32-mbtouc.c: New file.
7017
7018         * modules/unistr/u8-mbtouc-safe: New file.
7019         * modules/unistr/u16-mbtouc-safe: New file.
7020         * modules/unistr/u32-mbtouc-safe: New file.
7021         * lib/unistr/u8-mbtouc-safe.c: New file.
7022         * lib/unistr/u16-mbtouc-safe.c: New file.
7023         * lib/unistr/u32-mbtouc-safe.c: New file.
7024
7025         * modules/unistr/u8-move: New file.
7026         * modules/unistr/u16-move: New file.
7027         * modules/unistr/u32-move: New file.
7028         * lib/unistr/u8-move.c: New file.
7029         * lib/unistr/u16-move.c: New file.
7030         * lib/unistr/u32-move.c: New file.
7031         * lib/unistr/u-move.h: New file.
7032
7033         * modules/unistr/u8-next: New file.
7034         * modules/unistr/u16-next: New file.
7035         * modules/unistr/u32-next: New file.
7036         * lib/unistr/u8-next.c: New file.
7037         * lib/unistr/u16-next.c: New file.
7038         * lib/unistr/u32-next.c: New file.
7039
7040         * modules/unistr/u8-prev: New file.
7041         * modules/unistr/u16-prev: New file.
7042         * modules/unistr/u32-prev: New file.
7043         * lib/unistr/u8-prev.c: New file.
7044         * lib/unistr/u16-prev.c: New file.
7045         * lib/unistr/u32-prev.c: New file.
7046
7047         * modules/unistr/u8-set: New file.
7048         * modules/unistr/u16-set: New file.
7049         * modules/unistr/u32-set: New file.
7050         * lib/unistr/u8-set.c: New file.
7051         * lib/unistr/u16-set.c: New file.
7052         * lib/unistr/u32-set.c: New file.
7053         * lib/unistr/u-set.h: New file.
7054
7055         * modules/unistr/u8-startswith: New file.
7056         * modules/unistr/u16-startswith: New file.
7057         * modules/unistr/u32-startswith: New file.
7058         * lib/unistr/u8-startswith.c: New file.
7059         * lib/unistr/u16-startswith.c: New file.
7060         * lib/unistr/u32-startswith.c: New file.
7061         * lib/unistr/u-startswith.h: New file.
7062
7063         * modules/unistr/u8-stpcpy: New file.
7064         * modules/unistr/u16-stpcpy: New file.
7065         * modules/unistr/u32-stpcpy: New file.
7066         * lib/unistr/u8-stpcpy.c: New file.
7067         * lib/unistr/u16-stpcpy.c: New file.
7068         * lib/unistr/u32-stpcpy.c: New file.
7069         * lib/unistr/u-stpcpy.h: New file.
7070
7071         * modules/unistr/u8-stpncpy: New file.
7072         * modules/unistr/u16-stpncpy: New file.
7073         * modules/unistr/u32-stpncpy: New file.
7074         * lib/unistr/u8-stpncpy.c: New file.
7075         * lib/unistr/u16-stpncpy.c: New file.
7076         * lib/unistr/u32-stpncpy.c: New file.
7077         * lib/unistr/u-stpncpy.h: New file.
7078
7079         * modules/unistr/u8-strcat: New file.
7080         * modules/unistr/u16-strcat: New file.
7081         * modules/unistr/u32-strcat: New file.
7082         * lib/unistr/u8-strcat.c: New file.
7083         * lib/unistr/u16-strcat.c: New file.
7084         * lib/unistr/u32-strcat.c: New file.
7085         * lib/unistr/u-strcat.h: New file.
7086
7087         * modules/unistr/u8-strchr: New file.
7088         * modules/unistr/u16-strchr: New file.
7089         * modules/unistr/u32-strchr: New file.
7090         * lib/unistr/u8-strchr.c: New file.
7091         * lib/unistr/u16-strchr.c: New file.
7092         * lib/unistr/u32-strchr.c: New file.
7093
7094         * modules/unistr/u8-strcmp: New file.
7095         * modules/unistr/u16-strcmp: New file.
7096         * modules/unistr/u32-strcmp: New file.
7097         * lib/unistr/u8-strcmp.c: New file.
7098         * lib/unistr/u16-strcmp.c: New file.
7099         * lib/unistr/u32-strcmp.c: New file.
7100
7101         * modules/unistr/u8-strcpy: New file.
7102         * modules/unistr/u16-strcpy: New file.
7103         * modules/unistr/u32-strcpy: New file.
7104         * lib/unistr/u8-strcpy.c: New file.
7105         * lib/unistr/u16-strcpy.c: New file.
7106         * lib/unistr/u32-strcpy.c: New file.
7107         * lib/unistr/u-strcpy.h: New file.
7108
7109         * modules/unistr/u8-strcspn: New file.
7110         * modules/unistr/u16-strcspn: New file.
7111         * modules/unistr/u32-strcspn: New file.
7112         * lib/unistr/u8-strcspn.c: New file.
7113         * lib/unistr/u16-strcspn.c: New file.
7114         * lib/unistr/u32-strcspn.c: New file.
7115         * lib/unistr/u-strcspn.h: New file.
7116
7117         * modules/unistr/u8-strdup: New file.
7118         * modules/unistr/u16-strdup: New file.
7119         * modules/unistr/u32-strdup: New file.
7120         * lib/unistr/u8-strdup.c: New file.
7121         * lib/unistr/u16-strdup.c: New file.
7122         * lib/unistr/u32-strdup.c: New file.
7123         * lib/unistr/u-strdup.h: New file.
7124
7125         * modules/unistr/u8-strlen: New file.
7126         * modules/unistr/u16-strlen: New file.
7127         * modules/unistr/u32-strlen: New file.
7128         * lib/unistr/u8-strlen.c: New file.
7129         * lib/unistr/u16-strlen.c: New file.
7130         * lib/unistr/u32-strlen.c: New file.
7131         * lib/unistr/u-strlen.h: New file.
7132
7133         * modules/unistr/u8-strmblen: New file.
7134         * modules/unistr/u16-strmblen: New file.
7135         * modules/unistr/u32-strmblen: New file.
7136         * lib/unistr/u8-strmblen.c: New file.
7137         * lib/unistr/u16-strmblen.c: New file.
7138         * lib/unistr/u32-strmblen.c: New file.
7139
7140         * modules/unistr/u8-strmbtouc: New file.
7141         * modules/unistr/u16-strmbtouc: New file.
7142         * modules/unistr/u32-strmbtouc: New file.
7143         * lib/unistr/u8-strmbtouc.c: New file.
7144         * lib/unistr/u16-strmbtouc.c: New file.
7145         * lib/unistr/u32-strmbtouc.c: New file.
7146
7147         * modules/unistr/u8-strncat: New file.
7148         * modules/unistr/u16-strncat: New file.
7149         * modules/unistr/u32-strncat: New file.
7150         * lib/unistr/u8-strncat.c: New file.
7151         * lib/unistr/u16-strncat.c: New file.
7152         * lib/unistr/u32-strncat.c: New file.
7153         * lib/unistr/u-strncat.h: New file.
7154
7155         * modules/unistr/u8-strncmp: New file.
7156         * modules/unistr/u16-strncmp: New file.
7157         * modules/unistr/u32-strncmp: New file.
7158         * lib/unistr/u8-strncmp.c: New file.
7159         * lib/unistr/u16-strncmp.c: New file.
7160         * lib/unistr/u32-strncmp.c: New file.
7161
7162         * modules/unistr/u8-strncpy: New file.
7163         * modules/unistr/u16-strncpy: New file.
7164         * modules/unistr/u32-strncpy: New file.
7165         * lib/unistr/u8-strncpy.c: New file.
7166         * lib/unistr/u16-strncpy.c: New file.
7167         * lib/unistr/u32-strncpy.c: New file.
7168         * lib/unistr/u-strncpy.h: New file.
7169
7170         * modules/unistr/u8-strnlen: New file.
7171         * modules/unistr/u16-strnlen: New file.
7172         * modules/unistr/u32-strnlen: New file.
7173         * lib/unistr/u8-strnlen.c: New file.
7174         * lib/unistr/u16-strnlen.c: New file.
7175         * lib/unistr/u32-strnlen.c: New file.
7176         * lib/unistr/u-strnlen.h: New file.
7177
7178         * modules/unistr/u8-strpbrk: New file.
7179         * modules/unistr/u16-strpbrk: New file.
7180         * modules/unistr/u32-strpbrk: New file.
7181         * lib/unistr/u8-strpbrk.c: New file.
7182         * lib/unistr/u16-strpbrk.c: New file.
7183         * lib/unistr/u32-strpbrk.c: New file.
7184         * lib/unistr/u-strpbrk.h: New file.
7185
7186         * modules/unistr/u8-strrchr: New file.
7187         * modules/unistr/u16-strrchr: New file.
7188         * modules/unistr/u32-strrchr: New file.
7189         * lib/unistr/u8-strrchr.c: New file.
7190         * lib/unistr/u16-strrchr.c: New file.
7191         * lib/unistr/u32-strrchr.c: New file.
7192
7193         * modules/unistr/u8-strspn: New file.
7194         * modules/unistr/u16-strspn: New file.
7195         * modules/unistr/u32-strspn: New file.
7196         * lib/unistr/u8-strspn.c: New file.
7197         * lib/unistr/u16-strspn.c: New file.
7198         * lib/unistr/u32-strspn.c: New file.
7199         * lib/unistr/u-strspn.h: New file.
7200
7201         * modules/unistr/u8-strstr: New file.
7202         * modules/unistr/u16-strstr: New file.
7203         * modules/unistr/u32-strstr: New file.
7204         * lib/unistr/u8-strstr.c: New file.
7205         * lib/unistr/u16-strstr.c: New file.
7206         * lib/unistr/u32-strstr.c: New file.
7207         * lib/unistr/u-strstr.h: New file.
7208
7209         * modules/unistr/u8-strtok: New file.
7210         * modules/unistr/u16-strtok: New file.
7211         * modules/unistr/u32-strtok: New file.
7212         * lib/unistr/u8-strtok.c: New file.
7213         * lib/unistr/u16-strtok.c: New file.
7214         * lib/unistr/u32-strtok.c: New file.
7215         * lib/unistr/u-strtok.h: New file.
7216
7217         * modules/unistr/u8-uctomb: New file.
7218         * modules/unistr/u16-uctomb: New file.
7219         * modules/unistr/u32-uctomb: New file.
7220         * lib/unistr/u8-uctomb.c: New file.
7221         * lib/unistr/u16-uctomb.c: New file.
7222         * lib/unistr/u32-uctomb.c: New file.
7223
7224         * MODULES.html.sh (Unicode string functions): Add the new modules.
7225
7226 2007-01-08  Bruno Haible  <bruno@clisp.org>
7227
7228         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7229         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7230         subdirectories.
7231
7232 2007-01-08  Karl Berry  <karl@gnu.org>
7233
7234         * doc/error.texi: mention that main() fns must set program_name
7235         when progname is used.
7236
7237 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7238
7239         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7240         WCTYPE_H is empty, for the benefit of builds from non-distclean
7241         directories.  Problem reported by Eric Blake in
7242         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7243
7244 2007-01-08  Bruno Haible  <bruno@clisp.org>
7245
7246         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7247         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7248         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7249         PROVIDE_CANONICALIZE_FILENAME_MODE.
7250         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7251
7252 2007-01-08  Bruno Haible  <bruno@clisp.org>
7253
7254         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7255         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7256         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7257         * lib/fts.c: Likewise.
7258         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7259
7260 2006-12-25  Bruno Haible  <bruno@clisp.org>
7261
7262         * modules/utf8-ucs4-safe: New file.
7263         * lib/utf8-ucs4-safe.h: New file.
7264         * lib/unistr/utf8-ucs4-safe.c: New file.
7265
7266         * modules/utf16-ucs4-safe: New file.
7267         * lib/utf16-ucs4-safe.h: New file.
7268         * lib/unistr/utf16-ucs4-safe.c: New file.
7269
7270         * MODULES.html.sh (Unicode string functions): Add the new modules.
7271
7272 2007-01-08  Bruno Haible  <bruno@clisp.org>
7273
7274         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7275         (Depends-on): Add unitypes.
7276         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7277         (u8_mbtouc_aux): Move out to separate file.
7278         (u8_mbtouc): Use ucs4_t, uint8_t types.
7279         * lib/unistr/utf8-ucs4.c: New file.
7280
7281         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7282         (Depends-on): Add unitypes.
7283         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7284         (u16_mbtouc_aux): Move out to separate file.
7285         (u16_mbtouc): Use ucs4_t, uint16_t types.
7286         * lib/unistr/utf16-ucs4.c: New file.
7287
7288         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
7289         (Depends-on): Add unitypes.
7290         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
7291         (u8_uctomb_aux): Move out to separate file.
7292         (u8_uctomb): Use ucs4_t, uint8_t types.
7293         * lib/unistr/ucs4-utf8.c: New file.
7294
7295         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
7296         (Depends-on): Add unitypes.
7297         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
7298         (u16_uctomb_aux): Move out to separate file.
7299         (u16_uctomb): Use ucs4_t, uint16_t types.
7300         * lib/unistr/ucs4-utf16.c: New file.
7301
7302 2006-12-25  Bruno Haible  <bruno@clisp.org>
7303
7304         * modules/unitypes: New file.
7305         * lib/unitypes.h: New file.
7306         * MODULES.html.sh (func_all_modules): New section "Unicode string
7307         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
7308         this section. Add unitypes.
7309
7310 2007-01-08  Bruno Haible  <bruno@clisp.org>
7311
7312         Avoid variable names that conflict with those from libtool.
7313         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
7314         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
7315         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
7316         library_names_spec to acl_library_names_spec, hardcode_* to
7317         acl_hardcode_*.
7318         Reported by Ralf Wildenhues.
7319
7320 2007-01-08  Bruno Haible  <bruno@clisp.org>
7321
7322         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
7323         definition.
7324         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
7325         definition.
7326         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
7327         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
7328         definition.
7329         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
7330         definition.
7331         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
7332         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
7333         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
7334         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
7335         definition.
7336         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
7337         definition.
7338         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
7339         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
7340         GC_USE_<algorithm>.
7341         * lib/gc-libgcrypt.c: Likewise.
7342         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
7343         * modules/gc-arctwo (configure.ac): Likewise.
7344         * modules/gc-des (configure.ac): Likewise.
7345         * modules/gc-hmac-md5 (configure.ac): Likewise.
7346         * modules/gc-hmac-sha1 (configure.ac): Likewise.
7347         * modules/gc-md2 (configure.ac): Likewise.
7348         * modules/gc-md4 (configure.ac): Likewise.
7349         * modules/gc-md5 (configure.ac): Likewise.
7350         * modules/gc-random (configure.ac): Likewise.
7351         * modules/gc-rijndael (configure.ac): Likewise.
7352         * modules/gc-sha1 (configure.ac): Likewise.
7353
7354 2007-01-08  Bruno Haible  <bruno@clisp.org>
7355
7356         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
7357         macro definition.
7358         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
7359         definition.
7360         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
7361         definition.
7362         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
7363         * modules/fcntl-safer (configure.ac): Likewise.
7364         * modules/fopen-safer (configure.ac): Likewise.
7365         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
7366         GNULIB_FWRITEERROR macro definition.
7367
7368 2007-01-08  Bruno Haible  <bruno@clisp.org>
7369
7370         * m4/gnulib-common.m4: New file.
7371         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
7372         (func_get_filelist): Add m4/gnulib-common.m4.
7373
7374 2007-01-08  Bruno Haible  <bruno@clisp.org>
7375
7376         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
7377         command.
7378
7379 2007-01-08  Jim Meyering  <jim@meyering.net>
7380
7381         Use a more robust test for a "can't happen" condition.
7382         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
7383         narrowed the st_size value.  Presuming the "can't happen" condition
7384         is true, that narrowing could conceivably convert an invalid st_size
7385         value into a valid one.  Instead, use a change based on Matthew
7386         Woehlke's original patch.
7387
7388         Slight readability improvement: use an assert-like macro
7389         in place of literal "abort ()" uses.
7390         * lib/fts.c (fts_assert): Define.
7391         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
7392         Use this macro instead of a bare 'abort'.
7393
7394 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
7395
7396         Don't worry about using IRIX 5.3's wctype.h broken definitions;
7397         simply work around them.
7398         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
7399         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
7400         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
7401         declaring.
7402         Don't bother to define as macros, since the standard doesn't require it.
7403         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
7404         longer worry about IRIX 5.3.
7405         (HAVE_WCTYPE_CTMP_BUG): Remove.
7406
7407 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7408
7409         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
7410         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
7411         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
7412         Problems reported by Georg Schwarz for IRIX 5.3.
7413
7414         * gnulib-tool (autoconf_minversion): Take the maximum version number
7415         found, not the minimum.  Problem reported by James Youngman.
7416
7417 2007-01-03  Karl Berry  <karl@gnu.org>
7418
7419         * doc/error.texi: new file, explaining interaction with progname.
7420         * doc/gnulib.texi: include it.  Update copyright.
7421
7422 2007-01-03  Simon Josefsson  <simon@josefsson.org>
7423
7424         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
7425         AC_CANONICAL_HOST, to improve autobuild outputs.
7426
7427 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
7428             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7429
7430         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
7431         sockets, server sockets, and other file descriptors.  Count errors
7432         to compute the return value.  Reorder the code a bit to be easier
7433         to follow.  Don't set event bits that were not requested (except
7434         POLLERR and POLLHUP).
7435
7436 2007-01-01  Bruno Haible  <bruno@clisp.org>
7437
7438         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
7439
7440 2007-01-03  Jim Meyering  <jim@meyering.net>
7441
7442         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
7443
7444 2007-01-02  Bruno Haible  <bruno@clisp.org>
7445
7446         * modules/settime (Include): Require timespec.h.
7447         * modules/nanosleep (Include): Likewise.
7448
7449 2007-01-01  Bruno Haible  <bruno@clisp.org>
7450
7451         * gnulib-tool (func_emit_copyright_notice): Bump year.
7452         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
7453
7454 2007-01-01  Bruno Haible  <bruno@clisp.org>
7455
7456         Improve support for OpenBSD.
7457         * build-aux/config.rpath (libname_spec): Export.
7458         (library_names_spec): New variable. Export.
7459         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7460         library_names_spec from the config.rpath output. Locate shared library
7461         through the name pattern in library_names_spec.
7462
7463 2007-01-01  Eric Blake  <ebb9@byu.net>
7464
7465         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
7466
7467 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
7468
7469         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
7470         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
7471         assume the C locale, and avoid an "eval" that could cause trouble.
7472         Problem with SORT reported by Bob Proulx.
7473
7474         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
7475         Define.  Trivial patch from Henning Nielsen Lund, originally
7476         sent to bug-grep@gnu.org today.
7477
7478 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
7479
7480         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
7481         struct stat.  Problem reported by Henning Nielsen Lund.
7482         * lib/acl.c: Include acl.h first, to check interface.  Don't
7483         bother to include sys/types.h and sys/stat.h again.
7484
7485 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
7486
7487         Import the following change from libc; problem reported by
7488         Sven Verdoolaege.
7489
7490         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7491
7492         [BZ #1373]
7493         * lib/argp.h: Remove __NTH for __argp_usage inline function.
7494
7495 2006-12-28  Jim Meyering  <jim@meyering.net>
7496
7497         * build-aux/announce-gen: Do not assume that the package
7498         builds any of tar.gz, tar.bz2, and .xdelta files.
7499         Suggestion from Simon Josefsson.
7500
7501 2006-12-28  Simon Josefsson  <simon@josefsson.org>
7502
7503         * modules/announce-gen: New file.
7504
7505 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
7506
7507         * lib/mbchar.h: Just include <wctype.h>; the wctype module
7508         handles its gotchas now.
7509         * lib/mbswidth.c: Likewise.
7510         * lib/wcwidth.h: Likewise.
7511         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
7512         and iswcntrl; the wctype module does this stuff now.
7513         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7514         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7515         * modules/mbchar (Depends-on): Add wctype.
7516         * modules/mbswidth (Depends-on): Likewise.
7517         * modules/wcwidth (Depends-on): Likewise.
7518
7519 2006-12-27  Eric Blake  <ebb9@byu.net>
7520
7521         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
7522         module uses more than what <wctype.h> is required to provide.
7523
7524 2006-12-26  Eric Blake  <ebb9@byu.net>
7525
7526         * gnulib-tool (sed_extract_prog): Avoid space-tab.
7527
7528 2006-12-26  Eric Blake  <ebb9@byu.net>
7529
7530         * modules/absolute-header: New module.
7531         * modules/fcntl (Depends-on): Depend on it.
7532         * modules/inttypes (Depends-on): Likewise.
7533         * modules/stdint (Depends-on): Likewise.
7534         * modules/sys_stat (Depends-on): Likewise.
7535         * modules/wctype (Depends-on): Likewise.
7536         * MODULES.html.sh (Support for building libraries and
7537         executables): Document it.
7538
7539 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
7540
7541         * gnulib-tool (SED): Remove, undoing previous change.
7542         The problem was that it broke coreutils on Solaris, because
7543         "sed --posix" leaked into a makefile.
7544         (sed): New alias, if 'alias' and GNU sed.
7545
7546 2006-12-24  Jim Meyering  <jim@meyering.net>
7547
7548         Work around an fchownat bug in glibc-2.4:
7549         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
7550         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
7551         in spite of the -P option.
7552         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
7553         New macros.
7554         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
7555         * modules/openat (Files): Add lib/fchownat.c.
7556         * lib/openat.c (fchownat): Don't define here.  Move to...
7557         * lib/fchownat.c: ...this new file.
7558
7559 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
7560
7561         Fix bug reported by Bruno Haible in
7562         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
7563         where quotearg.c didn't compile on Mac OS X 10.2 because it
7564         lacks <wchar.h> and wint_t.
7565         * lib/wctype_.h (__wctype_wint_t): New type.
7566         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
7567         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
7568         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
7569         Arg is now of type __wctype_wint_t, not wint_t.
7570         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
7571         substitute HAVE_WINT_T.
7572         * modules/wctype (Files): Add m4/wint_t.m4.
7573         (wctype.h): Substitute HAVE_WINT_T.
7574
7575 2006-12-23  Bruno Haible  <bruno@clisp.org>
7576
7577         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
7578
7579 2006-12-23  Bruno Haible  <bruno@clisp.org>
7580
7581         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
7582         S_ISLNK.
7583         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
7584         mingw.
7585
7586 2006-12-22  Bruno Haible  <bruno@clisp.org>
7587
7588         * lib/copy-file.c: Include acl.h.
7589         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
7590         Close the file descriptors only after being done with copy_acl.
7591         * modules/copy-file (Depends-on): Add acl.
7592
7593 2006-12-22  Bruno Haible  <bruno@clisp.org>
7594
7595         * gnulib-tool (SED): New variable.
7596         Use $SED instead of sed everywhere.
7597
7598 2006-12-22  Bruno Haible  <bruno@clisp.org>
7599
7600         * modules/no-c++: New file.
7601         * m4/no-c++.m4: New file.
7602         * MODULES.html.sh (Support for building libraries and executables):
7603         Add no-c++.
7604
7605 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
7606
7607         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7608         Include <limits.h>, and use its INT_MAX to rewrite the
7609         j loop so that it does not overflow 'int'.  Problem reported by
7610         Ralf Wildenhues in
7611         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
7612         Play it safe by shifting left by 1 rather than multiplying by 2,
7613         as GCC is less likely to optimize this away when the value
7614         is signed (when it assumes overflow leads to undefined behavior).
7615         Also, don't assume time_t uses two's complement.
7616
7617 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
7618
7619         * MODULES.html.sh: New module wctype.
7620         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
7621         * lib/fnmatch.c: Don't bother to include <wchar.h> before
7622         <wctype.h>, since the new wctype module should fix this.
7623         * lib/quotearg.c: Include <wctype.h> unconditionally, since
7624         the wctype module should arrange for it.
7625         * lib/regex_internal.h: Likewise.
7626         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
7627         since the wctype module should handle this now.
7628         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
7629         * modules/fnmatch (Depends-on): Add wctype.
7630         * modules/quotearg (Depends-on): Likewise.
7631         * modules/regex (Depends-on): Likewise.
7632
7633 2006-12-19  Bruno Haible  <bruno@clisp.org>
7634
7635         * lib/strdup.h [C++]: Wrap definitions in extern "C".
7636         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
7637
7638 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7639
7640         * modules/savewd (Depends-on): Fix dependency on fcntl.
7641
7642 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7643
7644         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
7645         conforms to C99, rather than relying on the user's environment
7646         setting of STDINT_H.
7647
7648 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7649         and Eric Blake  <ebb9@byu.net>
7650
7651         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
7652         This is more consistent with the other defines here.
7653         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
7654         Port to z/OS.  Problem reported by Paul Gilmartin.
7655         Change local vars to use gl_ prefix rather than ac_.
7656         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
7657         with other defines.
7658         * modules/double-slash-root: New module.
7659         * modules/dirname (Files): Remove m4/double-slash-root.m4.
7660         (Depends-on): Add double-slash-root.
7661         * MODULES.html.sh (File system functions): Mention new module.
7662
7663 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
7664
7665         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
7666         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
7667         This is for the benefit of gzip, which doesn't do i18n.
7668
7669 2006-12-12  Jim Meyering  <jim@meyering.net>
7670
7671         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
7672         Reported by Andreas Schwab <schwab@suse.de>.
7673
7674 2006-12-12  Bruno Haible  <bruno@clisp.org>
7675
7676         Merge these changes.
7677         2006-09-05  Bruno Haible  <bruno@clisp.org>
7678         * lib/iconvme.c (iconv_string): No need to save and restore errno when
7679         iconv_alloc succeeded.
7680         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
7681         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
7682         test for " && dest " at the end - dest is always != NULL there. Call
7683         iconv with 4xNULL arguments initially, to reset the state. Call iconv
7684         with 2xNULL arguments, also to flush the state storage. Handle the
7685         IRIX iconv behaviour. Realloc the final result, to throw away unused
7686         memory.
7687
7688 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
7689
7690         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
7691         and fchmodat unconditionally, since glibc 2.4 has them.
7692         Problem reported by Arkadiusz Miskiewicz.
7693
7694 2006-12-10  Bruno Haible  <bruno@clisp.org>
7695
7696         * gnulib-tool (func_import): Show the include files only for those
7697         modules that are copied and specified.
7698         Reported by Karl Berry.
7699
7700 2006-12-08  Jim Meyering  <jim@meyering.net>
7701
7702         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
7703         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
7704
7705         * build-aux/announce-gen: Add two new options, both optional:
7706         --bootstrap-tools=TOOL_LIST
7707               a comma-separated list of tools, e.g.,
7708               autoconf,automake,bison,gnulib
7709         --gnulib-snapshot-date=DATE
7710               if gnulib is in the bootstrap tool list,
7711               then report this as the snapshot date.
7712               If not specified, use the current date/time.
7713               If you specify a date here, be sure it's UTC.
7714
7715 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7716
7717         * tests/test-argp-2.sh: Fix test to match actual output.
7718         (func_compare): Fix sed script to be portable.
7719
7720 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
7721
7722         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
7723         workaround for this case.  It is not autoconfigured now; offhand
7724         it's hard to see how to autoconfigure it.
7725
7726 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
7727
7728         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
7729         a directory that is about to be chowned.  Such a directory's
7730         initial file permissions should permit the owner only and this
7731         should not be changed until after the chown, since the group and
7732         other bits would be incorrect if they granted permission before
7733         the chown.
7734
7735         Fix porting problem for iswctype reported by Georg Schwarz in:
7736         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
7737         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
7738         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
7739         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
7740         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
7741
7742 2006-12-03  Jim Meyering  <jim@meyering.net>
7743
7744         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
7745         p->fts_statp may not yet be defined.
7746         (fts_read): Instead, set it in the caller, once p->fts_statp is
7747         sure to be defined, and corresponds to a top-level directory.
7748         This bug made du -x fail.  Here's the coreutils test case:
7749         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
7750         Reported by Mike Frysinger.
7751
7752 2006-12-01  Jim Meyering  <jim@meyering.net>
7753
7754         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
7755         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
7756         Reported by Simon Josefsson.
7757
7758 2006-11-30  Jim Meyering  <jim@meyering.net>
7759
7760         * m4/warning.m4: Use the all-permissive copyright notice
7761         recommended by RMS (rather than LGPL).
7762         * m4/vararrays.m4: Likewise.
7763         * m4/flexmember.m4: Likewise.
7764
7765 2006-11-29  Bruno Haible  <bruno@clisp.org>
7766
7767         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7768         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
7769         using +=.
7770         Reported by Simon Josefsson <simon@josefsson.org>.
7771
7772 2006-11-28  James Youngman <jay@gnu.org>
7773
7774         * README: Advise users that they might find the bug-gnulib@gnu.org
7775         and autotools-announce@gnu.org mailing lists useful.
7776
7777 2006-11-28  Bruno Haible  <bruno@clisp.org>
7778
7779         * m4/ptrdiff_max.m4: Remove file.
7780
7781 2006-11-21  Bruno Haible  <bruno@clisp.org>
7782
7783         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
7784         _AC_COMPUTE_INT.
7785         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7786         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
7787         _AC_COMPUTE_INT.
7788         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7789         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
7790         _AC_COMPUTE_INT.
7791         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7792
7793 2006-11-28  Jim Meyering  <jim@meyering.net>
7794
7795         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
7796         warning from "gcc -Wshadow" about shadowing the builtin.
7797
7798 2006-11-27  Bruno Haible  <bruno@clisp.org>
7799
7800         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
7801         _AC_COMPUTE_INT.
7802         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7803
7804 2006-11-27  Bruno Haible  <bruno@clisp.org>
7805             Paul Eggert  <eggert@cs.ucla.edu>
7806
7807         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
7808
7809 2006-11-26  Bruno Haible  <bruno@clisp.org>
7810
7811         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7812         noinst_LTLIBRARIES.
7813
7814 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
7815             Bruno Haible  <bruno@clisp.org>
7816
7817         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
7818         if compiling with "gcc -ansi".
7819
7820 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
7821
7822         Fix some incompatibilities with gcc -ansi -pedantic.
7823         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
7824         if compiling pedantically with GCC, unless it's C99 or later.
7825         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
7826         it mishandles gcc -ansi -pedantic as well.
7827         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
7828         if gcc -pedantic.
7829         * lib/regexec.c (check_node_accept_bytes): Don't use auto
7830         initializers for struct if -pedantic, unless it's C99 or later.
7831
7832 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
7833
7834         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
7835         Don't close an fd more than once. Identical atimes indicate
7836         success, not failure.
7837
7838 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
7839
7840         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
7841
7842 2006-11-23  Jim Meyering  <jim@meyering.net>
7843
7844         * build-aux/announce-gen: New file.  From coreutils.
7845
7846 2006-11-22  Jim Meyering  <jim@meyering.net>
7847
7848         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
7849         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
7850         (fts_read): Use a temporary to narrow the overused st_size member
7851         before using it in a switch statement.  Reported by Matthew Woehlke.
7852
7853         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
7854         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
7855
7856 2006-11-20  Bruno Haible  <bruno@clisp.org>
7857
7858         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
7859         changequote instead of pairs of brackets.
7860         Reported by Andreas Schwab <schwab@suse.de>.
7861
7862 2006-11-21  Jim Meyering  <jim@meyering.net>
7863
7864         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
7865         so as to remain compatible with older compilers.
7866         Patch from Michael Deutschmann.
7867
7868 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
7869
7870         * MODULES.html.sh (File system functions): Add openat.
7871
7872         * lib/openat.h (rpl_fstatat): New macro, if
7873         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
7874         (fstatat): Define to rpl_fstatat under the same conditions,
7875         unless COMPILING_FSTATAT.
7876         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
7877         seems to have the bug.
7878         * lib/fstatat.c: New file.
7879         * modules/openat (Files): Add it.
7880
7881 2006-11-20  Bruno Haible  <bruno@clisp.org>
7882
7883         * Makefile: New file.
7884
7885 2006-11-20  Jim Meyering  <jim@meyering.net>
7886
7887         The beginnings of syntax-related checks for gnulib.
7888         * lib/Makefile: New file.
7889         * lib/t-idcache: New script.  Ensure that the two halves of
7890         idcache.c stay in sync.
7891
7892         * lib/idcache.c: Adjust comments in user- and group- portions to
7893         be more accurate, and to be consistent with one another.
7894
7895 2006-11-20  Jim Meyering  <jim@meyering.net>
7896
7897         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
7898         continue using the flexible array member (thus, this module performs
7899         half as many malloc calls), with the addition that...
7900         (getgroup, getuser): Consistently record a non-match via an empty
7901         "name" string, and map an empty string match to a NULL return value.
7902         * modules/idcache (Depends-on): Re-add flexmember.
7903
7904         * lib/idcache.c (getuser): Remove all uses of the register keyword.
7905         (getuidbyname, getgroup, getgidbyname): Likewise.
7906
7907         Use cleaner syntax: NULL rather than 0.
7908         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
7909
7910 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
7911
7912         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
7913         It mishandled the case where the group was missing.
7914         Problem reported by Greg Schafer.
7915         * modules/idcache: Likewise.
7916
7917 2006-11-18  Jim Meyering  <jim@meyering.net>
7918
7919         * check-module (%exempt_header): Add exception for some
7920         conditionally-included headers.
7921
7922         * modules/i-ring (Depends-on): Add verify.
7923         (License): Change to LGPL.
7924
7925 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
7926
7927         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
7928         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
7929         and inttostr.h.  Use snprintf rather than uinttostr, so that
7930         LGPLed code doesn't depend on GPLed.
7931
7932 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
7933
7934         * modules/inline (License): Change from GPL to LGPL.
7935
7936 2006-11-17  Jim Meyering  <jim@meyering.net>
7937
7938         * modules/d-type (License): Switch to LGPL.
7939
7940 2006-11-15  Bruno Haible  <bruno@clisp.org>
7941
7942         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
7943
7944 2006-11-15  Eric Blake  <ebb9@byu.net>
7945
7946         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
7947         the module dependency.
7948
7949 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7950             Bruno Haible  <bruno@clisp.org>
7951
7952         * gnulib-tool (func_create_testdir): Add license consistency check.
7953
7954 2006-11-15  Eric Blake  <ebb9@byu.net>
7955
7956         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
7957         random "(cached)" in configure output.
7958
7959 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7960
7961         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
7962         test for conforming inttypes.h is both announced and cached.
7963
7964         * MODULES.html.sh (seen_modules, seen_files): New variables.
7965         (func_module): Rewrite to use a few less gnulib-tool and sed
7966         invocations.  Avoid a couple of quadratic algorithms for ...
7967         (missed_modules, missed_files): ... these, with ...
7968         (func_append, func_tmpdir): ... these new functions, from
7969         gnulib-tool.  Analogously, install traps for cleanup.
7970
7971         * tests/test-gc.c (main): Remove unused variables.
7972         * tests/test-read-file.c: Include stdlib.h, for 'free'.
7973
7974 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
7975
7976         * modules/inttostr (License): Change to LGPL.
7977
7978 2006-11-14  Eric Blake  <ebb9@byu.net>
7979
7980         * modules/tempname (License): Change to LGPL.
7981
7982 2006-11-14  Eric Blake  <ebb9@byu.net>
7983
7984         * doc/functions.texi (Function Portability): *printf functions on
7985         Cygwin now understand all POSIX size specifiers.
7986
7987 2006-11-14  Bruno Haible  <bruno@clisp.org>
7988
7989         * modules/c-ctype (License): Change to LGPL.
7990
7991 2006-11-12  Bruno Haible  <bruno@clisp.org>
7992
7993         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
7994         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
7995         for GNOME libraries, for which the include files are installed in
7996         subdirectories of $prefix/include.
7997
7998 2006-11-12  Bruno Haible  <bruno@clisp.org>
7999
8000         * m4/lib-link.m4: Require at least autoconf-2.54.
8001         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8002         name to underscores for the --with option.
8003
8004 2006-11-13  Bruno Haible  <bruno@clisp.org>
8005
8006         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8007         the tests directory.
8008         Reported by Ralf Wildenhues.
8009
8010 2006-11-13  Bruno Haible  <bruno@clisp.org>
8011
8012         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8013         (func_emit_initmacro_end): Undo the override here.
8014         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8015         Works around the famous automake error in coreutils.
8016
8017 2006-11-13  Eric Blake  <ebb9@byu.net>
8018
8019         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8020         element, not its node.
8021
8022 2006-11-12  Bruno Haible  <bruno@clisp.org>
8023
8024         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8025         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8026
8027 2006-11-12  Bruno Haible  <bruno@clisp.org>
8028
8029         * gnulib-tool: New option --local-symlink.
8030         (func_usage): Document it.
8031         (lsymbolic): New variable.
8032         (func_import, func_create_testdir): If --symlink was not specified,
8033         test whether --local-symlink was specified and the file comes from
8034         the local_gnulib_dir.
8035
8036 2006-11-12  Bruno Haible  <bruno@clisp.org>
8037
8038         * gnulib-tool (func_ln): New function.
8039         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8040
8041 2006-11-12  Bruno Haible  <bruno@clisp.org>
8042
8043         Finish support for source files in subdirectories.
8044         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8045         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8046         AUTOMAKE_OPTIONS.
8047         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8048
8049 2006-11-12  Bruno Haible  <bruno@clisp.org>
8050
8051         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8052         EXTRA_lib_SOURCES augmentation.
8053         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8054
8055 2006-11-12  Jim Meyering  <jim@meyering.net>
8056
8057         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8058         file descriptors.  This also averts a failure on systems with
8059         native openat support when a traversed directory lacks "x" access.
8060         * lib/fts_.h: Include "i-ring.h"
8061         (struct FTS) [fts_fd_ring]: New member.
8062         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8063         (FCHDIR): Add parentheses.
8064         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8065         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8066         When descending, rather than simply closing the previous
8067         fts_cwd_fd value, push that file descriptor onto the ring.
8068         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8069         (fts_open): Initialize the new fd_ring member.
8070         (fts_close): Clear the ring.
8071         (fts_safe_changedir): When possible, use our new fd_ring to skip
8072         the diropen and fstat and dev/ino comparison that would normally
8073         accompany a virtual `chdir ("..")'.
8074
8075         * modules/fts (Depends-on): Add i-ring.
8076         * modules/i-ring: New module.
8077         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8078         * m4/i-ring.m4: New file.
8079
8080 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8081
8082         * gnulib-tool (func_create_testdir): Fix replacement of
8083         `build-aux' in configure.ac.  Run autotools in gltests
8084         subdirectory.
8085         (func_create_testdir, func_create_megatestdir, test): There is
8086         no need for '--force' in most autotool invocations in a new
8087         tree.  Actually fail the whole test if any of the tools, or the
8088         configure or make stages fail.
8089
8090         Sync from Automake.
8091         * build-aux/gnupload: Revert last change.  Add pointer to upload
8092         instructions of the GNU Maintenance Instructions.
8093         Suggestion by Karl Berry.
8094
8095 2006-11-10  Jim Meyering  <jim@meyering.net>
8096
8097         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8098
8099 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8100
8101         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8102         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8103         (bind_textdomain_codeset) [! ENABLE_NLS]:
8104         Evaluate all the arguments.  That way, callers get compatible behavior
8105         if the arguments have side effects.  Also, it avoids some GCC
8106         diagnostics in some cases; Joel E. Denny reported problems when Bison
8107         was configured with --enable-gcc-warnigs.
8108
8109 2006-11-10  Jim Meyering  <jim@meyering.net>
8110
8111         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8112         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8113         account.
8114
8115 2006-11-10  Jim Meyering  <jim@meyering.net>
8116
8117         * modules/inline: New file/module.
8118         * modules/xalloc (Files): Remove m4/inline.m4.
8119         (Depends-on): Add inline, instead.
8120         * modules/oset: Likewise.
8121         * modules/list: Likewise.
8122
8123 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8124
8125         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8126         Problem reported by Matthew Woehlke.
8127
8128 2006-11-09  Bruno Haible  <bruno@clisp.org>
8129
8130         * lib/tempname.c (gen_tempname): Remove variant that invokes
8131         __gen_tempname.
8132         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8133         __gen_tempname.
8134
8135 2006-11-08  Bruno Haible  <bruno@clisp.org>
8136
8137         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8138         to 'yes' instead of 'cross-compiling'.
8139
8140 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8141
8142         * lib/quotearg.h (quotearg_free): New decl.
8143         * lib/quotearg.c (quotearg_free): New function.
8144         (slot0, nslots, slotvec0, slotvec):
8145         Now file-scope so that quotearg_free can get at them.
8146
8147 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8148
8149         Sync from Automake.
8150         * build-aux/gnupload: Add missing 'gnu' to example URL.
8151         Report by Karl Berry.
8152
8153 2006-11-08  Bruno Haible  <bruno@clisp.org>
8154
8155         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8156         Suggested by Paul Eggert.
8157
8158 2006-11-08  Jim Meyering  <jim@meyering.net>
8159
8160         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8161         It's already included if !_LIBC.
8162         (fts_safe_changedir): Add a comment.
8163
8164 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8165
8166         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8167         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8168         Matthew Woehlke.
8169
8170         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8171         definitions up, to avoid colliding with change below.
8172         (static_inline) [HAVE_INLINE]: New macro.
8173         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8174         Provide extern decls when !HAVE_INLINE.  Do not define unless
8175         static_inline is defined, either by us or by xmalloc.c.  Use
8176         static_inline rather than static inline.
8177         (XCALLOC): Optimize sizeof(T) = 1 case.
8178         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8179
8180 2006-11-07  Bruno Haible  <bruno@clisp.org>
8181
8182         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8183         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8184         AC_C_INLINE.
8185         * modules/xalloc (Files): Add m4/inline.m4.
8186
8187 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8188
8189         * README: Fix typo.
8190         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8191         (Miscellanous Notes): ...from this.
8192
8193 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8194
8195         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8196         Mention that offsetof should be used instead of sizeof.
8197         From Bruno Haible.
8198
8199 2006-11-07  Bruno Haible  <bruno@clisp.org>
8200
8201         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8202
8203 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8204
8205         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8206         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8207         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8208         (gl_tree_add_before, gl_tree_add_after):
8209         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8210         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8211         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8212         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8213         (gl_linked_add_after, gl_linked_add_at): Likewise.
8214         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8215         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8216         (gl_tree_add_before, gl_tree_add_after): Likewise.
8217         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8218         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8219         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8220
8221 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8222
8223         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8224
8225 2006-11-06  Bruno Haible  <bruno@clisp.org>
8226
8227         * m4/inline.m4: New file.
8228         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8229         * modules/list (Files): Add m4/inline.m4.
8230         * modules/oset (Files): Likewise.
8231
8232 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8233
8234         * lib/idcache.c: Include <stddef.h>, for offsetof.
8235         (struct userid.name): Change from char * to a flexible array member.
8236         All uses changed.
8237         * modules/idcache (Depends-on): Add flexmember.
8238
8239         * MODULES.html.sh (Core language properties): New module flexmember.
8240         * modules/flexmember, m4/flexmember.m4: New files.
8241
8242         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8243         inline functions that are identical with the old xnmalloc_inline,
8244         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8245         that we can avoid some unnecessary integer multiplications and
8246         divisions in the common case where the element size is known at
8247         compile time.
8248         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8249         needed.
8250         (xnboundedmalloc): Remove.
8251         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8252         arguments, for consistency with rest of this header.
8253         (xcharalloc): Rewrite using XNMALLOC.
8254         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8255         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8256         versions have been moved to lib/xalloc.h and renamed to be the
8257         non-*_inline versions.
8258         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8259         and xnrealloc functions, since those functions are now inline and
8260         now call us.
8261         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8262         renaming described above.
8263         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8264         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8265         captures the dependency in AC_C_INLINE.
8266
8267         New module canonicalize-lgpl, proposed by Charles Wilson in
8268         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8269         with a few small changes afterwards.
8270         * MODULES.html.sh (File system functions): New module
8271         canonicalize-lgpl.
8272         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8273         and canonicalize_file_name.
8274         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8275         * modules/canonicalize-lgpl: New files.
8276
8277 2006-11-05  Bruno Haible  <bruno@clisp.org>
8278
8279         * gnulib-tool (func_import, func_create_testdir): Create directories
8280         also for files in subdirectories of lib/.
8281
8282 2006-11-05  Bruno Haible  <bruno@clisp.org>
8283
8284         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
8285         ANSI C compliant.
8286
8287 2006-11-03  Bruno Haible  <bruno@clisp.org>
8288
8289         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8290         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
8291         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
8292         (xnboundedmalloc): New inline function.
8293         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
8294         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
8295         xmalloc.
8296         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
8297         xmalloc.
8298         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
8299         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
8300         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
8301         xmalloc.
8302         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8303         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
8304         xmalloc.
8305         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
8306         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8307         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
8308         xmalloc.
8309         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8310         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
8311         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8312         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
8313         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
8314         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
8315         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
8316
8317 2006-11-03  Bruno Haible  <bruno@clisp.org>
8318
8319         * lib/c-ctype.h [C++]: Define functions without name mangling.
8320         * lib/fwriteerror.h [C++]: Likewise.
8321         * lib/gcd.h [C++]: Likewise.
8322         * lib/linebreak.h [C++]: Likewise.
8323
8324 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
8325
8326         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
8327         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
8328         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
8329         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8330         Check for functions and headers just once.
8331         Check for declaration of canonicalize_file_name.
8332         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
8333
8334 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8335
8336         * gnulib-tool (func_import): Fix typo in actioncmd.
8337
8338 2006-11-02  Bruno Haible  <bruno@clisp.org>
8339
8340         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
8341         newline sequence in the Makefile.am snippet as a space, like "make"
8342         does.
8343         Reported by Roger Persson <perrog@gmail.com>.
8344
8345 2006-11-01  Bruno Haible  <bruno@clisp.org>
8346
8347         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
8348         already declared in <string.h>.
8349         * lib/strcase.h (strncasecmp): Don't declare it if yes.
8350
8351 2006-11-01  Bruno Haible  <bruno@clisp.org>
8352
8353         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
8354         * lib/strcase.h: Include <string.h>.
8355         (strcasecmp): Define to rpl_strcasecmp here.
8356
8357 2006-11-01  Bruno Haible  <bruno@clisp.org>
8358
8359         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
8360
8361 2006-11-01  Eric Blake  <ebb9@byu.net>
8362
8363         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
8364
8365         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
8366
8367 2006-10-29  Bruno Haible  <bruno@clisp.org>
8368
8369         Make it compile in C++ mode.
8370         * lib/full-write.c (full_rw): Add a cast.
8371
8372 2006-11-01  Bruno Haible  <bruno@clisp.org>
8373
8374         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
8375         be POSIX compliant.
8376         Reported by Roger Persson <perrog@gmail.com>.
8377
8378 2006-11-01  Eric Blake  <ebb9@byu.net>
8379
8380         * lib/getopt_.h: Fix comments.
8381
8382 2006-10-31  Eric Blake  <ebb9@byu.net>
8383
8384         * modules/tmpdir (Depends-on): Add sys_stat.
8385         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
8386         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
8387         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
8388         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
8389         tempname.
8390
8391 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
8392
8393         Avoid some C++ diagnostics reported by Bruno Haible.
8394         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
8395         xmalloc.
8396         (quotearg_alloc): Use xcharalloc rather than xmalloc.
8397         (struct slotvec): Move to top level.
8398         (quotearg_n_options): Rewrite to avoid xmalloc.
8399         * lib/xalloc.h (xcharalloc): New function.
8400         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
8401         [defined __cplusplus]: Add function template that provides result
8402         type propagation.  This part of the change is from Bruno Haible.
8403
8404 2006-10-29  Bruno Haible  <bruno@clisp.org>
8405
8406         Make it compile in C++ mode.
8407         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
8408         * lib/strnlen1.c (strnlen1): Cast memchr result.
8409         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
8410         * lib/clean-temp.c (string_equals, string_hash): Add casts.
8411         (create_temp_dir): Rename local variable 'template'.
8412         (compile_csharp_using_sscli): Add cast.
8413         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
8414         * lib/findprog.c (find_in_path): Likewise.
8415         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
8416         * lib/wait-process.c (register_slave_subprocess): Likewise.
8417
8418 2006-10-22  Bruno Haible  <bruno@clisp.org>
8419
8420         * modules/tsearch: New file.
8421         * lib/tsearch.h: New file.
8422         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
8423         * m4/tsearch.m4: New file.
8424         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8425
8426 2006-10-29  Eric Blake  <ebb9@byu.net>
8427
8428         * lib/arcfour.c: Assume config.h.
8429         * lib/arctwo.c: Likewise.
8430         * lib/base64.c: Likewise.
8431         * lib/check-version.c: Likewise.
8432         * lib/crc.c: Likewise.
8433         * lib/des.c: Likewise.
8434         * lib/gc-gnulib.c: Likewise.
8435         * lib/gc-libgcrypt.c: Likewise.
8436         * lib/gc-pbkdf2-sha1.c: Likewise.
8437         * lib/getaddrinfo.c: Likewise.
8438         * lib/getdelim.c: Likewise.
8439         * lib/getline.c: Likewise.
8440         * lib/hmac-md5.c: Likewise.
8441         * lib/hmac-sha1.c: Likewise.
8442         * lib/iconvme.c: Likewise.
8443         * lib/md2.c: Likewise.
8444         * lib/md4.c: Likewise.
8445         * lib/memxor.c: Likewise.
8446         * lib/read-file.c: Likewise.
8447         * lib/readline.c: Likewise.
8448         * lib/rijndael-alg-fst.c: Likewise.
8449         * lib/rijndael-api-fst.c: Likewise.
8450         * lib/xgetdomainname.c: Likewise.
8451
8452 2006-10-28  Eric Blake  <ebb9@byu.net>
8453
8454         * lib/xstrndup.c: Assume config.h.
8455
8456 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8457
8458         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
8459         stat-macros.h is now for our own macros, whereas stat_h is for
8460         macros in the <sys/stat.h> name space.
8461         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
8462         (STAT_MACROS_H): Remove.
8463         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
8464         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
8465         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
8466         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
8467         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
8468         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
8469         Move these macros to ...
8470         * lib/stat_.h: here.  Don't include stat-macros.h.
8471         * lib/canonicalize.c: Don't include stat-macros.h.
8472         * lib/chown.c: Likewise.
8473         * lib/euidaccess.c: Likewise.
8474         * lib/file-type.c: Likewise.
8475         * lib/filemode.c: Likewise.
8476         * lib/glob.c: Likewise.
8477         * lib/isapipe.c: Likewise.
8478         * lib/lchown.c: Likewise.
8479         * lib/lstat.c: Likewise.
8480         * lib/mkdir-p.c: Likewise.
8481         * lib/rmdir.c: Likewise.
8482         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
8483         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
8484         unless mkdir isn't declared, to speed up 'configure'.
8485         Always create sys/stat.h, since it's unlikely any real sys/stat.h
8486         would define all the S_* symbols.
8487         * modules/canonicalize (Depends-on):
8488         Depend on sys_stat, not stat-macros.
8489         * modules/chown: Likewise.
8490         * modules/euidaccess: Likewise.
8491         * modules/filemode: Likewise.
8492         * modules/file-type: Likewise.
8493         * modules/glob: Likewise.
8494         * modules/isapipe: Likewise.
8495         * modules/lchown: Likewise.
8496         * modules/lstat: Likewise.
8497         * modules/mkancesdirs: Likewise.
8498         * modules/rmdir: Likewise.
8499         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
8500         * modules/modechange: Likewise.
8501         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
8502         (configure.ac): Remove gl_STAT_MACROS.
8503         * modules/sys_stat (Depends-on): Remove stat-macros.
8504
8505 2006-10-27  Bruno Haible  <bruno@clisp.org>
8506
8507         * m4/signed.m4: Remove file.
8508         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
8509         invocation.
8510         * modules/vasnprintf (Files): Remove m4/signed.m4.
8511
8512 2006-10-27  Bruno Haible  <bruno@clisp.org>
8513
8514         Update to GNU gettext 0.16.
8515         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
8516         m4/inttypes-h.m4, m4/signed.m4.
8517         * m4/gettext.m4: Update to GNU gettext 0.16.
8518         * m4/intl.m4: New file, from GNU gettext.
8519         * m4/intldir.m4: New file, from GNU gettext.
8520         * config/srclist.txt: Update
8521
8522 2006-10-27  Eric Blake  <ebb9@byu.net>
8523
8524         * MODULES.html.sh: Document tempname.
8525         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
8526         dependencies.
8527         (Files): Move lib/tempname.c...
8528         * modules/tempname: ...to this new module.
8529         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
8530         (gl_PREREQ_TEMPNAME): Move...
8531         * m4/tempname.m4: ...to this new file.
8532         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
8533         * modules/sys_stat (Depends-on): Add stat-macros.
8534         * lib/stat_.h (includes): Pick up stat macros.
8535         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
8536         if stat macros are broken.
8537         * lib/tempname.c (includes): No need to include "stat-macros.h".
8538         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
8539         (direxists, __path_search) [!_LIBC]: Don't compile these in
8540         gnulib; the tmpdir module covers that.
8541         * lib/tempname.h: New file.
8542
8543 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
8544
8545         * COPYING: Explain how gnulib-tool converts licence headers.
8546         Almost all wording by Eric Blake.
8547
8548 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
8549
8550         * lib/mbchar.h (is_basic_table): Make read-only.
8551         * lib/mbchar.c (is_basic_table): Likewise.
8552         Reported by John Darrington.
8553
8554 2006-10-25  Bruno Haible  <bruno@clisp.org>
8555
8556         * lib/progname.h (set_program_name): Undefine before defining.
8557
8558 2006-10-25  Bruno Haible  <bruno@clisp.org>
8559
8560         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
8561         false for non-gcc C++ compilers.
8562         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
8563
8564 2006-10-24  Bruno Haible  <bruno@clisp.org>
8565
8566         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
8567         iconv implementations like Irix iconv.
8568
8569 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8570
8571         * modules/vararrays: New file.
8572         * m4/vararrays.m4: New file, taken from diffutils.
8573         * MODULES.html.sh: New module vararrays.
8574
8575 2006-10-24  Karl Berry  <karl@gnu.org>
8576
8577         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
8578         Don't call GNU Unix.
8579
8580 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8581
8582         * users.txt: Add Libtool.
8583
8584         Sync from Libtool:
8585
8586         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8587
8588         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
8589         to gnulib's policy of including config.h unconditionally.
8590
8591 2006-10-24  Bruno Haible  <bruno@clisp.org>
8592
8593         * modules/wcwidth (Files): Add m4/wint_t.m4.
8594         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
8595         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
8596
8597 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8598
8599         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
8600         to pacify GCC with some -W flags enabled.  Problem reported by
8601         Bruno Haible.
8602
8603 2006-10-24  Jim Meyering  <jim@meyering.net>
8604
8605         * MODULES.html.sh: Remove uinttostr.  It's not a module.
8606         Reported by Karl Berry.
8607
8608 2006-10-23  Bruno Haible  <bruno@clisp.org>
8609
8610         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
8611
8612 2006-10-24  Bruno Haible  <bruno@clisp.org>
8613
8614         * lib/gl_list.h: Use C comment style, not C++ comment style.
8615
8616 2006-10-23  Eric Blake  <ebb9@byu.net>
8617
8618         * lib/getaddrinfo.c (includes): Add missing include.
8619
8620 2006-10-23  Bruno Haible  <bruno@clisp.org>
8621             Paul Eggert  <eggert@cs.ucla.edu>
8622
8623         Ability to rename obstack_free.
8624         * lib/obstack.h (__obstack_free): New macro. Declare instead of
8625         obstack_free.
8626         (obstack_free): Invoke the __obstack_free macro.
8627         * lib/obstack.c (obstack_free): Use __obstack_free macro.
8628
8629 2006-10-23  Bruno Haible  <bruno@clisp.org>
8630             Paul Eggert  <eggert@cs.ucla.edu>
8631
8632         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
8633         __argc, __argv from the declaration. (They are defined as macros on
8634         mingw.)
8635
8636 2006-10-22  Bruno Haible  <bruno@clisp.org>
8637
8638         * doc/gnulib-intro.texi: New file.
8639         * doc/gnulib.texi: Include it.
8640
8641 2006-10-21  Bruno Haible  <bruno@clisp.org>
8642
8643         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
8644         "Introduction", "Miscellanous Notes", "Particular Modules".
8645
8646 2006-10-21  Bruno Haible  <bruno@clisp.org>
8647
8648         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8649         Change mostlyclean-local rule to avoid sh syntax error from bash
8650         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
8651
8652 2006-10-23  Jim Meyering  <jim@meyering.net>
8653
8654         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
8655         in place of snprintf.
8656
8657         * modules/inttostr (Files): Add lib/uinttostr.c.
8658         * lib/uinttostr.c (inttostr): New file/function.
8659         * lib/inttostr.h (uinttostr): Declare.
8660         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
8661         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8662         Add uinttostr.
8663         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
8664
8665 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8666
8667         * lib/canonicalize.c (ELOOP): Define if not already defined.
8668         Problem reported by Bruno Haible in
8669         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
8670
8671 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8672
8673         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
8674         Problem reported by Perry Smith and Ville Laurikari.
8675
8676         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
8677         uses.
8678
8679 2006-10-19  Bruno Haible  <bruno@clisp.org>
8680
8681         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
8682         for mingw.
8683
8684 2006-10-19  Bruno Haible  <bruno@clisp.org>
8685
8686         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
8687         Needed for mingw.
8688
8689 2006-10-19  Bruno Haible  <bruno@clisp.org>
8690
8691         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
8692
8693 2006-10-19  Bruno Haible  <bruno@clisp.org>
8694
8695         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
8696         it.
8697
8698 2006-10-19  Bruno Haible  <bruno@clisp.org>
8699
8700         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
8701         invocation.
8702
8703 2006-10-19  Bruno Haible  <bruno@clisp.org>
8704
8705         * gnulib-tool (func_create_testdir): Don't include ftruncate and
8706         mountlist by default.
8707
8708 2006-10-16  Bruno Haible  <bruno@clisp.org>
8709
8710         * lib/c-strstr.c: Include c-strstr.h.
8711
8712 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8713
8714         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
8715         in a slash.
8716
8717 2006-10-18  Bruno Haible  <bruno@clisp.org>
8718
8719         * lib/lock.h [C++]: Wrap definitions in extern "C".
8720
8721 2006-10-18  Bruno Haible  <bruno@clisp.org>
8722
8723         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
8724         gl_LIBOBJS list.
8725
8726 2006-10-18  Bruno Haible  <bruno@clisp.org>
8727
8728         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
8729
8730 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
8731
8732         * lib/xstrtol.h: Include gettext.h.
8733         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
8734         Problem reported by Eric Blake.
8735         * modules/xstrtol (Depends-on): Add gettext-h.
8736
8737 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
8738
8739         * lib/strftime.c (advance): New macro.
8740         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
8741         incomplete type, so you can't add 0 to it.  Problem and patch
8742         reported by Eelco Dolstra for dietlibc.
8743
8744 2006-10-18  Jim Meyering  <jim@meyering.net>
8745
8746         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
8747         type for a local, and rename it: s/up/user_proc/.
8748
8749 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8750
8751         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
8752         READ_UTMP_USER_PROCESS.
8753         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
8754
8755 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
8756
8757         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
8758         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
8759
8760 2006-10-17  Eric Blake  <ebb9@byu.net>
8761
8762         * lib/sigprocmask.c (sigprocmask): Fix typo.
8763
8764         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
8765
8766         * modules/clean-temp (Makefile.am): Don't add to make output...
8767         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
8768         config.h.
8769
8770 2006-10-17  Bruno Haible  <bruno@clisp.org>
8771
8772         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
8773         differently if DEFAULT_TEXT_DOMAIN is set.
8774
8775 2006-10-16  Bruno Haible  <bruno@clisp.org>
8776
8777         * lib/clean-temp.c: Include fwriteerror.h.
8778
8779 2006-10-16  Bruno Haible  <bruno@clisp.org>
8780
8781         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
8782
8783 2006-10-16  Bruno Haible  <bruno@clisp.org>
8784
8785         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
8786         * lib/sigprocmask.h: Include <sys/types.h>.
8787         (sigset_t): Use the system's definition if present.
8788
8789 2006-10-17  Eric Blake  <ebb9@byu.net>
8790
8791         * lib/xvasprintf.c (includes): Assume config.h.
8792         * lib/xasprintf.c (includes): Likewise.
8793
8794 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
8795
8796         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
8797         at least as wide as intmax_t.
8798
8799 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
8800
8801         (Imported from Automake.)
8802         * build-aux/gnupload: Update to version 1.1 of directive file.
8803
8804 2006-10-16  Eric Blake  <ebb9@byu.net>
8805
8806         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
8807         match Automake 1.10a.
8808
8809 2006-10-14  Bruno Haible  <bruno@clisp.org>
8810
8811         * modules/sigprocmask: New file.
8812         * lib/sigprocmask.h: New file.
8813         * lib/sigprocmask.c: New file.
8814         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
8815         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
8816         request sigprocmask.o.
8817         (gl_PREREQ_SIGPROCMASK): New macro.
8818         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
8819         (Depends-on): Add sigprocmask.
8820         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
8821         gt_SIGNALBLOCKING. Test for 'raise' only once.
8822         * lib/fatal-signal.c: Include sigprocmask.h.
8823         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
8824         unblock_fatal_signals): Define always.
8825         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
8826         sigprocmask.
8827
8828 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8829
8830         Sync from Automake.
8831         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
8832         which incorrectly sets the mode of an existing destination
8833         directory.  In some cases the unpatched install-sh could do the
8834         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
8835         system.  We hope this is rare in practice, but it's clearly worth
8836         fixing.  Problem reported by Alex Unleashed in
8837         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
8838         Also, don't bother to check for -m bugs unless we're using -m;
8839         suggested by Stepan Kasal.
8840
8841 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8842
8843         Sync from Automake.
8844         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
8845         `-c' flag, so they appear at the same position as in %FASTDEP%
8846         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
8847         which ignores unknown options only after the first non-option.
8848         Bug report against M4 by Nelson H. F. Beebe.
8849
8850 2006-10-13  Jim Meyering  <jim@meyering.net>
8851
8852         Fix a bug in yesterday's change.
8853         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
8854         p->fts_statp->st_dev would be used uninitialized.
8855         Ensures that we always call fts_stat on the very first entry.
8856         Miklos Szeredi reported that find -xdev stopped working.
8857
8858 2006-10-12  Bruno Haible  <bruno@clisp.org>
8859
8860         * gnulib-tool (func_get_automake_snippet): Append an automatically
8861         computed EXTRA_DIST augmentation.
8862         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
8863         * modules/alloca-opt (Makefile.am): Likewise.
8864         * modules/allocsa (Makefile.am): Likewise.
8865         * modules/arcfour (Makefile.am): Likewise.
8866         * modules/arctwo (Makefile.am): Likewise.
8867         * modules/argmatch (Makefile.am): Likewise.
8868         * modules/argz (Makefile.am): Likewise.
8869         * modules/atexit (Makefile.am): Likewise.
8870         * modules/backupfile (Makefile.am): Likewise.
8871         * modules/byteswap (Makefile.am): Likewise.
8872         * modules/c-strtod (Makefile.am): Likewise.
8873         * modules/c-strtold (Makefile.am): Likewise.
8874         * modules/calloc (Makefile.am): Likewise.
8875         * modules/canon-host (Makefile.am): Likewise.
8876         * modules/canonicalize (Makefile.am): Likewise.
8877         * modules/chdir-long (Makefile.am): Likewise.
8878         * modules/chdir-safer (Makefile.am): Likewise.
8879         * modules/check-version (Makefile.am): Likewise.
8880         * modules/chown (Makefile.am): Likewise.
8881         * modules/cloexec (Makefile.am): Likewise.
8882         * modules/close-stream (Makefile.am): Likewise.
8883         * modules/closeout (Makefile.am): Likewise.
8884         * modules/crc (Makefile.am): Likewise.
8885         * modules/csharpexec (Makefile.am): Likewise.
8886         * modules/cycle-check (Makefile.am): Likewise.
8887         * modules/des (Makefile.am): Likewise.
8888         * modules/dev-ino (Makefile.am): Likewise.
8889         * modules/dirfd (Makefile.am): Likewise.
8890         * modules/dirname (Makefile.am): Likewise.
8891         * modules/dup2 (Makefile.am): Likewise.
8892         * modules/eealloc (Makefile.am): Likewise.
8893         * modules/error (Makefile.am): Likewise.
8894         * modules/euidaccess (Makefile.am): Likewise.
8895         * modules/exclude (Makefile.am): Likewise.
8896         * modules/exitfail (Makefile.am): Likewise.
8897         * modules/fcntl-safer (Makefile.am): Likewise.
8898         * modules/fcntl (Makefile.am): Likewise.
8899         * modules/file-type (Makefile.am): Likewise.
8900         * modules/fileblocks (Makefile.am): Likewise.
8901         * modules/filemode (Makefile.am): Likewise.
8902         * modules/filenamecat (Makefile.am): Likewise.
8903         * modules/fnmatch (Makefile.am): Likewise.
8904         * modules/fopen-safer (Makefile.am): Likewise.
8905         * modules/fpending (Makefile.am): Likewise.
8906         * modules/fprintftime (Makefile.am): Likewise.
8907         * modules/free (Makefile.am): Likewise.
8908         * modules/fsusage (Makefile.am): Likewise.
8909         * modules/ftruncate (Makefile.am): Likewise.
8910         * modules/fts (Makefile.am): Likewise.
8911         * modules/gc-arcfour (Makefile.am): Likewise.
8912         * modules/gc-des (Makefile.am): Likewise.
8913         * modules/gc-hmac-md5 (Makefile.am): Likewise.
8914         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
8915         * modules/gc-md4 (Makefile.am): Likewise.
8916         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
8917         * modules/gc-sha1 (Makefile.am): Likewise.
8918         * modules/gc (Makefile.am): Likewise.
8919         * modules/getaddrinfo (Makefile.am): Likewise.
8920         * modules/getcwd (Makefile.am): Likewise.
8921         * modules/getdelim (Makefile.am): Likewise.
8922         * modules/getdomainname (Makefile.am): Likewise.
8923         * modules/getgroups (Makefile.am): Likewise.
8924         * modules/gethostname (Makefile.am): Likewise.
8925         * modules/gethrxtime (Makefile.am): Likewise.
8926         * modules/getline (Makefile.am): Likewise.
8927         * modules/getloadavg (Makefile.am): Likewise.
8928         * modules/getlogin_r (Makefile.am): Likewise.
8929         * modules/getndelim2 (Makefile.am): Likewise.
8930         * modules/getopt (Makefile.am): Likewise.
8931         * modules/getpagesize (Makefile.am): Likewise.
8932         * modules/getpass-gnu (Makefile.am): Likewise.
8933         * modules/getpass (Makefile.am): Likewise.
8934         * modules/getsubopt (Makefile.am): Likewise.
8935         * modules/gettime (Makefile.am): Likewise.
8936         * modules/gettimeofday (Makefile.am): Likewise.
8937         * modules/getugroups (Makefile.am): Likewise.
8938         * modules/getusershell (Makefile.am): Likewise.
8939         * modules/glob (Makefile.am): Likewise.
8940         * modules/group-member (Makefile.am): Likewise.
8941         * modules/hard-locale (Makefile.am): Likewise.
8942         * modules/hash (Makefile.am): Likewise.
8943         * modules/hmac-md5 (Makefile.am): Likewise.
8944         * modules/hmac-sha1 (Makefile.am): Likewise.
8945         * modules/human (Makefile.am): Likewise.
8946         * modules/idcache (Makefile.am): Likewise.
8947         * modules/imaxabs (Makefile.am): Likewise.
8948         * modules/imaxdiv (Makefile.am): Likewise.
8949         * modules/inet_ntop (Makefile.am): Likewise.
8950         * modules/inet_pton (Makefile.am): Likewise.
8951         * modules/intprops (Makefile.am): Likewise.
8952         * modules/inttostr (Makefile.am): Likewise.
8953         * modules/inttypes (Makefile.am): Likewise.
8954         * modules/isapipe (Makefile.am): Likewise.
8955         * modules/javaversion (Makefile.am): Likewise.
8956         * modules/lchmod (Makefile.am): Likewise.
8957         * modules/lchown (Makefile.am): Likewise.
8958         * modules/localcharset (Makefile.am): Likewise.
8959         * modules/long-options (Makefile.am): Likewise.
8960         * modules/lstat (Makefile.am): Likewise.
8961         * modules/malloc (Makefile.am): Likewise.
8962         * modules/mathl (Makefile.am): Likewise.
8963         * modules/mbchar (Makefile.am): Likewise.
8964         * modules/md2 (Makefile.am): Likewise.
8965         * modules/md4 (Makefile.am): Likewise.
8966         * modules/md5 (Makefile.am): Likewise.
8967         * modules/memcasecmp (Makefile.am): Likewise.
8968         * modules/memchr (Makefile.am): Likewise.
8969         * modules/memcmp (Makefile.am): Likewise.
8970         * modules/memcoll (Makefile.am): Likewise.
8971         * modules/memcpy (Makefile.am): Likewise.
8972         * modules/memmem (Makefile.am): Likewise.
8973         * modules/memmove (Makefile.am): Likewise.
8974         * modules/mempcpy (Makefile.am): Likewise.
8975         * modules/memrchr (Makefile.am): Likewise.
8976         * modules/memset (Makefile.am): Likewise.
8977         * modules/memxor (Makefile.am): Likewise.
8978         * modules/mkancesdirs (Makefile.am): Likewise.
8979         * modules/mkdir-p (Makefile.am): Likewise.
8980         * modules/mkdir (Makefile.am): Likewise.
8981         * modules/mkdtemp (Makefile.am): Likewise.
8982         * modules/mkstemp (Makefile.am): Likewise.
8983         * modules/mktime (Makefile.am): Likewise.
8984         * modules/modechange (Makefile.am): Likewise.
8985         * modules/mountlist (Makefile.am): Likewise.
8986         * modules/nanosleep (Makefile.am): Likewise.
8987         * modules/obstack (Makefile.am): Likewise.
8988         * modules/openat (Makefile.am): Likewise.
8989         * modules/pagealign_alloc (Makefile.am): Likewise.
8990         * modules/pathmax (Makefile.am): Likewise.
8991         * modules/physmem (Makefile.am): Likewise.
8992         * modules/poll (Makefile.am): Likewise.
8993         * modules/posixtm (Makefile.am): Likewise.
8994         * modules/posixver (Makefile.am): Likewise.
8995         * modules/putenv (Makefile.am): Likewise.
8996         * modules/quote (Makefile.am): Likewise.
8997         * modules/quotearg (Makefile.am): Likewise.
8998         * modules/raise (Makefile.am): Likewise.
8999         * modules/read-file (Makefile.am): Likewise.
9000         * modules/readline (Makefile.am): Likewise.
9001         * modules/readlink (Makefile.am): Likewise.
9002         * modules/readtokens (Makefile.am): Likewise.
9003         * modules/readutmp (Makefile.am): Likewise.
9004         * modules/realloc (Makefile.am): Likewise.
9005         * modules/regex (Makefile.am): Likewise.
9006         * modules/rename-dest-slash (Makefile.am): Likewise.
9007         * modules/rename (Makefile.am): Likewise.
9008         * modules/rijndael (Makefile.am): Likewise.
9009         * modules/rmdir (Makefile.am): Likewise.
9010         * modules/rpmatch (Makefile.am): Likewise.
9011         * modules/safe-read (Makefile.am): Likewise.
9012         * modules/safe-write (Makefile.am): Likewise.
9013         * modules/same-inode (Makefile.am): Likewise.
9014         * modules/same (Makefile.am): Likewise.
9015         * modules/save-cwd (Makefile.am): Likewise.
9016         * modules/savedir (Makefile.am): Likewise.
9017         * modules/setenv (Makefile.am): Likewise.
9018         * modules/settime (Makefile.am): Likewise.
9019         * modules/sha1 (Makefile.am): Likewise.
9020         * modules/sig2str (Makefile.am): Likewise.
9021         * modules/snprintf (Makefile.am): Likewise.
9022         * modules/stat-macros (Makefile.am): Likewise.
9023         * modules/stat-time (Makefile.am): Likewise.
9024         * modules/stdbool (Makefile.am): Likewise.
9025         * modules/stdint (Makefile.am): Likewise.
9026         * modules/stdlib-safer (Makefile.am): Likewise.
9027         * modules/stpcpy (Makefile.am): Likewise.
9028         * modules/stpncpy (Makefile.am): Likewise.
9029         * modules/strcase (Makefile.am): Likewise.
9030         * modules/strcasestr (Makefile.am): Likewise.
9031         * modules/strchrnul (Makefile.am): Likewise.
9032         * modules/strcspn (Makefile.am): Likewise.
9033         * modules/strdup (Makefile.am): Likewise.
9034         * modules/strerror (Makefile.am): Likewise.
9035         * modules/strftime (Makefile.am): Likewise.
9036         * modules/strndup (Makefile.am): Likewise.
9037         * modules/strnlen (Makefile.am): Likewise.
9038         * modules/strpbrk (Makefile.am): Likewise.
9039         * modules/strsep (Makefile.am): Likewise.
9040         * modules/strstr (Makefile.am): Likewise.
9041         * modules/strtod (Makefile.am): Likewise.
9042         * modules/strtoimax (Makefile.am): Likewise.
9043         * modules/strtok_r (Makefile.am): Likewise.
9044         * modules/strtol (Makefile.am): Likewise.
9045         * modules/strtoll (Makefile.am): Likewise.
9046         * modules/strtoul (Makefile.am): Likewise.
9047         * modules/strtoull (Makefile.am): Likewise.
9048         * modules/strtoumax (Makefile.am): Likewise.
9049         * modules/strverscmp (Makefile.am): Likewise.
9050         * modules/sys_socket (Makefile.am): Likewise.
9051         * modules/sys_stat (Makefile.am): Likewise.
9052         * modules/sysexits (Makefile.am): Likewise.
9053         * modules/time_r (Makefile.am): Likewise.
9054         * modules/timegm (Makefile.am): Likewise.
9055         * modules/timespec (Makefile.am): Likewise.
9056         * modules/tmpfile-safer (Makefile.am): Likewise.
9057         * modules/trim (Makefile.am): Likewise.
9058         * modules/unistd-safer (Makefile.am): Likewise.
9059         * modules/unlinkdir (Makefile.am): Likewise.
9060         * modules/unlocked-io (Makefile.am): Likewise.
9061         * modules/userspec (Makefile.am): Likewise.
9062         * modules/utime (Makefile.am): Likewise.
9063         * modules/utimecmp (Makefile.am): Likewise.
9064         * modules/utimens (Makefile.am): Likewise.
9065         * modules/vasnprintf (Makefile.am): Likewise.
9066         * modules/vasprintf (Makefile.am): Likewise.
9067         * modules/vsnprintf (Makefile.am): Likewise.
9068         * modules/xalloc (Makefile.am): Likewise.
9069         * modules/xgetcwd (Makefile.am): Likewise.
9070         * modules/xnanosleep (Makefile.am): Likewise.
9071         * modules/xreadlink (Makefile.am): Likewise.
9072         * modules/xstrtod (Makefile.am): Likewise.
9073         * modules/xstrtol (Makefile.am): Likewise.
9074         * modules/xstrtold (Makefile.am): Likewise.
9075         * modules/yesno (Makefile.am): Likewise.
9076         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9077
9078 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9079
9080         * modules/error (Makefile.am): Distribute files through
9081         EXTRA_DIST, not lib_SOURCES.
9082
9083 2006-10-12  Eric Blake  <ebb9@byu.net>
9084
9085         * modules/error (Makefile.am): Distribute files in /lib.
9086         * modules/obstack (Makefile.am): Likewise.
9087
9088 2006-10-12  Bruno Haible  <bruno@clisp.org>
9089
9090         * modules/acl (Makefile.am): Distribute all files in lib/ through
9091         EXTRA_DIST.
9092         * modules/arcfour (Makefile.am): Likewise.
9093         * modules/arctwo (Makefile.am): Likewise.
9094         * modules/argmatch (Makefile.am): Likewise.
9095         * modules/argz (Makefile.am): Likewise.
9096         * modules/atexit (Makefile.am): Likewise.
9097         * modules/backupfile (Makefile.am): Likewise.
9098         * modules/c-strtod (Makefile.am): Likewise.
9099         * modules/c-strtold (Makefile.am): Likewise.
9100         * modules/calloc (Makefile.am): Likewise.
9101         * modules/canon-host (Makefile.am): Likewise.
9102         * modules/canonicalize (Makefile.am): Likewise.
9103         * modules/chdir-long (Makefile.am): Likewise.
9104         * modules/chdir-safer (Makefile.am): Likewise.
9105         * modules/check-version (Makefile.am): Likewise.
9106         * modules/chown (Makefile.am): Likewise.
9107         * modules/cloexec (Makefile.am): Likewise.
9108         * modules/close-stream (Makefile.am): Likewise.
9109         * modules/closeout (Makefile.am): Likewise.
9110         * modules/crc (Makefile.am): Likewise.
9111         * modules/cycle-check (Makefile.am): Likewise.
9112         * modules/des (Makefile.am): Likewise.
9113         * modules/dirfd (Makefile.am): Likewise.
9114         * modules/dirname (Makefile.am): Likewise.
9115         * modules/dup2 (Makefile.am): Likewise.
9116         * modules/euidaccess (Makefile.am): Likewise.
9117         * modules/exclude (Makefile.am): Likewise.
9118         * modules/exitfail (Makefile.am): Likewise.
9119         * modules/fcntl-safer (Makefile.am): Likewise.
9120         * modules/file-type (Makefile.am): Likewise.
9121         * modules/fileblocks (Makefile.am): Likewise.
9122         * modules/filemode (Makefile.am): Likewise.
9123         * modules/filenamecat (Makefile.am): Likewise.
9124         * modules/fnmatch (Makefile.am): Likewise.
9125         * modules/fopen-safer (Makefile.am): Likewise.
9126         * modules/fpending (Makefile.am): Likewise.
9127         * modules/fprintftime (Makefile.am): Likewise.
9128         * modules/free (Makefile.am): Likewise.
9129         * modules/fsusage (Makefile.am): Likewise.
9130         * modules/ftruncate (Makefile.am): Likewise.
9131         * modules/fts (Makefile.am): Likewise.
9132         * modules/gc (Makefile.am): Likewise.
9133         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9134         * modules/getaddrinfo (Makefile.am): Likewise.
9135         * modules/getcwd (Makefile.am): Likewise.
9136         * modules/getdelim (Makefile.am): Likewise.
9137         * modules/getdomainname (Makefile.am): Likewise.
9138         * modules/getgroups (Makefile.am): Likewise.
9139         * modules/gethostname (Makefile.am): Likewise.
9140         * modules/gethrxtime (Makefile.am): Likewise.
9141         * modules/getline (Makefile.am): Likewise.
9142         * modules/getloadavg (Makefile.am): Likewise.
9143         * modules/getlogin_r (Makefile.am): Likewise.
9144         * modules/getopt (Makefile.am): Likewise.
9145         * modules/getpass (Makefile.am): Likewise.
9146         * modules/getpass-gnu (Makefile.am): Likewise.
9147         * modules/getsubopt (Makefile.am): Likewise.
9148         * modules/gettime (Makefile.am): Likewise.
9149         * modules/gettimeofday (Makefile.am): Likewise.
9150         * modules/getugroups (Makefile.am): Likewise.
9151         * modules/getusershell (Makefile.am): Likewise.
9152         * modules/glob (Makefile.am): Likewise.
9153         * modules/group-member (Makefile.am): Likewise.
9154         * modules/hard-locale (Makefile.am): Likewise.
9155         * modules/hash (Makefile.am): Likewise.
9156         * modules/hmac-md5 (Makefile.am): Likewise.
9157         * modules/hmac-sha1 (Makefile.am): Likewise.
9158         * modules/human (Makefile.am): Likewise.
9159         * modules/idcache (Makefile.am): Likewise.
9160         * modules/imaxabs (Makefile.am): Likewise.
9161         * modules/imaxdiv (Makefile.am): Likewise.
9162         * modules/inet_ntop (Makefile.am): Likewise.
9163         * modules/inet_pton (Makefile.am): Likewise.
9164         * modules/inttostr (Makefile.am): Likewise.
9165         * modules/isapipe (Makefile.am): Likewise.
9166         * modules/lchown (Makefile.am): Likewise.
9167         * modules/long-options (Makefile.am): Likewise.
9168         * modules/lstat (Makefile.am): Likewise.
9169         * modules/malloc (Makefile.am): Likewise.
9170         * modules/mathl (Makefile.am): Likewise.
9171         * modules/mbchar (Makefile.am): Likewise.
9172         * modules/md2 (Makefile.am): Likewise.
9173         * modules/md4 (Makefile.am): Likewise.
9174         * modules/md5 (Makefile.am): Likewise.
9175         * modules/memcasecmp (Makefile.am): Likewise.
9176         * modules/memchr (Makefile.am): Likewise.
9177         * modules/memcmp (Makefile.am): Likewise.
9178         * modules/memcoll (Makefile.am): Likewise.
9179         * modules/memcpy (Makefile.am): Likewise.
9180         * modules/memmem (Makefile.am): Likewise.
9181         * modules/memmove (Makefile.am): Likewise.
9182         * modules/mempcpy (Makefile.am): Likewise.
9183         * modules/memrchr (Makefile.am): Likewise.
9184         * modules/memset (Makefile.am): Likewise.
9185         * modules/memxor (Makefile.am): Likewise.
9186         * modules/mkancesdirs (Makefile.am): Likewise.
9187         * modules/mkdir (Makefile.am): Likewise.
9188         * modules/mkdir-p (Makefile.am): Likewise.
9189         * modules/mkdtemp (Makefile.am): Likewise.
9190         * modules/mkstemp (Makefile.am): Likewise.
9191         * modules/mktime (Makefile.am): Likewise.
9192         * modules/modechange (Makefile.am): Likewise.
9193         * modules/mountlist (Makefile.am): Likewise.
9194         * modules/nanosleep (Makefile.am): Likewise.
9195         * modules/openat (Makefile.am): Likewise.
9196         * modules/pagealign_alloc (Makefile.am): Likewise.
9197         * modules/physmem (Makefile.am): Likewise.
9198         * modules/poll (Makefile.am): Likewise.
9199         * modules/posixtm (Makefile.am): Likewise.
9200         * modules/posixver (Makefile.am): Likewise.
9201         * modules/putenv (Makefile.am): Likewise.
9202         * modules/quote (Makefile.am): Likewise.
9203         * modules/quotearg (Makefile.am): Likewise.
9204         * modules/raise (Makefile.am): Likewise.
9205         * modules/read-file (Makefile.am): Likewise.
9206         * modules/readline (Makefile.am): Likewise.
9207         * modules/readlink (Makefile.am): Likewise.
9208         * modules/readtokens (Makefile.am): Likewise.
9209         * modules/readutmp (Makefile.am): Likewise.
9210         * modules/realloc (Makefile.am): Likewise.
9211         * modules/regex (Makefile.am): Likewise.
9212         * modules/rename (Makefile.am): Likewise.
9213         * modules/rename-dest-slash (Makefile.am): Likewise.
9214         * modules/rijndael (Makefile.am): Likewise.
9215         * modules/rmdir (Makefile.am): Likewise.
9216         * modules/rpmatch (Makefile.am): Likewise.
9217         * modules/safe-read (Makefile.am): Likewise.
9218         * modules/safe-write (Makefile.am): Likewise.
9219         * modules/same (Makefile.am): Likewise.
9220         * modules/save-cwd (Makefile.am): Likewise.
9221         * modules/savedir (Makefile.am): Likewise.
9222         * modules/setenv (Makefile.am): Likewise.
9223         * modules/settime (Makefile.am): Likewise.
9224         * modules/sha1 (Makefile.am): Likewise.
9225         * modules/sig2str (Makefile.am): Likewise.
9226         * modules/snprintf (Makefile.am): Likewise.
9227         * modules/stdlib-safer (Makefile.am): Likewise.
9228         * modules/stpcpy (Makefile.am): Likewise.
9229         * modules/stpncpy (Makefile.am): Likewise.
9230         * modules/strcase (Makefile.am): Likewise.
9231         * modules/strcasestr (Makefile.am): Likewise.
9232         * modules/strchrnul (Makefile.am): Likewise.
9233         * modules/strcspn (Makefile.am): Likewise.
9234         * modules/strdup (Makefile.am): Likewise.
9235         * modules/strerror (Makefile.am): Likewise.
9236         * modules/strftime (Makefile.am): Likewise.
9237         * modules/strndup (Makefile.am): Likewise.
9238         * modules/strnlen (Makefile.am): Likewise.
9239         * modules/strpbrk (Makefile.am): Likewise.
9240         * modules/strsep (Makefile.am): Likewise.
9241         * modules/strstr (Makefile.am): Likewise.
9242         * modules/strtod (Makefile.am): Likewise.
9243         * modules/strtoimax (Makefile.am): Likewise.
9244         * modules/strtok_r (Makefile.am): Likewise.
9245         * modules/strtol (Makefile.am): Likewise.
9246         * modules/strtoll (Makefile.am): Likewise.
9247         * modules/strtoul (Makefile.am): Likewise.
9248         * modules/strtoull (Makefile.am): Likewise.
9249         * modules/strtoumax (Makefile.am): Likewise.
9250         * modules/strverscmp (Makefile.am): Likewise.
9251         * modules/time_r (Makefile.am): Likewise.
9252         * modules/timegm (Makefile.am): Likewise.
9253         * modules/tmpfile-safer (Makefile.am): Likewise.
9254         * modules/unistd-safer (Makefile.am): Likewise.
9255         * modules/unlinkdir (Makefile.am): Likewise.
9256         * modules/userspec (Makefile.am): Likewise.
9257         * modules/utime (Makefile.am): Likewise.
9258         * modules/utimecmp (Makefile.am): Likewise.
9259         * modules/utimens (Makefile.am): Likewise.
9260         * modules/vasnprintf (Makefile.am): Likewise.
9261         * modules/vasprintf (Makefile.am): Likewise.
9262         * modules/vsnprintf (Makefile.am): Likewise.
9263         * modules/xalloc (Makefile.am): Likewise.
9264         * modules/xgetcwd (Makefile.am): Likewise.
9265         * modules/xnanosleep (Makefile.am): Likewise.
9266         * modules/xreadlink (Makefile.am): Likewise.
9267         * modules/xstrtod (Makefile.am): Likewise.
9268         * modules/xstrtol (Makefile.am): Likewise.
9269         * modules/xstrtold (Makefile.am): Likewise.
9270         * modules/yesno (Makefile.am): Likewise.
9271
9272 2006-10-12  Jim Meyering  <jim@meyering.net>
9273
9274         * m4/getloadavg.m4: Revert the change below.
9275
9276         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9277         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9278         fail with a symlink, which is what coreutils' ./bootstrap now
9279         creates by default.
9280
9281 2006-10-12  Bruno Haible  <bruno@clisp.org>
9282
9283         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9284         mingw.
9285         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
9286         MSVC and mingw explicitly.
9287
9288 2006-10-11  Simon Josefsson  <jas@extundo.com>
9289             Bruno Haible  <bruno@clisp.org>
9290
9291         Add support for multiple gnulib-tool invocations in the scope of a
9292         single configure.ac file.
9293         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
9294         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
9295         with the same contents as the _LIBADD variable.
9296         (func_emit_initmacro_start, func_emit_initmacro_end,
9297         func_emit_initmacro_done): New functions.
9298         (func_import, func_create_testdir): Invoke them. Allow the identifiers
9299         gl_LIBOBJS and gl_LTLIBOBJS.
9300
9301 2006-10-11  Bruno Haible  <bruno@clisp.org>
9302
9303         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
9304         (func_create_testdir): Don't create po/Makefile.am, don't invoke
9305         autoreconf. Instead, invoke autopoint explicitly but move back the
9306         *.m4 files from gnulib.
9307
9308 2006-10-11  Bruno Haible  <bruno@clisp.org>
9309
9310         * gnulib-tool (func_usage): Make module names after --create-testdir
9311         optional.
9312         (func_create_testdir): If no module was specified, use nearly all
9313         modules.
9314
9315 2006-10-12  Jim Meyering  <jim@meyering.net>
9316
9317         Big performance improvement for fts-based tools that use FTS_NOSTAT.
9318         Avoid spurious inode-mismatch problems on non-POSIX file systems.
9319         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
9320         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
9321         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
9322         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
9323         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
9324         (fts_set_stat_required): New function.
9325         (fts_open): Defer the calls to fts_stat, if possible or requested.
9326         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
9327         into fts_stat itself.
9328         (fts_read): Perform any required (deferred) fts_stat call.
9329         (fts_build): Likewise, for the directory we're about to open and read.
9330         In the readdir loop, carefully decide whether each entry will require
9331         an eventual call to fts_stat, using dirent.d_type info if available.
9332         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
9333         a command line argument into this function.  Update all callers.
9334         Map a return value of FTS_DOT to FTS_D for a command line argument.
9335         * modules/fts (Depends-on): Add d-type.  Alphabetize.
9336         Thanks to Miklos Szeredi for his tenacity and for the initial
9337         bug report about "find" failing on a FUSE-based file system.
9338
9339         * lib/fts.c (fts_open): Use consistent indentation.
9340
9341 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9342
9343         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
9344         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
9345         reported by Jim Meyering.  All uses of cache variables renamed
9346         to match Autoconf's.
9347         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
9348         the other one.
9349
9350         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
9351         Fix misspelling in diagnostic.
9352
9353 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9354
9355         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
9356         defined.  Problem reported by Matthew Woehlke.
9357
9358         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
9359         Add support for Tandem NonStop R series.
9360         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
9361         Use new macro.
9362
9363         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
9364         (has_trailing_slash): Omit size arg; all callers changed.
9365         Omit 'inline', since it doesn't help performance and we'd
9366         need to configure it.
9367         Don't count //, ///, etc. as having a trailing slash.
9368         As a side effect, this removes a C99ism reported by Matthew Woehlke.
9369         (rpl_rename_dest_slash): On failure, use rename's errno rather
9370         than (in some cases) an incorrect or junk errno.
9371         Simplify code by removing need to compute length; this does
9372         cause it to make two passes instead of one over the file name,
9373         but it's worth it.
9374
9375         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
9376         change, since Autoconf's version may no longer be appropriate now
9377         that we are using CVS Autoconf's version.  Add support for Tandem.
9378
9379 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9380             Bruno Haible  <bruno@clisp.org>
9381
9382         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
9383         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
9384         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
9385         gl_AC_TYPE_LONG_LONG.
9386
9387         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
9388         instead of HAVE_LONG_LONG.
9389         * lib/printf-args.c (printf_fetchargs): Likewise.
9390         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
9391         * lib/vasnprintf.c (VASNPRINTF): Likewise.
9392         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
9393         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
9394         gl_AC_TYPE_LONG_LONG.
9395
9396 2006-10-11  Bruno Haible  <bruno@clisp.org>
9397
9398         * m4/longlong.m4: Add comments.
9399         * m4/ulonglong.m4: Likewise.
9400
9401 2006-10-10  Bruno Haible  <bruno@clisp.org>
9402
9403         Make it possible to #define stpcpy, strdup to aliases.
9404         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
9405         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
9406
9407 2006-10-10  Bruno Haible  <bruno@clisp.org>
9408
9409         Make it possible to #define gcd to an alias.
9410         * lib/gcd.c: Include config.h.
9411
9412 2006-10-10  Bruno Haible  <bruno@clisp.org>
9413
9414         Make it possible to #define c_isascii to an alias.
9415         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
9416         defined. Undefine the macros before defining them, to avoid gcc
9417         warnings.
9418         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
9419         define NO_C_CTYPE_MACROS early.
9420
9421 2006-10-10  Bruno Haible  <bruno@clisp.org>
9422
9423         Make it possible to #define set_program_name to an alias.
9424         * lib/progname.c: Don't undefine set_program_name; instead, undefine
9425         ENABLE_RELOCATABLE early.
9426
9427 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9428
9429         Port to Tandem NSK OSS, which has 64-bit signed int but at most
9430         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
9431         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
9432         More generally, don't assume that 64-bit signed int is available
9433         if unsigned int is, and vice versa.
9434         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
9435         unsigned symbols, not on their signed counterparts.
9436         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
9437         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
9438         (UINT64_C, UINTMAX_C):
9439         Likewise.
9440         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
9441         unsigned counterparts.
9442         (Have_long_long, Unsigned): New macros.
9443         (Int): Renamed from INT.
9444         (strtoimax): Use the new macros.
9445         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
9446         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
9447         * modules/inttypes (inttypes.h): Substitute
9448         HAVE_UNSIGNED_LONG_LONG_INT.
9449         * modules/stdint (stdint.h): Likewise.
9450         (Files): Add m4/ulonglong.m4.
9451
9452 2006-10-10  Bruno Haible  <bruno@clisp.org>
9453
9454         Fix a gcc -Wshadow warning.
9455         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
9456         to 'bucket'.
9457         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
9458         gl_linked_indexof_from_to): Likewise.
9459         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
9460         Likewise.
9461         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
9462         Likewise.
9463         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
9464         Reported by Eric Blake.
9465
9466 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
9467
9468         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
9469         for NetBSD.  Problem reported by Bruno Haible.
9470
9471 2006-10-09  Jim Meyering  <jim@meyering.net>
9472
9473         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
9474         Patch from Bruno Haible.
9475
9476 2006-10-09  Jim Meyering  <jim@meyering.net>
9477
9478         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
9479         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
9480         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
9481
9482 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
9483
9484         Don't include <config.h> twice; this doesn't work in some cases,
9485         e.g., when config.h has "#define intmax_t long long int" and
9486         we include <config.h>, <inttypes.h>, <config.h> in that order.
9487         Problem reported by Matthew Woehlke in:
9488         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
9489         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
9490         * lib/fts-cycle.c: Don't include config.h.
9491         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
9492         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
9493         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
9494         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
9495         inttypes.h.
9496         * lib/xstrtoumax.c: Likewise.
9497         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
9498         __strtol and the like, so that this module is more like its siblings.
9499         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
9500         Remove; no longer needed now that we assume gnulib inttypes.h.
9501
9502 2006-10-08  Bruno Haible  <bruno@clisp.org>
9503
9504         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
9505         option.
9506
9507 2006-10-07  Jim Meyering  <jim@meyering.net>
9508
9509         * modules/inttypes (inttypes.h): Revert what seems to have been
9510         an inadvertent part of today's change: use "|", not "/" in the
9511         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
9512
9513 2006-10-07  Bruno Haible  <bruno@clisp.org>
9514
9515         * modules/sublist: New file.
9516
9517 2006-10-07  Bruno Haible  <bruno@clisp.org>
9518
9519         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
9520         * modules/argz (argz.h): Likewise.
9521         * modules/arpa_inet (arpa/inet.h): Likewise.
9522         * modules/byteswap (byteswap.h): Likewise.
9523         * modules/configmake (configmake.h): Likewise.
9524         * modules/fcntl (fcntl.h): Likewise.
9525         * modules/fnmatch (fnmatch.h): Likewise.
9526         * modules/getopt (getopt.h): Likewise.
9527         * modules/glob (glob.h): Likewise.
9528         * modules/inttypes (inttypes.h): Likewise.
9529         * modules/netinet_in (netinet/in.h): Likewise.
9530         * modules/poll (poll.h): Likewise.
9531         * modules/stdbool (stdbool.h): Likewise.
9532         * modules/stdint (stdint.h): Likewise.
9533         * modules/sys_select (sys/select.h): Likewise.
9534         * modules/sys_socket (sys/socket.h): Likewise.
9535         * modules/sys_stat (sys/stat.h): Likewise.
9536         * modules/sysexits (sysexits.h): Likewise.
9537         * modules/unistd (unistd.h): Likewise.
9538         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9539         Add a "DO NOT EDIT" comment to the generated file.
9540         (func_import): Likewise for gnulib-comp.m4.
9541
9542 2006-10-07  Bruno Haible  <bruno@clisp.org>
9543
9544         * lib/gl_sublist.h: New file.
9545         * lib/gl_sublist.c: New file.
9546
9547 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9548
9549         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
9550         name (relative to the original working directory) and the file
9551         name component (relative to the temporary working directory).  All
9552         callers changed.
9553         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
9554         * lib/mkdir-p.c (make_dir_parents): Likewise.
9555         * lib/mkdir-p.h (make_dir_parents): Likewise.
9556
9557 2006-10-06  Eric Blake  <ebb9@byu.net>
9558
9559         Define several macros for use by the clean-temp module.
9560         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
9561         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
9562         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
9563
9564         * lib/clean-temp.h (close_stream_temp): New declaration.
9565         * lib/clean-temp.c (includes): Pull in headers according to what
9566         other modules are in use.
9567         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
9568
9569 2006-10-06  Bruno Haible  <bruno@clisp.org>
9570
9571         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
9572         instead of fopen, fwriteerror.
9573
9574 2006-10-06  Bruno Haible  <bruno@clisp.org>
9575
9576         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
9577         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
9578         int.
9579         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
9580         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
9581         Return an error indicator.
9582         Suggested by Eric Blake.
9583
9584 2006-10-06  Bruno Haible  <bruno@clisp.org>
9585
9586         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
9587         Reported by Eric Blake.
9588
9589 2006-10-06  Bruno Haible  <bruno@clisp.org>
9590
9591         * modules/closeout (Description): Mention stderr too.
9592
9593 2006-10-06  Bruno Haible  <bruno@clisp.org>
9594         and Paul Eggert  <eggert@cs.ucla.edu>
9595
9596         * lib/closeout.c (close_stdout): Also close stderr.
9597         * lib/closeout.h: Update comment.
9598
9599 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9600
9601         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
9602         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
9603         * lib/dirchownmod.c: Include lchown.h.
9604         * lib/lchown.c: Don't include files that lchown.h now includes.
9605         Don't declare chown, since lchown.h now does that.
9606         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
9607         (lchown): Define to rpl_chown if lchown is declared but
9608         does not exist.  Declare using a prototype if lchown is not
9609         declared.  Add a copyright notice.
9610         * lib/mkstemp.h: Include <unistd.h>.
9611         * lib/openat.c: Include lchown.h.
9612
9613         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
9614         we now test for that separately.
9615         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
9616         rather than O_NOFOLLOW, when testing whether it's possible to
9617         avoid a race condition reliably.
9618         * lib/savewd.c (savewd_chdir): Likewise.
9619
9620         Remove macros that are no longer needed now that stdint.h is
9621         reliable.
9622         * lib/fsusage.c (UINTMAX_MAX): Remove.
9623         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
9624         * lib/utimecmp.c (SIZE_MAX): Remove.
9625
9626         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
9627
9628         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
9629         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
9630         O_NOATIME works.
9631
9632 2006-10-05  Bruno Haible  <bruno@clisp.org>
9633
9634         * lib/gl_list.h (gl_sortedlist_search_from_to,
9635         gl_sortedlist_indexof_from_to): New declarations.
9636         (gl_list_implementation): New fields sortedlist_search_from_to,
9637         sortedlist_indexof_from_to.
9638         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
9639         inline functions.
9640         * lib/gl_list.c (gl_sortedlist_search_from_to,
9641         gl_sortedlist_indexof_from_to): New functions.
9642         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
9643         function.
9644         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
9645         (gl_array_sortedlist_search_from_to): New function.
9646         (gl_array_list_implementation): Update.
9647         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
9648         function.
9649         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
9650         (gl_carray_sortedlist_search_from_to): New function.
9651         (gl_carray_list_implementation): Update.
9652         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
9653         gl_linked_sortedlist_indexof_from_to): New functions.
9654         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9655         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9656         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
9657         gl_tree_sortedlist_indexof_from_to): New functions.
9658         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9659         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9660         Update.
9661         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9662         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
9663         Update.
9664
9665 2006-10-05  Bruno Haible  <bruno@clisp.org>
9666
9667         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
9668         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
9669         (struct gl_list_implementation): Add fields search_from_to,
9670         indexof_from_to. Remove fields search, indexof.
9671         (gl_list_search): Use the search_from_to method.
9672         (gl_list_search_from, gl_list_search_from_to): New functions.
9673         (gl_list_indexof): Use the indexof_from_to method.
9674         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9675         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
9676         (gl_list_search_from, gl_list_search_from_to): New functions.
9677         (gl_list_indexof): Use the indexof_from_to method.
9678         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9679         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
9680         gl_array_indexof. Add start_index, end_index arguments.
9681         (gl_array_search_from_to): Renamed from gl_array_search. Add
9682         start_index, end_index arguments.
9683         (gl_array_remove, gl_array_list_implementation): Update.
9684         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
9685         gl_carray_indexof. Add start_index, end_index arguments.
9686         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
9687         start_index, end_index arguments.
9688         (gl_carray_remove, gl_carray_list_implementation): Update.
9689         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
9690         gl_linked_search. Add start_index, end_index arguments.
9691         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
9692         start_index, end_index arguments.
9693         (gl_linked_remove): Update.
9694         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9695         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9696         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
9697         field to 'size_t'.
9698         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
9699         gl_tree_search. Add start_index, end_index arguments.
9700         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9701         start_index, end_index arguments.
9702         (gl_tree_remove): Update.
9703         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9704         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9705         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
9706         function.
9707         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
9708         gl_tree_search. Add start_index, end_index arguments.
9709         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9710         start_index, end_index arguments.
9711         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9712         Update.
9713         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
9714
9715 2006-10-05  Bruno Haible  <bruno@clisp.org>
9716
9717         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
9718
9719         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
9720         fwriteerror_temp): New declarations.
9721         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
9722         (descriptors): New variable.
9723         (cleanup): First, close the descriptors.
9724         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
9725         fclose_temp, fwriteerror_temp): New functions.
9726
9727 2006-10-04  Jim Meyering  <jim@meyering.net>
9728
9729         * lib/fts.c (fts_open): Tiny comment change.
9730
9731 2006-10-04  Bruno Haible  <bruno@clisp.org>
9732
9733         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
9734         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
9735         gl_LOCK_BODY.
9736         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
9737         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
9738         gl_LOCK_EARLY_BODY.
9739         (gl_LOCK): Require gl_LOCK_BODY.
9740
9741 2006-10-04  Bruno Haible  <bruno@clisp.org>
9742
9743         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
9744         (gl_oset_search_atleast): New declaration.
9745         (struct gl_oset_implementation): Add field 'search_atleast'.
9746         (gl_oset_search_atleast): New inline function.
9747         * lib/gl_oset.c (gl_oset_search_atleast): New function.
9748         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
9749         (gl_array_oset_implementation): Update.
9750         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
9751         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
9752         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
9753
9754 2006-10-04  Bruno Haible  <bruno@clisp.org>
9755
9756         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
9757
9758 2006-10-03  Bruno Haible  <bruno@clisp.org>
9759
9760         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
9761         from gl_avltreehash_list_implementation.
9762
9763 2006-10-03  Bruno Haible  <bruno@clisp.org>
9764
9765         * lib/gl_oset.c (gl_oset_add): Fix return type.
9766
9767 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
9768
9769         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
9770
9771 2006-10-02  Eric Blake  <ebb9@byu.net>
9772
9773         * modules/strnlen (Depends-on): Add extensions.
9774
9775 2006-10-02  Eric Blake  <ebb9@byu.net>
9776
9777         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
9778         definition in 2.60+.
9779
9780 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
9781
9782         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
9783         checks.
9784
9785 2006-10-02  Bruno Haible  <bruno@clisp.org>
9786
9787         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
9788         to the AUTOMAKE_OPTIONS.
9789         Reported by Jim Meyering.
9790
9791 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9792
9793         Work around bug in Solaris 10 /proc file system:
9794         /proc/self/fd/NNN/.. isn't the parent directory of
9795         the directory whose file descriptor is NNN.  This needs to
9796         be worked around at run time, not compile time, since a
9797         program might be built on Solaris 8, where things work, and
9798         run on Solaris 10.
9799         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
9800         to use the following interface instead:
9801         (OPENAT_BUFFER_SIZE): New macro.
9802         (openat_proc_name): New function.
9803         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
9804         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
9805         Likewise.
9806         * lib/openat-proc.c: New file.
9807         * modules/openat (Files): Add lib/openat-proc.c.
9808         (Depends-on): Add same-inode, stdbool.
9809         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
9810
9811 2006-09-29  Bruno Haible  <bruno@clisp.org>
9812
9813         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
9814         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
9815         argument. Set stdout_closed before testing for ferror, not after.
9816         (fwriteerror, fwriteerror_no_ebadf): New functions.
9817
9818 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9819
9820         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
9821
9822 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
9823
9824         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
9825         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
9826
9827 2006-09-28  Jim Meyering  <jim@meyering.net>
9828
9829         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
9830         Include <unistd.h>.
9831
9832 2006-09-28  Bruno Haible  <bruno@clisp.org>
9833
9834         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
9835         * modules/linkedhash-list (Depends-on): Likewise.
9836         * modules/rbtreehash-list (Depends-on): Likewise.
9837
9838 2006-09-28  Bruno Haible  <bruno@clisp.org>
9839
9840         * lib/strndup.h: Simplify the redefinition of strndup.
9841         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
9842         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
9843
9844 2006-09-28  Bruno Haible  <bruno@clisp.org>
9845
9846         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
9847         * lib/gl_linkedhash_list.c: Likewise.
9848         * lib/gl_rbtreehash_list.c: Likewise.
9849
9850 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9851
9852         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
9853         getaddrinfo.
9854
9855         * lib/__fpending.h: Don't include <stdio_ext.h> unless
9856         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
9857         it causes <stdio_ext.h> to cause a compile-time error.
9858         Problem reported by Nelson H. F. Beebe.
9859         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
9860         of HAVE_DECL___PENDING.
9861
9862         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
9863         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
9864         declaration.
9865
9866 2006-09-27  Jim Meyering  <jim@meyering.net>
9867
9868         This file could end up with a definition for a function
9869         named __strndup, rather than rpl_strndup on a system with
9870         incomplete weak_alias support.
9871         * lib/strndup.c (strndup): Rename from __strndup.
9872         Remove #defines that used to map __strndup to strndup.
9873         Don't use K&R prototypes.
9874         Remove LIBC-related code, since this file is not sync'd with glibc.
9875         * lib/strndup.h: Revamp, accordingly.
9876         * m4/strndup.m4: Modernize.
9877
9878 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9879
9880         * modules/savewd (Depends-on): Add 'raise'.
9881         * lib/savewd.c: Include <signal.h>, for 'raise'.
9882
9883 2006-09-26  Jim Meyering  <jim@meyering.net>
9884
9885         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
9886         when we detect Darwin 8.7.0's acl_get_file bug.
9887         Rearrange to perform the new (below) run-test while $LIBS
9888         contains any acl-related library.  Set USE_ACL at the end.
9889         (gl_ACL_GET_FILE): New function.
9890
9891 2006-09-26  Eric Blake  <ebb9@byu.net>
9892
9893         * lib/verror.c: Include <config.h> unconditionally.
9894
9895 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
9896
9897         * modules/clock-time (Maintainer): Add self.
9898         * modules/getlogin_r (Depends-on): Add extensions.
9899
9900 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9901
9902         * modules/clock-time: New module.
9903         * modules/nanosleep (Depends-on): Add clock-time.
9904         * modules/gethrxtime (Depends-on): Likewise.
9905         * modules/gettime (Depends-on): Likewise.
9906         * modules/settime (Depends-on): Likewise.
9907
9908         * modules/fts-lgpl: Depend on openat.
9909         * modules/mkancesdirs: Depend on savewd.
9910         * modules/mkdir-p: Likewise.
9911
9912 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9913
9914         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
9915
9916         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
9917         `gl_have_arbitrary_file_name_length_limit' to
9918         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
9919         actually works between configure runs.
9920
9921 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9922             Bruno Haible  <bruno@clisp.org>
9923
9924         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
9925
9926 2006-09-25  Jim Meyering  <jim@meyering.net>
9927
9928         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
9929         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
9930
9931 2006-09-25  Eric Blake  <ebb9@byu.net>
9932
9933         * gnulib-tool (func_import, func_create_testdir): Fix typos in
9934         exec's in 2006-09-18 patch when shuffling fds.
9935
9936 2006-09-25  Bruno Haible  <bruno@clisp.org>
9937
9938         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
9939         Reported by Jim Meyering.
9940
9941 2006-09-24  Jim Meyering  <jim@meyering.net>
9942
9943         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
9944         compare a pointer against a literal "0".  That caused failures with
9945         at least HP-UX's hpcc.
9946
9947 2006-09-22  Simon Josefsson  <jas@extundo.com>
9948
9949         * modules/gc-sha1:
9950         * modules/gc-md4:
9951         * modules/gc-hmac-sha1:
9952         * modules/gc-hmac-md5:
9953         * modules/gc-des:
9954         * modules/gc-arcfour: Distribute more files.
9955
9956 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9957
9958         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
9959         (gl_linked_iterator_from_to): Initialize struct completely.
9960         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
9961         (gl_tree_iterator_from_to): Likewise
9962         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
9963         * lib/gl_array_list.c [lint] (gl_array_iterator)
9964         (gl_array_iterator_from_to): Likewise.
9965         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
9966         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
9967         (gl_carray_iterator_from_to): Likewise.
9968
9969         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
9970         * lib/md4.c (md4_process_block): Remove unused variable.
9971         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
9972         parentheses for clarity.
9973
9974 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9975
9976         * modules/bison-i18n (Depends-on): Add gettext.
9977
9978 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9979
9980         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
9981         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
9982         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
9983         also add missing comma that caused broken test.
9984         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
9985         stdlib.h, for `abort'.
9986         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
9987         variables.
9988         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
9989         include unistd.h if present, for `rmdir'.
9990         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
9991         variables.
9992         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
9993         in the process include standard headers for prototypes.
9994         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
9995         gets declared on GNU/Linux.
9996         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
9997         unistd.h, for `rmdir'.
9998         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
9999
10000         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10001         always true.
10002         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10003
10004         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10005
10006 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10007
10008         * gnulib-tool (func_version): Create output all at once.  This
10009         may help avoid triggering unnecessary SIGPIPEs, and at any
10010         rate it doesn't hurt.
10011
10012 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10013             Bruno Haible  <bruno@clisp.org>
10014
10015         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10016         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10017         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10018
10019         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10020         (gl_FUNC_VASPRINTF): Invoke it.
10021
10022 2006-09-22  Bruno Haible  <bruno@clisp.org>
10023
10024         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10025         getloadavg.c as first argument.
10026
10027 2006-09-22  Bruno Haible  <bruno@clisp.org>
10028
10029         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10030         at the beginning of the gl_INIT macro.
10031         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10032         gl_GETLOADAVG.
10033
10034 2006-09-22  Bruno Haible  <bruno@clisp.org>
10035
10036         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10037         module.
10038         Suggested by Ralf Wildenhues.
10039
10040 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10041
10042         Import this patch from libc:
10043
10044         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10045
10046         * lib/regex_internal.c (re_string_reconstruct): Handle
10047         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10048         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10049         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10050         re_string_context_at.
10051
10052         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10053         now requires it.
10054         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10055         gl_REGEX now does it for us.
10056         (gl_REGEX): Add test taken from
10057         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10058
10059         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10060         Check that large offsets work.  Modernize Autoconf usages.
10061         Prefer "yes" to mean a good thing rather than a bad.
10062         Don't put "#define mkstemp" in config.h, as this might interfere
10063         with standard system headers that "#define mkstemp mkstemp64".
10064
10065         * modules/mkstemp (Depends-on): Add extensions, so that
10066         mkstemp is visible on some platforms.
10067         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10068         (Include): Change to "mkstemp.h" from <stdlib.h>.
10069         (Files): Add mkstemp.h.
10070
10071         * lib/mkstemp.h: New file, since some standard headers
10072         #define mkstemp.
10073         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10074         Include "mkstemp.h".
10075         Make the _LIBC code resemble glibc original more,
10076         e.g., use K&R style.
10077         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10078         (mkstemp): Remove, since mkstemp.h does this for us.
10079         * lib/stdlib--.h: Include mkstemp.h.
10080
10081         Import this patch from libc:
10082
10083         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10084
10085         * lib/tempname.c (__gen_tempname): Change attempts_min
10086         into a macro.  Use preprocessor to decide how to initialize
10087         attempts [Coverity CID 67].
10088
10089 2006-09-20  Bruno Haible  <bruno@clisp.org>
10090
10091         * lib/mkdtemp.c: Import from libc.
10092         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10093                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10094                 attempts_min into a macro.  Use preprocessor to decide how to
10095                 initialize attempts [Coverity CID 67].
10096         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10097                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10098                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10099
10100 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10101
10102         * gnulib-tool (func_exit): New function, to allow to pass the
10103         exit status portably through the trap.  Use everywhere.
10104         (--help, --version): Signal a write error.
10105         (trap): catch SIGPIPE, for write errors.
10106         Exit at the end of the trap, with the correct exit status.
10107
10108 2006-09-19  Karl Berry  <karl@gnu.org>
10109
10110         * doc/gnulib.texi: note about the license texinfo files.
10111
10112 2006-09-19  Eric Blake  <ebb9@byu.net>
10113
10114         * gnulib-tool: Avoid space-tab.
10115
10116 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10117
10118         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10119         that prevented coreutils 6.1 from building.  Problem reported
10120         by Petter Reinholdtsen.
10121
10122 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10123
10124         * gnulib-tool (avoidlist): Fix typo that broke options like
10125         --avoid=lock that are used by coreutils bootstrap.
10126
10127 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10128
10129         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10130         more systematically.
10131
10132 2006-09-18  Jim Meyering  <jim@meyering.net>
10133
10134         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10135
10136 2006-09-18  Bruno Haible  <bruno@clisp.org>
10137
10138         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10139
10140 2006-09-18  Bruno Haible  <bruno@clisp.org>
10141
10142         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10143         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10144         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10145         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10146         * m4/gettext.m4: Require autoconf >= 2.52.
10147         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10148         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10149         of gl_cv_header_inttypes_h.
10150
10151 2006-09-18  Bruno Haible  <bruno@clisp.org>
10152
10153         * lib/javaversion.c: Include configmake.h.
10154
10155 2006-09-18  Bruno Haible  <bruno@clisp.org>
10156
10157         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10158         avoid that the while loops be executed in a subshell.
10159
10160 2006-09-18  Bruno Haible  <bruno@clisp.org>
10161
10162         * MODULES.html.sh (func_module): Break long lines.
10163         Suggested by Bruce Korb <bkorb@gnu.org>.
10164
10165 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10166
10167         Speed up by a factor of 1.12.
10168         * gnulib-tool (nl): New variable.
10169         (func_import): Rewrite include directive extraction to only read each
10170         directive once.
10171
10172 2006-09-17  Bruno Haible  <bruno@clisp.org>
10173
10174         * modules/javaversion (Makefile.am): Remove DEFS setting.
10175         (Depends-on): Add configmake, for PKGDATADIR definition.
10176
10177 2006-09-17  Bruno Haible  <bruno@clisp.org>
10178
10179         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10180
10181 2006-09-17  Bruno Haible  <bruno@clisp.org>
10182
10183         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10184         (func_modules_transitive_closure, func_modules_add_dummy,
10185         func_modules_to_filelist, func_import, func_create_testdir,
10186         func_create_megatestdir, ...): Use it wherever possible.
10187         Suggested by Ralf Wildenhues.
10188
10189 2006-09-16  Karl Berry  <karl@gnu.org>
10190
10191         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10192         to avoid sectioning errors.
10193         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10194         [ifinfo]: blank line after @center-ed titles.
10195         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10196         Spell FSF address consistently with others.
10197         (These changes approved by rms.)
10198
10199 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10200
10201         Speed up by a factor of 1.61.
10202         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10203         already checked module names again.
10204
10205 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10206
10207         Speed up by a factor of 1.13.
10208         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10209         for new_files, and the input to func_add_or_update.
10210
10211 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10212
10213         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10214         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10215
10216 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10217
10218         * modules/mkancesdirs (Depends-on): Add fcntl.
10219         * modules/savewd: New file.
10220         * MODULES.html.sh (File system functions): Add savewd.
10221
10222         * modules/configmake (Makefile.am): Add support for the
10223         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10224
10225 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10226
10227         * m4/savewd.m4: New file.
10228
10229 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10230
10231         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10232         (dirchownmod): New arg FD.  All callers changed.
10233         Use FD rather than opening the directory ourself, as opening is
10234         now the caller's responsibility.
10235         * lib/dirchownmod.h: Likewise.
10236         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10237         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10238         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10239         (test_dir): Remove.
10240         (mkancesdirs): Return length of prefix of FILE that has already
10241         been made, or -2 if there is a child doing the work.  Redo
10242         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10243         ".", and treat ".." specially since it might stray back into
10244         already-created areas.  Use a subprocess if necessary.  New arg
10245         WD; all users changed.  MAKE_DIR function should now return 1
10246         if it creates a directory that is not readable.  Return -2 if
10247         a child process is spun off.
10248         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10249         Adjust signature to match code.
10250         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10251         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10252         all users changed.
10253         * lib/savewd.c, lib/savewd.h: New files.
10254
10255 2006-09-15  Jim Meyering  <jim@meyering.net>
10256
10257         * modules/rename-dest-slash: New module.
10258         * MODULES.html.sh (posix_compat): Add it here.
10259
10260         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10261
10262 2006-09-15  Jim Meyering  <jim@meyering.net>
10263
10264         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10265         file.
10266
10267         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10268
10269 2006-09-15  Jim Meyering  <jim@meyering.net>
10270
10271         * lib/rename-dest-slash.c (has_trailing_slash): Use
10272         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10273         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10274         test before testing whether SRC is a directory.
10275         Suggestions from Bruno Haible.
10276
10277         Avoid a warning about an unused variable.
10278         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10279         into the #ifdef block where it's used.
10280
10281         * lib/rename-dest-slash.c: New file.
10282
10283 2006-09-14  Bruno Haible  <bruno@clisp.org>
10284
10285         * lib/allocsa.c: Include <config.h> unconditionally.
10286         * lib/asnprintf.c: Likewise.
10287         * lib/asprintf.c: Likewise.
10288         * lib/c-strcasecmp.c: Likewise.
10289         * lib/c-strcasestr.c: Likewise.
10290         * lib/c-strncasecmp.c: Likewise.
10291         * lib/c-strstr.c: Likewise.
10292         * lib/classpath.c: Likewise.
10293         * lib/clean-temp.c: Likewise.
10294         * lib/concatpath.c: Likewise.
10295         * lib/copy-file.c: Likewise.
10296         * lib/csharpcomp.c: Likewise.
10297         * lib/csharpexec.c: Likewise.
10298         * lib/execute.c: Likewise.
10299         * lib/fatal-signal.c: Likewise.
10300         * lib/findprog.c: Likewise.
10301         * lib/fwriteerror.c: Likewise.
10302         * lib/gl_array_list.c: Likewise.
10303         * lib/gl_array_oset.c: Likewise.
10304         * lib/gl_avltree_list.c: Likewise.
10305         * lib/gl_avltree_oset.c: Likewise.
10306         * lib/gl_avltreehash_list.c: Likewise.
10307         * lib/gl_carray_list.c: Likewise.
10308         * lib/gl_linked_list.c: Likewise.
10309         * lib/gl_linkedhash_list.c: Likewise.
10310         * lib/gl_list.c: Likewise.
10311         * lib/gl_oset.c: Likewise.
10312         * lib/gl_rbtree_list.c: Likewise.
10313         * lib/gl_rbtree_oset.c: Likewise.
10314         * lib/gl_rbtreehash_list.c: Likewise.
10315         * lib/imaxabs.c: Likewise.
10316         * lib/imaxdiv.c: Likewise.
10317         * lib/javacomp.c: Likewise.
10318         * lib/javaexec.c: Likewise.
10319         * lib/javaversion.c: Likewise.
10320         * lib/linebreak.c: Likewise.
10321         * lib/localcharset.c: Likewise.
10322         * lib/lock.c: Likewise.
10323         * lib/mbchar.c: Likewise.
10324         * lib/mbswidth.c: Likewise.
10325         * lib/mkdtemp.c: Likewise.
10326         * lib/pipe.c: Likewise.
10327         * lib/printf-args.c: Likewise.
10328         * lib/printf-parse.c: Likewise.
10329         * lib/progname.c: Likewise.
10330         * lib/progreloc.c: Likewise.
10331         * lib/readlink.c: Likewise.
10332         * lib/sh-quote.c: Likewise.
10333         * lib/stpcpy.c: Likewise.
10334         * lib/stpncpy.c: Likewise.
10335         * lib/strcasecmp.c: Likewise.
10336         * lib/strcasestr.c: Likewise.
10337         * lib/strcspn.c: Likewise.
10338         * lib/striconv.c: Likewise.
10339         * lib/strncasecmp.c: Likewise.
10340         * lib/strnlen1.c: Likewise.
10341         * lib/strstr.c: Likewise.
10342         * lib/strtok_r.c: Likewise.
10343         * lib/tls.c: Likewise.
10344         * lib/tmpdir.c: Likewise.
10345         * lib/unicodeio.c: Likewise.
10346         * lib/unsetenv.c: Likewise.
10347         * lib/vasnprintf.c: Likewise.
10348         * lib/vasprintf.c: Likewise.
10349         * lib/wait-process.c: Likewise.
10350         * lib/xallocsa.c: Likewise.
10351         * lib/xsetenv.c: Likewise.
10352         * lib/xstriconv.c: Likewise.
10353
10354 2006-09-13  Simon Josefsson  <jas@extundo.com>
10355
10356         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
10357         that internally, suggested by Ralf Wildenhues
10358         <Ralf.Wildenhues@gmx.de>.
10359
10360 2006-09-13  Simon Josefsson  <jas@extundo.com>
10361
10362         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
10363         @LIBOBJS@.
10364         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10365
10366 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
10367
10368         * lib/_fpending.c: Include <config.h> unconditionally, since we no
10369         longer worry about uses that don't define HAVE_CONFIG_H.
10370         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
10371         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
10372         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
10373         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
10374         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
10375         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
10376         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
10377         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
10378         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
10379         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
10380         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
10381         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
10382         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
10383         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
10384         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
10385         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
10386         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
10387         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
10388         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
10389         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
10390         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
10391         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
10392         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
10393         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
10394         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
10395         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
10396         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
10397         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
10398         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
10399         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
10400         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
10401         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
10402         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
10403         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
10404         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
10405         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
10406         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
10407         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
10408         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
10409         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
10410         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
10411         Likewise.
10412
10413 2006-09-13  Eric Blake  <ebb9@byu.net>
10414
10415         * lib/getopt.c: Fix typo in last commit.
10416
10417 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10418
10419         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
10420         dgettext.
10421
10422 2006-09-12  Jim Meyering  <jim@meyering.net>
10423
10424         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
10425         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
10426         Reported by Nelson H. F. Beebe.
10427
10428 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10429
10430         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
10431         program_invocation_name and program_invocation_short_name are
10432         initialized.
10433         * lib/argp-namefrob.h: Move declarations of program_invocation_name
10434         and program_invocation_short_name to argp.h, so they are visible
10435         to user programs.
10436         * lib/argp.h: Likewise
10437
10438 2006-09-10  Bruno Haible  <bruno@clisp.org>
10439
10440         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10441         m4/inttypes_h.m4, m4/uintmax_t.m4.
10442
10443 2006-09-10  Bruno Haible  <bruno@clisp.org>
10444
10445         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
10446         gl_AC_TYPE_UINTMAX_T.
10447
10448 2006-09-10  Bruno Haible  <bruno@clisp.org>
10449
10450         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
10451
10452 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10453
10454         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
10455         convention.  Text proposed by Bruno Haible.
10456         (struct argp_option): Document the use of N_() wrappers.
10457
10458         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
10459         '\v', and translate the two parts separately, instead of feeding
10460         the whole string to gettext.  This allows to exclude
10461         '\v' from the strings visible to the translator by writing doc
10462         strings as N_("..") "\v" N_("..").
10463
10464 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
10465
10466         * config/srclist.txt: Undo latest change; the bug was fixed.
10467
10468 2006-09-09  Bruno Haible  <bruno@clisp.org>
10469
10470         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
10471         assignments if building a library without libtool.
10472         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
10473         in func_emit_lib_Makefile_am.
10474         (func_import): When building a static library libfoo.a, arrange to
10475         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
10476         (func_create_testdir): Likewise.
10477         * modules/gc (configure.ac, Makefile.am): If building statically,
10478         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
10479         * modules/iconvme (configure.ac, Makefile.am): Likewise.
10480         * modules/striconv (configure.ac, Makefile.am): Likewise.
10481         Based on a suggestion by Ralf Wildenhues.
10482
10483 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10484
10485         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
10486         Check for unistd.h too, since Autoconf doesn't assume POSIX.
10487         Also:
10488
10489         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10490         Add year_2050_test to catch glibc bug 2821
10491         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10492
10493         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10494         Prefer #ifdef to #if.
10495
10496         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
10497         Return from 'main' instead of calling 'exit'.
10498
10499 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10500
10501         * lib/mktime.c (guess_time_tm): Fix bug where mktime
10502         returned the maximum time_t value rather than (time_t) -1.
10503         Problem originally reported by William Bardwell
10504         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10505
10506         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10507         Moved to here ...
10508         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10509         ... from here.
10510
10511 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10512
10513         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
10514         2821 is fixed.
10515
10516 2006-09-08  Jim Meyering  <jim@meyering.net>
10517
10518         Don't make generated files read-only.  That would bother too many
10519         people.  However, do retain the ability to work when targets are
10520         read-only: remove the destination and temporary files before writing
10521         them (when generated via sed or echo), or by using the -f option for
10522         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
10523         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10524         * modules/byteswap, modules/configmake, modules/fcntl:
10525         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10526         * modules/localcharset, modules/netinet_in, modules/poll:
10527         * modules/stdbool, modules/stdint, modules/sys_select:
10528         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10529
10530 2006-09-08  Jim Meyering  <jim@meyering.net>
10531
10532         Avoid new build failure on FreeBSD 6.0.
10533         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
10534         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
10535         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
10536
10537 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10538
10539         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
10540
10541 2006-09-07  Jim Meyering  <jim@meyering.net>
10542
10543         Fix global typo in last change: use chmod u-w, not chmod u-x.
10544         Spotted by Paul Eggert and Bruce Korb.
10545         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10546         * modules/byteswap, modules/configmake, modules/fcntl:
10547         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10548         * modules/localcharset, modules/netinet_in, modules/poll:
10549         * modules/stdbool, modules/stdint, modules/sys_select:
10550         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10551
10552 2006-09-06  Jim Meyering  <jim@meyering.net>
10553
10554         Make generated files be read-only.
10555         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
10556         Ensure that each generated file is now read-only.
10557         * modules/argz: Likewise.
10558         * modules/arpa_inet: Likewise.
10559         * modules/byteswap: Likewise.
10560         * modules/configmake: Likewise.
10561         * modules/fcntl: Likewise.
10562         * modules/fnmatch: Likewise.
10563         * modules/getopt: Likewise.
10564         * modules/glob: Likewise.
10565         * modules/inttypes: Likewise.
10566         * modules/netinet_in: Likewise.
10567         * modules/poll: Likewise.
10568         * modules/stdbool: Likewise.
10569         * modules/stdint: Likewise.
10570         * modules/sys_select: Likewise.
10571         * modules/sys_socket: Likewise.
10572         * modules/sys_stat: Likewise.
10573         * modules/sysexits: Likewise.
10574         * modules/localcharset: Same as above, but continue using temporary
10575         file named "t-$@" (why different?) rather than the "$@-t" used
10576         everywhere else.
10577
10578         * modules/sysexits (Makefile.am): Replace literal occurrences
10579         of "sysexit.h" more readable, and more consistent, "$@".
10580
10581 2006-09-06  Bruno Haible  <bruno@clisp.org>
10582
10583         * modules/striconv: New file.
10584         * modules/xstriconv: New file.
10585         * MODULES.html.sh (Internationalization functions): Add striconv,
10586         xstriconv.
10587
10588 2006-09-06  Bruno Haible  <bruno@clisp.org>
10589
10590         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
10591         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
10592         not using libtool correctly.
10593
10594 2006-09-06  Bruno Haible  <bruno@clisp.org>
10595
10596         * lib/striconv.h: New file.
10597         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
10598         iconvstring.c.
10599         * lib/xstriconv.h: New file.
10600         * lib/xstriconv.c: New file.
10601
10602 2006-09-06  Bruno Haible  <bruno@clisp.org>
10603
10604         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
10605         lib_..._LDFLAGS.
10606
10607 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10608
10609         * lib/argz_.h: Sync from Libtool.
10610
10611         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
10612                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10613
10614         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
10615
10616 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10617
10618         * modules/trim: New file.
10619
10620 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10621
10622         * lib/trim.h: New file.
10623         * lib/trim.c: New file.
10624
10625 2006-09-05  Bruno Haible  <bruno@clisp.org>
10626
10627         * MODULES.html.sh (String handling): Add trim.
10628
10629 2006-09-04  Karl Berry  <karl@gnu.org>
10630
10631         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
10632         until next release.
10633
10634 2006-09-03  Bruno Haible  <bruno@clisp.org>
10635
10636         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
10637         correctly.
10638
10639 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10640
10641         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
10642         not gl_GETLOADAVG.  Omit unneeded semicolons.
10643         Problems reported by Ralf Wildenhues in
10644         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10645         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
10646         at the end, which is the usual gnulib style.
10647
10648         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
10649         of doing all the work ourselves.
10650         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
10651         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
10652
10653 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10654
10655         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
10656         Problem reported by Ralf Wildenhues in
10657         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10658
10659         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
10660         HAVE_STRUCT_STATFS_F_FSTYPENAME.
10661
10662 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10663
10664         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
10665         yesterday's patch by changing test -n to test -z.
10666
10667 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10668
10669         * modules/getloadavg (Files): Add m4/getloadavg.m4.
10670         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
10671         the former is now obsolescent.
10672
10673         * modules/chdir-long (Depends-on): Add fcntl.
10674
10675 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10676
10677         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
10678         obsolescent, and programs should use gnulib instead.
10679         * m4/getloadavg.m4: New file, with contents taken from Autoconf
10680         but with prefixes changed.
10681
10682 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10683
10684         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
10685         or stdbool.h, because they might not exist while configuring.
10686
10687         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
10688         Don't include unistd.h or limits.h; not needed, since chdir-long.h
10689         does that for us.
10690         (O_DIRECTORY): Remove.
10691
10692 2006-08-31  Eric Blake  <ebb9@byu.net>
10693
10694         * gnulib-tool: Don't let emacs change spaces to TAB.
10695
10696 2006-08-31  Bruno Haible  <bruno@clisp.org>
10697
10698         * gnulib-tool: When calling func_import more than once, do it in a
10699         subshell.
10700         Reported by Eric Blake <ebb9@byu.net>.
10701
10702 2006-08-31  Bruno Haible  <bruno@clisp.org>
10703
10704         * gnulib-tool (nl): Remove variable.
10705         (sed_transform_lib_file): Use more robust test for config-h module.
10706         (func_import): Fix typo in 2006-08-25 patch.
10707
10708 2006-08-31  Bruno Haible  <bruno@clisp.org>
10709
10710         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
10711         specified, augment Makefile.am variables instead of assigning them.
10712
10713 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10714
10715         Work around a bug in both the Linux and SunOS 64-bit kernels:
10716         nanosleep mishandles sleeps for longer than 2**31 seconds.
10717         Problem reported by Frank v Waveren in
10718         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10719         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
10720         Check for nanosleep bug.
10721         (LIB_NANOSLEEP): Append clock_gettime library if needed.
10722
10723 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10724
10725         Work around a bug in both the Linux and SunOS 64-bit kernels:
10726         nanosleep mishandles sleeps for longer than 2**31 seconds.
10727         Problem reported by Frank v Waveren in
10728         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10729         * lib/nanosleep.c (BILLION): New constant.
10730         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
10731         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
10732         implementation.
10733
10734 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10735
10736         * modules/nanosleep (Depends-on): Add gettime.
10737
10738 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10739         and Simon Josefsson  <jas@extundo.com>
10740         and Oskar Liljeblad  <oskar@osk.mine.nu>
10741
10742         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
10743         * gnulib-tool (func_import): New license type 'unmodifiable license
10744         text'.
10745         * modules/fdl: Use it.  Longer description.
10746         * module/gpl, module/lgpl: New files.
10747
10748 2006-08-30  Jim Meyering  <jim@meyering.net>
10749
10750         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
10751         shadowing the parameter.
10752
10753 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10754
10755         Sync from Libtool:
10756
10757         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10758
10759         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
10760         sharing with gnulib.  Report by Eric Blake.
10761
10762 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10763
10764         * modules/isapipe: New file.
10765         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
10766
10767 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10768
10769         * modules/configmake (Makefile.am): Add a comment, and omit
10770         the CONFIGMAKE_ prefix from generated macro names.  Suggested
10771         by Bruno Haible.
10772
10773 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10774
10775         * m4/isapipe.m4: New file.
10776
10777 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10778
10779         * lib/isapipe.c, lib/isapipe.h: New files.
10780
10781 2006-08-29  Jim Meyering  <jim@meyering.net>
10782
10783         * modules/configmake (Makefile.am): Make configmake.h depend on
10784         Makefile.  Otherwise, a stale configmake.h could hang around.
10785
10786 2006-08-29  Eric Blake  <ebb9@byu.net>
10787
10788         * lib/error.c (error_at_line, print_errno_message): Match libc, after
10789         resolution of upstream bug 3044.
10790
10791 2006-08-29  Bruno Haible  <bruno@clisp.org>
10792
10793         * modules/localcharset (Depends-on): Add configmake.
10794         (Makefile.am): Remove setting of LIBDIR through DEFS.
10795
10796 2006-08-29  Bruno Haible  <bruno@clisp.org>
10797
10798         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
10799         defined.
10800
10801 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10802
10803         * modules/fcntl: New file.
10804         * modules/chdir-safer (Depends-on): Add fcntl.
10805         * modules/fts: Likewise.
10806         * modules/mkdir-p: Likewise.
10807
10808         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
10809         This undoes the most recent change, since we're now addressing the
10810         problem in a different way.
10811
10812         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
10813         into output, since the output might be called Makefile.am even
10814         if $makefile_name is something different.
10815         (func_import): Use $makefile_am rather than
10816         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
10817         empty.
10818
10819         * modules/inttypes (Files): Add m4/inttypes-h.m4.
10820
10821 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10822
10823         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
10824         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
10825         recent change to stdint.m4, since we're now addressing the problem in a
10826         different way.
10827
10828 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10829
10830         * m4/fcntl_h.m4: New file.
10831
10832 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10833
10834         * lib/fcntl_.h: New file.
10835         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
10836         the fcntl module.
10837         * lib/dirchownmod.c: Likewise.
10838         * lib/fts.c: Likewise.
10839
10840         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
10841         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
10842         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
10843         just before including <inttypes.h>, to avoid circular inclusion.
10844
10845 2006-08-28  Jim Meyering  <jim@meyering.net>
10846
10847         * doc/visibility.texi: Actually read and correct the grammar of the
10848         sentence affected by yesterday's change.
10849
10850 2006-08-28  Eric Blake  <ebb9@byu.net>
10851
10852         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
10853         needs wrapper.
10854
10855 2006-08-28  Eric Blake  <ebb9@byu.net>
10856
10857         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
10858
10859 2006-08-28  Eric Blake  <ebb9@byu.net>
10860
10861         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
10862
10863 2006-08-28  Bruno Haible  <bruno@clisp.org>
10864
10865         * modules/c-strstr: New file, from GNU gettext.
10866         * MODULES.html.sh (String handling): Add c-strstr.
10867
10868 2006-08-28  Bruno Haible  <bruno@clisp.org>
10869
10870         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
10871         macros.
10872         Reported by Eric Blake.
10873
10874 2006-08-28  Bruno Haible  <bruno@clisp.org>
10875
10876         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
10877         (VASNPRINTF): Return a string of length > INT_MAX without failing.
10878         * lib/vasprintf.c: Include errno.h, limits.h.
10879         (EOVERFLOW): New fallback definition.
10880         (vasprintf): Test here whether the string length is > INT_MAX.
10881         * lib/vsnprintf.c: Include errno.h, limits.h.
10882         (EOVERFLOW): New fallback definition.
10883         (vsnprintf): Fix bug when generated string was too long for the buffer.
10884         Test here whether the string length is > INT_MAX.
10885
10886 2006-08-28  Bruno Haible  <bruno@clisp.org>
10887
10888         * lib/inttypes_.h (SCNX*): Remove definitions.
10889         Reported by Eric Blake.
10890
10891 2006-08-28  Bruno Haible  <bruno@clisp.org>
10892
10893         * lib/c-strstr.h: New file, from GNU gettext.
10894         * lib/c-strstr.c: New file, from GNU gettext.
10895
10896 2006-08-28  Bruno Haible  <bruno@clisp.org>
10897
10898         * gnulib-tool: Reorder some statements.
10899
10900 2006-08-28  Bruno Haible  <bruno@clisp.org>
10901
10902         * gnulib-tool: New option --makefile-name.
10903         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
10904         $makefile_name.
10905         (func_import): Write $makefile_name to the cache file, and read it from
10906         there unless explicitly specified. Use $makefile_name as file name
10907         instead of Makefile.am. Adjust the recommendations accordingly.
10908
10909 2006-08-28  Bruno Haible  <bruno@clisp.org>
10910
10911         * gnulib-tool (func_verify_module): Check against misapplying patch.
10912
10913 2006-08-28  Bruno Haible  <bruno@clisp.org>
10914
10915         * gnulib-tool (func_relativize, func_relconcat): New functions.
10916         Give an error if --local-dir is given with --update.
10917         Remove trailing slashes from $local_gnulib_dir.
10918         (func_import): Store the relativized $local_gnulib_dir in
10919         gnulib-cache.m4, and read it from there if not specified explicitly.
10920
10921 2006-08-28  Bruno Haible  <bruno@clisp.org>
10922
10923         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
10924         is the current directory. Respect also $local_gnulib_dir.
10925
10926 2006-08-28  Bruno Haible  <bruno@clisp.org>
10927             Simon Josefsson  <jas@extundo.com>
10928
10929         BeOS portability.
10930         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
10931
10932 2006-08-27  Jim Meyering  <jim@meyering.net>
10933
10934         * doc/visibility.texi: Remove duplicate word: "pointer".
10935
10936 2006-08-26  Bruno Haible  <bruno@clisp.org>
10937
10938         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
10939         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
10940         (Makefile.am): Create inttypes.h from inttypes_.h.
10941         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
10942
10943         * modules/imaxabs: New file.
10944
10945         * modules/imaxdiv: New file.
10946
10947 2006-08-26  Bruno Haible  <bruno@clisp.org>
10948
10949         * m4/inttypes.m4: New file.
10950         * m4/_inttypes_h.m4: Remove file.
10951         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
10952         PRI_MACROS_BROKEN.
10953         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
10954
10955         * m4/imaxabs.m4: New file.
10956
10957         * m4/imaxdiv.m4: New file.
10958
10959 2006-08-26  Bruno Haible  <bruno@clisp.org>
10960
10961         * lib/inttypes_.h: New file.
10962         * lib/inttypes.h: Remove file.
10963         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
10964
10965         * lib/imaxabs.c: New file.
10966
10967         * lib/imaxdiv.c: New file.
10968
10969 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10970
10971         New config-h module, so that "make" output needn't be cluttered
10972         by -DHAVE_CONFIG_H.
10973         * MODULES.html.sh (Support for building libraries and executables):
10974         Add config-h.
10975         * modules/config-h: New file.
10976         * gnulib-tool (nl, sed_transform_lib_file): New vars.
10977         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
10978         the config-h module is used.
10979
10980         New configmake module, so that "make" output needn't be cluttered
10981         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
10982         * MODULES.html.sh (Support for building libraries and executables):
10983         Add configmake.
10984         * modules/configmake: New file.
10985
10986 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10987
10988         * m4/config-h.m4: New file.
10989
10990 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10991
10992         * config/srclist.txt: Add elisp-comp.
10993
10994 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10995
10996         * MODULES.html.sh (Support for building libraries and executables):
10997         Add elisp-comp.
10998         * build-aux/elisp-comp: New file.
10999         * modules/elisp-comp: New file.
11000
11001 2006-08-24  Bruno Haible  <bruno@clisp.org>
11002
11003         * gnulib-tool (func_create_testdir): Use non-default values of
11004         sourcebase and m4base.
11005
11006 2006-08-24  Bruno Haible  <bruno@clisp.org>
11007
11008         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11009         HTML structure.
11010
11011 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11012
11013         * modules/openat (Depends-on): Add lchown.
11014
11015 2006-08-23  Bruno Haible  <bruno@clisp.org>
11016
11017         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11018         of gl_LOCK_EARLY instead of gl_LOCK.
11019
11020 2006-08-23  Bruno Haible  <bruno@clisp.org>
11021
11022         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11023         on OSF/1 to no.
11024         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11025
11026 2006-08-23  Bruno Haible  <bruno@clisp.org>
11027
11028         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11029         as unusable.
11030
11031         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11032         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11033         (gl_LOCK): New macro.
11034
11035 2006-08-22  Simon Josefsson  <jas@extundo.com>
11036
11037         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11038         to md5 module.
11039
11040 2006-08-22  Simon Josefsson  <jas@extundo.com>
11041
11042         * MODULES.html.sh: Add "Support for maintaining and release
11043         projects".
11044
11045         * build-aux/gnupload: New file, from coreutils.
11046
11047 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11048
11049         Avoid the need for AC_LIBSOURCES in m4 macros.
11050         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11051         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11052         * modules/check-version (EXTRA_DIST): Add check-version.h.
11053         * modules/crc (EXTRA_DIST): Add crc.h.
11054         * modules/des (EXTRA_DIST): Add des.h.
11055         * modules/gc (EXTRA_DIST): Add gc.h.
11056         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11057         * modules/getline (EXTRA_DIST): Add getline.h.
11058         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11059         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11060         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11061         * modules/md2 (EXTRA_DIST): Add md2.h.
11062         * modules/md4 (EXTRA_DIST): Add md4.h.
11063         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11064         * modules/read-file (EXTRA_DIST): Add read-file.h.
11065         * modules/readline (EXTRA_DIST): Add readline.h.
11066         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11067         rijndael-api-fst.h.
11068
11069 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11070
11071         * m4/rijndael.m4 (gl_ARCFOUR):
11072         * m4/arctwo.m4 (gl_ARCTWO):
11073         * m4/check-version.m4 (gl_CHECK_VERSION):
11074         * m4/crc.m4 (gl_CRC):
11075         * m4/des.m4 (gl_DES):
11076         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11077         * m4/gc.m4 (gl_GC):
11078         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11079         * m4/getline.m4 (gl_FUNC_GETLINE):
11080         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11081         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11082         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11083         * m4/md2.m4 (gl_MD2):
11084         * m4/md4.m4 (gl_MD4):
11085         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11086         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11087         * m4/readline.m4 (gl_FUNC_READLINE):
11088         * m4/rijndael.m4 (gl_RIJNDAEL):
11089         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11090         to get the necessary .h files and whatnot.
11091
11092 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11093
11094         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11095         gnulib rather than the other way around.
11096         * config/srclistvars.sh (COREUTILS): Remove.
11097
11098 2006-08-22  Jim Meyering  <jim@meyering.net>
11099
11100         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11101
11102         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11103
11104 2006-08-22  Eric Blake  <ebb9@byu.net>
11105
11106         * modules/regexprops-generic: New file.
11107         * MODULES.html.sh (Support for building documentation): List it.
11108
11109 2006-08-22  Eric Blake  <ebb9@byu.net>
11110
11111         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11112         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11113         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11114         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11115
11116 2006-08-22  Bruno Haible  <bruno@clisp.org>
11117
11118         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11119         and lib_LTLIBRARIES like the other lib_* variables.
11120
11121 2006-08-22  Bruno Haible  <bruno@clisp.org>
11122
11123         * build-aux/x-to-1.in: New file, from GNU gettext.
11124
11125 2006-08-22  Bruno Haible  <bruno@clisp.org>
11126
11127         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11128         <utmpx.h> exists.
11129
11130 2006-08-22  Bruno Haible  <bruno@clisp.org>
11131
11132         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11133         <utmpx.h> exists.
11134
11135 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11136
11137         BeOS portability.
11138         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11139         exist.
11140         Problem reported by Bruno Haible.
11141
11142 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11143
11144         Avoid the need for AC_LIBSOURCES in m4 macros.
11145         * modules/acl (EXTRA_DIST): Add acl.h.
11146         * modules/argmatch (Files): Add m4/argmatch.m4.
11147         (configure.ac): Add gl_ARGMATCH.
11148         (EXTRA_DIST): Renamed from lib_SOURCES, for
11149         consistency with the other modules.  Remove argmatch.c.
11150         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11151         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11152         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11153         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11154         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11155         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11156         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11157         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11158         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11159         * modules/closeout (EXTRA_DIST): Add closeout.h.
11160         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11161         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11162         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11163         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11164         dirname.h; remove basename.c and stripslash.c.
11165         * modules/exclude (EXTRA_DIST): Add exclude.h.
11166         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11167         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11168         * modules/file-type (EXTRA_DIST): Add file-type.h.
11169         * modules/filemode (EXTRA_DIST): Add filemode.h.
11170         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11171         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11172         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11173         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11174         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11175         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11176         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11177         * modules/getdate (EXTRA_DIST): Add getdate.c.
11178         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11179         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11180         * modules/getpass (EXTRA_DIST): Add getpass.h.
11181         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11182         * modules/group-member (EXTRA_DIST): Add group-member.h.
11183         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11184         * modules/hash (EXTRA_DIST): Add hash.h.
11185         * modules/human (EXTRA_DIST): Add human.h.
11186         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11187         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11188         * modules/lchown (EXTRA_DIST): Add lchown.h.
11189         * modules/long-options (EXTRA_DIST): Add long-options.h.
11190         * modules/lstat (EXTRA_DIST): Add lstat.h.
11191         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11192         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11193         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11194         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11195         * modules/memxor (EXTRA_DIST): Add memxor.h.
11196         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11197         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11198         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11199         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11200         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11201         * modules/physmem (EXTRA_DIST): Add physmem.h.
11202         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11203         * modules/posixver (EXTRA_DIST): Add posixver.h.
11204         * modules/quote (EXTRA_DIST): Add quote.h.
11205         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11206         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11207         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11208         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11209         regex_internal.h regexec.c.
11210         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11211         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11212         * modules/same (EXTRA_DIST): Add same.h.
11213         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11214         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11215         * modules/savedir (EXTRA_DIST): Add savedir.h.
11216         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11217         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11218         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11219         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11220         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11221         * modules/strdup (EXTRA_DIST): Add strdup.h.
11222         * modules/strftime (EXTRA_DIST): Add strftime.h.
11223         * modules/strndup (EXTRA_DIST): Add strndup.h.
11224         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11225         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11226         * modules/time_r (EXTRA_DIST): Add time_r.h.
11227         * modules/timespec (EXTRA_DIST): Add timespec.h.
11228         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11229         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11230         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11231         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11232         * modules/userspec (EXTRA_DIST): Add userspec.h.
11233         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11234         * modules/utimens (EXTRA_DIST): Add utimens.h.
11235         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11236         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11237         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11238         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11239         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11240         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11241         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11242         * modules/yesno (EXTRA_DIST): Add yesno.h.
11243
11244 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11245
11246         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11247
11248         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11249         * m4/dev-ino.m4, same-inode.m4: Remove.
11250
11251         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11252         * m4/acl.m4 (AC_FUNC_ACL):
11253         * m4/backupfile.m4 (gl_BACKUPFILE):
11254         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11255         * m4/canon-host.m4 (gl_CANON_HOST):
11256         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11257         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11258         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11259         * m4/cloexec.m4 (gl_CLOEXEC):
11260         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11261         * m4/closeout.m4 (gl_CLOSEOUT):
11262         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11263         * m4/dirname.m4 (gl_DIRNAME):
11264         * m4/exclude.m4 (gl_EXCLUDE):
11265         * m4/exitfail.m4 (gl_EXITFAIL):
11266         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11267         * m4/file-type.m4 (gl_FILE_TYPE):
11268         * m4/filemode.m4 (gl_FILEMODE):
11269         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11270         * m4/fpending.m4 (gl_FUNC_FPENDING):
11271         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11272         * m4/fts.m4 (gl_FUNC_FTS):
11273         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11274         * m4/getdate.m4 (gl_GETDATE):
11275         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11276         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11277         * m4/getpass.m4 (gl_FUNC_GETPASS):
11278         * m4/gettime.m4 (gl_GETTIME):
11279         * m4/getugroups.m4 (gl_GETUGROUPS):
11280         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11281         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11282         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11283         * m4/hash.m4 (gl_HASH):
11284         * m4/idcache.m4 (gl_IDCACHE):
11285         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
11286         * m4/lchown.m4 (gl_FUNC_LCHOWN):
11287         * m4/long-options.m4 (gl_LONG_OPTIONS):
11288         * m4/lstat.m4 (gl_FUNC_LSTAT):
11289         * m4/md5.m4 (gl_MD5):
11290         * m4/memcasecmp.m4 (gl_MEMCASECMP):
11291         * m4/memcoll.m4 (gl_MEMCOLL):
11292         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
11293         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
11294         * m4/memxor.m4 (gl_MEMXOR):
11295         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
11296         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
11297         * m4/modechange.m4 (gl_MODECHANGE):
11298         * m4/mountlist.m4 (gl_MOUNTLIST):
11299         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
11300         * m4/openat.m4 (gl_FUNC_OPENAT):
11301         * m4/pathmax.m4 (gl_PATHMAX):
11302         * m4/physmem.m4 (gl_PHYSMEM):
11303         * m4/posixtm.m4 (gl_POSIXTM):
11304         * m4/posixver.m4 (gl_POSIXVER):
11305         * m4/quote.m4 (gl_QUOTE):
11306         * m4/quotearg.m4 (gl_QUOTEARG):
11307         * m4/readtokens.m4 (gl_READTOKENS):
11308         * m4/readutmp.m4 (gl_READUTMP):
11309         * m4/regex.m4 (gl_REGEX):
11310         * m4/safe-read.m4 (gl_SAFE_READ):
11311         * m4/safe-write.m4 (gl_SAFE_WRITE):
11312         * m4/same.m4 (gl_SAME):
11313         * m4/save-cwd.m4 (gl_SAVE_CWD):
11314         * m4/savedir.m4 (gl_SAVEDIR):
11315         * m4/settime.m4 (gl_SETTIME):
11316         * m4/sha1.m4 (gl_SHA1):
11317         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
11318         * m4/stat-macros.m4 (gl_STAT_MACROS):
11319         * m4/stat-time.m4 (gl_STAT_TIME):
11320         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
11321         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
11322         * m4/strdup.m4 (gl_FUNC_STRDUP):
11323         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
11324         * m4/strndup.m4 (gl_FUNC_STRNDUP):
11325         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
11326         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
11327         * m4/time_r.m4 (gl_TIME_R):
11328         * m4/timespec.m4 (gl_TIMESPEC):
11329         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
11330         * m4/unlinkdir.m4 (gl_UNLINKDIR):
11331         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
11332         * m4/userspec.m4 (gl_USERSPEC):
11333         * m4/utimecmp.m4 (gl_UTIMECMP):
11334         * m4/utimens.m4 (gl_UTIMENS):
11335         * m4/xalloc.m4 (gl_XALLOC):
11336         * m4/xgetcwd.m4 (gl_XGETCWD):
11337         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
11338         * m4/xreadlink.m4 (gl_XREADLINK):
11339         * m4/xstrtod.m4 (gl_XSTRTOD):
11340         * m4/yesno.m4 (gl_YESNO):
11341         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11342         to get the necessary .h files and whatnot.
11343
11344 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
11345             Bruno Haible  <bruno@clisp.org>
11346
11347         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
11348         /bin/sh understanding of '!' conditional negation.
11349
11350 2006-08-21  Jim Meyering  <jim@meyering.net>
11351
11352         * modules/openat (Depends-on): Really alphabetize.
11353
11354         * modules/acl (Depends-on): Add error and quote.
11355
11356         * check-module (find_included_lib_files): Add at-func.c to the
11357         ok-to-include-more-than-once white list.
11358
11359         * modules/openat (Depends-on): Add lstat.  Alphabetize.
11360
11361 2006-08-21  Bruno Haible  <bruno@clisp.org>
11362
11363         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11364         Emit a pkgdata_DATA variable only if some snippets add contents to it.
11365         Reported by Martin Lambers <marlam@marlam.de>.
11366
11367 2006-08-21  Bruno Haible  <bruno@clisp.org>
11368
11369         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
11370         specify an installation location, don't emit a noinst_LIBRARIES or
11371         noinst_LTLIBRARIES assignment.
11372
11373 2006-08-21  Bruno Haible  <bruno@clisp.org>
11374
11375         BeOS portability.
11376         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
11377         BeOS has mbrtowc() but no <wctype.h>.
11378
11379 2006-08-21  Bruno Haible  <bruno@clisp.org>
11380
11381         BeOS portability.
11382         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
11383         exist.
11384
11385 2006-08-21  Bruno Haible  <bruno@clisp.org>
11386
11387         BeOS portability.
11388         * lib/mbchar.h: Include <wctype.h> only if it exists.
11389
11390 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11391
11392         Remove files that are no longer needed by their respective modules.
11393         * m4/obstack.m4: Remove.
11394         * m4/strerror_r.m4: Remove.
11395         * m4/uint32_t.m4: Remove.
11396         * m4/uintptr_t.m4: Remove.
11397         * m4/ullong_max.m4: Remove.
11398         * m4/xstrtoimax.m4: Remove.
11399         * m4/xstrtoumax.m4: Remove.
11400
11401         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
11402         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
11403         dependencies now capture this.
11404
11405         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
11406         Do not use AC_LIBSOURCES, since gnulib modules now do this.
11407         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
11408         * m4/human.m4 (gl_HUMAN): Likewise.
11409         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
11410         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
11411
11412         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
11413
11414         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
11415         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
11416         stdint.
11417         * m4/human.m4 (gl_HUMAN): Likewise.
11418         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
11419         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
11420         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11421         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11422         * m4/xstrtol (gl_XSTRTOL): Likewise.
11423
11424         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
11425         AC_TYPE_LONG_LONG_INT.
11426         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11427         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
11428         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
11429         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11430
11431         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
11432         on stdbool.
11433
11434         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
11435         (gl_PREREQ_XSTRTOUL): Remove.
11436
11437         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
11438
11439         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
11440         mode.
11441
11442 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11443
11444         Add and change modules to make it easier for coreutils to use
11445         gnulib-tool.
11446         * modules/backupfile (Files): Remove m4/d-ino.m4.
11447         (Depends-on): Add d-ino.
11448         * modules/cycle-check (Depends-on): Add stdint.
11449         (lib_SOURCES): Add cycle-check.h.
11450         * modules/d-ino: New module.
11451         * modules/d-type: New module.
11452         * modules/error (Files): Remove m4/strerror_r.m4.
11453         * modules/filemode (Files): Add m4/st_dm_mode.m4.
11454         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11455         m4/inttypes_h.m4, m4/uintmax_t.m4.
11456         (Depends-on): Add stdint.
11457         (lib_SOURCES): Add fsusage.h.
11458         * modules/getcwd (Files): Remove d-ino.m4.
11459         (Depends-on): Add d-ino.
11460         * modules/getndelim2 (Depends-on): Add stdint.
11461         * modules/glob (Files): Remove m4/d-type.m4.
11462         (Depends-on): Add d-type.
11463         * modules/host-os: New module.
11464         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
11465         m4/inttypes_h.m4, m4/uintmax_t.m4.
11466         * Depends-on: Add stdint.
11467         (lib_SOURCES): Add human.h.
11468         * modules/inttostr (Files): Remove m4/intmax_t.m4,
11469         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
11470         m4/uintmax_t.m4, m4/ulonglong.m4.
11471         (Depends-on): Add stdint.
11472         (EXTRA_DIST): Add inttostr.h.
11473         * modules/lchmod: New module.
11474         * modules/link-follow: New module.
11475         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
11476         (Depends-on): Add lchmod.
11477         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
11478         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
11479         (Depends-on): Add stdint.
11480         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
11481         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
11482         (Depends-on): Add stdint.
11483         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
11484         * modules/perl: New module.
11485         * modules/regex (Depends-on): Add stdint.
11486         * modules/rmdir-errno: New module.
11487         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11488         m4/intmax_t.m4.
11489         (Depends-on): Add stdint.
11490         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11491         m4/uintmax_t.m4.
11492         (Depends-on): Add stdint.
11493         * modules/unlink-busy: New module.
11494         * modules/utimecmp (Depends-on): Add stdint.
11495         * modules/uptime: New module.
11496         * modules/winsz-ioctl: New module.
11497         * modules/winsz-termios: New module.
11498         * modules/xnanosleep (Depends-on): Add nanosleep.
11499         * modules/ullong_max: Remove.
11500         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
11501         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
11502         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
11503         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
11504         (Depends-on): Add inttypes.
11505         (lib_SOURCES): Add xstrtol.h.
11506         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
11507         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
11508         * MODULES.html.sh: Move 'assert' into the assert section.
11509         Move 'dummy' into the linking section.
11510         Remove ullong_max.
11511         Add section for compatibility checks for POSIX:2001 functions,
11512         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
11513         winsz-ioctl, and winsz-termios into it.
11514         Add lchmod.
11515         Add top-level Misc section and put host-os, perl, and uptime
11516         into it.
11517
11518 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11519
11520         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
11521         now assume the stdint module.  Do not include inttypes.h.
11522         * lib/fsusage.h: Likewise.
11523         * lib/getndelim2.c: Likewise.
11524         * lib/human.h: Likewise.
11525         * lib/inttostr.h: Likewise.
11526         * lib/obstack.c: Likewise.
11527         * lib/regex_internal.h: Likewise.
11528         * lib/tempname.c: Likewise.
11529         * lib/utimecmp.c: Likewise.
11530         * lib/xstrtol.h: Likewise.
11531
11532         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
11533
11534         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
11535         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
11536         * lib/xtime.h: Likewise.
11537
11538 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11539
11540         * modules/openat (Files): Add lib/fchmodat.c.
11541         Fixes problem reported by Jay Youngman.
11542
11543 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11544
11545         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
11546         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
11547
11548 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
11549             Bruno Haible  <bruno@clisp.org>
11550
11551         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
11552         and is a script that invokes bison. Tighten the code. Add comments.
11553
11554 2006-08-18  Jim Meyering  <jim@meyering.net>
11555
11556         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
11557         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
11558         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
11559         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
11560
11561 2006-08-18  Bruno Haible  <bruno@clisp.org>
11562
11563         * modules/bison-i18n: New file.
11564         * MODULES.html.sh (Internationalization functions): Add it.
11565
11566 2006-08-18  Bruno Haible  <bruno@clisp.org>
11567
11568         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
11569         sys/statvfs.h. When getmntinfo was found, check its declaration and
11570         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
11571
11572 2006-08-18  Bruno Haible  <bruno@clisp.org>
11573
11574         * m4/bison-i18n.m4: New file, from bison.
11575
11576 2006-08-18  Bruno Haible  <bruno@clisp.org>
11577
11578         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
11579         (ME_DUMMY): Treat "kernfs" as a dummy.
11580         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
11581
11582 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11583
11584         Update from coreutils.
11585
11586         2006-08-15  Jim Meyering  <jim@meyering.net>
11587
11588         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
11589
11590         2006-01-17  Jim Meyering  <jim@meyering.net>
11591
11592         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
11593
11594         2006-01-11  Jim Meyering  <jim@meyering.net>
11595
11596         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
11597         Check for the lchmod function.
11598
11599 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11600
11601         Update from coreutils.
11602
11603         * lib/__fpending.h: Add copyright notice.
11604         * lib/fprintftime.h: Likewise.
11605         * lib/savedir.c: Use (C) in copyright notice.
11606         * lib/savedir.h: Likewise.
11607
11608         2006-08-15  Jim Meyering  <jim@meyering.net>
11609
11610         * lib/at-func.c: New file, with the logic of all emulated at-functions.
11611         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
11612         in support of the EXPECTED_ERRNO macro.
11613         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
11614         definitions.  Instead, define the appropriate symbols and include
11615         "at-func.c".
11616         * lib/mkdirat.c (mkdirat): Likewise.
11617         * lib/fchmodat.c (fchmodat): Likewise.
11618         (ENOSYS): Remove definition.
11619         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
11620         it.  Don't include "unistd--.h" -- it wasn't ever used.
11621
11622         2006-01-17  Jim Meyering  <jim@meyering.net>
11623
11624         Rewrite fts.c not to change the current working directory,
11625         by using openat, fstatat, fdopendir, etc..
11626
11627         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
11628         (HAVE_OPENAT_SUPPORT): Define.
11629         [_LIBC] (fchdir): Don't undef or define; no longer used.
11630         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
11631         Now, this `function' always succeeds, and consumes its file descriptor
11632         parameter -- so callers must not close such FDs.  Update callers.
11633         (diropen_fd, opendirat, cwd_advance_fd): New functions.
11634         (diropen): Add parameter, SP.  Adjust all callers.
11635         Implement using diropen_fd, rather than open.
11636         (fts_open): Initialize new member, fts_cwd_fd.
11637         Remove fts_rft-setting code.
11638         (fts_close): Close fts_cwd_fd, if necessary.
11639         (__opendir2): Define in terms of opendir or opendirat,
11640         depending on whether the FST_NOCHDIR flag is set.
11641         (fts_build): Since fts_safe_changedir consumes its FD, and since
11642         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
11643         and close the dup'd file descriptor upon failure.
11644         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
11645         (fts_safe_changedir): Tweak semantics to reflect that this function
11646         now calls cwd_advance_fd and hence consumes its FD argument.
11647         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
11648         [struct FTS] (fts_rft): Remove now-unused member.
11649         [struct FTS] (fts_cycle.state): Improve comment.
11650
11651         * lib/openat.c (openat_needs_fchdir): New function.
11652         * lib/openat.h (openat_needs_fchdir): Declare it.
11653
11654 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11655
11656         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
11657         Problem and fix reported by Pádraig Brady in
11658         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
11659
11660 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11661
11662         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
11663
11664 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11665
11666         * lib/memcoll.c (memcoll): Optimize for the common case where the
11667         arguments are bytewise equal.
11668
11669 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11670
11671         * doc/regexprops-generic.texi: Add a copyright notice.
11672
11673 2006-08-15  Bruno Haible  <bruno@clisp.org>
11674
11675         * modules/tmpdir (License): Change to LGPL.
11676
11677 2006-08-15  Bruno Haible  <bruno@clisp.org>
11678
11679         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
11680         module.
11681
11682 2006-08-14  Simon Josefsson  <jas@extundo.com>
11683
11684         * config/srclist.txt: Add gnupload.
11685
11686 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11687
11688         Change copyright notice from LGPL 2 to GPL 2, since that's the
11689         standard form used in the gnulib repository.
11690         * tests/test-lock.c: Likewise.
11691         * tests/test-stdint.c: Likewise.
11692         * tests/test-tls.c: Likewise.
11693
11694         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
11695         prelude-manager.  User shorter URLs for GNU projects, without '?'.
11696         Add copyright notice.
11697
11698         * check-module: Add copyright notice.  Output a copyright
11699         notice if "--version" is specified.
11700         * modules/COPYING: New file.
11701         * tests/test-getaddrinfo.c: Add copyright notice.
11702         * tests/test-verify.c: Likewise.
11703
11704 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11705
11706         Change copyright notice from LGPL 2 to GPL 2, since that's the
11707         standard form used in the gnulib repository.
11708         * lib/lock.c: LGPL -> GPL.
11709         * lib/lock.h: Likewise.
11710         * lib/strnlen1.c: Likewise.
11711         * lib/strnlen1.h: Likewise.
11712         * lib/tls.c: Likewise.
11713         * lib/tls.h: Likewise.
11714         * lib/tmpdir.c: Likewise.
11715
11716         * lib/TODO: Remove; this belongs only in coreutils.
11717
11718 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11719
11720         Add copyright notices to long-enough files that lack them, since
11721         otherwise the files aren't clearly free.  Use the same notice that
11722         getdate.texi already uses.
11723         * doc/alloca-opt.texi: Add copyright notice.
11724         * doc/alloca.texi: Likewise.
11725         * doc/ctime.texi: Likewise.
11726         * doc/functions.texi: Likewise.
11727         * doc/gcd.texi: Likewise.
11728         * doc/gnulib-tool.texi: Likewise.
11729         * doc/inet_ntoa.texi: Likewise.
11730         * doc/visibility.texi: Likewise.
11731
11732         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
11733         * doc/quote.texi: Add copyright notice.
11734
11735         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
11736         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
11737         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
11738         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
11739         is now obsolete, and give a pointer to the Sun list.
11740         Add copyright notice.
11741
11742 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11743
11744         * config/srclistvars.sh: Add copyright notice.
11745
11746 2006-08-14  Eric Blake  <ebb9@byu.net>
11747
11748         Import the following change from libc:
11749
11750         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
11751
11752         Upstream bug 2997.
11753         * lib/misc/error.c: Add space between program name and message if file
11754         name is missing.
11755
11756 2006-08-12  Karl Berry  <karl@gnu.org>
11757
11758         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
11759         remove, these originate in gnulib now.
11760
11761 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11762
11763         * doc/Makefile (standards.info standards.html standards.dvi):
11764         Also depend on make-stds.texi.
11765
11766 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
11767
11768         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
11769         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
11770
11771         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
11772         in wchar_t.  Problem reported by Eric Blake.
11773
11774         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
11775         LEN is smaller than SIZE.  Suggested by Bruno Haible.
11776         Also, help the compiler to keep LEN in a register.
11777
11778 2006-08-11  Eric Blake  <ebb9@byu.net>
11779
11780         * users.txt: Sort.  Add tar.
11781
11782 2006-08-11  Bruno Haible  <bruno@clisp.org>
11783
11784         * users.txt: New file.
11785
11786 2006-08-11  Bruno Haible  <bruno@clisp.org>
11787
11788         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
11789         before <wchar.h>. Needed for OSF/1 and BSD/OS.
11790
11791 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
11792
11793         * modules/snprintf (Depends-on): Remove minmax.
11794         (Maintainer): Add self and Bruno.
11795
11796 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
11797
11798         * lib/.cppi-disable: Add snprintf.h, socket_.h.
11799         * lib/snprintf.c: Include <errno.h> and <limits.h>.
11800         (EOVERFLOW): Define if the system does not.
11801         Do not include "minmax.h"; it wasn't used.
11802         (snprintf): Don't assume size_t promotes to an unsigned type.
11803         Fix bug when generated string was too long for the buffer: the
11804         buffer's contents are supposed to be the initial prefix of the
11805         output.  Don't assume vasnprintf returns EOVERFLOW if the size
11806         exceeds INT_MAX; do the check ourselves.
11807
11808         Import the following changes from libc:
11809
11810         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
11811
11812         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
11813         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
11814         set wc to the byte which couldn't be converted.
11815         (re_string_reconstruct): Don't clear valid_raw_len before calling
11816         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
11817         tip_context using re_string_context_at.
11818
11819         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
11820
11821         * lib/posix/regex.h: g++ still cannot handled [restrict].
11822
11823         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
11824
11825         * lib/posix/regex.h: Remove special handling for VMS.
11826
11827 2006-08-10  Jim Meyering  <jim@meyering.net>
11828
11829         * modules/same-inode: New module.
11830         * modules/dev-ino: New module.
11831         * modules/cycle-check: Depend on these modules, rather than simply
11832         including their .h files.
11833         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
11834         required via m4/cycle-check.m4.
11835         * modules/same: Depend on new same-inode module, rather than
11836         including same-inode.h.
11837         * modules/chdir-safer: New file.
11838
11839         * modules/chown (Depends-on): Add stat-macros.
11840
11841 2006-08-10  Jim Meyering  <jim@meyering.net>
11842
11843         * m4/cycle-check.m4: New file.
11844         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
11845         * m4/dev-ino.m4, m4/same-inode.m4: New files.
11846
11847 2006-08-10  Eric Blake  <ebb9@byu.net>
11848
11849         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
11850         in from original proposal.
11851
11852 2006-08-10  Eric Blake  <ebb9@byu.net>
11853         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11854
11855         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
11856         namespace.
11857
11858 2006-08-10  Bruno Haible  <bruno@clisp.org>
11859
11860         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
11861         as well.
11862
11863 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11864
11865         Sync from coreutils.
11866
11867         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
11868
11869         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
11870         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
11871
11872 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11873
11874         * modules/restrict: Remove; no longer needed now that we assume
11875         Autoconf 2.59 or later.
11876         * MODULES.html.sh: Remove 'restrict'.
11877         * modules/argp (Depends-on): Remove 'restrict'.
11878         * modules/base64 (Depends-on): Likewise.
11879         * modules/gc (Depends-on): Likewise.
11880         * modules/getaddrinfo (Depends-on): Likewise.
11881         * modules/glob (Depends-on): Likewise.
11882         * modules/inet_ntop (Depends-on): Likewise.
11883         * modules/inet_pton (Depends-on): Likewise.
11884         * modules/memxor (Depends-on): Likewise.
11885         * modules/regex (Depends-on): Likewise.
11886         * modules/strtok_r (Depends-on): Likewise.
11887         * modules/time_r (Depends-on): Likewise.
11888
11889 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11890
11891         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
11892         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
11893         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
11894         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
11895         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
11896         * m4/memxor.m4 (gl_MEMXOR): Likewise.
11897         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
11898         gl_C_RESTRICT replaced by AC_C_RESTRICT.
11899
11900         Merge from coreutils.
11901         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
11902         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
11903         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
11904         * m4/time_r.m4 (gl_TIME_R): Likewise.
11905
11906 2006-08-09  Karl Berry  <karl@gnu.org>
11907
11908         * config/srclist.txt: no more gettext-tools, per Bruno.
11909
11910 2006-08-08  Eric Blake  <ebb9@byu.net>
11911
11912         * modules/verror: New module.
11913         * MODULES.html.sh: Document it.
11914
11915 2006-08-08  Eric Blake  <ebb9@byu.net>
11916
11917         * lib/verror.h, lib/verror.c: New files.
11918
11919 2006-08-08  Eric Blake  <ebb9@byu.net>
11920
11921         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
11922         verror_at_line output complies with GNU Coding Standards even when
11923         file is NULL.
11924
11925 2006-08-07  Bruno Haible  <bruno@clisp.org>
11926
11927         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
11928         versions of AIX.
11929         Reported by Ralf Wildenhues.
11930
11931 2006-08-07  Bruno Haible  <bruno@clisp.org>
11932
11933         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
11934         in an AC_DEFUN. Needed so that the autoconf snippets can use
11935         AC_REQUIRE.
11936
11937 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11938
11939         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11940         Initialize pkgdata_DATA.
11941         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
11942         overriding it.
11943
11944 2006-08-06  Eric Blake  <ebb9@byu.net>
11945
11946         * lib/error.h: Fold in some upstream changes from glibc.
11947         * lib/error.c: Likewise.
11948
11949 2006-08-04  Bruno Haible  <bruno@clisp.org>
11950
11951         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11952         Make the mostlyclean-local rule depend on mostlyclean-generic.
11953         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
11954
11955 2006-07-31  Bruno Haible  <bruno@clisp.org>
11956
11957         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
11958         <stdlib.h>, <string.h>.
11959
11960 2006-07-30  Bruno Haible  <bruno@clisp.org>
11961
11962         * modules/readlink (License): Change to LGPL.
11963
11964 2006-07-30  Bruno Haible  <bruno@clisp.org>
11965
11966         * modules/javaversion (Makefile.am): Distribute javaversion.java and
11967         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
11968         set PKGDATADIR to point to it.
11969
11970 2006-07-30  Bruno Haible  <bruno@clisp.org>
11971
11972         * modules/csharpexec (configure.ac): Comment out macro invocation.
11973         * modules/javaexec (configure.ac): Likewise.
11974         * modules/javacomp-script (configure.ac): Likewise.
11975
11976         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
11977
11978 2006-07-30  Bruno Haible  <bruno@clisp.org>
11979
11980         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
11981         linked-list.
11982
11983 2006-07-30  Bruno Haible  <bruno@clisp.org>
11984
11985         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
11986
11987 2006-07-30  Bruno Haible  <bruno@clisp.org>
11988
11989         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11990         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
11991         get removed.
11992
11993 2006-07-29  Bruno Haible  <bruno@clisp.org>
11994
11995         Make it possible for gnulib-tool to work with locally modified or
11996         augmented gnulib repositories.
11997         * gnulib-tool (func_usage): Document --local-dir option.
11998         (local_gnulib_dir): New variable.
11999         Handle --local-dir option.
12000         (func_lookup_file): New function.
12001         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12002         (func_get_description, func_get_filelist, func_get_description,
12003         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12004         func_get_automake_snippet, func_get_include_directive,
12005         func_get_license, func_get_maintainer): Use func_lookup_file.
12006         (func_import, func_create_testdir): Use func_lookup_file.
12007
12008 2006-07-29  Bruno Haible  <bruno@clisp.org>
12009
12010         * modules/setenv (Depends-on): Add unistd.
12011
12012 2006-07-29  Bruno Haible  <bruno@clisp.org>
12013
12014         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12015
12016 2006-07-29  Bruno Haible  <bruno@clisp.org>
12017
12018         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12019
12020 2006-07-29  Bruno Haible  <bruno@clisp.org>
12021
12022         * gnulib-tool (import, update): If there is no Makefile.am, look at
12023         aclocal.m4, instead of bailing out.
12024
12025 2006-07-29  Bruno Haible  <bruno@clisp.org>
12026
12027         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12028         Categorize the options by when they are useful.
12029
12030 2006-07-29  Bruno Haible  <bruno@clisp.org>
12031
12032         * gnulib-tool (func_usage): Document option --no-libtool.
12033         Handle option --no-libtool.
12034         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12035         for changed semantics of $libtool variable.
12036         (func_import): Likewise. If libtool is not used, show this through
12037         an option --no-libtool.
12038         (func_create_testdir): Update.
12039
12040 2006-07-29  Bruno Haible  <bruno@clisp.org>
12041
12042         * gnulib-tool (func_import): Extend error message about missing
12043         --doc-base.
12044
12045 2006-07-29  Bruno Haible  <bruno@clisp.org>
12046
12047         * gnulib-tool (func_import): Don't create the $docbase directory if
12048         there is no file to store there.
12049
12050 2006-07-29  Bruno Haible  <bruno@clisp.org>
12051
12052         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12053         relevant, look for configure.ac there, not in the current directory.
12054         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12055
12056 2006-07-29  Bruno Haible  <bruno@clisp.org>
12057
12058         * gnulib-tool (SORT): New variable.
12059         (func_usage): Undocument --assume-autoconf option.
12060         Remove --assume-autoconf option handling.
12061         (autoconf_minversion): Determine from the contents of configure.ac.
12062         (func_import): Remove autoconf_minversion handling.
12063         Suggested by Eric Blake.
12064
12065 2006-07-29  Bruno Haible  <bruno@clisp.org>
12066
12067         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12068
12069 2006-07-29  Bruno Haible  <bruno@clisp.org>
12070
12071         * config/srclist.txt (*setenv.[ch]): Remove rules.
12072
12073 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12074
12075         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12076
12077 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12078
12079         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12080         arpa/inet.h.
12081
12082 2006-07-28  Simon Josefsson  <jas@extundo.com>
12083
12084         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12085         * modules/inet_pton (Depends-on): Likewise.
12086
12087 2006-07-28  Simon Josefsson  <jas@extundo.com>
12088
12089         * m4/netinet_in_h.m4: New file.
12090
12091 2006-07-28  Simon Josefsson  <jas@extundo.com>
12092
12093         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12094         #include's.
12095
12096 2006-07-28  Simon Josefsson  <jas@extundo.com>
12097
12098         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12099         #include's.
12100
12101 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12102
12103         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12104         setgid on directories only if they set these bits.
12105         * lib/modechange.h: Remove obsolete comment about masks.
12106
12107 2006-07-28  Eric Blake  <ebb9@byu.net>
12108
12109         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12110         macro expansion.
12111
12112 2006-07-28  Bruno Haible  <bruno@clisp.org>
12113
12114         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12115
12116 2006-07-28  Bruno Haible  <bruno@clisp.org>
12117
12118         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12119
12120 2006-07-28  Bruno Haible  <bruno@clisp.org>
12121
12122         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12123         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12124         Define fallbacks.
12125         Avoids link error on FreeBSD 4.x.
12126         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12127
12128         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12129         encoding.
12130         * lib/mbswidth.c (iswcntrl): Likewise.
12131
12132 2006-07-27  Bruno Haible  <bruno@clisp.org>
12133
12134         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12135         test.
12136
12137 2006-07-27  Bruno Haible  <bruno@clisp.org>
12138
12139         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12140         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12141         defined.
12142
12143 2006-07-26  Eric Blake  <ebb9@byu.net>
12144
12145         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12146
12147 2006-07-26  Eric Blake  <ebb9@byu.net>
12148
12149         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12150         like mingw that lack mkstemp.
12151         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12152         avoid compilation warning on mingw.
12153
12154 2006-07-26  Bruno Haible  <bruno@clisp.org>
12155
12156         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12157         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12158         INT_FAST*_MIN, INTPTR_MIN.
12159
12160 2006-07-25  Bruno Haible  <bruno@clisp.org>
12161
12162         * modules/version-etc (Depends-on): Add stdarg.
12163
12164 2006-07-25  Bruno Haible  <bruno@clisp.org>
12165
12166         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12167         complex commands.
12168
12169 2006-07-25  Bruno Haible  <bruno@clisp.org>
12170
12171         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12172         defined in <stdarg.h> or config.h.
12173
12174 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12175
12176         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12177         (gl_STDIO_SAFER): Remove.
12178
12179 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12180
12181         * MODULES.html.sh (File stream based Input/Output):
12182         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12183         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12184         * modules/fopen-safer, modules/tmpfile-safer: New files.
12185         * modules/stdio-safer: Remove.
12186
12187 2006-07-24  Bruno Haible  <bruno@clisp.org>
12188
12189         * modules/tmpdir: New file.
12190         * MODULES.html.sh (File system functions): Add it.
12191
12192 2006-07-24  Bruno Haible  <bruno@clisp.org>
12193
12194         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12195         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12196
12197 2006-07-24  Bruno Haible  <bruno@clisp.org>
12198
12199         * modules/clean-temp: New file.
12200
12201 2006-07-24  Bruno Haible  <bruno@clisp.org>
12202
12203         * m4/tmpdir.m4: New file, from GNU gettext.
12204
12205 2006-07-24  Bruno Haible  <bruno@clisp.org>
12206
12207         * lib/tmpdir.h: New file, from GNU gettext.
12208         * lib/tmpdir.c: New file, from GNU gettext.
12209
12210 2006-07-24  Bruno Haible  <bruno@clisp.org>
12211
12212         * lib/clean-temp.h: New file, from GNU gettext.
12213         * lib/clean-temp.c: New file, from GNU gettext.
12214
12215 2006-07-23  Eric Blake  <ebb9@byu.net>
12216
12217         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12218         (Depends-on): Add binary-io.
12219
12220 2006-07-23  Eric Blake  <ebb9@byu.net>
12221
12222         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12223
12224 2006-07-23  Eric Blake  <ebb9@byu.net>
12225
12226         * lib/tmpfile-safer.c: New file.
12227         * lib/stdio-safer.h (fopen_safer): Add prototype.
12228         * lib/stdio--.h (tmpfile): Make safer.
12229
12230 2006-07-23  Bruno Haible  <bruno@clisp.org>
12231
12232         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12233         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12234         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12235         gl_linked_remove_at): Use it.
12236
12237 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12238         and Simon Josefsson <jas@extundo.com>
12239
12240         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12241
12242         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12243
12244 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12245
12246         * modules/close-stream: New file.
12247         * modules/closeout (Description): Make it clear that it exits
12248         with a diagnostic on error.
12249         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12250         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12251
12252 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12253
12254         * m4/close-stream.m4: New file.
12255
12256 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12257
12258         * lib/close-stream.c, lib/close-stream.h: New files.
12259
12260 2006-07-22  Bruno Haible  <bruno@clisp.org>
12261
12262         Merge from GNU gettext 0.15.
12263
12264         2006-05-01  Bruno Haible  <bruno@clisp.org>
12265
12266                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12267
12268         2006-07-22  Bruno Haible  <bruno@clisp.org>
12269
12270                 * modules/javaversion: New file.
12271                 * MODULES.html.sh (Java): Add javaversion.
12272
12273         2006-03-12  Bruno Haible  <bruno@clisp.org>
12274
12275                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12276
12277         2005-12-04  Bruno Haible  <bruno@clisp.org>
12278
12279                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12280                 (untested).
12281
12282         2006-06-21  Bruno Haible  <bruno@clisp.org>
12283
12284                 Avoid warnings from recent versions of mcs.
12285                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
12286                 -o, -L, -r any more. Use options documented since mcs-1.0
12287                 instead. Similarly for -g.
12288
12289         2005-12-04  Bruno Haible  <bruno@clisp.org>
12290
12291                 * build-aux/csharpcomp.sh.in: Suffix for resources is
12292                 .resources, not .resource.
12293
12294         2005-07-09  Bruno Haible  <bruno@clisp.org>
12295
12296                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
12297                 add a .dll suffix.
12298                 Reported by Mark Junker <mjscod@gmx.de>.
12299
12300         2006-07-22  Bruno Haible  <bruno@clisp.org>
12301
12302                 * modules/gettext: Upgrade to gettext-0.15.
12303                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
12304                 m4/visibility.m4.
12305                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
12306
12307 2006-07-22  Bruno Haible  <bruno@clisp.org>
12308
12309         Merge from GNU gettext 0.15.
12310
12311         2006-03-25  Bruno Haible  <bruno@clisp.org>
12312
12313                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
12314
12315         2006-07-21  Bruno Haible  <bruno@clisp.org>
12316
12317                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
12318                 "1.1".
12319
12320         2006-05-09  Bruno Haible  <bruno@clisp.org>
12321
12322                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
12323                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
12324                 for the conftestver execution.
12325
12326         2006-05-01  Bruno Haible  <bruno@clisp.org>
12327
12328                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
12329                 optional target-version argument. Verify that the compiler
12330                 groks source of the specified source-version, or add -source
12331                 option as necessary. Verify that the compiler produces
12332                 bytecode in the specified target-version, or add -target and
12333                 -source options as necessary. Make the result of the test
12334                 available as variable CONF_JAVAC. Also log error output in
12335                 config.log.
12336
12337         2006-03-11  Bruno Haible  <bruno@clisp.org>
12338
12339                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
12340
12341         2006-05-09  Bruno Haible  <bruno@clisp.org>
12342
12343                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
12344                 CLASSPATH_SEPARATOR to a semicolon.
12345
12346         2006-03-12  Bruno Haible  <bruno@clisp.org>
12347
12348                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
12349                 available as variable CONF_JAVA, for subsequent autoconf
12350                 tests. Also log error output in config.log.
12351
12352         2006-07-19  Bruno Haible  <bruno@clisp.org>
12353
12354                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
12355                 that getline works on glibc2 systems. Needed to avoid trouble
12356                 in relocatable.c.
12357                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
12358
12359         2005-12-04  Bruno Haible  <bruno@clisp.org>
12360
12361                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
12362                 launcher (untested).
12363
12364         2005-12-04  Bruno Haible  <bruno@clisp.org>
12365
12366                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
12367
12368         2006-07-22  Bruno Haible  <bruno@clisp.org>
12369
12370                 * gettext.m4: Update from GNU gettext-0.15.
12371                 * nls.m4: Likewise.
12372                 * po.m4: Likewise.
12373                 * inttypes-pri.m4: Likewise.
12374                 * inttypes-h.m4: Renamed from inttypes.m4.
12375                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
12376
12377 2006-07-22  Bruno Haible  <bruno@clisp.org>
12378
12379         Merge from GNU gettext 0.15.
12380
12381         2005-07-05  Bruno Haible  <bruno@clisp.org>
12382
12383                 * printf-args.c (printf_fetchargs): Work around broken
12384                 definition of wint_t on mingw.
12385
12386         2005-02-12  Bruno Haible  <bruno@clisp.org>
12387
12388                 * xallocsa.h: Add extern "C" for C++.
12389
12390         2006-05-17  Bruno Haible  <bruno@clisp.org>
12391
12392                 Cygwin portability.
12393                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
12394
12395         2006-04-30  Bruno Haible  <bruno@clisp.org>
12396
12397                 * progreloc.c: Include <mach-o/dyld.h> if available.
12398                 (find_executable): Use _NSGetExecutablePath when possible.
12399
12400         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
12401
12402                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
12403                 function.
12404
12405         2005-12-29  Bruno Haible  <bruno@clisp.org>
12406
12407                 * progreloc.c (set_program_name_and_installdir): Fix
12408                 compilation error.
12409
12410         2005-12-04  Bruno Haible  <bruno@clisp.org>
12411
12412                 Cygwin portability.
12413                 * progreloc.c: Include <windows.h> also on Cygwin.
12414                 (find_executable): Add support for Cygwin.
12415                 (set_program_name_and_installdir): Handle also platforms with
12416                 nonempty EXEEXT.
12417
12418         2006-07-11  Bruno Haible  <bruno@clisp.org>
12419
12420                 * javacomp.c: Fix a comment.
12421                 Reported by Jim Meyering.
12422
12423         2006-04-30  Bruno Haible  <bruno@clisp.org>
12424
12425                 * javacomp.h (compile_java_class): Add source_version,
12426                 target_version arguments.
12427                 * javacomp.c: Rewritten to choose only a compiler that
12428                 respects the specified source_version and target_version.
12429
12430         2006-06-27  Bruno Haible  <bruno@clisp.org>
12431
12432                 Assume correct S_ISDIR macro.
12433                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
12434
12435         2006-07-22  Bruno Haible  <bruno@clisp.org>
12436
12437                 * javaversion.h: New file, from GNU gettext.
12438                 * javaversion.c: New file, from GNU gettext.
12439                 * javaversion.java: New file, from GNU gettext.
12440                 * javaversion.class: New file, from GNU gettext.
12441
12442         2006-05-17  Bruno Haible  <bruno@clisp.org>
12443
12444                 Cygwin portability.
12445                 * javaexec.c (execute_java_class): Test for jview program
12446                 also on Cygwin.
12447
12448         2006-04-09  Bruno Haible  <bruno@clisp.org>
12449
12450                 * fatal-signal.c: Don't include string.h.
12451                 (at_fatal_signal): Use a copying loop instead of memcpy.
12452
12453         2005-12-04  Bruno Haible  <bruno@clisp.org>
12454
12455                 * csharpexec.c: Add support for 'clix' launcher (untested).
12456                 (execute_csharp_using_sscli): New function.
12457                 (execute_csharp_program): Call it.
12458
12459         2006-06-21  Bruno Haible  <bruno@clisp.org>
12460
12461                 Avoid warnings from recent versions of mcs.
12462                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
12463                 -o, -L, -r any more. Use options documented since mcs-1.0
12464                 instead. Similarly for -g.
12465
12466         2005-07-09  Bruno Haible  <bruno@clisp.org>
12467
12468                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
12469                 add a .dll suffix.
12470                 Reported by Mark Junker <mjscod@gmx.de>.
12471
12472         2006-06-17  Bruno Haible  <bruno@clisp.org>
12473
12474                 * config.charset: Update for NetBSD 3.0.
12475
12476         2006-05-17  Bruno Haible  <bruno@clisp.org>
12477
12478                 Cygwin portability.
12479                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
12480
12481         2006-05-16  Bruno Haible  <bruno@clisp.org>
12482
12483                 * localcharset.c [CYGWIN]: Include <windows.h>.
12484                 (get_charset_aliases): For Cygwin, return the same CPxxx
12485                 aliases list as under WIN32.
12486                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
12487                 the environment variables. Fall back to GetACP().
12488
12489         2006-04-05  Bruno Haible  <bruno@clisp.org>
12490
12491                 * config.charset: Update Juan Manuel Guerrero's address.
12492
12493         2005-02-12  Bruno Haible  <bruno@clisp.org>
12494
12495                 * allocsa.h: Add extern "C" for C++.
12496
12497         2005-02-10  Bruno Haible  <bruno@clisp.org>
12498
12499                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
12500                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
12501
12502         2006-07-22  Bruno Haible  <bruno@clisp.org>
12503
12504                 * gettext.h: Update to GNU gettext-0.15.
12505
12506 2006-07-22  Bruno Haible  <bruno@clisp.org>
12507
12508         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
12509         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
12510         lib-prefix.m4, longdouble.m4, ssize_t.m4.
12511
12512 2006-07-21  Eric Blake  <ebb9@byu.net>
12513
12514         * modules/stdlib-safer: New file.
12515         * MODULES.html.sh (File stream based Input/Output): Add
12516         stdlib-safer.
12517
12518 2006-07-21  Eric Blake  <ebb9@byu.net>
12519
12520         * lib/stdlib-safer.h: New file from coreutils, required by
12521         stdlib--.h.
12522
12523 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
12524
12525         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
12526
12527 2006-07-20  Bruno Haible  <bruno@clisp.org>
12528
12529         * gnulib-tool: Recognize new option --assume-autoconf.
12530         (autoconf_minversion): New variable.
12531         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
12532
12533 2006-07-20  Bruno Haible  <bruno@clisp.org>
12534
12535         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
12536
12537 2006-07-19  Derek R. Price  <derek@ximbiot.com>
12538
12539         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
12540         Reindent and repaginate.
12541
12542 2006-07-19  Derek Price  <derek@ximbiot.com>
12543
12544         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
12545         Correct grammar.
12546
12547 2006-07-17  Bruno Haible  <bruno@clisp.org>
12548
12549         * modules/list: New file.
12550         * modules/array-list: New file.
12551         * modules/carray-list, modules/carray-list-tests: New files.
12552         * modules/linked-list, modules/linked-list-tests: New files.
12553         * modules/avltree-list, modules/avltree-list-tests: New files.
12554         * modules/rbtree-list, modules/rbtree-list-tests: New files.
12555         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
12556         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
12557         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
12558         * modules/oset: New file.
12559         * modules/array-oset: New file.
12560         * modules/avltree-oset, modules/avltree-oset-tests: New files.
12561         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
12562         * tests/test-carray_list.c: New file.
12563         * tests/test-linked_list.c: New file.
12564         * tests/test-avltree_list.c: New file.
12565         * tests/test-rbtree_list.c: New file.
12566         * tests/test-linkedhash_list.c: New file.
12567         * tests/test-avltreehash_list.c: New file.
12568         * tests/test-rbtreehash_list.c: New file.
12569         * tests/test-avltree_oset.c: New file.
12570         * tests/test-rbtree_oset.c: New file.
12571         * MODULES.html.sh (Container data structures): New section.
12572
12573 2006-07-17  Bruno Haible  <bruno@clisp.org>
12574
12575         * m4/gl_list.m4: New file.
12576
12577 2006-07-17  Bruno Haible  <bruno@clisp.org>
12578
12579         * lib/gl_list.h: New file.
12580         * lib/gl_list.c: New file.
12581         * lib/gl_array_list.h: New file.
12582         * lib/gl_array_list.c: New file.
12583         * lib/gl_carray_list.h: New file.
12584         * lib/gl_carray_list.c: New file.
12585         * lib/gl_linked_list.h: New file.
12586         * lib/gl_linked_list.c: New file.
12587         * lib/gl_anylinked_list1.h: New file.
12588         * lib/gl_anylinked_list2.h: New file.
12589         * lib/gl_avltree_list.h: New file.
12590         * lib/gl_avltree_list.c: New file.
12591         * lib/gl_anyavltree_list1.h: New file.
12592         * lib/gl_anyavltree_list2.h: New file.
12593         * lib/gl_rbtree_list.h: New file.
12594         * lib/gl_rbtree_list.c: New file.
12595         * lib/gl_anyrbtree_list1.h: New file.
12596         * lib/gl_anyrbtree_list2.h: New file.
12597         * lib/gl_anytree_list1.h: New file.
12598         * lib/gl_anytree_list2.h: New file.
12599         * lib/gl_linkedhash_list.h: New file.
12600         * lib/gl_linkedhash_list.c: New file.
12601         * lib/gl_anyhash_list1.h: New file.
12602         * lib/gl_anyhash_list2.h: New file.
12603         * lib/gl_avltreehash_list.h: New file.
12604         * lib/gl_avltreehash_list.c: New file.
12605         * lib/gl_rbtreehash_list.h: New file.
12606         * lib/gl_rbtreehash_list.c: New file.
12607         * lib/gl_anytreehash_list1.h: New file.
12608         * lib/gl_anytreehash_list2.h: New file.
12609
12610         * lib/gl_oset.h: New file.
12611         * lib/gl_oset.c: New file.
12612         * lib/gl_array_oset.h: New file.
12613         * lib/gl_array_oset.c: New file.
12614         * lib/gl_avltree_oset.h: New file.
12615         * lib/gl_avltree_oset.c: New file.
12616         * lib/gl_rbtree_oset.h: New file.
12617         * lib/gl_rbtree_oset.c: New file.
12618         * lib/gl_anytree_oset.h: New file.
12619
12620 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12621
12622         * m4/mkancesdirs.m4: New file.
12623         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
12624         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
12625         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
12626         it.
12627
12628 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12629
12630         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
12631         * lib/mkancesdirs.h: New files.
12632         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
12633         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
12634         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
12635         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
12636         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
12637         callers changed.  Revamp internals significantly, by not
12638         attempting to create directories that are temporarily more
12639         permissive than the final results.  Do not attempt to use
12640         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
12641         This removes some race conditions, fixes some bugs, and simplifies
12642         things.  Use new dirchownmod function to do owner and mode changes.
12643         * lib/mkdir-p.h: Likewise.
12644         * lib/modechange.c (octal_to_mode): New function.
12645         (struct mode_change): New member mentioned.
12646         (make_node_op_equals): New arg mentioned.  All callers changed.
12647         (mode_compile): Keep track of which mode bits the user has explicitly
12648         mentioned.
12649         (mode_adjust): New arg DIR, so that we implement the X op correctly.
12650         New arg PMODE_BITS, to keep track of which mode bits the user
12651         mentioned; it treats S_ISUID and S_ISGID speciall.
12652         All callers changed.
12653         * lib/modechange.h: Likewise.
12654
12655 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12656
12657         * MODULES.html.sh: Add mkancestors.
12658         * modules/mkancesdirs: New module.
12659         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
12660         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
12661         The chdir-safer and afs files are now orphans; I'll remove them
12662         unless someone speaks up.
12663         Add lib/dirchownmod.c, lib/dirchownmod.h.
12664         (Depends-on): Remove alloca, chown, save-cwd, dirname.
12665         Add lchown, mkancesdirs.
12666         (Maintainer): Add self.
12667
12668 2006-07-15  Karl Berry  <karl@gnu.org>
12669
12670         * gnulib-tool: help message wording/arrangement.
12671
12672 2006-07-14  Simon Josefsson  <jas@extundo.com>
12673
12674         * doc/gnulib.texi (Libtool and Windows): New section.
12675
12676 2006-07-12  Simon Josefsson  <jas@extundo.com>
12677
12678         * modules/gendocs (License): Fix license, approved by Karl.
12679
12680 2006-07-12  Eric Blake  <ebb9@byu.net>
12681
12682         * MODULES.html.sh: Add gendocs.
12683
12684 2006-07-11  Eric Blake  <ebb9@byu.net>
12685
12686         * modules/fdl: New module, to install doc/fdl.texi.
12687         * MODULES.html.sh: Add new section for documentation modules.
12688         * gnulib-tool: Avoid space-tab.
12689         (--doc-base): New option, to manage files from doc.
12690
12691 2006-07-11  Eric Blake  <ebb9@byu.net>
12692
12693         * m4/absolute-header.m4: Fix comments to match recent change.
12694
12695 2006-07-11  Eric Blake  <ebb9@byu.net>
12696
12697         * gnulib-tool: List --doc-base before --tests-base.
12698
12699 2006-07-11  Derek R. Price  <derek@ximbiot.com>
12700
12701         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
12702
12703 2006-07-11  Bruno Haible  <bruno@clisp.org>
12704
12705         * README: Mention where to put documentation.
12706
12707 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12708
12709         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
12710
12711 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12712
12713         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
12714         to stdint.m4.
12715
12716 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12717
12718         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
12719         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
12720         "no/such/file/stdint.h" when there is no such file, so that
12721         the resulting C code can be parsed by dodgy compilers.
12722         Problems reported by Bob Proulx.
12723
12724 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12725
12726         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
12727         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12728         macros into the GNU _D_EXACT_NAMLEN.
12729         * lib/savedir.c:  Likewise.
12730         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
12731
12732 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12733         and Paul Eggert  <eggert@cs.ucla.edu>
12734
12735         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
12736         * m4/savedir.m4:
12737         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12738         macros into the GNU _D_EXACT_NAMLEN.
12739
12740 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12741
12742         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
12743         around the absolute name, to work around a problem with the HP-UX
12744         11.23 native C compiler, reported by Bob Proulx.
12745
12746 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * doc/maintain.texi, make-stds.texi: Sync from
12749         <http://savannah.gnu.org/projects/gnustandards>.
12750
12751 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12752
12753         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
12754
12755 2006-07-09  Jim Meyering  <jim@meyering.net>
12756
12757         * m4/glob.m4: Remove a doubled word in a comment.
12758
12759 2006-07-09  Jim Meyering  <jim@meyering.net>
12760
12761         * lib/argp-pv.c: Remove a doubled word in a comment.
12762         * lib/check-version.c (check_version): Likewise.
12763         * lib/javacomp.c (compile_java_class): Likewise.
12764
12765 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12766
12767         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
12768         for the benefit of people using Autoconf 2.60.  If you want to
12769         support older Autoconf versions you can copy m4/onceonly_2_57.m4
12770         (or m4/onceonly.m4, if pre-2.57) manually.
12771
12772 2006-07-08  Jim Meyering  <jim@meyering.net>
12773
12774         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
12775         comment.
12776         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
12777         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
12778         comment.
12779
12780 2006-07-08  Jim Meyering  <jim@meyering.net>
12781
12782         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
12783
12784 2006-07-07  Simon Josefsson  <jas@extundo.com>
12785
12786         * tests/test-crc.c: Change expected crc value, the test vector
12787         were probably computed using the old broken crc.c?
12788
12789 2006-07-06  Simon Josefsson  <jas@extundo.com>
12790
12791         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
12792         now the canonical place for the M4 file).
12793
12794         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
12795         from the sys_socket dependency now.
12796
12797         * modules/inet_pton (Files): Ditto.
12798
12799         * modules/inet_ntop (Files): Ditto.
12800
12801 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12802
12803         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
12804         not gl_PREREQ_GETUSERSHELL.
12805
12806 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12807
12808         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
12809         with only one argument, for Autoconf 2.60.
12810         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
12811         expand to nothing, so add a shell command to avoid syntax error.
12812         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
12813
12814 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12815
12816         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
12817
12818 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12819
12820         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
12821         no longer needed.  Check for isblank decl.
12822         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
12823         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
12824         of existence.
12825
12826 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12827
12828         * lib/getloadavg.c: Use __VMS, not VMS.
12829         * lib/getopt.c: Likewise.
12830         * lib/getpagesize.h: Likewise.
12831         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
12832         and probably does not work.
12833
12834 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12835
12836         * lib/.cppi-disable: Add wcwidth.
12837         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
12838         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
12839         (ISGRAPH): Remove.  All uses changed to isgraph.
12840         (FOLD) [!defined _LIBC]: Remove special case.
12841         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
12842         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
12843         HAVE_ISBLANK.
12844         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
12845         case.
12846
12847 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
12848
12849         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
12850         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
12851         brackets.  Other minor changes to suppress some compiler
12852         warnings.
12853
12854 2006-07-06  Derek R. Price  <derek@ximbiot.com>
12855         and Paul Eggert  <eggert@cs.ucla.edu>
12856
12857         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
12858         of invoking obsolescent AC_HEADER_DIRENT macro.
12859         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
12860         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
12861         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
12862         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
12863         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
12864         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12865         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
12866         * m4/readdir.m4: Remove; no longer needed.
12867
12868 2006-07-06  Derek R. Price  <derek@ximbiot.com>
12869         and Paul Eggert  <eggert@cs.ucla.edu>
12870
12871         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
12872         Don't worry about this obsolete case any more.
12873         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
12874         directories.
12875         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
12876         worry about this obsolete case any more.
12877         * lib/fts.c: Likewise.
12878         * lib/getcwd.c: Likewise.
12879         * lib/glob.h: Likewise.
12880         * lib/savedir.c: Likewise.
12881
12882 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12883
12884         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
12885         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
12886         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
12887         needed.
12888         All uses removed.
12889         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12890         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
12891         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
12892         needed.
12893         * m4/getdate.m4 (gl_GETDATE): Likewise.
12894         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12895         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12896         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12897         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12898         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
12899         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12900         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
12901         needed.
12902
12903 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12904
12905         * lib/memcasecmp.c: Include <limits.h>.
12906         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
12907         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
12908         Don't assume isdigit succeeds only on '0' through '9'.
12909
12910 2006-07-05  Eric Blake  <ebb9@byu.net>
12911
12912         * modules/getaddrinfo (Depends-on): Add snprintf.
12913
12914 2006-07-05  Eric Blake  <ebb9@byu.net>
12915
12916         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
12917         to avoid 'header present but could not be compiled' on cygwin.
12918
12919 2006-07-05  Eric Blake  <ebb9@byu.net>
12920
12921         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
12922         missing from netdb.h.
12923         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
12924
12925 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12926
12927         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
12928         no longer needed.
12929         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
12930         * m4/getdate.m4 (gl_GETDATE): Likewise.
12931         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12932         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12933         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12934         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12935         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12936
12937 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12938
12939         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
12940         All uses of is_space replaced by isspace.
12941         * lib/exit.h: Don't talk about STDC_HEADERS.
12942         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
12943         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
12944         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
12945         replaced by isprint etc.
12946         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
12947         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
12948         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
12949         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
12950         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
12951         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
12952
12953 2006-07-05  Bruno Haible  <bruno@clisp.org>
12954
12955         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
12956         the function exists, before testing against AIX.
12957         Reported by Martin Lambers <marlam@marlam.de>.
12958
12959 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
12960
12961         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
12962         From Mark D. Baushke.
12963
12964 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
12965
12966         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
12967         to the absolute name, not just one, to bypass Sun C 5.8's
12968         "warning: #include of /usr/include/... may be non-portable".
12969
12970 2006-07-04  Eric Blake  <ebb9@byu.net>
12971
12972         * modules/dirname-tests: New test module.
12973         * tests/test-dirname.c: New file, replacing dirname.c
12974         TEST_DIRNAME section that was recently deleted.
12975
12976 2006-07-04  Bruno Haible  <bruno@clisp.org>
12977
12978         Assume ANSI C header files and <ctype.h> functions.
12979         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
12980         (mbsnwidth): Use isprint, iscntrl instead.
12981
12982 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12983
12984         Merge from coreutils.
12985         * MODULES.html.sh: Add xstrtold.
12986         * modules/xstrtold: New file.
12987         * modules/cycle-check (Files): Add lib/same-inode.h.
12988         * modules/dirname (Files): Add m4/double-slash-root.m4.
12989         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
12990         * modules/mkdir-p (Files): Add lib/same-inode.h.
12991         * modules/same (Files): Add lib/same-inode.h.
12992
12993 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12994
12995         * m4/absolute-header.m4: Renamed from full-header-path.m4.
12996         This is to keep the terminology clean; POSIX talks about
12997         "absolute pathnames", not "full pathnames", but the GNU
12998         Coding Standards say to use "path" for something else;
12999         so use "absolute" to keep both sides happy.
13000         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13001         Set gl_absolute_header, not gl_full_header_path.
13002         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13003         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13004         All uses changed.
13005
13006         Merge from coreutils.
13007
13008         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13009
13010         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13011         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13012         want to require the building of c-strtod.o.
13013         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13014         needs -lm directly.
13015         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13016
13017         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13018
13019         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13020         --as-needed option if available.  Problem reported by Albert Chin in
13021         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13022         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13023         cc merely issues a bunch of annoying warnings for --as-needed
13024         (this problem was reported by Bob Proulx).  Also, try linking with
13025         -lm to detect a bug in binutils 2.16 (this problem was reported
13026         by Ralf Wildenhues).
13027
13028         2006-06-18  Jim Meyering  <jim@meyering.net>
13029
13030         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13031         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13032         macro.
13033         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13034         also check for glibc-2.4's abort-inducing bug.
13035
13036         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13037         Low-probability clean-up should be to use rmdir to get rid of
13038         the just-created directory, not unlink.
13039
13040         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13041         configure fail, and request a bug report to inform us about it.
13042         Add a comment that, barring reports to the contrary, in 2007 we'll
13043         assume ftruncate is universally available.
13044
13045         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13046
13047         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13048
13049         2006-03-12  Jim Meyering  <jim@meyering.net>
13050
13051         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13052         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13053         * m4/same.m4 (gl_SAME): Likewise.
13054         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13055
13056         2006-03-11  Eric Blake  <ebb9@byu.net>
13057
13058         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13059         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13060         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13061         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13062
13063 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13066         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13067         reported by Mark D. Baushke, one in
13068         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13069
13070         Merge from coreutils.
13071
13072         * lib/.cppi-disable: Add stdint_.h.
13073         * lib/.cvsignore: Add stdint.h.
13074
13075         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13076
13077         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13078         both double and long double versions.
13079         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13080         * lib/xstrtold.c: New file.
13081         * lib/xstrtod.h (xstrtold): New decl.
13082
13083         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13084
13085         * lib/filemode.c (setst): Remove.
13086         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13087         (arguably) clearer, and the generated code is a bit smaller on my
13088         Debian GNU/Linux stable x86 host.
13089
13090         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13091
13092         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13093         Assume that filemode.h includes sys/types.h and sys/stat.h.
13094         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13095         (ftypelet): Reorder to put common cases first, for efficiency.
13096         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13097         to do 'M'.
13098         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13099         of 10, for compatibility with FreeBSD.  All callers changed.
13100         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13101         types that can't be deduced solely from st_mode.  First arg is now a
13102         const pointer.
13103         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13104         (strmode): Renamed from mode_string.
13105         (filemodestring): New decl.
13106         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13107         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13108         needed.
13109         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13110
13111         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13112
13113         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13114         fsusage.h now does that.  Include fsusage.h first, to test interface.
13115         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13116         at most one method (the old code could have generated decls that
13117         didn't conform to C89, not that this was ever exercised).
13118         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13119
13120         2006-03-19  Jim Meyering  <jim@meyering.net>
13121
13122         Work even in a chroot where d_ino values for entries in "/"
13123         don't match the stat.st_ino values for the same names.
13124         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13125         number, iterate through all entries again, using lstat instead.
13126         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13127         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13128
13129         * lib/getcwd.c (__getcwd): Clarify a comment.
13130         Use memcpy in place of a call to strcpy.
13131
13132         2006-03-12  Jim Meyering  <jim@meyering.net>
13133
13134         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13135         matches that of the current directory (which we're about to chdir ".."
13136         out of), then save the dev-ino of the parent, instead.
13137
13138         * lib/same-inode.h (SAME_INODE): New file/macro.
13139         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13140         Include "same-inode.h", instead.
13141         * lib/same.c: Likewise.
13142         * lib/cycle-check.h: Include "same-inode.h".
13143         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13144         * lib/cycle-check.c (SAME_INODE): Remove definition.
13145         * lib/root-dev-ino.h: Include "same-inode.h".
13146
13147         2006-03-11  Eric Blake  <ebb9@byu.net>
13148
13149         * lib/same.c (same_name): s/base_name/last_component/
13150         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13151         * lib/filenamecat.c (file_name_concat): Likewise.
13152
13153         2006-03-11  Eric Blake  <ebb9@byu.net>,
13154                     Paul Eggert  <eggert@cs.ucla.edu>
13155
13156         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13157         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13158         drive prefix.
13159         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13160         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13161         (last_component): New method.
13162         * lib/dirname.c (dir_len): Determine when drive letters need a
13163         subsequent slash.  Preserve // when it is special.
13164         (dir_name): Don't append dot when drive letter is absolute.
13165         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13166         * lib/basename.c (base_name): New semantics - malloc the result.
13167         Preserve // when it is special.  Preserve relative files that look
13168         like drive letters.
13169         (base_len): Preserve // when it is special.
13170         (last_component): New method, similar to old base_name semantics.
13171         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13172         base_name.  Strip redundant slashes from ///.
13173
13174 2006-07-03  Jim Meyering  <jim@meyering.net>
13175
13176         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13177         macro is used before the first cycle_check call.
13178
13179 2006-07-03  Eric Blake  <ebb9@byu.net>
13180
13181         * modules/dirname (Depends-on): Add xstrndup.
13182
13183 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13184
13185         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13186         test cases, so that config.log is a bit easier to follow.
13187
13188 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13189
13190         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13191         both are 64 bits, since this seems to be the tradition, and this
13192         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13193         we ever run into a host that prefers long long to long in this
13194         case, we'll need another configure-time test.  Problem reported by
13195         Jim Meyering.
13196
13197 2006-07-02  Eric Blake  <ebb9@byu.net>
13198
13199         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13200
13201 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13202
13203         * modules/inttypes (Depends-on): No longer depends on stdint.
13204         * modules/stdint (Description): Say more about assumptions.
13205         Say that the fast types might differ.  Say macros are used.
13206         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13207         (Makefile.am): Revise list of substituted symbols to match
13208         new stdint.m4.
13209         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13210         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13211         * tests/test-stdint.c (verify_same_types)
13212         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13213         the code conforms to C99/C89.
13214         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13215         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13216
13217 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13218
13219         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13220         but fix a bug, by requiring at least 64 bits.
13221         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13222         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13223         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13224         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13225
13226         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13227         changes.  Make 2.59 a prerequisite.  Check and substitute for
13228         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13229         inttypes.h.  Do not use special include files; just use the
13230         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13231         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13232         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13233         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13234         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13235         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13236         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13237         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13238         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13239         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13240         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13241         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13242         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13243         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13244         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13245         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13246         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13247         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13248         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13249         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13250         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13251         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13252         not check for things that C99 does not require, e.g., int8_t.  If
13253         a test isn't needed unless <stdint.h> isn't working, and is
13254         unlikely to be needed for any other reason, then don't do it
13255         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13256         size_t, since we assume C89 freestanding at least.  Do not check
13257         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13258         the right thing even if the types are not defined.  Instead use:
13259         (gl_STDINT_TYPE_PROPERTIES): New macro.
13260         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13261         testing whether <sys/types.h> clashes, as Autoconf does this for
13262         us now.  All uses removed.
13263         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13264         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13265         (gl_CHECK_TYPE_SAME):
13266         Remove; no longer needed.
13267         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13268         exists, since we'll return 0 anyway in that case.
13269         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13270
13271 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13272
13273         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13274         possible collision with system files.
13275         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13276         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13277         WCHAR_MIN and WCHAR_MAX in this case.
13278         (<stddef.h>): Do not include; no longer needed.
13279         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13280         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13281         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13282         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13283         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13284         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
13285         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
13286         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
13287         !defined(__c99))]: Include in this case too, since it's harmless
13288         now.
13289         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
13290         dangerous to do so.
13291         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
13292         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
13293         (_STDINT_MIN, _STDINT_MAX): New macros.
13294         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
13295         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
13296         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
13297         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
13298         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
13299         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
13300         macros, not typedefs; this simplifies things quite a bit.
13301         Use long int for all types narrower than int64_t.
13302         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
13303         Define in terms of long long int or int64_t or long int,
13304         not int64_t or int32_t.  This saves some compile-time testing.
13305         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
13306         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
13307         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
13308         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
13309         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
13310         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
13311         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
13312         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
13313         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
13314         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
13315         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13316         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13317         undef any previous version and define our own version, for
13318         simplicity and consistency with the new macros for types.
13319         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13320         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13321         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
13322         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
13323         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
13324         @WINT_T_SUFFIX@ to keep things simple here.
13325         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
13326         Simplify by assuming typical 8/16/32/64 host, since we're
13327         already doing that elsewhere anyway.
13328         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
13329         and assume long long int is 64 bits if available.  This
13330         speeds up 'configure'.
13331
13332 2006-07-01  Eric Blake  <ebb9@byu.net>
13333
13334         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
13335         Reported by Andreas Buening.
13336
13337 2006-07-01  Eric Blake  <ebb9@byu.net>
13338
13339         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
13340
13341 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13342
13343         * lib/getaddrinfo.c: fixed typo
13344
13345 2006-06-29  Jim Meyering  <jim@meyering.net>
13346
13347         * modules/strftime (Maintainer): Add my name, since with the
13348         FPRINTFTIME changes strftime.c has forked from glibc.
13349
13350 2006-06-29  Eric Blake  <ebb9@byu.net>
13351
13352         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
13353
13354 2006-06-29  Eric Blake  <ebb9@byu.net>
13355
13356         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
13357
13358 2006-06-29  Eric Blake  <ebb9@byu.net>
13359
13360         * lib/stat_.h: New file.
13361
13362 2006-06-29  Eric Blake  <ebb9@byu.net>
13363
13364         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
13365         unused static function.
13366
13367 2006-06-29  Eric Blake  <ebb9@byu.net>
13368
13369         * doc/functions.texi (Function Portability): Document missing lstat
13370         on mingw.
13371
13372 2006-06-29  Eric Blake  <ebb9@byu.net>
13373
13374         * MODULES.html.sh: Add sys_stat.
13375         * modules/sys_stat: New module.
13376         * modules/mkstemp (Depends-on): Add sys_stat.
13377
13378 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13379
13380         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
13381
13382 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13383
13384         * m4/c-bs-a.m4: Removed.
13385
13386 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13387
13388         * lib/strftime.c: Assume strftime() exists.
13389
13390 2006-06-29  Derek Price  <derek@ximbiot.com>
13391
13392         * modules/c-bs-a: Removed - \a is C89.
13393         * MODULES.html.sh: Remove c-bs-a.
13394
13395 2006-06-29  Bruno Haible  <bruno@clisp.org>
13396
13397         * modules/wcwidth (License): Change to LGPL.
13398
13399 2006-06-28  Simon Josefsson  <jas@extundo.com>
13400
13401         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
13402         on _WIN32.
13403
13404         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
13405         getnameinfo.
13406
13407 2006-06-28  Simon Josefsson  <jas@extundo.com>
13408
13409         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
13410
13411 2006-06-28  Simon Josefsson  <jas@extundo.com>
13412
13413         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
13414         functions there.  It will succeed on Windows XP, but on Windows
13415         2000 and (presumably) earlier, it will fail, and use the internal
13416         re-implementation.
13417         (use_win32_p): New function.
13418         (getaddrinfo): Use strtoul on servname, to support numeric ports.
13419         Support AI_NUMERICSERV to disable getservbyname.
13420         (getnameinfo): New function, only supports
13421         NI_NUMERICHOST|NI_NUMERICSERV for now.
13422
13423         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
13424         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
13425         getnameinfo.
13426
13427 2006-06-28  Eric Blake  <ebb9@byu.net>
13428
13429         * modules/wcwidth: New file.
13430         * modules/mbchar (Depends-on): Add wcwidth.
13431         * modules/mbswidth (Depends-on): Add wcwidth.
13432         * MODULES.html.sh: Add wcwidth.
13433
13434 2006-06-28  Eric Blake  <ebb9@byu.net>
13435
13436         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
13437         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
13438
13439 2006-06-28  Eric Blake  <ebb9@byu.net>
13440
13441         * lib/xvasprintf.h: Fix comments.
13442
13443 2006-06-28  Eric Blake  <ebb9@byu.net>
13444
13445         * lib/mbchar.h (wcwidth): Include wcwidth.h.
13446         * lib/mbswidth.c (wcwidth): Move from here...
13447         * lib/wcwidth.h: ...to this new file.
13448
13449 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13450
13451         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
13452
13453         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
13454         it's obsolete.
13455         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
13456
13457 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13458
13459         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
13460         Autoconf 2.60 says this stuff was obsolete.
13461
13462 2006-06-28  Bruno Haible  <bruno@clisp.org>
13463
13464         * modules/wcwidth (Files): Add m4/wchar_t.m4.
13465
13466 2006-06-28  Bruno Haible  <bruno@clisp.org>
13467
13468         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
13469         gt_TYPE_WCHAR_T.
13470
13471 2006-06-28  Bruno Haible  <bruno@clisp.org>
13472
13473         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
13474         declaration for wcwidth.
13475         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
13476
13477 2006-06-28  Bruno Haible  <bruno@clisp.org>
13478
13479         * lib/mkdtemp.c [MINGW]: Include <io.h>.
13480         (mkdir): Define using _mkdir.
13481
13482 2006-06-28  Bruno Haible  <bruno@clisp.org>
13483
13484         * lib/getaddrinfo.h: Fix POSIX URL.
13485         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
13486         _WIN32.
13487         (use_win32_p): Make static.
13488         (getaddrinfo): Reject service name if it is empty or does not consist
13489         solely of decimal digits, or if its value is > 65535.
13490         (getnameinfo): Remove useless casts.
13491
13492 2006-06-27  Simon Josefsson  <jas@extundo.com>
13493
13494         * modules/sys_select: New file, suggested by Bruno Haible, Paul
13495         Eggert and Martin Lambers.
13496
13497 2006-06-27  Simon Josefsson  <jas@extundo.com>
13498
13499         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
13500         Eggert and Martin Lambers.
13501
13502 2006-06-27  Bruno Haible  <bruno@clisp.org>
13503
13504         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
13505         result to 0, not to empty.
13506         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
13507
13508 2006-06-27  Bruno Haible  <bruno@clisp.org>
13509
13510         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
13511
13512 2006-06-26  Simon Josefsson  <jas@extundo.com>
13513
13514         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
13515         present.
13516
13517 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
13518
13519         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
13520         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
13521         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
13522
13523 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
13524
13525         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
13526
13527 2006-06-26  Bruno Haible  <bruno@clisp.org>
13528
13529         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
13530
13531 2006-06-26  Bruno Haible  <bruno@clisp.org>
13532
13533         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
13534
13535 2006-06-26  Bruno Haible  <bruno@clisp.org>
13536
13537         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
13538         SGI C compiler in pre-C99 mode.
13539         Suggested by Mark D. Baushke and Larry Jones.
13540
13541 2006-06-26  Bruno Haible  <bruno@clisp.org>
13542
13543         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
13544         WCHAR_MAX.
13545         Reported by Mark D. Baushke and Larry Jones.
13546
13547 2006-06-26  Bruno Haible  <bruno@clisp.org>
13548
13549         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
13550         in pre-C99 mode.
13551         Suggested by Mark D. Baushke and Larry Jones.
13552
13553 2006-06-23  Simon Josefsson  <jas@extundo.com>
13554             Bruno Haible  <bruno@clisp.org>
13555
13556         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
13557         Emit mostlyclean-local rule.
13558         (func_emit_tests_Makefile_am): Likewise.
13559         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
13560
13561 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
13562
13563         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
13564
13565 2006-06-23  Bruno Haible  <bruno@clisp.org>
13566
13567         * tests/test-stdint.c: Update to match ISO C 99 Technical
13568         Corrigendum 1.
13569
13570 2006-06-23  Bruno Haible  <bruno@clisp.org>
13571
13572         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
13573
13574 2006-06-23  Bruno Haible  <bruno@clisp.org>
13575
13576         * lib/stdint_.h: Treat IRIX like OpenBSD.
13577
13578 2006-06-23  Bruno Haible  <bruno@clisp.org>
13579
13580         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
13581         ISO C 99 Technical Corrigendum 1.
13582
13583 2006-06-22  Simon Josefsson  <jas@extundo.com>
13584
13585         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
13586         MinGW.
13587
13588 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13589
13590         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
13591         needed.  Some compiler complained about some of them.  Problem reported
13592         by Larry Jones in
13593         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
13594
13595 2006-06-21  Simon Josefsson  <jas@extundo.com>
13596
13597         * tests/test-getaddrinfo.c: New file.
13598
13599         * modules/getaddrinfo-tests: New file.
13600
13601         * MODULES.html.sh: Add inet_pton.
13602
13603         * modules/inet_pton: New file.
13604
13605 2006-06-21  Simon Josefsson  <jas@extundo.com>
13606
13607         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
13608         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
13609         of using the (limited) gnulib implementation on Windows XP.
13610
13611         * m4/inet_pton.m4: New file.
13612
13613 2006-06-21  Simon Josefsson  <jas@extundo.com>
13614
13615         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
13616         variable.
13617
13618         * lib/socket_.h: Don't define WINVER.
13619
13620         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
13621         slightly modified to work in gnulib.
13622
13623 2006-06-21  Simon Josefsson  <jas@extundo.com>
13624
13625         * doc/gnulib.texi (Windows sockets): Add.
13626
13627 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
13628
13629         * lib/read-file.c (fread_file): Start with buffer allocation of
13630         0 bytes rather than 1 byte; this simplifies the code.
13631         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
13632         code to free buffer and save/restore errno.
13633         (internal_read_file): Remove unused local.
13634
13635 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
13636
13637         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
13638         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
13639         Problem reported by Denis Excoffier in
13640         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
13641
13642 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13643
13644         * modules/sys_socket, modules/socklen: Include sys/types since
13645         FreeBSD 4.x's sys/socket.h needs it.
13646
13647 2006-06-19  Simon Josefsson  <jas@extundo.com>
13648
13649         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
13650
13651 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13652
13653         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
13654
13655 2006-06-19  Bruno Haible  <bruno@clisp.org>
13656
13657         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
13658         and FULL_PATH_INTTYPES_H in angle brackets.
13659         Reported by Mark D. Baushke <mdb@gnu.org>.
13660
13661 2006-06-17  Eric Blake  <ebb9@byu.net>
13662
13663         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
13664         errno.
13665
13666 2006-06-17  Bruno Haible  <bruno@clisp.org>
13667
13668         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
13669         <sys/inttypes.h>.
13670
13671 2006-06-17  Bruno Haible  <bruno@clisp.org>
13672
13673         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
13674         whether errno is declared. Assume <errno.h> declares errno.
13675
13676 2006-06-17  Bruno Haible  <bruno@clisp.org>
13677
13678         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
13679
13680 2006-06-17  Bruno Haible  <bruno@clisp.org>
13681
13682         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
13683         problem on Solaris 2.5.1.
13684
13685 2006-06-16  Eric Blake  <ebb9@byu.net>
13686
13687         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
13688         * lib/unicodeio.c [!defined errno]: Likewise.
13689         * lib/strtol.c [!defined errno]: Likewise.
13690         * lib/strtod.c [!defined errno]: Likewise.
13691
13692 2006-06-15  Eric Blake  <ebb9@byu.net>
13693
13694         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
13695
13696 2006-06-15  Eric Blake  <ebb9@byu.net>
13697
13698         * config/srclist.txt (ssize_t.m4): Lose sync.
13699
13700 2006-06-15  Bruno Haible  <bruno@clisp.org>
13701
13702         * modules/stdint (Files): Include m4/full-header-path.m4,
13703         m4/size_max.m4, m4/wchar_t.m4.
13704         (Makefile.am): Many more substitutions.
13705         * modules/stdint-tests: New file.
13706         * tests/test-stdint.c: New file.
13707
13708 2006-06-15  Bruno Haible  <bruno@clisp.org>
13709
13710         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
13711         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
13712         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
13713         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
13714         gl_CHECK_TYPE_SAME): New macros.
13715
13716 2006-06-15  Bruno Haible  <bruno@clisp.org>
13717
13718         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
13719
13720 2006-06-15  Bruno Haible  <bruno@clisp.org>
13721
13722         * lib/stdint_.h: Rewritten to be fully auto-configured.
13723         Fixes bug on HP-UX/IA64.
13724
13725 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
13726
13727         * lib/getdate.y (__attribute__): Don't define if already defined.
13728         Problem reported by Larry Jones.
13729         * lib/utimens.c (__attribute__): Likewise.
13730
13731 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
13732
13733         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
13734         reported by Andreas Schwab.
13735
13736 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13737             Bruno Haible  <bruno@clisp.org>
13738
13739         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
13740         check for the declaration of strnlen and a run test that exposes the
13741         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
13742         rpl_strndup.
13743
13744 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13745             Bruno Haible  <bruno@clisp.org>
13746
13747         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
13748
13749 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13750
13751         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
13752         compile test, for Tru64 4.0D.
13753
13754 2006-05-28  Karl Berry  <karl@gnu.org>
13755
13756         * config/srclist.txt (printf-args.c): lose sync.
13757
13758 2006-05-26  Martin Lambers  <marlam@marlam.de>
13759
13760         * lib/getpass.c: Updates the test for the native W32 API, and adds
13761         missing includes, thus fixing compilation warnings.
13762
13763 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
13764
13765         * lib/exclude.c (exclude_fnmatch): New function.
13766         (excluded_file_name): Call exclude_fnmatch.
13767         * lib/exclude.h (excluded_file_name): New prototype
13768
13769 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
13770
13771         * lib/tempname.c (small_open, large_open): New macros.
13772         (__open, __open64) [!_LIBC]: Remove.
13773         (__gen_tempname): Use small_open and large_open instead of __open
13774         and __open64.  This fixes a portability bug on HP-UX 11.11i
13775         reported by Simon Wing-Tang in
13776         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
13777
13778 2006-05-24  Bruno Haible  <bruno@clisp.org>
13779
13780         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
13781         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
13782         Reported by Thorsten Maerz <torte@netztorte.de> via
13783         Aaron Stone <aaron@serendipity.cx>.
13784
13785 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13786
13787         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
13788         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
13789         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
13790         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
13791         not really conditional on the cache.
13792         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
13793
13794 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13795
13796         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
13797         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
13798         (my_usleep): Don't mishandle maximum value.
13799
13800 2006-05-19  Jim Meyering  <jim@meyering.net>
13801
13802         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
13803
13804 2006-05-17  Bruno Haible  <bruno@clisp.org>
13805
13806         Cygwin portability.
13807         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
13808
13809 2006-05-17  Bruno Haible  <bruno@clisp.org>
13810
13811         * lib/stdint_.h: Fix recognition of Cygwin.
13812
13813 2006-05-15  Bruno Haible  <bruno@clisp.org>
13814
13815         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
13816         on libtool patch by Ralf Wildenhues.
13817
13818 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13819
13820         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
13821         test for C99 conformance; (bool) 0.5 is an integer constant
13822         expression, but (bool) -0.5 is not.  Problem reported by Fedor
13823         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
13824
13825 2006-05-11  Simon Josefsson  <jas@extundo.com>
13826
13827         * m4/xvasprintf.m4: Fix obvious typo.
13828
13829 2006-05-11  Jim Meyering  <jim@meyering.net>
13830
13831         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
13832         James Lemley.
13833
13834 2006-05-10  Simon Josefsson  <jas@extundo.com>
13835
13836         * lib/md4.c: Typo fix, update copyright years.
13837         (K1, K2): Don't use L because it turn computations into 64-bit on
13838         64-bit platforms.
13839
13840 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
13841
13842         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
13843         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
13844         unwanted sign propagation, e.g., on hosts with 64-bit int.
13845         There still are some problems with reeelly weird theoretical hosts
13846         (e.g., 33-bit int) but it's not worth worrying about now.
13847         * lib/sha1.c (rol): Likewise.
13848         (K1, K2, K3, K4): Remove unnecessary L suffix.
13849
13850 2006-05-10  Bruno Haible  <bruno@clisp.org>
13851
13852         * lib/des.c: Cast to avoid warnings.
13853
13854 2006-05-09  Bruno Haible  <bruno@clisp.org>
13855
13856         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
13857         (Depends-on): Depend also on xsize, stdarg.
13858         (configure.ac): Add gl_XVASPRINTF.
13859
13860 2006-05-09  Bruno Haible  <bruno@clisp.org>
13861
13862         * m4/xvasprintf.m4: New file.
13863
13864 2006-05-09  Bruno Haible  <bruno@clisp.org>
13865
13866         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
13867         (EOVERFLOW): Define fallback value.
13868         (xstrcat): New function.
13869         (xvasprintf): Recognize the special case of a string concatenation.
13870
13871 2006-05-08  Eric Blake  <ebb9@byu.net>
13872
13873         * gnulib-tool (func_version): Base copyright year on CVS date.
13874         (func_emit_copyright_notice): New function.
13875         (func_emit_lib_Makefile_am): Use it.
13876         (func_emit_tests_Makefile_am): Likewise.
13877         (func_import): Likewise.
13878
13879 2006-05-08  Bruno Haible  <bruno@clisp.org>
13880
13881         * modules/stdarg: New file.
13882         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
13883
13884 2006-05-08  Bruno Haible  <bruno@clisp.org>
13885
13886         * m4/stdarg.m4: New file, from GNU gettext.
13887
13888 2006-05-08  Bruno Haible  <bruno@clisp.org>
13889
13890         * config/srclist.txt (build-aux/config.rpath): different from latest
13891         release.
13892
13893 2006-05-08  Bruno Haible  <bruno@clisp.org>
13894
13895         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
13896
13897 2006-05-05  Jim Meyering  <jim@meyering.net>
13898
13899         * m4/warning.m4: New file, derived from bison's file by the same name.
13900
13901 2006-05-03  Bruno Haible  <bruno@clisp.org>
13902
13903         * lib/stdint_.h: Shorter URL.
13904         * lib/inttypes.h: Likewise.
13905
13906 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13907
13908         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
13909
13910 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * lib/verify.h: Document the internals better.  Most of this change
13913         was written by Bruno Haible.
13914
13915 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13916
13917         * doc/verify.texi: New file, partly based on a proposal by
13918         Bruno Haible.
13919
13920 2006-05-02  Bruno Haible  <bruno@clisp.org>
13921
13922         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
13923         test from here...
13924         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
13925
13926 2006-04-29  Bruno Haible  <bruno@clisp.org>
13927
13928         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
13929         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
13930
13931 2006-04-29  Bruno Haible  <bruno@clisp.org>
13932
13933         * gnulib-tool: Make --update option actually work.
13934
13935 2006-04-29  Bruno Haible  <bruno@clisp.org>
13936
13937         * doc/gcd.texi: New file.
13938         * doc/gnulib.texi: Include it.
13939
13940 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
13941
13942         * lib/getdate.y (get_date): When adding relative date, start with the
13943         initial time, not with the result of the first mktime call.
13944
13945 2006-04-25  Bruno Haible  <bruno@clisp.org>
13946
13947         * gnulib-tool (func_import): Output the include directives in three
13948         blocks, sorted separately.
13949         Reported by Ben Pfaff <blp@cs.stanford.edu>.
13950
13951 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
13952
13953         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
13954         to define main with arguments, for C++.  Reported by Eric Blake.
13955         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
13956         Prefer 'int main ()' to 'int main (void)', for C++.
13957         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
13958         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
13959         for 'main', for C99 and C++.
13960
13961 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
13962
13963         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
13964         Don't assume that exit status -1 is valid.
13965         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
13966         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
13967         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
13968         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
13969         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
13970         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
13971         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
13972         functions can be used without declaring them, or that you can
13973         exit with status -1.
13974         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
13975
13976 2006-04-24  Karl Berry  <karl@gnu.org>
13977
13978         * config/srclist.txt (longdouble.m4): sync lost.
13979
13980 2006-04-24  Eric Blake  <ebb9@byu.net>
13981
13982         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
13983
13984 2006-04-24  Bruno Haible  <bruno@clisp.org>
13985
13986         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
13987         poll() implementation in AIX.
13988         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13989
13990 2006-04-24  Bruno Haible  <bruno@clisp.org>
13991
13992         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
13993         assigned exactly once.
13994
13995 2006-04-23  Claudio Fontana  <claudio@gnu.org>
13996             Bruno Haible  <bruno@clisp.org>
13997
13998         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
13999         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14000         for AM_CPPFLAGS.
14001
14002 2006-04-23  Bruno Haible  <bruno@clisp.org>
14003
14004         * modules/copy-file: Depend on unistd.
14005         * modules/execute: Likewise.
14006         * modules/fatal-signal: Likewise.
14007         * modules/findprog: Likewise.
14008         * modules/mkdtemp : Likewise.
14009         * modules/pipe: Likewise.
14010         * modules/wait-process: Likewise.
14011
14012 2006-04-23  Bruno Haible  <bruno@clisp.org>
14013
14014         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14015         condition was already detected.
14016         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14017
14018 2006-04-23  Bruno Haible  <bruno@clisp.org>
14019
14020         * lib/copy-file.c: Include <unistd.h> unconditionally.
14021         * lib/execute.c: Likewise.
14022         * lib/fatal-signal.c: Likewise.
14023         * lib/findprog.c: Likewise.
14024         * lib/mkdtemp.c: Likewise.
14025         * lib/pipe.h: Likewise.
14026         * lib/pipe.c: Likewise.
14027         * lib/wait-process.h: Likewise.
14028
14029 2006-04-23  Bruno Haible  <bruno@clisp.org>
14030
14031         * gnulib-tool (func_usage): Fix --import description. Document
14032         --update.
14033         (func_import): Create temporary file in a temporary directory, if
14034         --dry-run is specified. Silence errors from 'grep' when there are no
14035         m4 files in $m4dir.
14036         (func_create_testdir): Silence errors from 'grep' when there are no
14037         m4 files in $m4dir.
14038         Reported by Karl Berry <karl@freefriends.org>.
14039
14040 2006-04-20  Bruno Haible  <bruno@clisp.org>
14041
14042         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14043         one argument, so that the code will be portable to Autoconf 2.60.
14044         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14045         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14046         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14047
14048 2006-04-19  Derek Price  <derek@ximbiot.com>
14049             Eric Blake  <ebb9@byu.net>
14050
14051         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14052         rather than "/full/path.h".  Update comment to match.  Shorten &
14053         generalize m4_translit call via AS_TR_CPP.
14054
14055 2006-04-19  Derek Price  <derek@ximbiot.com>
14056             Eric Blake  <ebb9@byu.net>
14057
14058         * lib/inttypes.h: Correct grammar in comment.
14059
14060 2006-04-18  Derek Price  <derek@ximbiot.com>
14061             Paul Eggert  <eggert@cs.ucla.edu>
14062
14063         * modules/inttypes: New file.
14064         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14065
14066 2006-04-18  Derek Price  <derek@ximbiot.com>
14067             Paul Eggert  <eggert@cs.ucla.edu>
14068
14069         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14070         New files.
14071
14072 2006-04-18  Derek Price  <derek@ximbiot.com>
14073             Paul Eggert  <eggert@cs.ucla.edu>
14074
14075         * lib/inttypes.h: New file.
14076         * lib/strtoimax.c: Assume <inttypes.h>.
14077
14078 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14079
14080         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14081         isn't mounted.  Problem reported by Kir Kolyshkin.
14082
14083 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14084
14085         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14086         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14087         Derek R. Price.
14088         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14089         implementation.
14090
14091 2006-04-12  Eric Blake  <ebb9@byu.net>
14092
14093         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14094         is now done automatically by the corresponding Autoconf macro.
14095
14096 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14097
14098         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14099         time_r.h.
14100
14101 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14102
14103         Merge regex changes from libc, removing some of our
14104         POSIX-conformance changes that were rejected and redoing them in a
14105         less-intrusive way.
14106
14107         * lib/regcomp.c (re_compile_internal, init_dfa):
14108         Length arg is now size_t, not Idx.  All uses changed.
14109         (peek_token): Forward decl now says internal_function.
14110         (__re_error_msgid, __re_error_msgid_idx):
14111         Now static rather than extern with attribute_hidden.
14112         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14113         For some reason libc prefers K&R style defns for external functions.
14114         (regerror) [!defined _LIBC]: Likewise.
14115         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14116         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14117         (build_range_exp, build_collating_symbol):
14118         Use K&R-style defn.
14119         (re_compile_fastmap): Use '\0' to memset, not 0.
14120         (utf8_sb_map): Make the calculations more obvious.
14121         (init_dfa, parse_bracket_exp, build_charclass_op):
14122         Call calloc and cast result, as glibc does.
14123         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14124         (build_range_exp, build_collating_symbol):
14125         Now internal functions.
14126
14127         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14128
14129         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14130         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14131         Don't depend on VMS; depend on __VMS instead, for POSIX
14132         namespace cleanness.
14133         (regoff_t): Define to ssize_t, not long int.
14134
14135         Remove the REG_ macros named below.  Instead, make the old names
14136         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14137         __USE_GNU_REGEX.
14138         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14139         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14140         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14141         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14142         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14143         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14144         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14145         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14146         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14147         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14148         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14149         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14150         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14151         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14152         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14153         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14154         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14155         (REG_NREGS):
14156         Remove.  All uses replaced by the old RE_* names.
14157         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14158         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14159         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14160         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14161         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14162         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14163         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14164         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14165         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14166         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14167         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14168         Don't bother having these macros be independent of each others'
14169         values, since they no longer exist in the POSIX name space.
14170
14171         Rename the following member names back to their old names,
14172         unless !__USE_GNU_REGEX.  All uses changed back.
14173         (buffer): Renamed from re_buffer.
14174         (allocated): Renamed from re_allocated.
14175         (used): Renamed from re_used.
14176         (syntax): Renamed from re_syntax.
14177         (fastmap): Renamed from re_fastmap.
14178         (translate): Renamed from re_translate.
14179         (can_be_null): Renamed from re_can_be_null.
14180         (regs_allocated): Renamed from re_regs_allocated.
14181         (fastmap_accurate): Renamed from re_fastmap_accurate.
14182         (no_sub): Renamed from re_no_sub.
14183         (not_bol): Renamed from re_not_bol.
14184         (not_eol): Renamed from re_not_eol.
14185         (newline_anchor): Renamed from re_newline_anchor.
14186         (num_regs): Renamed from rm_num_regs.
14187         (start): Renamed from rm_start.
14188         (end): Renamed from rm_end.
14189
14190         (free_state): Move up a bit.
14191
14192         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14193         #define to be empty.
14194         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14195         when that is what is intended.
14196         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14197         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14198         (MAX): New macro.
14199         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14200         All uses changed back to re_malloc, etc.  It's now the caller's
14201         responsibility to check for overflow; all callers changed.
14202         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14203         (re_x2nrealloc): Remove.
14204         (free_state): Remove decl.
14205
14206         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14207         (re_set_registers, re_exec):
14208         Use K&R-style defn.
14209
14210         2006-01-31  Roland McGrath  <roland@redhat.com>
14211
14212         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14213         Reported by Mike Frysinger <vapier@gentoo.org>.
14214
14215         2006-01-15  Andreas Jaeger  <aj@suse.de>
14216
14217         [BZ #1950]
14218         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14219         build_wcs_upper_buffer change.
14220         (build_wcs_upper_buffer): Change return type.
14221
14222         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14223
14224         * lib/regex_internal.h: Include <stdint.h> if available.
14225
14226         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14227
14228         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14229
14230         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14231
14232         * lib/regcomp.c: Adjust for changed secondary hash function.
14233
14234         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14235
14236         * lib/regex.h: Pretty printing.
14237         Clean up namespace a bit.
14238
14239         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14240
14241         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14242         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14243
14244         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14245                     Ulrich Drepper  <drepper@redhat.com>
14246
14247         [BZ #1302]
14248         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14249         changed.
14250         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14251
14252         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14253
14254         [BZ #281]
14255         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14256         * lib/regcomp.c: Remove unnecessary uses of
14257         unsigned RE_TRANSLATE_TYPE.
14258         * lib/regex_internal.h: Likewise.
14259         * lib/regex_internal.c: Likewise.
14260         * lib/regexec.c: Likewise.
14261         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14262
14263         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14264
14265         * lib/regexec.c (find_recover_state): Remove unnecessary
14266         initialization.
14267         (transit_state_bkref): Make DFA a const pointer.
14268         (get_subexp): Likewise.
14269         (check_arrival): Likewise.
14270         (update_cur_sifted_state): Likewise.
14271         (re_search_internal): Likewise.
14272         (prune_impossible_nodes): Likewise.
14273         (acquire_init_state_context): Likewise.
14274         (proceed_next_node): Likewise.
14275         (set_regs): Likewise.
14276         (free_fail_stack_return): Likewise.
14277         (check_arrival_expand_ecl): Mark DFA parameter as const.
14278         (check_arrival_expand_ecl_sub): Likewise.
14279         (check_subexp_limits): Likewise.
14280         (sub_epsilon_src_nodes):  Likewise.
14281         (add_epsilon_src_nodes):  Likewise.
14282         (merge_state_array): Likewise.
14283         (update_regs): Likewise.
14284         (build_trtable): Likewise.
14285         (sift_states_backward): Mark MCTX parameter as const.
14286         (build_sifted_states): Likewise.
14287         (update_cur_sifted_state): Likewise.
14288         (sift_states_mkref): Likewise.
14289         (check_arrival_expand_ecl): Mark eclosure as const.
14290         (check_dst_limits_calc_pos_1): Likewise.
14291         * lib/regex_internal.h (re_match_context_t): Make dfa a const
14292         pointer.
14293
14294         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
14295
14296         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
14297         (transit_state_sb): Likewise.
14298         (transit_state_mb): Likewise.
14299         (sift_states_iter_mb): Likewise.
14300         (check_arrival_add_next_nodes): Likewise.
14301         (check_node_accept_bytes): Change first parameter to pointer-to-const.
14302         [_LIBC] (re_search_2_stub): Use mempcpy.
14303
14304         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
14305         mbrtowc for very simple UTF-8 case.
14306
14307         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
14308         a pointer-to-const.
14309         (re_acquire_state_context): Likewise.
14310         * lib/regex_internal.h: Adjust prototypes.
14311
14312         * lib/regex.c: Prevent using C++ compilers.
14313
14314         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
14315         (re_acquire_state_context): Likewise.
14316
14317 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14318
14319         * modules/regex (Depends-on): Add ssize_t.
14320
14321 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14322
14323         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
14324         translation table.
14325
14326 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14327
14328         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
14329
14330 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
14331             Bruno Haible  <bruno@clisp.org>
14332
14333         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
14334         <sys/types.h> and <inttypes.h>.
14335
14336 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14337
14338         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
14339         `__error_t_defined', so argp.h will not typedef the former.
14340
14341 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
14344         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
14345         glibc names.  Even if glibc is changed to conform to POSIX, the
14346         traditional names will be available anyway, since regex depends on
14347         the extensions module.  Also, fix a longstanding typo in the
14348         implementation of Spencer ERE test #75 from grep 2.3.  Problems
14349         reported by Emanuele Giaquinta.  Also, change sense of cached
14350         variable, so that the message makes sense.
14351
14352 2006-03-24  Simon Josefsson  <jas@extundo.com>
14353
14354         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
14355         including some doc fixes.
14356         (base64_encode_alloc): Fix +1 bug on allocation failures.
14357
14358 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14359
14360         * lib/base64.c (base64_encode): Do not read past end of array with
14361         unsanitized input on systems with CHAR_BIT > 8.
14362
14363 2006-03-24  Eric Blake  <ebb9@byu.net>
14364
14365         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
14366
14367 2006-03-22  Karl Berry  <karl@gnu.org>
14368
14369         * config/srclist.txt (*setenv.[ch]): get from coreutils.
14370         * config/srclistvars.sh (COREUTILS): new var.
14371
14372 2006-03-17  Jim Meyering  <jim@meyering.net>
14373
14374         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
14375         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
14376
14377 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14378
14379         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
14380         no longer needs it.  Instead, check that regoff_t is as least
14381         as wide as ptrdiff_t.
14382
14383         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
14384         so that our regex.h stays compatible with the installed regex.
14385         This is helpful for installers who configure --without-included-regex.
14386         Problem reported by Emanuele Giaquinta.
14387
14388 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14389
14390         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
14391         Typedef to long int, not to off_, as POSIX will likely change
14392         in that direction.
14393
14394 2006-03-15  Eric Blake  <ebb9@byu.net>
14395
14396         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
14397
14398 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14399
14400         * lib/argp-help.c (validate_uparams): Fix typo
14401         * lib/argp-parse.c (argp_default_options): Consistently begin help
14402         messages with a lowercase letter.
14403
14404 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
14405
14406         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
14407         overrun buffers and shouldn't be used (much as gets shouldn't be
14408         used).
14409         * lib/time_r.c (asctime_r, ctime_r): Likewise.
14410
14411 2006-03-08  Simon Josefsson  <jas@extundo.com>
14412
14413         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
14414         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14415
14416 2006-03-08  Simon Josefsson  <jas@extundo.com>
14417
14418         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
14419         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14420
14421 2006-03-08  Simon Josefsson  <jas@extundo.com>
14422
14423         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
14424         signal that configure disabled the device.
14425
14426 2006-03-08  Simon Josefsson  <jas@extundo.com>
14427
14428         * build-aux/maint.mk: Fix refresh-po, to handle no translated
14429         languages.
14430
14431 2006-03-07  Simon Josefsson  <jas@extundo.com>
14432
14433         * modules/getopt (Depends-on): Add unistd.
14434
14435         * modules/unistd: New file.
14436
14437 2006-03-07  Simon Josefsson  <jas@extundo.com>
14438
14439         * modules/gc-random: New file.
14440
14441 2006-03-07  Simon Josefsson  <jas@extundo.com>
14442
14443         * m4/unistd_h.m4: New file.
14444
14445 2006-03-07  Simon Josefsson  <jas@extundo.com>
14446
14447         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
14448         test to be side-effect free by storing the result in the cache
14449         variable gl_cv_lib_readline, and moving the assignment of
14450         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
14451         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14452
14453 2006-03-07  Simon Josefsson  <jas@extundo.com>
14454
14455         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
14456         error on missing devices (the functions will return an error).
14457
14458         * m4/gc.m4: Move random stuff to gc-random.m4
14459
14460 2006-03-07  Simon Josefsson  <jas@extundo.com>
14461
14462         * lib/unistd_.h: New file.
14463
14464 2006-03-07  Simon Josefsson  <jas@extundo.com>
14465
14466         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
14467
14468 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14469
14470         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
14471         Problem reported by Juan Manuel Guerrero.
14472
14473 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14474
14475         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
14476         the unistd module.
14477         * lib/getlogin_r.c: Likewise.
14478         * lib/getlogin_r.h: Likewise.
14479         * lib/glob.c: Likewise.
14480         * lib/pagealign_alloc.c: Likewise.
14481         * lib/unistd_.h: Remove; no longer needed.
14482
14483 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14484
14485         * MODULES.html.sh (Support for systems lacking POSIX:2001):
14486         Add unistd.
14487         * modules/c-stack (Depends-on): Add unistd.
14488         * modules/getlogin_r: Likewise.
14489         * modules/glob: Likewise.
14490         * modules/pagealign_alloc: Likewise.
14491         * modules/unistd (Files): Remove lib/unistd_.h.
14492         (EXTRA_DIST): Remove.
14493         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
14494         need unistd_.h.
14495         (MOSTLYCLEANFILES): Remove unistd.h-t.
14496
14497 2006-03-03  Simon Josefsson  <jas@extundo.com>
14498
14499         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
14500
14501 2006-03-03  Simon Josefsson  <jas@extundo.com>
14502
14503         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
14504         libidn and bison.
14505
14506 2006-03-03  Simon Josefsson  <jas@extundo.com>
14507
14508         * build-aux/maint.mk: Add indent target.
14509
14510 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
14511
14512         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
14513         our replacement poll.h in any case, to avoid a differing
14514         declaration from a system header.  Seen on AIX.
14515
14516 2006-03-01  Simon Josefsson  <jas@extundo.com>
14517
14518         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
14519         <kasal@ucw.cz>.
14520
14521 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14522
14523         * modules/gettime (Depends-on): Add extensions module.
14524         * modules/nanosleep (Depends-on): Likewise.
14525         * modules/settime (Depends-on): Likewise.
14526
14527 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14528
14529         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
14530         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
14531         pedantically.
14532         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14533         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
14534
14535         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
14536         not "==".  Reported by Ralf Wildenhues.
14537
14538 2006-03-01  Karl Berry  <karl@gnu.org>
14539
14540         * doc/Copyright/request-*: new files, synced from gnuorg.
14541
14542 2006-03-01  Karl Berry  <karl@gnu.org>
14543
14544         * config/srclist.txt (Copyright/*): new entries.
14545
14546 2006-02-28  Simon Josefsson  <jas@extundo.com>
14547
14548         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
14549
14550 2006-02-27  Simon Josefsson  <jas@extundo.com>
14551
14552         * lib/base64.h: Indent #define's.  From Jim Meyering
14553         <jim@meyering.net>.
14554
14555 2006-02-27  Jim Meyering  <jim@meyering.net>
14556
14557         Revert the change of 2006-02-24, so these files can continue
14558         to be sync'd from gettext.
14559         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
14560         of `config.h'.
14561
14562 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14563
14564         * modules/intprops: New file.
14565         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
14566         Add intprops.
14567         * modules/getloadavg (Files): Remove lib/intprops.h.
14568         (Depends-on): Add intprops.
14569         * modules/human: Likewise.
14570         * modules/inttostr: Likewise.
14571         * modules/openat: Likewise.
14572         * modules/sig2str: Likewise.
14573         * modules/userspec: Likewise.
14574         * modules/utimecmp: Likewise.
14575         * modules/xnanosleep: Likewise.
14576         * modules/xstrtol: Likewise.
14577
14578 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
14579
14580         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
14581         * modules/lock-tests (TESTS): Use $(EXEEXT).
14582         * modules/tls-tests: Likewise.
14583         * modules/argp-tests: Likewise.
14584         (check_PROGRAMS): New var, replacing...
14585         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
14586
14587 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14588
14589         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
14590         `config.h'.
14591
14592 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
14593
14594         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
14595
14596 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14597
14598         Sync from coreutils.
14599         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
14600         gl_CHDIR_SAFER.
14601
14602 2006-02-22  Jim Meyering  <jim@meyering.net>
14603
14604         Sync from coreutils.
14605         * m4/chdir-safer.m4: New file.
14606
14607 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
14608
14609         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
14610         AT_FDCWD exceeds INT_MAX.
14611         * lib/openat.h (AT_FDCWD): Likewise.
14612
14613 2006-02-17  Eric Blake  <address@hidden>
14614
14615         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
14616
14617 2006-02-16  Simon Josefsson  <jas@extundo.com>
14618
14619         * modules/getaddrinfo (Depends-on): Add sys_socket.
14620
14621 2006-02-15  Simon Josefsson  <jas@extundo.com>
14622
14623         * build-aux/maint.mk: Add dsyntax-check rule.
14624
14625 2006-02-15  Eric Blake  <ebb9@byu.net>
14626
14627         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
14628         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
14629         'present but cannot compile' warnings on cygwin.
14630         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
14631         use ws2tcpip.h if sys/socket.h works.
14632         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
14633         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
14634
14635 2006-02-14  Simon Josefsson  <jas@extundo.com>
14636
14637         * modules/maintainer-makefile (Files): Rename.
14638
14639         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
14640         and (the local) Makefile.cfg to maint-cfg.mk.
14641
14642         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
14643         to the latter.
14644
14645         * modules/maintainer-makefile: New module.
14646
14647         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
14648         severaly stripped to make it possible to build it up from scratch
14649         with reliable tests.
14650
14651         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
14652         fixes to permit overriding the default actions when configure and
14653         makefile are not available.
14654
14655 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         Sync from coreutils.
14658         * modules/lstat (Depends-on): Don't depend on xalloc.
14659         (License): Change from GPL to LGPL, since this is now simply a
14660         replacement for a libc function.
14661
14662 2006-02-14  Jim Meyering  <jim@meyering.net>
14663
14664         Sync from coreutils.
14665
14666         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
14667         failure on deficient systems, and simplify gnulib lgpl dependencies.
14668         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
14669         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
14670
14671         * lib/xalloc-die.c: Remove unused definition of N_.
14672
14673 2006-02-14  Jim Meyering  <jim@meyering.net>
14674
14675         Sync from coreutils.
14676         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
14677         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
14678         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
14679         double-quote uses of that variable, to accommodate the rare case in
14680         which getmntent is available in none of the libraries checked.  This
14681         happens at least on FreeBSD 5.0.
14682
14683 2006-02-13  Simon Josefsson  <jas@extundo.com>
14684
14685         * gnulib-tool (Usage): Fix --import, from
14686         karl@freefriends.org (Karl Berry).
14687
14688 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14689
14690         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
14691
14692 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
14693
14694         * lib/argp-namefrob.h: Restore changes accidentally lost during the
14695         "autoupdate" on 2005-12-12.
14696
14697 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14698
14699         * modules/closeout (Depends-on): Remove atexit.
14700
14701 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14702
14703         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
14704         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
14705
14706 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
14707
14708         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
14709         __EXTENSIONS__ if this causes compilation to fail.  Problem
14710         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
14711         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
14712
14713 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
14714
14715         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
14716         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
14717         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
14718         All uses changed.
14719
14720 2006-01-26  Simon Josefsson  <jas@extundo.com>
14721
14722         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
14723         prototype is visible on mingw32.
14724
14725         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
14726         for mingw32.
14727
14728         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
14729         mingw32).
14730
14731 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
14732
14733         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
14734         attempt to open for write; this always fails, at least on POSIX
14735         hosts.  This reinstates the 2006-01-09 change, which was
14736         inadvertently removed.
14737
14738 2006-01-26  Bruno Haible  <bruno@clisp.org>
14739
14740         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
14741         Reported by Paul Eggert.
14742
14743 2006-01-26  Bruno Haible  <bruno@clisp.org>
14744             Paul Eggert  <eggert@cs.ucla.edu>
14745
14746         * lib/stdbool_.h (_Bool)
14747         [(! (defined __cplusplus || defined __BEOS__)
14748           && !defined __GNUC__
14749           && !(defined __HP_cc || defined __xlc__
14750                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
14751                || defined __sgi))]:
14752         #define to signed char in these cases too; this simplifies
14753         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
14754         etc., separately) and makes it more conservative.
14755
14756 2006-01-25  Simon Josefsson  <jas@extundo.com>
14757
14758         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
14759         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
14760         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
14761
14762 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14763
14764         * lib/argp-namefrob.h: Bugfix. Remove stray #
14765
14766 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
14767
14768         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
14769         so that we test the test.
14770         Check for yet another HP-UX cc bug involving *bool |= bool.
14771
14772 2006-01-25  Karl Berry  <karl@gnu.org>
14773
14774         * config/srclist.txt (vasnprintf.c): sync lost.
14775
14776 2006-01-25  Jim Meyering  <jim@meyering.net>
14777
14778         Sync from the stable (b5) branch of coreutils:
14779
14780         * lib/fts.c (fts_children): Don't let close() clobber errno from
14781         failed fchdir().
14782
14783         * lib/fts.c (fts_stat): When following a symlink-to-directory,
14784         don't necessarily interpret stat-fails+lstat-succeeds as indicating
14785         a dangling symlink.  That can also happen at least for ELOOP.
14786         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
14787         FYI, this bug predates the inclusion of fts.c in coreutils.
14788
14789         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
14790         in their own block, so pre-c99 compilers don't object.
14791
14792         Avoid the double-free (first in fts_read, second in fts_close) that
14793         would occur when an `active' directory is made inaccessible (e.g.,
14794         via chmod a-x) during a traversal.
14795         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
14796         before returning.  Reproduce this failure by
14797         mkdir -p a/b; cd a; chmod a-x . b
14798         Reported by Stavros Passas.
14799
14800 2006-01-25  Jim Meyering  <jim@meyering.net>
14801
14802         * lib/fileblocks.c: Remove more useless parentheses.
14803         * lib/readutmp.h: Likewise.
14804
14805 2006-01-25  Bruno Haible  <bruno@clisp.org>
14806
14807         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
14808         warnings.
14809         Reported by Paul Eggert.
14810
14811 2006-01-25  Bruno Haible  <bruno@clisp.org>
14812
14813         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
14814         rid of a trap command. For Solaris sh.
14815         Reported by Mark D. Baushke <mdb@gnu.org>.
14816
14817 2006-01-24  Simon Josefsson  <jas@extundo.com>
14818
14819         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
14820         Bruno.
14821
14822 2006-01-24  Karl Berry  <karl@gnu.org>
14823
14824         * config/srclist.txt (argp-namefrob.h): sync lost.
14825
14826 2006-01-24  Jim Meyering  <jim@meyering.net>
14827
14828         * modules/openat (Files): Add lib/intprops.h.
14829         From Mark D. Baushke.
14830
14831 2006-01-24  Jim Meyering  <jim@meyering.net>
14832
14833         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
14834         Reported by Mark D. Baushke.
14835
14836 2006-01-24  Jim Meyering  <jim@meyering.net>
14837
14838         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
14839
14840 2006-01-24  Bruno Haible  <bruno@clisp.org>
14841
14842         * modules/strnlen (Maintainer): Change from glibc to all.
14843
14844 2006-01-24  Bruno Haible  <bruno@clisp.org>
14845
14846         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
14847         Patch by Paul Eggert.
14848
14849 2006-01-24  Bruno Haible  <bruno@clisp.org>
14850
14851         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
14852         already has it.
14853         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
14854         2005-11-26.
14855
14856         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
14857         'signed char' to avoid problems with the built-in _Bool type.
14858         Reported by Paul Eggert on 2005-11-26.
14859
14860 2006-01-24  Bruno Haible  <bruno@clisp.org>
14861
14862         * gnulib-tool (func_import): Avoid constructing complicated sed
14863         expressions inside backquote.
14864         Report and solution by Mark D. Baushke <mdb@gnu.org>.
14865
14866 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
14867
14868         These changes imported from libc.
14869         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
14870         test and two separate function calls.
14871         * lib/strndup.c (__strndup): Add libc_hidden_def.
14872
14873 2006-01-23  Simon Josefsson  <jas@extundo.com>
14874
14875         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
14876         Remove the test_*_SOURCES variable: automake infers it by default.
14877         * modules/tls-tests: Likewise.
14878
14879 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14880
14881         Work around porting bugs reported by Dieter in
14882         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
14883         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
14884         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
14885         Include "getopt.h" first, to check interface.
14886         (getenv): Declare only if defined HAVE_DECL_GETENV &&
14887         !HAVE_DECL_GETENV.
14888         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
14889         (__strndup): Revert to K&R-style function dfns, the glibc style.
14890         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
14891         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
14892         Include strnlen.h first, to get prototype properly.
14893         (strnlen): Renamed from __strnlen.
14894         Remove weak alias.
14895
14896 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14897
14898         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
14899
14900 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14901
14902         * config/srclist.txt: Adjust to reflect glibc reorganization.
14903         This affects only comments.
14904
14905 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14906
14907          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
14908          Reported by Bruce Korb <bkorb@gnu.org>.
14909
14910 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
14911
14912         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
14913         to pacify gcc -Wswitch-default.
14914
14915 2006-01-22  Bruno Haible  <bruno@clisp.org>
14916
14917         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
14918         temporary buffer for sprintf, take into account the precision also
14919         for 'd', 'i', 'u', 'o', 'x', 'X'.
14920
14921 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14922
14923         * modules/argp-tests: New module
14924         * tests/test-argp.c: New file
14925         * tests/test-argp-2.sh: New file
14926
14927 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14928
14929         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
14930         (__argp_base_name): Removed
14931         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
14932         typo.
14933         (__argp_base_name): Provide macro definition or extern declaration
14934         depending on the configuration
14935
14936 2006-01-20  Simon Josefsson  <jas@extundo.com>
14937
14938         * modules/inet_ntop (Depends-on): Depend on sys_socket.
14939
14940 2006-01-20  Simon Josefsson  <jas@extundo.com>
14941
14942         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
14943
14944 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14945
14946         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
14947         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
14948         Suggested by Bruno Haible.
14949
14950 2006-01-20  Karl Berry  <karl@gnu.org>
14951
14952         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
14953         until changes propagate, I guess.
14954
14955 2006-01-19  Simon Josefsson  <jas@extundo.com>
14956
14957         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
14958
14959 2006-01-19  Simon Josefsson  <jas@extundo.com>
14960
14961         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
14962
14963 2006-01-19  Simon Josefsson  <jas@extundo.com>
14964
14965         * gnulib-tool: Set check_PROGRAMS.
14966
14967         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
14968         modules/des-tests, modules/gc-arcfour-tests,
14969         modules/gc-arctwo-tests, modules/gc-des-tests,
14970         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
14971         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
14972         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
14973         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
14974         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
14975         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
14976         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
14977         test_*_SOURCES.
14978
14979 2006-01-18  Simon Josefsson  <jas@extundo.com>
14980
14981         * modules/socklen (Depends-on): Depend on sys_socket.
14982
14983 2006-01-18  Simon Josefsson  <jas@extundo.com>
14984
14985         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
14986         modules/des-tests, modules/gc-arcfour-tests,
14987         modules/gc-arctwo-tests, modules/gc-des-tests,
14988         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
14989         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
14990         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
14991         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
14992         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
14993         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
14994         $(EXEEXT) to automake TESTS variable, for mingw32.
14995
14996 2006-01-17  Simon Josefsson  <jas@extundo.com>
14997
14998         * modules/socklen (Include): Need sys/socket.h.
14999
15000 2006-01-17  Bruno Haible  <bruno@clisp.org>
15001
15002         * modules/ssize_t (Include): Add <sys/types.h>.
15003
15004 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15005
15006         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15007         it's not portable and it doesn't work with cross-compiles.
15008         Problem reported by Bruno Haible.  Fix missing-$ typo in
15009         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15010         -zignore from being used with Sun's C compiler.
15011
15012 2006-01-12  Simon Josefsson  <jas@extundo.com>
15013
15014         * lib/base64.c: Fix warning, reported by Bruno Haible
15015         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15016
15017 2006-01-12  Bruno Haible  <bruno@clisp.org>
15018
15019         * modules/ldd: New file.
15020         * build-aux/ldd.sh.in: New file.
15021         * MODULES.html.sh (Support for building libraries and executables): Add
15022         ldd.
15023
15024 2006-01-12  Bruno Haible  <bruno@clisp.org>
15025
15026         * m4/ldd.m4: New file.
15027
15028 2006-01-12  Bruno Haible  <bruno@clisp.org>
15029
15030         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15031         endless loop while replacing $auxdir with build-aux.
15032
15033 2006-01-11  Simon Josefsson  <jas@extundo.com>
15034
15035         * lib/stdint_.h (SIZE_MAX): Add missing (.
15036
15037 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15038
15039         Sync from coreutils.
15040         * lib/md5.c: Fix commentary typos.
15041         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15042         * lib/md5.h (__attribute__): Remove; unused.
15043         * lib/sha1.c: Fix commentary to match md5 better.
15044         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15045         so that we don't need to worry about alignment.  All uses changed.
15046         This merges the 2005-10-28 md5 change into sha1.
15047
15048 2006-01-11  Jim Meyering  <jim@meyering.net>
15049
15050         Sync from coreutils.
15051         * lib/md5.c (OP): Fix spacing.
15052
15053 2006-01-11  Bruno Haible  <bruno@clisp.org>
15054
15055         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15056         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15057         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15058
15059 2006-01-11  Bruno Haible  <bruno@clisp.org>
15060
15061         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15062         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15063         the "early" section as well.
15064
15065 2006-01-11  Bruno Haible  <bruno@clisp.org>
15066
15067         Avoid "ar: no archive members specified" error on MacOS X.
15068         * gnulib-tool (func_modules_add_dummy): New function.
15069         (func_import, func_create_testdir): Invoke it.
15070
15071 2006-01-11  Bruno Haible  <bruno@clisp.org>
15072
15073         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15074         with $auxdir in AC_CONFIG_FILES statements.
15075
15076 2006-01-11  Bruno Haible  <bruno@clisp.org>
15077
15078         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15079         Initialize also noinst_HEADERS to empty.
15080
15081 2006-01-11  Bruno Haible  <bruno@clisp.org>
15082
15083         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15084         variables.
15085         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15086         autoreconf.
15087
15088 2006-01-11  Bruno Haible  <bruno@clisp.org>
15089
15090         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15091         overridable by the user.
15092         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15093
15094 2006-01-10  Simon Josefsson  <jas@extundo.com>
15095
15096         * modules/sys_socket: New file.
15097
15098 2006-01-10  Simon Josefsson  <jas@extundo.com>
15099
15100         * m4/sys_socket_h.m4: New file.
15101
15102 2006-01-10  Simon Josefsson  <jas@extundo.com>
15103
15104         * lib/socket_.h: New file.
15105
15106 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15107
15108         * modules/readutmp (Maintainer): Add myself.
15109
15110 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15111
15112         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15113         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15114         People who are still concerned with buggy memcmp implementations
15115         can invoke gl_FUNC_MEMCMP themselves.
15116
15117 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         * lib/regex_internal.h (BITSET_WORD_BITS):
15120         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15121         preprocessor mishandles large unsigned values as if they were signed.
15122         Problem reported by Claudio Fontana in
15123         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15124
15125 2006-01-10  Jim Meyering  <jim@meyering.net>
15126
15127         Avoid the double-free (first in fts_read, second in fts_close) that
15128         would occur when an `active' directory is made inaccessible (e.g.,
15129         via chmod a-x) during a traversal.
15130         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15131         before returning.  Reproduce this failure by
15132         mkdir -p a/b; cd a; chmod a-x . b
15133         Reported by Stavros Passas.
15134
15135         Sync from coreutils.
15136         * lib/sha1.c: Tweak grammar in a comment.
15137
15138 2006-01-10  Jim Meyering  <jim@meyering.net>
15139
15140         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15141         Patch by Joerg Sonnenberger.
15142
15143 2006-01-10  Bruno Haible  <bruno@clisp.org>
15144
15145         * modules/readutmp: Depend on module free.
15146         * modules/strtok_r: Depend on module restrict.
15147
15148 2006-01-10  Bruno Haible  <bruno@clisp.org>
15149
15150         * modules/gettext (configure.ac): Add an invocation of
15151         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15152
15153 2006-01-10  Bruno Haible  <bruno@clisp.org>
15154
15155         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15156         Reported by Werner Lemberg <wl@gnu.org>.
15157
15158 2006-01-10  Bruno Haible  <bruno@clisp.org>
15159
15160         * lib/localcharset.c: Update from GNU gettext.
15161
15162 2006-01-10  Bruno Haible  <bruno@clisp.org>
15163
15164         * lib/argp.h (__const): Remove macro. Use const instead.
15165         * lib/argp-fmtstream.h (__const): Likewise.
15166         * lib/glob_.h (__const): Remove macro.
15167         * lib/glob-libc.h: Use const instead of __const.
15168
15169 2006-01-10  Bruno Haible  <bruno@clisp.org>
15170
15171         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15172         variable.
15173         Needed to avoid an automake error regarding the 'gettext' module.
15174
15175 2006-01-09  Simon Josefsson  <jas@extundo.com>
15176
15177         * modules/inet_ntop (Depends-on): Add restrict.
15178
15179 2006-01-09  Simon Josefsson  <jas@extundo.com>
15180
15181         * modules/gc-rijndael-tests (License): Put under LGPL.
15182
15183         * modules/gc-des-tests (License): Likewise.
15184
15185         * modules/gc-arcfour-tests (License): Likewise.
15186
15187         * modules/gc-arctwo-tests (License): Likewise.
15188
15189         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15190
15191         * modules/gc-hmac-sha1-tests (Files): Likewise.
15192
15193         * modules/gc-hmac-md5-tests (License): Likewise.
15194
15195         * modules/gc-sha1-tests (License): Likewise.
15196
15197         * modules/gc-md5-tests (License): Likewise.
15198
15199         * modules/gc-md4-tests (License): Likewise.
15200
15201         * modules/gc-md2-tests (License): Likewise.
15202
15203         * modules/gc-tests (License): Likewise.
15204
15205         * modules/des-tests (License): Likewise.
15206
15207         * modules/md4-tests (License): Likewise.
15208
15209         * modules/md2-tests (License): Likewise.
15210
15211 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15212
15213         Sync from coreutils:
15214
15215         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15216         * modules/lib-ignore: New file.
15217         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15218         chdir-safer.m4, lchmod.m4.
15219         * modules/openat: Add mkdirat.c, openat-priv.h.
15220
15221 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15222
15223         Sync from coreutils.
15224         * m4/lib-ignore.m4: New file.
15225         * m4/lchmod.m4: New file.
15226
15227 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15228
15229         Sync from coreutils.
15230         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15231         for write access: POSIX says that must fail.
15232         * lib/fts.c (diropen): Likewise.
15233         * lib/save-cwd.c (save_cwd): Likewise.
15234         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15235         well, for minor improvements on hosts that lack O_DIRECTORY.
15236         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15237         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15238         Fall back on chown if open failed with EACCES.
15239
15240         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15241         Report an error at compile-time if only a 1-second nominal clock
15242         resolution is found.
15243
15244         * lib/lchmod.h: New file.
15245         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15246         (make_dir_parents): Use lchown rather than chown, and
15247         lchmod rather than chmod.
15248
15249         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15250         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15251         "proc" reported by n0dalus.
15252
15253         * lib/mountlist.c: Include <limits.h>.
15254         (dev_from_mount_options)
15255         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15256         New function.  It no longer assumes "dev=" has the System V meaning
15257         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15258         (read_file_system_list)
15259         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15260         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15261         dev= in that case.
15262
15263         * lib/posixtm.h (PDS_PRE_2000): New macro.
15264         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15265         allow_century.  All usages changed.  Reject dates outside the range
15266         1969-1999 if PDS_PRE_2000 is used.
15267
15268 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         Sync from coreutils.
15271         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15272         (Time of day items): Mention the possibility of leap seconds.
15273         Problem reported by Dr. David Alan Gilbert.
15274
15275 2006-01-09  Jim Meyering  <jim@meyering.net>
15276
15277         Sync from coreutils.
15278
15279         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15280
15281         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15282
15283         * lib/modechange.c (mode_compile): Reject an invalid mode string
15284         that starts with an octal digit.  From Andreas Gruenbacher.
15285
15286         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
15287         and dup to open_safer and dup_safer, respectively.
15288         (openat_permissive): Fix typo in comment.
15289
15290         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
15291         "gettext.h"; either no longer needed or are guaranteed by openat.h.
15292         (_): Remove; no longer needed.
15293         (openat): Renamed from rpl_openat; no need for rpl_openat
15294         since openat.h renames openat for us.
15295         Replace most of the body with a call to openat_permissive,
15296         to avoid duplicate code.
15297         Port to (probably hypothetical) environments were mode_t is
15298         wider than int.
15299         (openat_permissive): Require mode arg, so that we can check
15300         types better.  Put it just after flags.  Change cwd failure
15301         indicator from pointer-to-bool to pointer-to-errno-value.
15302         All callers changed.
15303         Invoke openat_save_fail and/or openat_restore_fail if
15304         cwd_errno is null, so that openat can call us.
15305         (openat_permissive, fdopendir, fstatat, unlinkat):
15306         Simplify errno handling to avoid some duplicate code,
15307         as it's OK to set errno on success.
15308         * lib/openat.h: Revamp code so that function macros depend on
15309         __OPENAT_PREFIX only, not also on AT_FDCWD.
15310         (openat_ro): Remove.  Caller changed to use openat_permissive.
15311         (openat_permissive): Now a macro, if not a function.
15312         (openat_restore_fail, openat_save_fail): Now always functions,
15313         since mkdirat needs them even if __OPENAT_PREFIX is defined.
15314
15315         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
15316         and openat.c.
15317         * lib/mkdirat.c: Include openat-priv.h.
15318         Remove definitions of macros defined therein.
15319         * lib/openat.c: Likewise.
15320
15321         * lib/mkdirat.c (mkdirat): New file and function.
15322         * lib/openat.h (mkdirat): Declare.
15323
15324         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
15325
15326         * lib/openat.h (openat_permissive): Declare.
15327         (openat_ro): Define.
15328
15329         * lib/openat.c (EXPECTED_ERRNO): New macro.
15330         (openat_permissive): New function -- used in remove.c rewrite.
15331         (all functions): Set errno just before returning, only if there
15332         was an actual failure.
15333         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
15334
15335         Emulate openat-family functions using Linux's procfs, if possible.
15336         Idea and some code based on Ulrich Drepper's glibc changes.
15337
15338         * lib/openat.c: (BUILD_PROC_NAME): New macro.
15339         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
15340         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
15341         before falling back on save_cwd and restore_cwd.
15342         (fdopendir, fstatat, unlinkat): Likewise.
15343
15344         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
15345         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
15346
15347         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
15348         as second argument to va_arg.  Otherwise, some versions of gcc
15349         warn that `if this code is reached, the program will abort'.
15350
15351 2006-01-09  Jim Meyering  <jim@meyering.net>
15352
15353         Sync from coreutils.
15354         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
15355         Require openat-priv.h.
15356
15357 2006-01-09  Bruno Haible  <bruno@clisp.org>
15358
15359         * modules/strnlen (Include): Use strnlen.h.
15360
15361 2006-01-09  Bruno Haible  <bruno@clisp.org>
15362
15363         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
15364
15365 2006-01-09  Bruno Haible  <bruno@clisp.org>
15366
15367         * lib/sysexit_.h (EX_OK): New macro.
15368         Suggested by Martin Lambers <marlam@marlam.de>.
15369
15370 2006-01-09  Bruno Haible  <bruno@clisp.org>
15371
15372         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
15373         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
15374
15375 2006-01-09  Bruno Haible  <bruno@clisp.org>
15376
15377         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
15378         numbers.
15379
15380 2006-01-09  Bruno Haible  <bruno@clisp.org>
15381
15382         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
15383         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
15384         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
15385         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
15386
15387 2006-01-09  Bruno Haible  <bruno@clisp.org>
15388
15389         * build-aux/javacomp.sh.in: New file, moved from lib/.
15390         * modules/javacomp-script (Files): Update.
15391         (configure.ac): Add AC_CONFIG_FILES invocation.
15392         (EXTRA_DIST): Remove variable.
15393
15394         * build-aux/javaexec.sh.in: New file, moved from lib/.
15395         * modules/javaexec (Files): Update.
15396         (configure.ac): Add AC_CONFIG_FILES invocation.
15397         (EXTRA_DIST): Remove javaexec.sh.in.
15398
15399         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
15400         * modules/csharpcomp-script (Files): Update.
15401         (configure.ac): Add AC_CONFIG_FILES invocation.
15402         (EXTRA_DIST): Remove variable.
15403
15404         * build-aux/csharpexec.sh.in: New file, moved from lib/.
15405         * modules/csharpexec (Files): Update.
15406         (configure.ac): Add AC_CONFIG_FILES invocation.
15407         (EXTRA_DIST): Remove csharpexec.sh.in.
15408
15409 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15410
15411         Sync from coreutils.
15412
15413         Add POSIX ACL support
15414         * lib/acl.h (copy_acl, set_acl): Add declarations.
15415         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
15416         systems other than Linux.
15417         (chmod_or_fchmod): New function: use fchmod when possible,
15418         and chmod otherwise.
15419         (file_has_acl): Add a POSIX ACL implementation, with a
15420         Linux-specific subcase.
15421         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
15422         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
15423         acls are unsupported.
15424         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
15425         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
15426         are unsupported.
15427
15428 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15429
15430         Sync from coreutils.
15431         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
15432
15433 2006-01-07  Bruno Haible  <bruno@clisp.org>
15434
15435         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
15436         gl_EARLY.
15437
15438 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15439
15440         * lib/strftime.c (tzname): Don't declare if it is already #defined.
15441         Problem reported for Mingw by Mark Junker.
15442
15443 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15444
15445         * README: Gnulib normally doesn't generate a tarball.
15446
15447 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
15448
15449         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
15450         long int, not int, for nanosecond counts, so that people who are
15451         used to POSIX struct timespec won't be surprised.  Reported by Jim
15452         Meyering.
15453
15454 2005-12-28  Bruno Haible  <bruno@clisp.org>
15455
15456         * build-aux/config.rpath: Update from GNU gettext.
15457
15458 2005-12-16  Jim Meyering  <jim@meyering.net>
15459
15460         * modules/fprintftime: New module.
15461         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
15462
15463 2005-12-16  Jim Meyering  <jim@meyering.net>
15464
15465         * m4/fprintftime.m4: New file.
15466
15467 2005-12-16  Jim Meyering  <jim@meyering.net>
15468
15469         * lib/fprintftime.c, lib/fprintftime.h: New files.
15470
15471 2005-12-15  Simon Josefsson  <jas@extundo.com>
15472
15473         * modules/socklen (configure.ac): Fix M4 macro name, to align with
15474         new m4/socklen.m4.
15475
15476 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15477
15478         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
15479         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
15480
15481 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15482
15483         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
15484         * lib/argp-help.c (fill_in_uparams): Check if the constructed
15485         struct uparams is valid. Fall back to the default values if it is
15486         not.
15487
15488 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15489
15490         * modules/argp (Files): Add argp-pin.c
15491         (Depends-on): dirname
15492         (lib_SOURCES): Add argp-pin.c
15493
15494 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15495
15496         * m4/argp.m4:  Check if program_invocation_name and
15497         program_invocation_short_name are declared and define appropriate
15498         macros if they are not.
15499
15500 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15501
15502         * lib/argp-help.c (__argp_base_name): New function
15503         (__argp_short_program_name): Rewrite using __argp_base_name
15504         * lib/argp-namefrob.h: Define program_invocation_name and
15505         program_invocation_short_name if requested
15506         (__argp_base_name): Add prototype
15507         * lib/argp-parse.c (argp_def): Use gettext wrappers
15508         (argp_default_parser): Use __argp_base_name
15509         * lib/argp-pin.c: New file. Defines program_invocation_name and
15510         program_invocation_short_name on systems that lack them.
15511
15512 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15513
15514         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
15515         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15516         porting problem reported by Georg Schwarz in
15517         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15518
15519 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15520
15521         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
15522         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15523         porting problem reported by Georg Schwarz in
15524         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15525
15526 2005-12-05  Bruno Haible  <bruno@clisp.org>
15527
15528         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
15529         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
15530         Reported by Mark Junker <mjscod@gmx.de>.
15531
15532 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
15533
15534         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
15535         Use implementation from Albert Chin, with some
15536         comments/corrections by Stepan Kasal and myself.
15537
15538 2005-12-02  Bruno Haible  <bruno@clisp.org>
15539
15540         * gnulib-tool (func_import): Accept GPLed build tool modules when
15541         --lgpl is given.
15542         * modules/csharpcomp-script: New file.
15543         * modules/csharpcomp: Depend on it.
15544         * modules/javacomp-script: New file.
15545         * modules/javacomp: Depend on it.
15546         Suggested by Simon Josefsson.
15547
15548 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
15549
15550         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
15551         statement, to work around an HP-UX 10.20 compiler bug reported by
15552         Peter O'Gorman.
15553
15554 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15555
15556         * modules/savedir (Depends-on): Add openat.
15557
15558 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15559
15560         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
15561         (uintmax_t) [defined uintmax_t]: Do not declare.
15562         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
15563         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
15564         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
15565         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
15566         sake of portability to weird hosts that C allows (though we don't
15567         know of any practical examples).
15568
15569         * lib/savedir.h (fdsavedir): New decl.
15570         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
15571         contains most of the former guts of savedir.
15572         (savedir): Use savedirstream.
15573         Include "openat.h".
15574
15575 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15576
15577         * modules/obstack (Files): Add m4/ulonglong.m4.
15578         Problem reported by Davide Angelocola.
15579
15580 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
15581
15582         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
15583         coreutils no longer futzes with rounding modes.
15584
15585 2005-11-14  Jim Meyering  <jim@meyering.net>
15586
15587         * lib/mkstemp-safer.c: Include <config.h>, required for possible
15588         replacement of mkstemp.
15589
15590 2005-11-10  Simon Josefsson  <jas@extundo.com>
15591
15592         * lib/readline.c: Remove EOL.
15593
15594 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15595
15596         * modules/gethrxtime (Depends-on): Add gettime.
15597
15598 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15599
15600         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
15601         or gettimeofday; no longer needed.
15602
15603 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15604
15605         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
15606         time business.
15607         (gethrxtime) [! (HAVE_NANOUPTIME
15608         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
15609         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
15610         our own approximation.
15611
15612 2005-11-08  Eric Blake  <ebb9@byu.net>
15613
15614         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15615
15616 2005-11-08  Eric Blake  <ebb9@byu.net>
15617
15618         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15619
15620 2005-11-04  Bruno Haible  <bruno@clisp.org>
15621
15622         * gnulib-tool: Implement --update mode.
15623
15624 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15625
15626         Fix porting problem reported by Theodoros V. Kalamatianos.
15627         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
15628         Don't assume that futimes failing means we must fail.
15629
15630 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15631
15632         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
15633         variables to suggest the intended function of the PATH_MAX check.
15634
15635 2005-10-30  Kean Johnston  <jkj@sco.com>
15636
15637         Trivial changes to support SCO systems.
15638         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
15639         as PATH_MAX.
15640         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
15641         where __ptr is null when no I/O is pending.
15642
15643 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15644
15645         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
15646         leave errno alone.  Problem reported by Dmitry V. Levin.
15647
15648 2005-10-28  Simon Josefsson  <jas@extundo.com>
15649
15650         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
15651         Test more.
15652
15653         * tests/test-gc-md2.c, tests/test-md2.c: New files.
15654
15655         * modules/md2, modules/md2-tests: New files.
15656
15657 2005-10-28  Simon Josefsson  <jas@extundo.com>
15658
15659         * m4/inet_ntop.m4: More tests.
15660
15661         * m4/gc-md2.m4, md2.m4: New file.
15662
15663 2005-10-28  Simon Josefsson  <jas@extundo.com>
15664
15665         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
15666         "restrict" keywords, as per POSIX.  Protect the function
15667         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
15668         Don't use K&R prototypes.  Check the sprintf return values.
15669         Re-define EAFNOSUPPORT if not present.  Indent.
15670
15671         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
15672         suggested by Bruno Haible <bruno@clisp.org>.
15673
15674         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
15675
15676         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
15677
15678         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
15679         libgcrypt).
15680
15681         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
15682
15683         * lib/md2.h, lib/md2.c: New files.
15684
15685 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
15686
15687         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
15688         errno alone.  Problem reported by Frederic Jolliton.
15689
15690 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
15691
15692         * modules/verify (License): Change from GPL to LGPL.  This is a
15693         tiny module and there are apparently near-equivalents that are
15694         under the BSD license.
15695
15696 2005-10-24  Simon Josefsson  <jas@extundo.com>
15697
15698         * modules/sha1: Relicense to LGPL.
15699
15700 2005-10-24  Simon Josefsson  <jas@extundo.com>
15701
15702         * lib/md4.h: Shrink buffer size, now that we changed the type.
15703
15704 2005-10-23  Simon Josefsson  <jas@extundo.com>
15705
15706         * gnulib-tool (func_import): Fix --tests-base.
15707
15708 2005-10-22  Simon Josefsson  <jas@extundo.com>
15709
15710         * modules/arcfour (Depends-on): Need stdint.
15711
15712 2005-10-22  Simon Josefsson  <jas@extundo.com>
15713
15714         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
15715         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
15716
15717 2005-10-22  Simon Josefsson  <jas@extundo.com>
15718
15719         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
15720         suggested by Bruno Haible <bruno@clisp.org>.
15721
15722 2005-10-22  Simon Josefsson  <jas@extundo.com>
15723
15724         * lib/crc.h: Include stddef.h, for size_t.
15725
15726 2005-10-22  Simon Josefsson  <jas@extundo.com>
15727
15728         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
15729         arcfour_context struct (simplify test vector testing in GNU
15730         Shishi).
15731
15732 2005-10-21  Simon Josefsson  <jas@extundo.com>
15733
15734         * modules/des, modules/des-tests: New files.
15735
15736         * modules/gc-des, modules/gc-des-tests: New files.
15737
15738         * tests/test-des.c, tests/test-gc-des.c: New file.
15739
15740 2005-10-21  Simon Josefsson  <jas@extundo.com>
15741
15742         * modules/arctwo, modules/arctwo-tests: New files.
15743
15744         * tests/test-arctwo.c: New file.
15745
15746         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
15747
15748         * tests/test-gc-arctwo.c: New file.
15749
15750 2005-10-21  Simon Josefsson  <jas@extundo.com>
15751
15752         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
15753         Bruno Haible <bruno@clisp.org>.
15754
15755         * m4/gc-des.m4: New file.
15756
15757 2005-10-21  Simon Josefsson  <jas@extundo.com>
15758
15759         * m4/arctwo.m4: New file.
15760
15761         * m4/gc-arctwo.m4: New file.
15762
15763 2005-10-21  Simon Josefsson  <jas@extundo.com>
15764
15765         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
15766         block.
15767
15768 2005-10-21  Simon Josefsson  <jas@extundo.com>
15769
15770         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
15771         <bruno@clisp.org>.
15772
15773         * lib/hmac-sha1.c (hmac_sha1): Likewise.
15774
15775         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
15776         Bruno Haible <bruno@clisp.org>.
15777
15778         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
15779         <bruno@clisp.org>.
15780
15781 2005-10-21  Simon Josefsson  <jas@extundo.com>
15782
15783         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
15784
15785 2005-10-21  Simon Josefsson  <jas@extundo.com>
15786
15787         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
15788
15789 2005-10-21  Simon Josefsson  <jas@extundo.com>
15790
15791         * lib/des.h, lib/des.c: New files.
15792
15793         * lib/gc-gnulib.c: Support DES.c
15794
15795 2005-10-21  Simon Josefsson  <jas@extundo.com>
15796
15797         * lib/arctwo.h, lib/arctwo.c: New files.
15798
15799         * lib/gc-gnulib.c: Support ARCTWO.
15800
15801 2005-10-21  Simon Josefsson  <jas@extundo.com>
15802
15803         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
15804         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15805
15806 2005-10-21  Simon Josefsson  <jas@extundo.com>
15807
15808         * gnulib-tool (func_import, func_create_testdir): Define automake
15809         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
15810         Makefile.am snippet),
15811         suggested by Bruno Haible <bruno@clisp.org>.
15812
15813         * modules/gc (Makefile.am): Use it.
15814
15815 2005-10-21  Bruno Haible  <bruno@clisp.org>
15816
15817         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
15818         patch.
15819
15820 2005-10-19  Simon Josefsson  <jas@extundo.com>
15821
15822         * tests/test-gc-rijndael.c: New file.
15823
15824         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
15825
15826 2005-10-19  Simon Josefsson  <jas@extundo.com>
15827
15828         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
15829         interface too.
15830
15831 2005-10-19  Simon Josefsson  <jas@extundo.com>
15832
15833         * tests/test-gc-arcfour.c: New file.
15834
15835         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
15836
15837 2005-10-19  Simon Josefsson  <jas@extundo.com>
15838
15839         * modules/gc-md4, modules/gc-md4-tests: New file.
15840
15841         * tests/test-gc-md4.c: New file.
15842
15843 2005-10-19  Simon Josefsson  <jas@extundo.com>
15844
15845         * m4/gc-md4.m4: New file.
15846
15847 2005-10-19  Simon Josefsson  <jas@extundo.com>
15848
15849         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
15850         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
15851         <kasal@ucw.cz>.
15852
15853 2005-10-19  Simon Josefsson  <jas@extundo.com>
15854
15855         * m4/gc-arcfour.m4: New file.
15856
15857         * m4/gc-rijndael.m4: New file.
15858
15859 2005-10-19  Simon Josefsson  <jas@extundo.com>
15860
15861         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
15862
15863 2005-10-19  Simon Josefsson  <jas@extundo.com>
15864
15865         * lib/gc-gnulib.c: Support ARCFOUR.
15866
15867 2005-10-19  Simon Josefsson  <jas@extundo.com>
15868
15869         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
15870         support.
15871
15872         * lib/gc.h: Add ECB enum type.
15873
15874         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
15875
15876 2005-10-18  Simon Josefsson  <jas@extundo.com>
15877
15878         * tests/test-md5.c: New file.
15879
15880         * modules/md5-tests: New file.
15881
15882 2005-10-18  Simon Josefsson  <jas@extundo.com>
15883
15884         * tests/test-md4.c: New file.
15885
15886         * modules/md4, modules/md4-tests: New files.
15887
15888 2005-10-18  Simon Josefsson  <jas@extundo.com>
15889
15890         * m4/md4.m4: New file.
15891
15892 2005-10-18  Simon Josefsson  <jas@extundo.com>
15893
15894         * lib/md4.h, lib/md4.c: New files, based on md5.?.
15895
15896 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
15897
15898         * gnulib-tool (func_create_testdir): Omit the second check whether
15899         BUILT_SOURCES in nonempty.
15900
15901 2005-10-17  Simon Josefsson  <jas@extundo.com>
15902
15903         * tests/test-rijndael.c: New file.
15904
15905 2005-10-17  Simon Josefsson  <jas@extundo.com>
15906
15907         * modules/sha1: Depend on stdint instead of md5.
15908
15909         * modules/md5: Depend on stdint, remove uint32_t.
15910
15911 2005-10-17  Simon Josefsson  <jas@extundo.com>
15912
15913         * modules/gc-sha1-tests: New file.
15914
15915         * tests/test-gc-sha1.c: New file.
15916
15917 2005-10-17  Simon Josefsson  <jas@extundo.com>
15918
15919         * m4/md5.m4: Remove call to uint32_t.m4.
15920
15921 2005-10-17  Simon Josefsson  <jas@extundo.com>
15922
15923         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
15924
15925         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
15926         md5.h.
15927
15928         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
15929
15930         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
15931
15932 2005-10-17  Simon Josefsson  <jas@extundo.com>
15933
15934         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
15935
15936 2005-10-17  Simon Josefsson  <jas@extundo.com>
15937
15938         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
15939
15940 2005-10-17  Simon Josefsson  <jas@extundo.com>
15941
15942         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
15943
15944         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
15945
15946 2005-10-17  Bruno Haible  <bruno@clisp.org>
15947
15948         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
15949         that it can also be used in a test.
15950
15951 2005-10-16  Bruno Haible  <bruno@clisp.org>
15952
15953         * gnulib-tool (func_emit_tests_Makefile_am): Also define
15954         TESTS_ENVIRONMENT, so that individual tests can augment it.
15955
15956         * gnulib-tool (func_create_testdir): Use an intermediate target for
15957         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
15958         macros, like $(ALLOCA_H), which cannot be passed through the command
15959         line.
15960
15961 2005-10-15  Simon Josefsson  <jas@extundo.com>
15962
15963         * modules/rijndael-tests: New file.
15964
15965         * modules/rijndael: New file.
15966
15967 2005-10-15  Simon Josefsson  <jas@extundo.com>
15968
15969         * m4/rijndael.m4: New file.
15970
15971 2005-10-15  Simon Josefsson  <jas@extundo.com>
15972
15973         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
15974
15975         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
15976
15977 2005-10-14  Simon Josefsson  <jas@extundo.com>
15978
15979         * tests/test-arcfour.c: New file.
15980
15981         * modules/arcfour, modules/arcfour-tests: New files.
15982
15983 2005-10-14  Simon Josefsson  <jas@extundo.com>
15984
15985         * m4/arcfour.m4: New file.
15986
15987 2005-10-14  Simon Josefsson  <jas@extundo.com>
15988
15989         * lib/arcfour.h, lib/arcfour.c: New files.
15990
15991 2005-10-14  Roland McGrath  <roland@redhat.com>
15992
15993         Import from libc.  [BZ #1331]
15994         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
15995         macro argument.
15996         Reported by Matej Vela <vela@debian.org>.
15997
15998 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
15999
16000         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16001         include <wchar.h>; no longer needed.
16002
16003 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16004
16005         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16006
16007 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16008         and  Ulrich Drepper  <drepper@redhat.com>
16009
16010         Import from libc.
16011         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16012         instead of inline stream orientation test and two separate
16013         function calls.  Pay no attention to USE_IN_LIBIO.
16014
16015 2005-10-13  Simon Josefsson  <jas@extundo.com>
16016
16017         * modules/gc-hmac-md5-tests: New file.
16018
16019         * tests/test-gc-hmac-sha1.c: New file.
16020
16021         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16022
16023         * modules/gc-hmac-md5-tests: New file.
16024
16025         * tests/test-gc-md5.c: New file.
16026
16027         * modules/gc-md5-tests: New file.
16028
16029 2005-10-13  Simon Josefsson  <jas@extundo.com>
16030
16031         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16032         Move memory allocation outside of loop.
16033
16034 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16035
16036         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16037         intermediate directory is in a read-only file system.  Problem
16038         reported by Eric Blake.
16039
16040 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16041
16042         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16043
16044 2005-10-12  Simon Josefsson  <jas@extundo.com>
16045
16046         * tests/test-hmac-sha1.c: New file.
16047
16048         * modules/hmac-sha1-tests: New file.
16049
16050         * modules/hmac-sha1: New file.
16051
16052 2005-10-12  Simon Josefsson  <jas@extundo.com>
16053
16054         * modules/gc-sha1: New file.
16055
16056 2005-10-12  Simon Josefsson  <jas@extundo.com>
16057
16058         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16059
16060         * tests/test-gc-pbkdf2-sha1.c: New file.
16061
16062 2005-10-12  Simon Josefsson  <jas@extundo.com>
16063
16064         * modules/gc-md5, modules/gc-hmac-md5: New files.
16065
16066         * modules/gc (Files): Remove md5, memxor and hmac files.
16067
16068 2005-10-12  Simon Josefsson  <jas@extundo.com>
16069
16070         * m4/gc-pbkdf2-sha1.m4: New file.
16071
16072         * m4/gc-hmac-sha1.m4: New file.
16073
16074         * m4/gc-sha1: New file.
16075
16076         * m4/hmac-sha1.m4: New file.
16077
16078 2005-10-12  Simon Josefsson  <jas@extundo.com>
16079
16080         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16081
16082         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16083
16084 2005-10-12  Simon Josefsson  <jas@extundo.com>
16085
16086         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16087         suggested by Bruno Haible <bruno@clisp.org>.
16088
16089 2005-10-12  Simon Josefsson  <jas@extundo.com>
16090
16091         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16092
16093 2005-10-12  Simon Josefsson  <jas@extundo.com>
16094
16095         * lib/gc-pbkdf2-sha1.c: New file.
16096
16097         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16098
16099 2005-10-12  Simon Josefsson  <jas@extundo.com>
16100
16101         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16102
16103         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16104
16105 2005-10-12  Simon Josefsson  <jas@extundo.com>
16106
16107         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16108         GC_USE_HMAC_MD5, respectively.
16109
16110         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16111         (gc_md5): Fix typo.
16112
16113         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16114
16115         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16116
16117         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16118
16119 2005-10-12  Bruno Haible  <bruno@clisp.org>
16120
16121         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16122         Reported by Stepan Kasal <kasal@ucw.cz>.
16123
16124 2005-10-11  Simon Josefsson  <jas@extundo.com>
16125
16126         * tests/test-crc.c: New file.
16127
16128         * modules/crc, modules/crc-tests: New files.
16129
16130 2005-10-11  Simon Josefsson  <jas@extundo.com>
16131
16132         * m4/crc.m4: New file.
16133
16134 2005-10-11  Simon Josefsson  <jas@extundo.com>
16135
16136         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16137
16138         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16139
16140         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16141
16142 2005-10-11  Simon Josefsson  <jas@extundo.com>
16143
16144         * lib/crc.h, lib/crc.c: New files.
16145
16146         * lib/gc.h (gc_hash_buffer): Add doc.
16147
16148 2005-10-11  Bruno Haible  <bruno@clisp.org>
16149
16150         * modules/c-strcasestr: New file.
16151         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16152
16153 2005-10-11  Bruno Haible  <bruno@clisp.org>
16154
16155         * modules/c-strcase: New file.
16156         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16157
16158 2005-10-11  Bruno Haible  <bruno@clisp.org>
16159
16160         * lib/strcasecmp.c: Include limits.h.
16161         (strcasecmp): Avoid integer overflow on exotic platforms.
16162         * lib/strncasecmp.c: Include limits.h.
16163         (strncasecmp): Avoid integer overflow on exotic platforms.
16164         Reported by Paul Eggert.
16165
16166 2005-10-11  Bruno Haible  <bruno@clisp.org>
16167
16168         * lib/c-strcasestr.h: New file, from GNU gettext.
16169         * lib/c-strcasestr.c: New file, from GNU gettext.
16170
16171 2005-10-11  Bruno Haible  <bruno@clisp.org>
16172
16173         * lib/c-strcase.h: New file, from GNU gettext.
16174         * lib/c-strcasecmp.c: New file, from GNU gettext.
16175         * lib/c-strncasecmp.c: New file, from GNU gettext.
16176
16177 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16178
16179         * modules/mempcpy (License): GPL -> LGPL.
16180         * modules/strchrnul (License): Likewise.
16181         * modules/sysexits (License): Likewise.
16182
16183 2005-10-08  Simon Josefsson  <jas@extundo.com>
16184
16185         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16186
16187 2005-10-07  Simon Josefsson  <jas@extundo.com>
16188
16189         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16190
16191 2005-10-06  Simon Josefsson  <jas@extundo.com>
16192
16193         * tests/test-hmac-md5.c: New file.
16194
16195         * modules/hmac-md5-tests: New file.
16196
16197         * modules/hmac-md5: New file.
16198
16199 2005-10-06  Simon Josefsson  <jas@extundo.com>
16200
16201         * m4/hmac-md5.m4: New file.
16202
16203         * m4/memxor.m4: Require gl_C_RESTRICT.
16204
16205 2005-10-06  Simon Josefsson  <jas@extundo.com>
16206
16207         * lib/memxor.c (memxor): Avoid casts and warnings.
16208
16209 2005-10-06  Simon Josefsson  <jas@extundo.com>
16210
16211         * lib/hmac-md5.c: New file.
16212
16213         * lib/hmac.h: New file.
16214
16215 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16216
16217         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16218         promotes to int, not unsigned int, to catch the AIX 5.3
16219         compiler bug.
16220
16221 2005-10-05  Simon Josefsson  <jas@extundo.com>
16222
16223         * modules/memxor: New file.
16224
16225         * modules/iconv (Files): Move config.rpath to havelib, it is used
16226         there.
16227
16228         * modules/havelib (Files): Add config.rpath.
16229
16230 2005-10-05  Simon Josefsson  <jas@extundo.com>
16231
16232         * m4/memxor.m4: New file.
16233
16234 2005-10-05  Simon Josefsson  <jas@extundo.com>
16235
16236         * lib/memxor.c (memxor): Fix compiler error.
16237
16238         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16239         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16240
16241         * lib/memxor.h, lib/memxor.c: New files.
16242
16243         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16244         we assume all systems have it, suggested by Jim Meyering
16245         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16246         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16247         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16248         same reasons.
16249
16250 2005-10-05  Simon Josefsson  <jas@extundo.com>
16251
16252         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16253
16254 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16255
16256         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16257         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16258         needed, since the source code now assumes these .h files.
16259
16260 2005-10-05  Derek Price  <derek@ximbiot.com>
16261
16262         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16263
16264 2005-10-05  Bruno Haible  <bruno@clisp.org>
16265
16266         * modules/stdint (License): Change to LGPL.
16267
16268 2005-10-04  Simon Josefsson  <jas@extundo.com>
16269
16270         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16271         D. Baushke" <mdb@gnu.org>.
16272
16273 2005-10-04  Bruno Haible  <bruno@clisp.org>
16274
16275         * lib/verify.h (verify_true): Provide alternative definition for C++.
16276
16277 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16278
16279         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16280         (SSIZE_MAX): New macro, if not already defined.
16281         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16282         than 2 GiB.
16283
16284 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16285
16286         Sync from coreutils.
16287         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
16288         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
16289         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
16290         ULLONG_MAX doesn't work with 2.7.2.1.
16291
16292 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16293
16294         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
16295         From Ben Pfaff.
16296
16297         * modules/exclude (Depends-on): Depend on verify.
16298         * modules/strtoimax (Depends-on): Likewise.
16299         * modules/utimecmp (Depends-on): Likewise.
16300
16301 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16302
16303         * lib/exclude.c: Include verify.h.
16304         (verify): Remove.  All callers changed to use verify.h's version.
16305         * lib/strtoimax.c: Likewise.
16306         * lib/utimecmp.c: Likewis.e
16307
16308         Sync from coreutils.
16309         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
16310         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
16311         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
16312         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
16313         bother returning ENOSYS if settimeofday or stime fails; just let
16314         them return whatever errno they want to return.
16315         * lib/utimens.c: Include unistd.h, for dup2.
16316         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
16317         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
16318
16319 2005-10-02  Jim Meyering  <jim@meyering.net>
16320
16321         Sync from coreutils.
16322         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
16323         from glibc-2.2.5 that fails for read-only files.
16324
16325 2005-10-02  Jim Meyering  <jim@meyering.net>
16326
16327         Sync from coreutils.
16328         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
16329         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
16330         `#if HAVE_CONFIG_H'.
16331         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
16332         Remove AT_FDCWD test.
16333         Do not consume the fd unless successful.
16334         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
16335         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
16336         block, so that we don't even try to compile it if settimeofday is
16337         available.  This works around a compilation failure on OSF1 V5.1,
16338         due to stime requiring a `long int*' while tv_sec is `int'.
16339
16340 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
16341
16342         Sync from coreutils.
16343         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
16344         against `yes', rather than just testing for nonempty.
16345
16346 2005-10-01  Simon Josefsson  <jas@extundo.com>
16347
16348         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
16349         and Darwin.
16350
16351         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
16352         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
16353         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
16354         freeaddrinfo and gai_strerror are declared by the POSIX headers.
16355         Check if struct addrinfo is declared.
16356
16357 2005-10-01  Simon Josefsson  <jas@extundo.com>
16358
16359         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
16360         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
16361         AI_* and EAI_* definitions.  Protect function declarations.
16362
16363 2005-10-01  Jim Meyering  <jim@meyering.net>
16364
16365         Sync from coreutils.
16366
16367         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
16368         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
16369         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
16370         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16371         in the inet and nsl libraries.  Required on Solaris 5.7.
16372
16373 2005-10-01  Jim Meyering  <jim@meyering.net>
16374
16375         Sync from coreutils.
16376         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16377         in the inet and nsl libraries.  Required on Solaris 5.7.
16378
16379 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
16380
16381         * lib/getdelim.c (getdelim): Remove unused variables.
16382
16383 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
16384
16385         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
16386         so that the code works even with ancient cpp.  Portability problem
16387         with GCC 2.7.2.1 reported by Thomas M.Ott.
16388
16389 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
16390
16391         * modules/regex (Depends-on): Add strcase.
16392
16393         * modules/gethostname (Licence): Change from GPL to LGPL, since
16394         gethostname.c is a trivial implementation of a standard library
16395         function.
16396         * modules/poll (License): Change from GPL to LGPL, since it's
16397         derived from LGPL code.
16398
16399 2005-09-27  Jim Meyering  <jim@meyering.net>
16400
16401         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
16402         HAVE_CONFIG_H.
16403
16404         * lib/intprops.h (signed_type_or_expr__): Define.
16405         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
16406         for unsigned types.
16407
16408 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
16409
16410         * lib/verify.h (verify_expr): Remove, replacing with:
16411         (verify_true): New macro that returns true instead of void.
16412         (verify_type__): Remove.
16413         (verify): Use verify_true rather than verify_type__.
16414
16415 2005-09-26  Bruno Haible  <bruno@clisp.org>
16416
16417         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
16418         is necessary.
16419         (lib_SOURCES): Remove mbchar.c.
16420         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
16421         (Files): Add m4/mbrtowc.m4.
16422         * modules/mbiter: Likewise.
16423         * modules/mbuiter: Likewise.
16424
16425 2005-09-26  Bruno Haible  <bruno@clisp.org>
16426
16427         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
16428         compile mbchar.c if they are not both present.
16429         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
16430         * m4/mbiter.m4 (gl_MBITER): Likewise.
16431         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
16432         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
16433         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
16434
16435 2005-09-25  Jim Meyering  <jim@meyering.net>
16436
16437         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
16438         also uses socklen_t.
16439
16440 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
16441
16442         * lib/utimens.c (ENOSYS): Define if not already defined.
16443         (futimens): Support having a null PATH if the file descriptor
16444         is nonnegative.
16445
16446         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
16447         Remove.
16448         (__attribute): Define to empty unless GCC 3.1 or later.
16449         This works around a core dump on OpenBSD 3.4, which has GCC
16450         2.95.3, which dumps core when given __attribute__(()).  It also
16451         simplifies other tests, since we really don't want to bother with
16452         worrying about which ancient version of GCC supported what.
16453         Original problem reported by Yoann Vandoorselaere, with part of
16454         the fix suggested by Derek Price.
16455
16456 2005-09-24  Jim Meyering  <jim@meyering.net>
16457
16458         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
16459         so we can once again use a positive bitfield width of 1 -- now we
16460         don't have to explain why we were using a bitfield width of 2.
16461
16462 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16463
16464         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
16465         and similarly for the other external symbols.  Problem reported
16466         by James Gallager.
16467
16468         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
16469         bug reported by Jim Meyering.
16470
16471         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
16472         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
16473         not needed, since socklen is a prerequisite module.
16474
16475 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16476
16477         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
16478         Problem reported by Eric Blake.
16479         (getaddrinfo): Initialize se so that it's not garbage.
16480         Redo internal storage allocation so that it doesn't make unportable
16481         assumptions about alignment.
16482         Fix a memory leak.
16483
16484         * lib/utimens.c (futimens): Use futimesat if available.
16485         Prefer it to futimes since it doesn't have the futimes bug.
16486
16487         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
16488         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
16489         Instead, declare a function that returns a pointer to an array,
16490         and use verify_type__ to declare the size of the array.
16491         Problem and germ of a solution reported by Bruno Haible.
16492         (verify_type__): Use 2, not 1, for bitfield size, to avoid
16493         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
16494
16495 2005-09-23  Jim Meyering  <jim@meyering.net>
16496
16497         Sync from coreutils.
16498         Correct build failure (socklen_t not defined) on at least
16499         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
16500         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
16501
16502 2005-09-23  Jim Meyering  <jim@meyering.net>
16503
16504         * modules/getaddrinfo (Depends-on): Add socklen.
16505
16506 2005-09-23  Bruno Haible  <bruno@clisp.org>
16507
16508         * tests/test-verify.c: New file.
16509
16510 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16511
16512         Sync from coreutils.
16513
16514         * modules/argmatch (Depends-on): Add verify.
16515         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
16516         unistd-safer.
16517         * modules/save-cwd (Depends-on): Likewise.
16518
16519         * modules/openat (Files): Add lib/openat-die.c.
16520         (Depends-on): Remove error, exitfail.
16521         Add dirname.
16522
16523         * modules/verify: New file.
16524         * MODULES.html.sh (Diagnostics <assert.h>): New section,
16525         with "verify" module.
16526
16527 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16528
16529         Sync from coreutils.
16530
16531         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
16532         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
16533         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
16534         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
16535         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
16536         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
16537         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
16538         Don't bother checking for string.h, stdlib.h, unistd.h.
16539         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
16540         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
16541         module's job.
16542         * m4/jm-macros.m4 (gl_MACROS): Likewise.
16543         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
16544
16545         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
16546         (gl_GETDATE): Use it.
16547
16548         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
16549
16550 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16551
16552         Sync from coreutils.
16553
16554         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
16555         stat-time.h.
16556         * lib/argmatch.h: Include verify.h
16557         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
16558         (ARGMATCH_ASSERT): Remove; unused.
16559         * lib/canonicalize.c: Assume STDC_HEADERS.
16560         * lib/exclude.c: Include "strcase.h".
16561         * lib/regex_internal.h [!defined _LIBC]: Likewise.
16562         * lib/getusershell.c: Include stdio--.h rather than stdio.h
16563         and stdio-safer.h.
16564         (getusershell): Call fopen, not fopen_safer.
16565         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
16566         Do not include unistd-safer.h.
16567         (save_cwd): Don't call fd_safer; no longer needed
16568         now that we include fcntl--.h.
16569
16570         * lib/getdate.y (relative_time): New type.
16571         (RELATIVE_TIME_0): New constant.
16572         (parser_control): Use relative_time instead of doing it ourselves.
16573         (%union): Add new relative_time rel member.
16574         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
16575         Now typeless.
16576         (relunit, relunit_snumber): Now of type rel.
16577         (zone, rel, relunit, get_date): Adjust to above changes.
16578
16579         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
16580         Do not include unistd-safer.h.
16581         (getloadavg): Don't call fd_safer; no longer needed
16582         now that we include fcntl--.h.
16583
16584         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
16585         (make_dir_parents): Treat ENOSYS like EEXIST.
16586
16587         Improve quality of diagnostics on restore_cwd failure.
16588         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
16589         (make_dir_parents): Last arg is now int * (for errno), not bool *.
16590         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
16591         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
16592         each time through the loop.  Do not diagnose restore_cwd failure;
16593         that is the caller's job (and perhaps the caller does not care).
16594
16595         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
16596         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
16597         If the file already exists but is not a directory, don't bother
16598         to try to make its parents.
16599         Close potential file descriptor leak if we can't chdir("/") (!).
16600         Don't always return true if chdir($PWD) fails; return true only
16601         if the requested action was done successfully (except for the
16602         chdir($PWD)).
16603         Don't log final directory unless we actually made it.
16604         Refactor to avoid duplicate code to fix up permissions.
16605         Don't attempt to fix up parent permissions if chdir($PWD) fails.
16606
16607         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
16608         to make it a bit faster and (I hope) clearer.
16609         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
16610         Fix bug in formats like %2N.
16611
16612         * lib/verify.h: New file.
16613
16614 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16615
16616         Sync from coreutils.
16617         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
16618
16619 2005-09-22  Jim Meyering  <jim@meyering.net>
16620
16621         Sync from coreutils.
16622
16623         * m4/lstat.m4 (gl_FUNC_LSTAT):
16624         Use AC_LIBSOURCES to require lstat.c and lstat.h.
16625         Remove obsolete comment.
16626         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
16627         * m4/xstrtod.m4: Likewise.
16628
16629         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
16630
16631 2005-09-22  Jim Meyering  <jim@meyering.net>
16632
16633         Sync from coreutils.
16634
16635         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
16636
16637         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
16638         the .tm_year member, since otherwise gcc-4.0 would now warn about
16639         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
16640
16641         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
16642         order to avoid an unsuppressible warning from gcc on 64-bit systems.
16643
16644         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
16645         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
16646         when run in a time zone for which daylight savings time is in effect
16647         for the starting date.
16648
16649         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
16650         stop us from restricting permissions of just-created absolute-named
16651         directories.
16652         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
16653         to restore initial working directory.
16654         * lib/mkdir-p.c (make_dir_parents): New parameter:
16655         different_working_dir, to tell caller if/when we change the working
16656         directory and are unable to return to the initial one.
16657         * lib/mkdir-p.h (make_dir_parents): Update prototype.
16658         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
16659         `return false'.  This fixes a bug introduced on 2004-07-30.
16660
16661         * lib/openat.c (fdopendir): Be sure to close the supplied
16662         file descriptor before returning.  This makes our replacement
16663         implementation a little closer to Solaris's, where fdopendir
16664         ties the file descriptor to the returned DIR* pointer.
16665         * lib/openat.c (unlinkat): New function.
16666         * lib/openat.h (unlinkat): Add prototype.
16667         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
16668         (openat_restore_fail): Rename from openat_restore_die.
16669         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
16670
16671         Provide an alternative to exiting immediately upon save_cwd or
16672         restore_cwd failure.  Now, an application can arrange e.g.,
16673         to perform a longjump in that case.
16674         * lib/openat.c: Include dirname.h.
16675         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
16676         (rpl_openat, fdopendir, fstatat): Call openat_save_die
16677         and openat_restore_die rather than calling error directly.
16678         Don't include "error.h" or "exitfail.h"; they're no longer needed.
16679
16680         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
16681         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
16682         define.
16683
16684         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
16685         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
16686                             int utc, int nanoseconds);
16687         Background:
16688         date should not have to allocate a megabyte of virtual memory to
16689         handle a format argument like +%1048575T.  When implemented with
16690         strftime, it must allocate such a buffer, use strftime to fill it
16691         in, print it, then free it.
16692         With fprintftime, it simply prints everything and exits.
16693         With no need for memory allocation, that's one fewer way to fail.
16694         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
16695         optional field width, not before, so we accept %9:z, not %:9z.
16696         (my_strftime): Be sure to use L_('x') for literals.
16697
16698         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
16699         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
16700         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
16701         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
16702         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
16703         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
16704         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
16705         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
16706         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
16707         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
16708         * lib/xgethostname.c, lib/xreadlink.c:
16709         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
16710
16711         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
16712         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
16713         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
16714         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16715         and don't include <sys/file.h>).
16716
16717 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
16718
16719         Sync from coreutils.
16720
16721         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
16722         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
16723         [!LDAV_DONE]: Avoid unused variable warning.
16724
16725 2005-09-21  Bruno Haible  <bruno@clisp.org>
16726
16727         * lib/unicodeio.h (unicode_to_mb): New declaration.
16728
16729 2005-09-20  Derek Price  <derek@ximbiot.com>
16730
16731         * lib/getaddrinfo.c: Don't include <netdb.h> included from
16732         getaddrinfo.h.
16733
16734 2005-09-20  Bruno Haible  <bruno@clisp.org>
16735
16736         * gnulib-tool: Remove trailing slashes from the values specified for
16737         --source-base, --m4-base, --tests-base, --aux-dir.
16738         Suggested by Simon Josefsson <jas@extundo.com>.
16739
16740 2005-09-20  Bruno Haible  <bruno@clisp.org>
16741
16742         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
16743         func_modules_to_filelist, func_import, func_create_testdir): Make all
16744         sorting results locale-independent, so that gnulib-cache.m4 doesn't
16745         change when gnulib-tool is invoked in a different locale.
16746
16747 2005-09-19  Simon Josefsson  <jas@extundo.com>
16748
16749         * m4/socklen.m4: Fix typo.
16750
16751 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
16752
16753         Use a consistent style for including <config.h>.
16754         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
16755         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
16756         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
16757         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
16758         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
16759         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
16760         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
16761         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
16762         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
16763         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
16764         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
16765         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
16766         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
16767         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
16768         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
16769         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
16770         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
16771         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
16772         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
16773         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
16774         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
16775         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
16776         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
16777         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
16778         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
16779         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
16780         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
16781         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
16782         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
16783         lib/xstrtoumax.c, lib/yesno.c:
16784         Standardize inclusion of config.h.
16785         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
16786         lib/inttostr.h:  Removed inclusion of config.h from header files.
16787         * lib/inttostr.c:  Adjusted in-tree users.
16788         * lib/timespec.h: Remove superfluous warning to include config.h.
16789         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
16790         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
16791         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
16792         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
16793         config.h with HAVE_CONFIG_H.
16794
16795 2005-09-19  Jim Meyering  <jim@meyering.net>
16796
16797         * modules/pathmax (License): Change to LGPL.
16798
16799 2005-09-19  Derek Price  <derek@ximbiot.com>
16800
16801         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
16802
16803 2005-09-19  Bruno Haible  <bruno@clisp.org>
16804
16805         * gnulib-tool (import): Provide default for --tests-base.
16806
16807 2005-09-19  Bruno Haible  <bruno@clisp.org>
16808
16809         * doc/quote.texi: New file, extracted from gnulib.texi.
16810         * doc/ctime.texi: New file, extracted from gnulib.texi.
16811         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
16812         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
16813         * doc/gnulib.texi: Include them.
16814
16815 2005-09-18  Bruno Haible  <bruno@clisp.org>
16816
16817         Portability fix.
16818         * gnulib-tool (func_readlink): New function.
16819         (func_ln_if_changed): Use it.
16820
16821 2005-09-18  Bruno Haible  <bruno@clisp.org>
16822
16823         * gnulib-tool: Support --with-tests also with --import.
16824         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
16825         (func_import): Use variables $testsbase and $inctests. Emit a
16826         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
16827         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
16828         SUBDIRS += $testsdir.
16829         (func_create_testdir): Update.
16830
16831 2005-09-18  Bruno Haible  <bruno@clisp.org>
16832
16833         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
16834         instead of $dry_run.
16835         (func_cp_if_changed, func_mv_if_changed): Remove functions.
16836         (func_ln_if_changed): Don't handle dry-run here.
16837         (func_import): In dry-run mode, detect more precisely which actions
16838         would be performed, and don't use "...ing" verbs.
16839
16840 2005-09-18  Bruno Haible  <bruno@clisp.org>
16841
16842         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
16843         (func_import): Use join on two temporary files instead of three nested
16844         loops, in order to determine which files are new or old.
16845
16846 2005-09-18  Bruno Haible  <bruno@clisp.org>
16847
16848         * gnulib-tool (func_import): Comment out code that spits out the
16849         new files with --dry-run.
16850
16851 2005-09-18  Bruno Haible  <bruno@clisp.org>
16852
16853         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
16854
16855 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16856
16857         * lib/stat-time.h: New file.
16858         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
16859         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
16860         in a different way.
16861         (timespec_cmp): New function.
16862         * lib/utimecmp.c: Include stat-time.h.
16863         (SYSCALL_RESOLUTION): Depend on whether various struct stat
16864         members exist, not on the obsolescent ST_MTIM_NSEC.
16865         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
16866
16867 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16868
16869         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
16870
16871 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16872
16873         * MODULES.html.sh (File system functions): Add stat-time.
16874         * modules/stat-time: New file.
16875         * modules/timespec (Files): Remove m4/st_mtim.m4; this
16876         is now done in a different way, by the stat-time module.
16877         * modules/utimecmp (Depends-on): Add stat-time.
16878
16879 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
16880
16881         * m4/st_mtim.m4: Remove.  Superseded by...
16882         * m4/stat-time.m4: New file.
16883         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
16884         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
16885
16886 2005-09-15  Derek Price  <derek@ximbiot.com>
16887
16888         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
16889
16890 2005-09-15  Derek Price  <derek@ximbiot.com>
16891
16892         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
16893         * lib/regex_internal.c: Ditto, using this...
16894         (__GNUC_PREREQ): ...new macro.
16895         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
16896         using...
16897         (__GNUC_PREREQ): ...this new macro.
16898
16899         * lib/strstr.h: Include string.h. Define strstr as a macro here.
16900
16901 2005-09-15  Derek Price  <derek@ximbiot.com>
16902             Paul Eggert  <eggert@cs.ucla.edu>
16903
16904         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
16905         changes, consolidating in...
16906         * lib/regex_internal.h: ...this file.
16907
16908 2005-09-13  Jim Meyering  <jim@meyering.net>
16909
16910         * lib/canon-host.c: Filter through gnu indent and reword comments
16911         slightly.
16912         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
16913
16914 2005-09-13  Derek Price  <derek@ximbiot.com>
16915
16916         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
16917         failure.
16918         Reported by Jim Meyering  <jim@meyering.net>.
16919
16920 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16921
16922         * lib/base64.c: Typo.
16923         (base64_encode): Put b64str in initialized data section.
16924
16925 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
16926
16927         Merge glibc and coreutils changes into gnulib, plus a few
16928         extra fixes.
16929         * lib/md5.c: Use #error rather than a string.
16930         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
16931         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
16932         (__attribute__): Define to empty for non recent-GCC.
16933         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
16934         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
16935         Renamed from their non-__ counterparts, with new macros replacing
16936         them if not _LIBC.  Add __THROW attribute.
16937         (rol): Remove.
16938         (struct md5_ctx): Align buffer if using GCC.
16939         * lib/sha1.h (struct sha1_ctx): Likewise.
16940         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
16941         The old name was backwards.
16942         (NOTSWAP): Remove; not used.
16943         (rol): New macro, moved here from md5.h.
16944         (sha1_process_block): Remove a FIXME that doesn't make sense.
16945
16946 2005-09-12  Derek Price  <derek@ximbiot.com>
16947
16948         Return usable errors from canon-host.
16949         * lib/canon-host.h: New file.
16950         * lib/canon-host.c (canon_host): Wrap...
16951         (canon_host_r): ...this new function, which now relies exclusively on
16952         getaddrinfo.
16953         (ch_strerror): New function.
16954         (last_cherror): New global.
16955         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
16956         interface.
16957         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
16958         void *.
16959         (freeaddrinfo): Free ai->ai_canonname when set.
16960
16961 2005-09-12  Derek Price  <derek@ximbiot.com>
16962
16963         Make canon-host require getaddrinfo.
16964         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
16965         AC_LIBSOURCE canon-host.h.  Call...
16966         (gl_PREREQ_CANON_HOST): ...this new function, which requires
16967         gl_GETADDRINFO.
16968         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
16969
16970 2005-09-12  Derek Price  <derek@ximbiot.com>
16971
16972         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
16973         LGPL.
16974         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
16975
16976 2005-09-12  Derek Price  <derek@ximbiot.com>
16977
16978         * lib/gai_strerror.c: Include config.h when available.  Include
16979         getaddrinfo.h before other headers to test interface.
16980         Reported by Larry Jones <lawrence.jones@ugs.com>.
16981
16982 2005-09-12  Derek Price  <derek@ximbiot.com>
16983             Paul Eggert  <eggert@cs.ucla.edu>
16984
16985         * modules/glob (Files): Add glob-libc.h.
16986
16987 2005-09-12  Derek Price  <derek@ximbiot.com>
16988             Paul Eggert  <eggert@cs.ucla.edu>
16989
16990         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
16991         glob_.h, glob-libc.h.
16992         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
16993
16994 2005-09-12  Derek Price  <derek@ximbiot.com>
16995             Paul Eggert  <eggert@cs.ucla.edu>
16996
16997         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
16998         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
16999         protecting things that should be done only in gnulib contexts.
17000         * lib/glob_.h: New file, containing only the glob things needed for
17001         gnulib.
17002         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17003         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17004         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17005         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17006         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17007         and to respect the namespace rules better.
17008
17009 2005-09-08  Simon Josefsson  <jas@extundo.com>
17010
17011         * modules/socklen: New file.
17012
17013 2005-09-08  Simon Josefsson  <jas@extundo.com>
17014
17015         * m4/socklen.m4: New file.
17016
17017 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17018
17019         * modules/utimens (Files): Add m4/utimbuf.m4, since
17020         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17021         Reported by Sergey Poznyakoff.
17022
17023 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17024
17025         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17026         definitions, since that's the preferred style in glibc.
17027         Fix a minor spacing issue, and update copyright notice to match
17028         glibc's.
17029
17030 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17031
17032         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17033
17034 2005-09-06  Simon Josefsson  <jas@extundo.com>
17035
17036         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17037         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17038
17039 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17040
17041         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17042         warning.
17043
17044 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17045
17046         * config/srclist.txt: Add glibc bug 1302.
17047
17048 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17049
17050         Change bitset word type from unsigned int to unsigned long int,
17051         as this has better performance on typical 64-bit hosts.
17052         Port bitset code to hosts with unusual word sizes.
17053         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17054         (build_collating_symbol):
17055         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17056         argument is a bitset.  This is merely a style issue, but it makes
17057         it clearer that an entire array is expected.
17058         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17059         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17060         Port to the case where bitset_word is not the same as unsigned int.
17061         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17062         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17063         Likewise.
17064         * lib/regexec.c (check_dst_limits_calc_pos_1,
17065         check_subexp_matching_top):
17066         (build_trtable, group_nodes_into_DFAstates):
17067         Likewise.
17068         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17069         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17070         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17071         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17072         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17073         * lib/regcomp.c (optimize_subexps, lower_subexp):
17074         Work even if bitset_word has holes in its bitwise representation.
17075         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17076         * lib/regexec.c (check_dst_limits_calc_pos_1,
17077         check_subexp_matching_top):
17078         Likewise.
17079         * lib/regex_internal.c (re_string_reconstruct):
17080         Don't assume UCHAR_MAX == 255.
17081         * lib/regex_internal.h (bitset_set_all): Likewise.
17082         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17083         All uses changed.
17084         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17085         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17086         All uses changed.
17087         (BITSET_WORD_MAX): New macro.
17088         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17089         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17090         (bitset_empty, bitset_copy):
17091         Prefer sizeof (bitset) to multiplying it out ourselves.
17092         (bitset_not_merge): Remove; unused.
17093         (bitset_contain): Return bool, not unsigned int with one bit on.
17094         All callers changed.
17095         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17096         alignment than re_node_set; do this by defining a new internal
17097         type struct dests_alloc and using it to allocate memory.
17098
17099 2005-09-05  Bruno Haible  <bruno@clisp.org>
17100
17101         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17102         links.
17103
17104 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17105
17106         * modules/size_max (Makefile.am): Add size_max.h
17107
17108 2005-09-04  Derek Price  <derek@ximbiot.com>
17109
17110         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17111
17112 2005-09-03  Simon Josefsson  <jas@extundo.com>
17113
17114         * gnulib-tool: Fix typo.
17115
17116 2005-09-03  Simon Josefsson  <jas@extundo.com>
17117
17118         * config/srclist.txt: Add glibc bug 1293.
17119
17120 2005-09-03  Derek Price  <derek@ximbiot.com>
17121
17122         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17123         From Larry Jones <lawrence.jones@ugs.com>.
17124
17125 2005-09-02  Simon Josefsson  <jas@extundo.com>
17126
17127         * modules/socklen: New file.
17128
17129 2005-09-02  Simon Josefsson  <jas@extundo.com>
17130
17131         * modules/havelib: New module.
17132
17133         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17134         Use havelib.
17135
17136 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17137
17138         Check for arithmetic overflow when calculating sizes, to prevent
17139         some buffer-overflow issues.  These patches are conservative, in the
17140         sense that when I couldn't determine whether an overflow was possible,
17141         I inserted a run-time check.
17142         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17143         macros.
17144         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17145         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17146         (re_xnrealloc, re_x2nrealloc): New inline functions.
17147         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17148         parse_bracket_exp):
17149         (build_equiv_class, build_charclass): Check for arithmetic overflow
17150         in size expression calculations.
17151         * lib/regex_internal.c (re_string_realloc_buffers):
17152         (build_wcs_upper_buffer, re_node_set_add_intersect):
17153         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17154         (re_dfa_add_node, register_state): Likewise.
17155         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17156         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17157         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17158         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17159
17160 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17161
17162         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17163         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17164
17165 2005-09-02  Bruno Haible  <bruno@clisp.org>
17166
17167         Support for lib vs. lib64 distinction on biarch platforms.
17168         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17169         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17170         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17171
17172 2005-09-02  Bruno Haible  <bruno@clisp.org>
17173
17174         * gnulib-tool (import): In the other first-use case, provide defaults
17175         as well.
17176
17177 2005-09-02  Bruno Haible  <bruno@clisp.org>
17178
17179         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17180         patches not yet found in the latest gettext release.
17181
17182 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17183
17184         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17185         to avoid a collision with bits/local_lim.h in glibc.
17186         All uses changed.  Problem reported by Dmitry V. Levin in
17187         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17188
17189         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17190         bugs in int versus size_t comparisons.
17191         (re_string_context_at): Fix bug where the code assumed that
17192         Idx is signed.
17193
17194         Use bool where appropriate.
17195         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17196         All callers changed.
17197         (calc_eclosure_iter): Likewise, for ROOT arg.
17198         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17199         (build_charclass_op): Likewise, for NON_MATCH arg.
17200         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17201         (re_string_construct_common): Likewise, for ICASE arg.
17202         * lib/regexec.c (re_search_2_stub, re_search_stub):
17203         Likewise, for RET_LEN arg.
17204         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17205         (set_regs): Likewise, for FL_BACKTRACK arg.
17206         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17207         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17208         (calc_eclosure_iter, parse_bracket_exp):
17209         Use bool for internal variables that are booleans.
17210         * lib/regexec.c (re_search_internal, check_matching,
17211         proceed_next_node):
17212         (set_regs, build_sifted_states, sift_states_bkref):
17213         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17214         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17215         (find_collation_sequence_value):
17216         Likewise.
17217         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17218         (re_node_set_compare):
17219         Return bool, not int. All callers changed.
17220         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17221         (build_trtable, check_node_accept): Likewise.
17222         * lib/regex_internal.h: Include stdbool.h.
17223
17224         Fix bugs uncovered when converting to bool.
17225         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17226         failure instead of charging ahead blindly.
17227         * lib/regex_internal.c (register_state): Likewise.
17228         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17229         for freeing internal storage.
17230         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17231         bitset pieces used as boolean, to avoid undefined behavior
17232         on hosts that do int overflow checking.
17233
17234 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17235
17236         * config/srclist.txt: Add glibc bugs 1285-1287.
17237
17238 2005-09-01  Jim Meyering  <jim@meyering.net>
17239
17240         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17241         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17242         Require gl_STAT_MACROS, too.
17243
17244 2005-09-01  Bruno Haible  <bruno@clisp.org>
17245
17246         * gnulib-tool (import): In the first-use case, provide defaults.
17247
17248 2005-09-01  Bruno Haible  <bruno@clisp.org>
17249
17250         * gnulib-tool (func_import): Remove the .tmp files.
17251
17252 2005-09-01  Bruno Haible  <bruno@clisp.org>
17253
17254         * gnulib-tool (func_import): Fix handling of symbolic links.
17255
17256 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17259         old glibc regex code mishandles strings longer than 2**31 bytes.
17260         This patch fixes this when the regex code is used in gnulib
17261         (i.e., outside glibc).
17262
17263         This patch should not affect the use of the regex code inside
17264         glibc.  No doubt this problem also needs to be handled for glibc
17265         as well, but the result will be an incompatible change to the
17266         glibc ABI, and the old ABI will have to be supported too.  That
17267         can be the the subject for another patch.
17268
17269         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17270         governing whether the rest of this patch is active.  By default,
17271         the macro is disabled and the patch has no effect.
17272         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17273         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17274         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17275         (re_match_2, re_set_registers): Use the new types.
17276         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17277         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17278         New macros.
17279         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17280         (re_string_context_at, bin_tree_t, re_dfastate_t):
17281         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17282         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17283         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17284         (re_string_char_size_at, re_string_wchar_at):
17285         (re_string_elem_size_at):
17286         Use the new types and macros to port to 64-bit hosts.
17287         Use unsigned types for internal values, so that the code
17288         mostly works even for arrays larger than SSIZE_MAX.
17289         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
17290         (search_duplicated_node, calc_eclosure_iter, fetch_number):
17291         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
17292         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
17293         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
17294         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
17295         (calc_inveclosure, parse_dup_op, build_range_exp):
17296         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
17297         (fetch_number, create_token_tree, mark_opt_subexp):
17298         Likewise.
17299         * lib/regex_internal.c (re_string_construct_common,
17300         create_ci_newstate):
17301         (create_cd_newstate, re_string_allocate, re_string_construct):
17302         (re_string_realloc_buffers, build_wcs_upper_buffer):
17303         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17304         (re_string_reconstruct, re_string_peek_byte_case):
17305         (re_string_fetch_byte_case, re_string_context_at):
17306         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17307         (re_node_set_init_copy, re_node_set_add_intersect):
17308         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17309         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17310         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17311         (re_acquire_state, re_acquire_state_context, register_state):
17312         Likewise.
17313         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
17314         search_cur_bkref_entry):
17315         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
17316         (re_search_internal, re_search_2_stub, re_search_stub)
17317         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
17318         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
17319         (update_cur_sifted_state, check_dst_limits):
17320         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17321         (check_subexp_limits, sift_states_bkref, merge_state_array):
17322         (check_subexp_matching_top, get_subexp, get_subexp_sub):
17323         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
17324         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17325         (expand_bkref_cache, check_node_accept_bytes):
17326         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
17327         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
17328         (acquire_init_state_context, check_halt_node_context):
17329         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
17330         (sift_states_backward, clean_state_log_if_needed):
17331         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
17332         (find_recover_state, transit_state_sb, transit_state_mb):
17333         (transit_state_bkref, build_trtable, match_ctx_clean):
17334         Likewise.
17335         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
17336         to work around an assumption that REG_MISSING is negative.
17337
17338         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
17339         (seek_collating_symbol_entry) [defined _LIBC]:
17340         (lookup_collation_sequence_value) [defined _LIBC]:
17341         (build_range_exp, build_collating_symbol) [defined _LIBC]:
17342         Use prototypes rather than old-style function definitions.
17343         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
17344         (transit_state_sb) [0]:
17345         (find_collation_sequence_value) [defined _LIBC]: Likewise.
17346
17347         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
17348         rm_eo.
17349
17350         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
17351         (optimize_subexps, lower_subexp):
17352         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
17353         since the signed shift might overflow.  Use 1u<<31 instead.
17354         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17355         Likewise.
17356         * lib/regexec.c (check_dst_limits_calc_pos_1,
17357         check_subexp_matching_top): Likewise.
17358
17359         * lib/regcomp.c (optimize_subexps, lower_subexp):
17360         Use CHAR_BIT rather than 8, for clarity.
17361         * lib/regexec.c (check_dst_limits_calc_pos_1):
17362         (check_subexp_matching_top): Likewise.
17363         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
17364         have to worry about portability issues when shifting it left.
17365         Remove no-longer-needed test for table_size > 0.
17366         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
17367         in a word, as the resulting behavior is undefined.
17368         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
17369         in one case, a <= should have been an <, and in another case the
17370         whole test was missing.
17371         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
17372         the standard name CHAR_BIT.
17373         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
17374         this is not true on one's complement and signed-magnitude hosts.
17375
17376         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
17377         next_last_offset.
17378         (struct re_dfa_t): Remove unused member states_alloc.
17379         * lib/regcomp.c (init_dfa): Don't initialize unused members.
17380
17381 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17382
17383         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
17384         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
17385         and large-file glibc and in 32-bit large-file Solaris.
17386
17387 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17388
17389         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
17390         lengths fit in regoff_t; this isn't true if regoff_t is the same
17391         width as size_t.
17392         * lib/regex.c (re_search_internal): 5th arg is LAST_START
17393         (= START + RANGE) instead of RANGE.  This avoids overflow
17394         problems when regoff_t is the same width as size_t.
17395         All callers changed.
17396         (re_search_2_stub): Check for overflow when adding the
17397         sizes of the two strings.
17398         (re_search_stub): Check for overflow when adding START
17399         to RANGE; if it occurs, substitute the extreme value.
17400
17401 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17402
17403         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
17404
17405 2005-08-31  Jim Meyering  <jim@meyering.net>
17406
17407         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
17408         a pointer-to-const.
17409         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
17410         (register_state): Likewise.
17411         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
17412         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17413         (group_nodes_into_DFAstates): Likewise.
17414
17415 2005-08-31  Jim Meyering  <jim@meyering.net>
17416
17417         * check-module: Add a FIXME comment.
17418
17419 2005-08-31  Eric Blake  <ebb9@byu.net>
17420
17421         * modules/unistd-safer (Files): Add unistd--.h.
17422         * modules/stdio-safer (Files): Add stdio--.h.
17423
17424 2005-08-31  Derek Price  <derek@ximbiot.com>
17425
17426         * lib/getdelim.c (getdelim): Return EOF on EOF.
17427         Reported by Larry Jones <lawrence.jones@ugs.com>.
17428
17429 2005-08-31  Bruno Haible  <bruno@clisp.org>
17430
17431         Avoid unnecessary diffs in the generated lib/Makefile.am.
17432         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
17433         the generated files.
17434         (func_import): Don't set cmd.
17435
17436 2005-08-31  Bruno Haible  <bruno@clisp.org>
17437
17438         * lib/strstr.c: Include <stddef.h>, for NULL.
17439         * lib/strcasestr.c: Likewise.
17440         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17441
17442 2005-08-31  Bruno Haible  <bruno@clisp.org>
17443
17444         * gnulib-tool: New option --macro-prefix.
17445         (func_import): Use macro_prefix.
17446         (import): Handle option --macro-prefix.
17447
17448 2005-08-31  Bruno Haible  <bruno@clisp.org>
17449
17450         * gnulib-tool (import): Rename most ac_* variables to cached_*.
17451         Also use new variables cached_lgpl, cached_libtool.
17452
17453 2005-08-31  Bruno Haible  <bruno@clisp.org>
17454
17455         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
17456         always instantiating them.
17457
17458 2005-08-31  Bruno Haible  <bruno@clisp.org>
17459
17460         * gnulib-tool (func_import): Read the previous cached settings
17461         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
17462         earlier added by gnulib but are now dropped. Warn when a gnulib file
17463         overwrites a non-gnulib file.
17464
17465 2005-08-31  Bruno Haible  <bruno@clisp.org>
17466
17467         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
17468         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
17469         projects that don't keep autogenerated files in CVS. Put into
17470         actioncmd only the specified modules, not the transitive closure.
17471
17472 2005-08-31  Bruno Haible  <bruno@clisp.org>
17473
17474         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
17475         Create directories that shall be filled.
17476         (import): Don't look for gl_* macros in configure.ac. Recurse across
17477         all directories containing a gnulib-cache.m4 files, if meaningful.
17478
17479 2005-08-31  Bruno Haible  <bruno@clisp.org>
17480
17481         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
17482         (import): Set seen_libtool when we see gl_LIBTOOL.
17483
17484 2005-08-31  Bruno Haible  <bruno@clisp.org>
17485
17486         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
17487         declaration macro definitions from generated gnulib.m4.
17488
17489 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
17490
17491         * lib/iconvme.h: Add prototype for iconv_alloc.
17492
17493 2005-08-29  Simon Josefsson  <jas@extundo.com>
17494
17495         * lib/iconvme.c: Fix errno.
17496
17497 2005-08-29  Bruno Haible  <bruno@clisp.org>
17498
17499         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
17500         that it works when the directory contains spaces.
17501
17502 2005-08-29  Bruno Haible  <bruno@clisp.org>
17503
17504         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
17505
17506 2005-08-29  Bruno Haible  <bruno@clisp.org>
17507
17508         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
17509         Emit more advice.
17510
17511 2005-08-29  Bruno Haible  <bruno@clisp.org>
17512         and Stepan Kasal  <kasal@ucw.cz>
17513
17514         * check-module: If more parameters are given, check each of them
17515         separately; add more exceptions, as noted by Jim Meyering.
17516         (check_module): New procedure.
17517         (%exempt_header): Now contains all exceptions.
17518
17519 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
17520
17521         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
17522
17523 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17524
17525         * lib/iconvme.c: Split iconv_string into iconv_alloc.
17526
17527 2005-08-28  Bruno Haible  <bruno@clisp.org>
17528
17529         * m4/gnulib-tool.m4: New file.
17530
17531 2005-08-27  Jim Meyering  <jim@meyering.net>
17532
17533         * modules/unistd-safer (Files): Add pipe-safer.c.
17534         * modules/fcntl-safer (Files): Add creat-safer.c.
17535
17536 2005-08-27  Jim Meyering  <jim@meyering.net>
17537
17538         * m4/stdlib-safer.m4: New file.  From coreutils.
17539         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
17540         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
17541         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
17542         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
17543         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
17544
17545 2005-08-27  Jim Meyering  <jim@meyering.net>
17546
17547         * lib/fopen-safer.c: Merge minor changes from coreutils.
17548         * lib/dup-safer.c: Likewise.
17549         * lib/fd-safer.c: Likewise.
17550
17551         Merge from coreutils.
17552         * lib/stdio--.h: New file.
17553         * lib/stdlib--.h: New file.
17554         * lib/mkstemp-safer.c: New file.
17555
17556         GNU tar needs these.
17557         * lib/pipe-safer.c: New file.
17558         * lib/creat-safer.c: New file.
17559         * lib/fcntl--.h (creat): Define to creat_safer.
17560         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
17561         * lib/unistd--.h (pipe): Define to pipe_safer.
17562         * lib/unistd-safer.h: Declare pipe_safer.
17563
17564 2005-08-26  Simon Josefsson  <jas@extundo.com>
17565
17566         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
17567         Haible <bruno@clisp.org>.
17568
17569 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
17570
17571         * lib/regex_internal.h: Remove all references to
17572         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
17573         or better.
17574         (bitset_not, bitset_merge, bitset_not_merge):
17575         (bitset_mask, re_string_allocate, re_string_construct):
17576         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
17577         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
17578         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
17579         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
17580         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17581         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17582         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
17583         (re_acquire_state_context):
17584         Remove unnecessary forward decls.
17585         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
17586         Put __attribute at function definition,
17587         now that the function decl has been removed.
17588         * lib/regex_internal.c (re_string_peek_byte_case):
17589         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
17590         Likewise.
17591
17592 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
17593
17594         * m4/regex.m4: Add AC_PREREQ(2.50).
17595         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
17596
17597 2005-08-25  Simon Josefsson  <jas@extundo.com>
17598
17599         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
17600         __fsetlocking.
17601
17602 2005-08-25  Simon Josefsson  <jas@extundo.com>
17603
17604         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
17605         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
17606         GLIBC specific code.
17607
17608 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         Make regex safe for g++.  This fixes one real bug (an "err"
17611         that should have been "*err").  g++ problem reported by
17612         Sam Steingold.
17613         * lib/regex_internal.h (re_calloc): New macro, consistent with
17614         re_malloc etc.  All callers of calloc changed to use re_calloc.
17615         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
17616         not int.  All callers changed.
17617         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
17618         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
17619         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
17620         (find_recover_state): Change "err" to "*err"; this fixes what
17621         appears to be a real bug.
17622         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
17623         versus int.
17624
17625 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17626
17627         * modules/regex (Depends-on): Add malloc, since the code
17628         assumes that !malloc(0) means failure.
17629
17630 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17631
17632         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
17633
17634         alloca modernization/simplification for regex.
17635         * lib/regex.c: Remove portability cruft for alloca.  This no longer
17636         needs to be at the start of the file, and can be moved into
17637         regex_internal.h and simplified.
17638         * lib/regex_internal.h: Include <alloca.h>.
17639         (__libc_use_alloca) [!defined _LIBC]: New macro.
17640         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
17641         now works outside glibc.
17642
17643 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17644
17645         * config/srclist.txt: Add glibc bugs 1241, 1245.
17646
17647 2005-08-25  Jim Meyering  <jim@meyering.net>
17648
17649         * lib/open-safer.c: Include <config.h>.
17650         Otherwise, we'd lose LARGEFILE support in any file using
17651         e.g. "fcntl--.h"
17652
17653 2005-08-25  Bruno Haible  <bruno@clisp.org>
17654
17655         * m4/minmax.m4: Require autoconf 2.52.
17656         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
17657         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
17658         alternatives of translit over the alphabet.
17659         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
17660
17661 2005-08-24  Simon Josefsson  <jas@extundo.com>
17662
17663         * tests/test-getpass.c: New file.
17664
17665 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17666
17667         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
17668         for GNU regex features.
17669
17670 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17671
17672         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
17673         * lib/regex.h (regerror): Likewise.
17674
17675         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
17676         requires this.  (The code never needed it.)
17677
17678         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
17679         All uses of recently-renamed identifiers changed to use the new,
17680         POSIX-compliant names.  The code will build and run just fine
17681         without these changes, but it's better to eat our own dog food
17682         and use the standard-conforming names.
17683
17684         * lib/regex.h: Fix a multitude of POSIX name space violations.
17685         These changes have an effect only for programs that define
17686         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
17687         do not change anything for programs compiled in the normal way.
17688         Also, there is no effect on the ABI.
17689
17690         (_REGEX_SOURCE): New macro.
17691         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
17692         defined and _GNU_SOURCE is not; this fixes a name space violation.
17693
17694         Rename the following macros to obey POSIX requirements.
17695         The old names are still visible as macros if _REGEX_SOURCE is defined.
17696         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
17697         RE_BACKSLASH_ESCAPE_IN_LISTS.
17698         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
17699         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
17700         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
17701         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
17702         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
17703         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
17704         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
17705         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
17706         (REG_INTERVALS): renamed from RE_INTERVALS.
17707         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
17708         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
17709         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
17710         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
17711         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
17712         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
17713         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
17714         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
17715         RE_UNMATCHED_RIGHT_PAREN_ORD.
17716         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
17717         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
17718         (REG_DEBUG): renamed from RE_DEBUG.
17719         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
17720         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
17721         unusual, since we can't clash with the POSIX REG_ICASE.
17722         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
17723         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
17724         (REG_NO_SUB): renamed from RE_NO_SUB.
17725         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
17726         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
17727         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
17728         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
17729         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
17730         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
17731         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
17732         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
17733         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
17734         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
17735         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
17736         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
17737         RE_SYNTAX_POSIX_MINIMAL_BASIC.
17738         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
17739         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
17740         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
17741         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
17742         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
17743         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
17744         (REG_FIXED): Renamed from REGS_FIXED.
17745         (REG_NREGS): Renamed from RE_NREGS.
17746
17747         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
17748         of other REG_* macros, since POSIX says the user is allowed to
17749         #undef these macros selectively.
17750
17751         (reg_errcode_t): Update comment stating what other tables need
17752         to be consistent.
17753
17754         Rename the following enum values to obey POSIX requirements.
17755         The old names are still visible as macros.
17756         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
17757         is not defined, since GNU is supposed to be a superset of POSIX as
17758         much as possible, and since we want reg_errcode_t to be a signed
17759         type for implementation consistency.
17760         (_REG_NOERROR): Renamed from REG_NOERROR.
17761         (_REG_NOMATCH): Renamed from REG_NOMATCH.
17762         (_REG_BADPAT): Renamed from REG_BADPAT.
17763         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
17764         (_REG_ECTYPE): Renamed from REG_ECTYPE.
17765         (_REG_EESCAPE): Renamed from REG_EESCAPE.
17766         (_REG_ESUBREG): Renamed from REG_ESUBREG.
17767         (_REG_EBRACK): Renamed from REG_EBRACK.
17768         (_REG_EPAREN): Renamed from REG_EPAREN.
17769         (_REG_EBRACE): Renamed from REG_EBRACE.
17770         (_REG_BADBR): Renamed from REG_BADBR.
17771         (_REG_ERANGE): Renamed from REG_ERANGE.
17772         (_REG_ESPACE): Renamed from REG_ESPACE.
17773         (_REG_BADRPT): Renamed from REG_BADRPT.
17774         (_REG_EEND): Renamed from REG_EEND.
17775         (_REG_ESIZE): Renamed from REG_ESIZE.
17776         (_REG_ERPAREN): Renamed from REG_ERPAREN.
17777         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
17778         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
17779         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
17780         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
17781
17782         (_REG_RE_NAME, _REG_RM_NAME): New macros.
17783         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
17784         changed.  But support the old name if the new one is not defined
17785         and if _REGEX_SOURCE.
17786
17787         Change the following member names in struct re_pattern_buffer.
17788         The old names are still supported if !_REGEX_SOURCE.
17789         The new names are always supported, regardless of _REGEX_SOURCE.
17790         (re_buffer): Renamed from buffer.
17791         (re_allocated): Renamed from allocated.
17792         (re_used): Renamed from used.
17793         (re_syntax): Renamed from syntax.
17794         (re_fastmap): Renamed from fastmap.
17795         (re_translate): Renamed from translate.
17796         (re_can_be_null): Renamed from can_be_null.
17797         (re_regs_allocated): Renamed from regs_allocated.
17798         (re_fastmap_accurate): Renamed from fastmap_accurate.
17799         (re_no_sub): Renamed from no_sub.
17800         (re_not_bol): Renamed from not_bol.
17801         (re_not_eol): Renamed from not_eol.
17802         (re_newline_anchor): Renamed from newline_anchor.
17803
17804         Change the following member names in struct re_registers.
17805         The old names are still supported if !_REGEX_SOURCE.
17806         The new names are always supported, regardless of _REGEX_SOURCE.
17807         (rm_num_regs): Renamed from num_regs.
17808         (rm_start): Renamed from start.
17809         (rm_end): Renamed from end.
17810
17811         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
17812         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
17813         Prepend __ to parameter names.
17814
17815         Undo yesterday's changes.
17816
17817 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17818
17819         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
17820         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
17821         lib/regex.c.
17822
17823 2005-08-24  Jim Meyering  <jim@meyering.net>
17824
17825         Sync from coreutils.
17826         * m4/fcntl-safer.m4: New file.
17827
17828         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
17829         and object files for this module.
17830
17831 2005-08-24  Jim Meyering  <jim@meyering.net>
17832
17833         Sync from coreutils.
17834         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
17835
17836 2005-08-24  Jim Meyering  <jim@meyering.net>
17837
17838         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
17839         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
17840
17841 2005-08-24  Jim Meyering  <jim@meyering.net>
17842
17843         * modules/fcntl-safer: New module.
17844         * modules/fts (Depends-on): Add fcntl-safer.
17845         * MODULES.html.sh (File descriptor based Input/Output):
17846         Add fcntl-safer.
17847
17848 2005-08-24  Bruno Haible  <bruno@clisp.org>
17849
17850         Support for unit test modules.
17851         * modules/README: Mention tests modules.
17852         * modules/TEMPLATE-TESTS: New file.
17853         * gnulib-tool: New options --extract-tests-module, --with-tests and
17854         --tests-base (unused for the moment).
17855         (testsbase, inctests): New variables.
17856         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
17857         (func_verify_module): Exclude TEMPLATE-TESTS.
17858         (func_verify_nontests_module, func_verify_tests_module): New functions.
17859         (func_get_dependencies): Add implicit dependency for tests modules.
17860         (func_get_tests_module): New function.
17861         (func_modules_transitive_closure): When --with-tests was specified,
17862         include the unit tests as well, unless explicitly avoided.
17863         (func_emit_lib_Makefile_am): Ignore the tests modules here.
17864         (func_emit_tests_Makefile_am): New function.
17865         (func_create_testdir): When --with-tests was specified, emit a
17866         tests/ directory.
17867         * MODULES.html.sh (Future developments): Update.
17868
17869 2005-08-24  Bruno Haible  <bruno@clisp.org>
17870
17871         * modules/tls-tests: New file.
17872         * tests/test-tls.c: New file, from GNU gettext.
17873
17874 2005-08-24  Bruno Haible  <bruno@clisp.org>
17875
17876         * modules/lock-tests: New file.
17877         * tests/test-lock.c: New file, from GNU gettext.
17878
17879 2005-08-24  Bruno Haible  <bruno@clisp.org>
17880
17881         * lib/lock.h: Add multiple inclusion guard.
17882         * lib/tls.h: Add multiple inclusion guard.
17883
17884 2005-08-24  Bruno Haible  <bruno@clisp.org>
17885
17886         * gnulib-tool: Add support for the --aux-dir option to
17887         --create-testdir, --create-megatestdir, --test, --megatest.
17888         (func_create_testdir, func_create_megatestdir): Optionally emit a
17889         AC_CONFIG_AUX_DIR directive.
17890         (create-testdir, create-megatestdir, test, megatest): Provide a
17891         default value for $auxdir.
17892
17893 2005-08-24  Bruno Haible  <bruno@clisp.org>
17894
17895         * gnulib-tool (import): Use compound statement instead of subshell
17896         where possible.
17897
17898 2005-08-24  Bruno Haible  <bruno@clisp.org>
17899
17900         * gnulib-tool (import): Change --aux-dir default to "build-aux".
17901
17902 2005-08-24  Bruno Haible  <bruno@clisp.org>
17903
17904         * gnulib-tool (func_version): Update.
17905
17906 2005-08-24  Bruno Haible  <bruno@clisp.org>
17907
17908         * gnulib-tool (func_import, func_create_testdir,
17909         func_create_megatestdir): Quote all autoconf macro arguments.
17910
17911 2005-08-24  Bruno Haible  <bruno@clisp.org>
17912
17913         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
17914         option --force, because --force causes the aclocal.m4 of each
17915         subdirectory to be newer than the corresponding config.h.in.
17916
17917 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17918
17919         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
17920         All contents moved to gl_REGEX.
17921         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
17922         assume that it does.
17923
17924 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17925
17926         * lib/regex.h (REG_NOSYS)
17927         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
17928         Define, since POSIX requires it as of 2001.
17929         (_REG_ENOSYS)
17930         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
17931         New private symbol, used to keep the enum signed in all cases.
17932         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
17933         Youngman in
17934         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
17935
17936         * lib/regex_internal.c (re_string_skip_chars, register_state):
17937         (calc_state_hash):
17938         Remove forward decls; no longer needed now that we use prototypes.
17939         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
17940         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
17941         (clean_state_log_if_needed): Likewise.
17942
17943 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17944
17945         * config/srclist.txt: Add glibc bugs 1231-1233.
17946
17947 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17948
17949         Fix problems reported by Sam Steingold in
17950         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
17951         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
17952         assumed that reg_errcode_t is a signed type, which is not
17953         necessarily true if _XOPEN_SOURCE is not defined.
17954         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
17955         since some compilers warn about it otherwise.
17956
17957 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17958
17959         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
17960         (init_word_char, create_initial_state, duplicate_node_closure):
17961         (fetch_token, peek_token_bracket, build_range_exp):
17962         (build_collating_symbol): Remove forward decls; no longer needed
17963         now that we use prototypes.
17964
17965         * lib/regcomp.c:
17966         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
17967         (re_compile_fastmap_iter, regcomp, regerror, regfree):
17968         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
17969         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
17970         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
17971         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
17972         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
17973         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
17974         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
17975         (build_range_exp, build_collating_symbol, parse_bracket_exp):
17976         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
17977         (build_charclass, build_charclass_op, fetch_number, create_tree):
17978         (create_token_tree, mark_opt_subexp, duplicate_tree):
17979         Use prototypes rather than old-style definitions.
17980
17981         * lib/regex_internal.c:
17982         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
17983         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
17984         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17985         (re_string_reconstruct, re_string_peek_byte_case):
17986         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
17987         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17988         (re_node_set_init_copy, re_node_set_add_intersect):
17989         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17990         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17991         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17992         (re_acquire_state, re_acquire_state_context, register_state):
17993         (create_ci_newstate, create_cd_newstate, free_state):
17994         Likewise.
17995         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
17996         re_search_2):
17997         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
17998         (re_search_internal, prune_impossible_nodes):
17999         (acquire_init_state_context, check_matching, static):
18000         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18001         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18002         (update_regs, sift_states_backward, build_sifted_states):
18003         (clean_state_log_if_needed, merge_state_array):
18004         (update_cur_sifted_state, add_epsilon_src_nodes):
18005         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18006         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18007         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18008         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18009         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18010         (check_arrival, check_arrival_add_next_nodes):
18011         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18012         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18013         (check_node_accept_bytes, check_node_accept, extend_buffers):
18014         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18015         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18016         (sift_ctx_init):
18017         Likewise.
18018
18019         * lib/regex_internal.h:
18020         (re_string_allocate, re_string_construct, re_string_reconstruct):
18021         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18022         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18023         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18024         (re_string_context_at, re_string_peek_byte_case):
18025         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18026         is defined, since we now use prototypes always.
18027
18028         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18029         C89 or better.  All uses removed.
18030
18031 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18032
18033         * config/srclist.txt: Add glibc bugs 1220-1227.
18034
18035 2005-08-20  Jim Meyering  <jim@meyering.net>
18036
18037         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18038         of unused local, dfa.
18039
18040 2005-08-20  Bruno Haible  <bruno@clisp.org>
18041
18042         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18043
18044 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18045
18046         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18047         (re_node_set_insert_last, re_dfa_add_node):
18048         Rename local variables to avoid GCC shadowing warnings.
18049
18050 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18051
18052         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18053         [defined lint]: Suppress bogus uninitialized-variable warnings.
18054
18055         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18056         and let the caller return REG_ESPACE if out of space.  This
18057         removes an uninitialied-variable warning with GCC 4.0.1, and also
18058         avoids taking the address of a local variable.  All callers
18059         changed.
18060
18061 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18062
18063         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18064         $LIBCSRC/posix/regexec.c.
18065         Add glibc bug 1217 for regcomp.c.
18066
18067 2005-08-19  Jim Meyering  <jim@meyering.net>
18068
18069         * lib/regexec.c (proceed_next_node): Redo local variables to
18070         avoid GCC shadowing warnings.
18071
18072 2005-08-18  Bruno Haible  <bruno@clisp.org>
18073
18074         * lib/strstr.c (strstr): Fix return value in multibyte case.
18075         * lib/strcasestr.c (strcasestr): Likewise.
18076
18077 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18078
18079         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18080
18081 2005-08-17  Jim Meyering  <jim@meyering.net>
18082
18083         Make the %s format (seconds since the epoch) work for a negative
18084         number and when used with a zero-padded field width, e.g. %015s.
18085
18086         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18087         label so that it precedes the code to set `digits'.  Otherwise,
18088         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18089         print `00-22'.  Now, it prints `-0022', as it should.
18090
18091 2005-08-17  Bruno Haible  <bruno@clisp.org>
18092
18093         * modules/strstr (Files): Add m4/mbrtowc.m4.
18094         (Depends-on): Add mbuiter.
18095
18096 2005-08-17  Bruno Haible  <bruno@clisp.org>
18097
18098         * modules/strcasestr: New file.
18099         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18100         strcasestr.
18101
18102 2005-08-17  Bruno Haible  <bruno@clisp.org>
18103
18104         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18105
18106 2005-08-17  Bruno Haible  <bruno@clisp.org>
18107
18108         * modules/mbuiter: New file.
18109         * MODULES.html.sh (Extended multibyte and wide character utilities):
18110         Add mbuiter.
18111
18112 2005-08-17  Bruno Haible  <bruno@clisp.org>
18113
18114         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18115         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18116
18117 2005-08-17  Bruno Haible  <bruno@clisp.org>
18118
18119         * m4/strcasestr.m4: New file.
18120
18121 2005-08-17  Bruno Haible  <bruno@clisp.org>
18122
18123         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18124         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18125
18126 2005-08-17  Bruno Haible  <bruno@clisp.org>
18127
18128         * lib/strcasestr.h: New file.
18129         * lib/strcasestr.c: New file.
18130
18131 2005-08-17  Bruno Haible  <bruno@clisp.org>
18132
18133         * lib/strcasecmp.c: Use mbuiter.h.
18134
18135 2005-08-17  Bruno Haible  <bruno@clisp.org>
18136
18137         * lib/mbuiter.h: New file.
18138
18139 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18140
18141         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18142         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18143         and gl_GETOPT are both invoked via different paths (as happens
18144         with GNU tar CVS because it uses both argp and getopt), the former
18145         wins.
18146
18147 2005-08-16  Bruno Haible  <bruno@clisp.org>
18148
18149         * modules/tls: New file.
18150         * MODULES.html.sh (Multithreading): Add tls.
18151
18152 2005-08-16  Bruno Haible  <bruno@clisp.org>
18153
18154         * modules/strnlen1: New file.
18155         * MODULES.html.sh (String handling): Add strnlen1.
18156
18157 2005-08-16  Bruno Haible  <bruno@clisp.org>
18158
18159         * modules/strcase (Files): Add m4/mbrtowc.m4.
18160         (Depends-on): Add strnlen1, mbchar.
18161
18162 2005-08-16  Bruno Haible  <bruno@clisp.org>
18163
18164         * modules/mbiter: New file.
18165         * MODULES.html.sh (Extended multibyte and wide character utilities):
18166         Add mbiter.
18167
18168 2005-08-16  Bruno Haible  <bruno@clisp.org>
18169
18170         * modules/mbfile: New file.
18171         * MODULES.html.sh (Extended multibyte and wide character utilities):
18172         Add mbfile.
18173
18174 2005-08-16  Bruno Haible  <bruno@clisp.org>
18175
18176         * modules/mbchar: New file.
18177         * MODULES.html.sh (Extended multibyte and wide character utilities):
18178         New section.
18179
18180 2005-08-16  Bruno Haible  <bruno@clisp.org>
18181
18182         * m4/tls.m4: New file, from GNU gettext.
18183
18184 2005-08-16  Bruno Haible  <bruno@clisp.org>
18185
18186         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18187         always.
18188         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18189
18190 2005-08-16  Bruno Haible  <bruno@clisp.org>
18191
18192         * m4/mbiter.m4: New file.
18193
18194 2005-08-16  Bruno Haible  <bruno@clisp.org>
18195
18196         * m4/mbfile.m4: New file.
18197
18198 2005-08-16  Bruno Haible  <bruno@clisp.org>
18199
18200         * m4/mbchar.m4: New file.
18201
18202 2005-08-16  Bruno Haible  <bruno@clisp.org>
18203
18204         * lib/tls.h: New file, from GNU gettext.
18205         * lib/tls.c: New file, from GNU gettext.
18206
18207 2005-08-16  Bruno Haible  <bruno@clisp.org>
18208
18209         * lib/strnlen1.h: New file.
18210         * lib/strnlen1.c: New file.
18211
18212 2005-08-16  Bruno Haible  <bruno@clisp.org>
18213
18214         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18215         (mbi_init): Update.
18216         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18217         NUL byte, not after it.
18218
18219 2005-08-16  Bruno Haible  <bruno@clisp.org>
18220
18221         * lib/strcase.h (strcasecmp): Add note in comments.
18222         * lib/strncasecmp.c: Use code from strcasecmp.c.
18223         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18224         (strcasecmp): Work correctly in multibyte locales.
18225
18226 2005-08-16  Bruno Haible  <bruno@clisp.org>
18227
18228         * lib/mbiter.h: New file.
18229
18230 2005-08-16  Bruno Haible  <bruno@clisp.org>
18231
18232         * lib/mbfile.h: New file.
18233
18234 2005-08-16  Bruno Haible  <bruno@clisp.org>
18235
18236         * lib/mbchar.h: New file.
18237         * lib/mbchar.c: New file.
18238
18239 2005-08-16  Bruno Haible  <bruno@clisp.org>
18240
18241         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18242         the valid ones. Makes the comparison operations transitive:
18243         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18244         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18245
18246 2005-08-15  Simon Josefsson  <jas@extundo.com>
18247
18248         * modules/ssize_t (License): Change to 'unlimited'.
18249
18250         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18251
18252 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18253
18254         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18255         Add comments for each pending glibc patch.
18256
18257 2005-08-15  Bruno Haible  <bruno@clisp.org>
18258
18259         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18260         __cplusplus is defined.
18261
18262 2005-08-14  Jim Meyering  <jim@meyering.net>
18263
18264         Sync from coreutils.
18265
18266         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18267         Use the hash-table-based cycle-detection code not just when
18268         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18269         Reported by James Youngman in
18270         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18271         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18272         FTS_TIGHT_CYCLE_CHECK.
18273         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18274         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18275         once again.
18276         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18277         * lib/fts.c (fd_safer): Remove decl.
18278         Include fcntl--.h rather than unistd-safer.h
18279         (fts_safe_changedir): Don't call fd_safer; no longer needed
18280         now that we include fcntl--.h.
18281
18282 2005-08-12  Simon Josefsson  <jas@extundo.com>
18283
18284         * modules/getndelim2: Use ssize_t module.
18285         * modules/getnline: Likewise.
18286         * modules/safe-read: Likewise.
18287         * modules/xreadlink: Likewise.
18288
18289         * modules/ssize_t: New file.
18290
18291 2005-08-12  Simon Josefsson  <jas@extundo.com>
18292
18293         * m4/readline.m4: Look for termcap, curses or ncurses if required.
18294
18295 2005-08-12  Simon Josefsson  <jas@extundo.com>
18296
18297         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18298         ssize_t.
18299
18300 2005-08-12  Simon Josefsson  <jas@extundo.com>
18301
18302         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
18303         readline, getdelim and check_version.
18304         (Support for systems lacking ISO C 99: Sizes of integer types):
18305         Add size_max.
18306
18307 2005-08-12  Bruno Haible  <bruno@clisp.org>
18308
18309         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
18310
18311 2005-08-11  Simon Josefsson  <jas@extundo.com>
18312
18313         * modules/readline: New file.
18314
18315         * modules/strnlen (Files): Add strnlen.h.
18316
18317 2005-08-11  Simon Josefsson  <jas@extundo.com>
18318
18319         * m4/readline.m4: New file.
18320
18321 2005-08-11  Simon Josefsson  <jas@extundo.com>
18322
18323         * lib/readline.h, readline.c: New file.
18324
18325 2005-08-11  Simon Josefsson  <jas@extundo.com>
18326
18327         * doc/gnulib.texi (Initial import, Finishing touches): Mention
18328         gl_AVOID.
18329
18330 2005-08-11  Bruno Haible  <bruno@clisp.org>
18331
18332         * lib/strnlen.h (strnlen): Change parameter name to match comment.
18333
18334 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
18335
18336         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
18337
18338 2005-08-10  Simon Josefsson  <jas@extundo.com>
18339
18340         * tests/test-iconvme.c: New file.
18341
18342 2005-08-10  Simon Josefsson  <jas@extundo.com>
18343
18344         * m4/strnlen.m4: New file.
18345
18346         * m4/strndup.m4: Don't check for strnlen declaration, done in
18347         strnlen.m4.
18348
18349 2005-08-10  Simon Josefsson  <jas@extundo.com>
18350
18351         * lib/strndup.c: Use strnlen.h.
18352
18353         * lib/strnlen.h: New file.
18354
18355 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18356
18357         * README: Typos.
18358
18359 2005-08-02  Simon Josefsson  <jas@extundo.com>
18360
18361         * modules/readline: New file.
18362
18363 2005-08-02  Simon Josefsson  <jas@extundo.com>
18364
18365         * modules/getdelim: New file.
18366
18367         * modules/getline: Rewrite, don't use getndelim2.
18368
18369 2005-08-02  Simon Josefsson  <jas@extundo.com>
18370
18371         * m4/getline.m4: Separate out getdelim stuff into separate module.
18372
18373         * m4/getdelim.m4: New file.
18374
18375 2005-08-02  Simon Josefsson  <jas@extundo.com>
18376
18377         * lib/getline.h, getline.c: Rewrite.
18378
18379         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
18380
18381 2005-07-31  Bruno Haible  <bruno@clisp.org>
18382
18383         * lib/lock.h (gl_lock_initializer): New macro.
18384         (gl_lock_define_initialized): Use it.
18385         (gl_rwlock_initializer): New macro.
18386         (gl_rwlock_define_initialized): Use it.
18387         (gl_recursive_lock_initializer): New macro.
18388         (gl_recursive_lock_define_initialized): Use it.
18389
18390 2005-07-30  Karl Berry  <karl@gnu.org>
18391
18392         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
18393         Report from Ben Pfaff, regarding getopt.
18394
18395 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
18396
18397         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
18398         normal way.
18399         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
18400         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
18401         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
18402         (gl_GETOPT): Use the new macros.  Most of the implementation
18403         is moved to the new macros.  This is for programs like Emacs
18404         that don't want all the functionality of gl_GETOPT.
18405
18406 2005-07-26  Bruno Haible  <bruno@clisp.org>
18407
18408         * m4/lock.m4: Update from GNU gettext.
18409
18410 2005-07-26  Bruno Haible  <bruno@clisp.org>
18411
18412         * lib/lock.h: Update from GNU gettext.
18413         * lib/lock.c: Update from GNU gettext.
18414
18415 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
18416
18417         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
18418         obsolescent AC_TRY_RUN.  Include the default includes files, for
18419         'exit'.
18420
18421 2005-07-24  Bruno Haible  <bruno@clisp.org>
18422
18423         * modules/visibility: New file.
18424         * MODULES.html.sh (Misc): Add visibility.
18425
18426 2005-07-24  Bruno Haible  <bruno@clisp.org>
18427
18428         * m4/visibility.m4: New file.
18429
18430 2005-07-24  Bruno Haible  <bruno@clisp.org>
18431
18432         * doc/visibility.texi: New file.
18433
18434 2005-07-22  Bruno Haible  <bruno@clisp.org>
18435
18436         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
18437         $(ALLOCA_H), redundant through BUILT_SOURCES.
18438         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
18439         redundant through BUILT_SOURCES.
18440         * modules/byteswap (Makefile.am): Remove explicit dependency on
18441         $(BYTESWAP_H), redundant through BUILT_SOURCES.
18442         * modules/fnmatch (Makefile.am): Remove explicit dependency on
18443         $(FNMATCH_H), redundant through BUILT_SOURCES.
18444         * modules/getopt (Makefile.am): Remove explicit dependency on
18445         $(GETOPT_H), redundant through BUILT_SOURCES.
18446         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
18447         redundant through BUILT_SOURCES.
18448         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
18449         redundant through BUILT_SOURCES.
18450         * modules/stdbool (Makefile.am): Remove explicit dependency on
18451         $(STDBOOL_H), redundant through BUILT_SOURCES.
18452         * modules/stdint (Makefile.am): Remove explicit dependency on
18453         $(STDINT_H), redundant through BUILT_SOURCES.
18454         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
18455         Remove explicit dependency on $(SYSEXITS_H).
18456         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
18457
18458 2005-07-18  Simon Josefsson  <jas@extundo.com>
18459
18460         * lib/check-version.c (check_version): Accept identical versions too.
18461
18462 2005-07-18  Bruno Haible  <bruno@clisp.org>
18463
18464         * modules/lock: New file.
18465         * MODULES.html.sh (Multithreading): New section.
18466
18467 2005-07-18  Bruno Haible  <bruno@clisp.org>
18468
18469         * m4/lock.m4: New file, from GNU gettext.
18470
18471 2005-07-18  Bruno Haible  <bruno@clisp.org>
18472
18473         * lib/lock.h: New file, from GNU gettext.
18474         * lib/lock.c: New file, from GNU gettext.
18475
18476 2005-07-18  Bruno Haible  <bruno@clisp.org>
18477
18478         * lib/lock.h (gl_once_t): New type.
18479         (gl_once_define, gl_once): New macros.
18480         * lib/lock.c (fresh_once): New variable.
18481         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
18482         functions.
18483
18484 2005-07-16  Simon Josefsson  <jas@extundo.com>
18485
18486         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
18487         workaround, suggested by Bruno.
18488
18489 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18490
18491         * modules/xalloc (Depends-on): Add xalloc-die.
18492         * modules/xvasprintf (Depends-on): Add xalloc-die.
18493
18494 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18495
18496         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
18497         with a minor change.
18498
18499 2005-07-15  Bruno Haible  <bruno@clisp.org>
18500
18501         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
18502         When using lib/poll.c, define poll as rpl_poll.
18503
18504 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
18505
18506         * modules/argp (Depends-on): Remove unlocked-io.
18507
18508 2005-07-14  Derek Price  <derek@ximbiot.com>
18509
18510         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
18511         for glob symlink bug.
18512
18513 2005-07-14  Bruno Haible  <bruno@clisp.org>
18514
18515         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
18516         Instead, test for *_unlocked function declarations directly.
18517
18518 2005-07-11  Simon Josefsson  <jas@extundo.com>
18519
18520         * modules/size_max: New file.
18521
18522         * modules/xsize: Depend on size_max module for size_max.m4.
18523
18524 2005-07-11  Simon Josefsson  <jas@extundo.com>
18525
18526         * lib/size_max.h: New file.
18527
18528 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
18529
18530         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
18531         copyright symbol and the year.
18532         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
18533         (version_etc_va): Use parameterized copyright notice.
18534         Reword to conform to the current GNU coding standards.
18535
18536 2005-07-11  Karl Berry  <karl@gnu.org>
18537
18538         * doc/gnulib.texi (Quoting): new node.
18539         (Initial import): more info, from Patrice.
18540
18541 2005-07-11  Bruno Haible  <bruno@clisp.org>
18542
18543         * gnulib-tool (func_usage): Document option --avoid.
18544         (Command line options): Handle --avoid.
18545         (func_acceptable): New function.
18546         (func_modules_transitive_closure): Use it.
18547
18548 2005-07-11  Bruno Haible  <bruno@clisp.org>
18549
18550         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
18551         Reported by Jim Meyering.
18552
18553 2005-07-10  Bruno Haible  <bruno@clisp.org>
18554
18555         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
18556         Needed when size_t is smaller than 'unsigned int'.
18557         Reported by Paul Eggert.
18558
18559 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18560
18561         * modules/argp (Depends-on): Add unlocked-io
18562
18563 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18564
18565         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
18566         block of defines.
18567
18568 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
18569
18570         * config/srclist.txt: Comment out regcomp.c, since we have a porting
18571         fix now.
18572
18573 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
18574         and Paul Eggert  <eggert@cs.ucla.edu>
18575
18576         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
18577         in wint_t, not wchar_t.  Remove now-unnecessary cast.
18578
18579 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18580
18581         * modules/regex (Files): Add lib/regex_internal.c,
18582         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
18583         (Depends-on): Add extensions.
18584         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
18585
18586 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18587
18588         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
18589         pathconf.
18590         * m4/same.m4 (gl_SAME): Likewise.
18591         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
18592
18593         * m4/regex.m4: Adjust to new libc regex implementation.
18594         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
18595         all the .c and .h parts of (the new) regex.
18596         Quote the m4 stuff better.
18597         Check for RE_ICASE bug of old gnulib.
18598         Check for REG_STARTEND of recent libc.
18599         Rename local variables from jm_* to gl_*.
18600         Quote operand of "test -f".
18601         Say "recent enough" version of libc, not "version 2".
18602         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
18603         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
18604         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
18605         Remove check for btowc, isascii.
18606         Require AM_LANGINFO_CODESET.
18607
18608 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18609
18610         * lib/regex.c, regex.h: Sync from libc.
18611         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
18612         * lib/regexec.c:
18613         New files, synced from libc, except that regex_internal.h
18614         currently has a small porting fix.
18615
18616 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18617
18618         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
18619         regex_internal.c, regexec.c.
18620         Add regex_internal.h too, but as a comment, since the libc version
18621         is currently broken in gnulib mode.
18622
18623 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
18624
18625         Support programs like Emacs that use gnulib but not gettext.
18626         * MODULES.html.sh (Internationalization functions): Add gettext-h.
18627         * modules/gettext-h: New file.
18628         * modules/gettext (Files): Remove lib/gettext.h.
18629         (Depends-on): Add gettext-h.
18630         (Makefile.am): Remove lib_SOURCES.
18631         * modules/argmatch, modules/c-stack, modules/closeout:
18632         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
18633         * modules/execute, modules/file-type, modules/getaddrinfo:
18634         * modules/getopt, modules/human, modules/javacomp:
18635         * modules/javaexec, modules/mkdir-p, modules/obstack:
18636         * modules/openat, modules/pagealign_alloc, modules/pipe:
18637         * modules/quotearg, modules/regex, modules/rpmatch:
18638         * modules/unicodeio, modules/userspec, modules/version-etc:
18639         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
18640         * modules/xsetenv:
18641         Depend on gettext-h, not gettext.
18642
18643 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
18644
18645         * gnulib-tool (func_import): Add support for 'public domain' license.
18646         * modules/alloca, modules/atexit, modules/memmove:
18647         Now public domain, not GPL.
18648         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
18649         * modules/realloc, modules/strerror, modules/strtod:
18650         Now LGPL, not GPL.
18651
18652 2005-07-05  Bruno Haible  <bruno@clisp.org>
18653
18654         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
18655         autoconf CVS. Needed for mingw.
18656
18657 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18658
18659         Remove the dependency of the strftime module on the tzset module.
18660         * modules/strftime (Depends-on): Remove dependency on tzset.
18661
18662 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18663
18664         Remove the dependency of the strftime module on the tzset module.
18665         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
18666         gl_FUNC_TZSET_CLOBBER.
18667
18668 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18669
18670         Remove the dependency of the strftime module on the tzset module.
18671         * lib/strftime.c (my_strftime)
18672         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
18673         Copy the input structure, to work around some of the bug with
18674         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
18675         Solaris releases, you should also use the tzset module, but we won't
18676         require it as a dependency any more since we don't want LGPLed code
18677         to depend on GPLed code.
18678
18679 2005-07-02  Jim Meyering  <jim@meyering.net>
18680
18681         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
18682         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
18683         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
18684         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
18685
18686 2005-07-02  Jim Meyering  <jim@meyering.net>
18687
18688         * lib/backupfile.c (backup_args): Change a `0' to NULL.
18689
18690 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
18691
18692         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
18693         declares only 'struct timespec;' (!).
18694
18695 2005-07-01  Jim Meyering  <jim@meyering.net>
18696
18697         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
18698         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
18699         * lib/save-cwd.c, tempname.c:
18700         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
18701         and don't include <sys/file.h>).
18702
18703 2005-06-29  Jim Meyering  <jim@meyering.net>
18704
18705         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
18706         type name.  Use the variable name instead.
18707         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
18708         Likewise.
18709
18710 2005-06-28  Simon Josefsson  <jas@extundo.com>
18711
18712         * modules/check-version (Files): Add check-version.m4.
18713
18714 2005-06-28  Simon Josefsson  <jas@extundo.com>
18715
18716         * m4/check-version.m4: New file, suggested by Jim Meyering
18717         <jim@meyering.net>.
18718
18719 2005-06-28  Simon Josefsson  <jas@extundo.com>
18720
18721         * lib/check-version.h, lib/check-version.c: New files.
18722
18723 2005-06-28  Simon Josefsson  <jas@extundo.com>
18724
18725         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
18726         collision with global variable.  Better indentation.  Don't
18727         increment buffer pointer beyond buffer end.  Based on comments
18728         from Paul Eggert <eggert@cs.ucla.edu>.
18729
18730         * lib/base64.h: Indent.
18731
18732 2005-06-28  Simon Josefsson  <jas@extundo.com>
18733
18734         * doc/gnulib.texi (Library version handling): New section.
18735
18736 2005-06-28  Jim Meyering  <jim@meyering.net>
18737
18738         * check-module (find_included_lib_files): Hard-code another
18739         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
18740         but modules/fts-lgpl (correctly) does not list those files.
18741
18742         * modules/canonicalize (Files): Add lib/pathmax.h.
18743
18744 2005-06-25  Simon Josefsson  <jas@extundo.com>
18745
18746         * modules/check-version: New file.
18747
18748 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
18749
18750         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
18751         initializer of struct addrinfo, as an indication that we don't
18752         care how many members the structure has.
18753
18754 2005-06-24  Derek Price  <derek@ximbiot.com>
18755         and Bruno Haible  <bruno@clisp.org>
18756
18757         Remove stat module & update lstat.
18758         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
18759         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
18760         * m4/stat.m4: Remove this file.
18761
18762 2005-06-24  Derek Price  <derek@ximbiot.com>
18763         and Bruno Haible  <bruno@clisp.org>
18764
18765         Remove stat module & update lstat.
18766         * lib/stat.c: Remove this file...
18767         (slash_aware_lstat): ...moving this content and its support...
18768         * lib/lstat.c (rpl_lstat): ...into here.
18769         * lib/lstat.h: New file.
18770
18771 2005-06-24  Derek Price  <derek@ximbiot.com>
18772         and Bruno Haible  <bruno@clisp.org>
18773
18774         Remove stat module & update lstat.
18775         * config/srclist.txt (libc sources): Remove stat.
18776
18777 2005-06-24  Derek Price  <derek@ximbiot.com>
18778         and Bruno Haible  <bruno@clisp.org>
18779
18780         Remove stat module & update lstat.
18781         * MODULES.html.sh (stat): Remove.
18782         * MODULES.html: Regenerated.
18783         * modules/lstat (Description): Correct function name.
18784         (Files): Add "lstat.h".
18785         (Depends-on): Remove stat, add xalloc, stat-macros.
18786         * modules/stat: Remove this file.
18787         (Include): Add "lstat.h", remove <sys/stat.h>.
18788
18789 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
18790
18791         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
18792         (ranged_convert): Don't save conversion in a temporary struct.
18793         This causes a warning with GCC 4.0.0, and anyway in the typical
18794         case it's not worth the extra 100 bytes or so of code.
18795         (ranged_convert, __mktime_internal): When calling a function via a
18796         pointer P, use P () rather than (*P) (), as we now assume C89 or
18797         better.
18798
18799 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18800
18801         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
18802         "who -r" failed to give output.  Problem reported by Tim Waugh.
18803
18804         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
18805         (xcalloc): Use it to avoid needless tests.
18806         Problem reported by Jim Meyering.
18807
18808 2005-06-20  Derek Price  <derek@ximbiot.com>
18809
18810         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
18811         unnecessary for Autoconfs > 2.59c.
18812
18813 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18814
18815         * lib/argp.h (__option_is_short): Check upper limit of
18816         __key. Isprint() requires its argument to have the value
18817         of an unsigned char or EOF.
18818
18819 2005-06-16  Jim Meyering  <jim@meyering.net>
18820
18821         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
18822         when either N or S is zero.
18823
18824 2005-06-16  Derek Price  <derek@ximbiot.com>
18825
18826         * m4/bison.m4: Declare YACC & YFLAGS precious.
18827
18828 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
18829
18830         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
18831         multibyte string or pattern, fall back on unibyte matching.
18832         Problem reported by James Youngman.
18833
18834 2005-06-08  Bruno Haible  <bruno@clisp.org>
18835
18836         * modules/csharpcomp: New file.
18837         * MODULES.html.sh (C#): Add csharpcomp.
18838
18839 2005-06-08  Bruno Haible  <bruno@clisp.org>
18840
18841         * m4/csharpcomp.m4: New file, from GNU gettext.
18842
18843 2005-06-08  Bruno Haible  <bruno@clisp.org>
18844
18845         * lib/csharpcomp.h: New file, from GNU gettext.
18846         * lib/csharpcomp.c: New file, from GNU gettext.
18847         * lib/csharpcomp.sh.in: New file, from GNU gettext.
18848
18849 2005-06-08  Bruno Haible  <bruno@clisp.org>
18850
18851         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
18852         warning on mingw.
18853
18854 2005-06-07  Derek Price  <derek@ximbiot.com>
18855
18856         Sync from CVS.
18857         * lib/glob_.h: Indent nested #ifdef.
18858
18859 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18860
18861         Sync from coreutils.
18862         Use "file name" when talking about file names, instead of "filename"
18863         or "path", as per the GNU coding standards.
18864         * lib/mkdir-p.c: Renamed from makepath.c.
18865         (make_dir_parents): Renamed from make_path.  All callers changed.
18866         * lib/mkdir-p.h: Likewise.  All includers changed.
18867         * lib/filenamecat.c: Renamed from path-concat.c.
18868         (file_name_concat): Renamed from path_concat.  All callers changed.
18869         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
18870         * lib/filenamecat.h: Likewise.  All includers changed.
18871         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
18872         in comments or local variable names.
18873         * lib/basename.c: Likewise.
18874         * lib/canonicalize.c, canonicalize.h: Likewise.
18875         * lib/dirname.c, dirname.h: Likewise.
18876         * lib/euidaccess.c: Likewise.
18877         * lib/exclude.c: Likewise
18878         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
18879         * lib/fsusage.c, fsuage.h: Likewise.
18880         * lib/fts.c, fts_.h: Likewise.
18881         * lib/getcwd.c: Likewise.
18882         * lib/getloadavg.c: Likewise.
18883         * lib/mkstemp.c: Likewise.
18884         * lib/mountlist.c, mountlist.h: Likewise.
18885         * lib/openat.c, openat.h: Likewise.
18886         * lib/readlink-stub.c: Likewise.
18887         * lib/readutmp.c, readutmp.h: Likewise.
18888         * lib/rename.c: Likewise.
18889         * lib/rmdir.c: Likewise.
18890         * lib/same.c: Likewise.
18891         * lib/savedir.c: Likewise.
18892         * lib/stripslash.c: Likewise.
18893         * lib/tempname.c: Likewise.
18894         * lib/xreadlink.c: Likewise.
18895         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
18896         All uses changed.
18897         * lib/exclude.h: Likewise.
18898
18899         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
18900         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18901         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
18902         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18903         * lib/pathmax.h: Include <limits.h> unconditionally, since other
18904         files have been getting away with it for years (MORE/BSD 4.3
18905         is extinct now).
18906         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
18907         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18908
18909         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
18910         Define to 256, not 255, as per modern POSIX.
18911
18912 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18913
18914         Sync from coreutils.
18915         Use "file name" when talking about file names, instead of "filename"
18916         or "path", as per the GNU coding standards.
18917         * MODULES.html.sh: mkdir-p renamed from makepath.
18918         filenamecat renamed from path-concat.
18919         * modules/filenamecat: Renamed from modules/path-concat.
18920         (Files): filenamecat.h and filenamecat.c renamed from
18921         path-concat.h and path-concat.c.
18922         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
18923         (Include): filenamecat.h, not path-concat.h.
18924         * modules/mkdir-p: Renamed from modules/makepath.
18925         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
18926         makepath.c.
18927         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
18928         (Include): mkdir-p.h, not makepath.h.
18929
18930 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18931
18932         Sync from coreutils.
18933         * m4/mkdir-p.m4: Renamed from makepath.m4.
18934         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
18935         Rename files from makepath.c to mkdir-p.c, and from
18936         makepath.h to mkdir-p.h.
18937         * m4/filenamecat.m4: Renamed from path-concat.m4.
18938         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
18939         Rename files from path-concat.c to filenamecat.c,
18940         and from path-concat.h to filenamecat.h.
18941         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
18942         "file name" in local variables or comments.
18943         * m4/rename.m4: Likewise.
18944
18945 2005-06-01  Bruno Haible  <bruno@clisp.org>
18946
18947         * modules/csharpexec: New file.
18948         * MODULES.html.sh (C#): New section.
18949
18950 2005-06-01  Bruno Haible  <bruno@clisp.org>
18951
18952         * m4/csharp.m4: New file, from GNU gettext.
18953         * m4/csharpexec.m4: New file, from GNU gettext.
18954
18955 2005-06-01  Bruno Haible  <bruno@clisp.org>
18956
18957         * lib/csharpexec.h: New file, from GNU gettext.
18958         * lib/csharpexec.c: New file, from GNU gettext.
18959         * lib/csharpexec.sh.in: New file, from GNU gettext.
18960
18961 2005-05-31  Derek Price  <derek@ximbiot.com>
18962             Paul Eggert  <eggert@cs.ucla.edu>
18963
18964         Sync from cvs.
18965         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
18966
18967 2005-05-31  Derek Price  <derek@ximbiot.com>
18968             Paul Eggert  <eggert@cs.ucla.edu>
18969
18970         Sync from cvs.
18971         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
18972
18973 2005-05-29  Derek Price  <derek@ximbiot.com>
18974
18975         * config/srclist.txt (glob_.h, glob.c): Add these files.
18976
18977 2005-05-29  Derek Price  <derek@ximbiot.com>
18978
18979         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
18980         * modules/glob: New file.
18981         * modules/getlogin_r: Add link to POSIX spec in description.
18982
18983 2005-05-29  Derek Price  <derek@ximbiot.com>
18984             Paul Eggert  <eggert@cs.ucla.edu>
18985
18986         * m4/glob.m4: New file.
18987
18988 2005-05-29  Derek Price  <derek@ximbiot.com>
18989             Paul Eggert  <eggert@cs.ucla.edu>
18990
18991         * lib/glob_.h, lib/glob.c: New files.
18992
18993 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18994
18995         * modules/fts (Files): Remove m4/inttypes-pri.m4.
18996         * modules/fts-lgpl (Depends-on): Remove gettext.
18997
18998 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18999
19000         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19001         and don't require gt_INTTYPES_PRI.
19002
19003 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19004
19005         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19006
19007         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19008         the configuration hassle isn't worth it.
19009         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19010         (LONGEST_MODIFIER, PRIuMAX): Remove.
19011
19012 2005-05-27  Bruno Haible  <bruno@clisp.org>
19013
19014         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19015
19016 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19017
19018         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19019         _POSIX_PTHREAD_SEMANTICS for Solaris.
19020
19021 2005-05-25  Derek Price  <derek@ximbiot.com>
19022
19023         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19024
19025 2005-05-25  Derek Price  <derek@ximbiot.com>
19026             Paul Eggert  <eggert@cs.ucla.edu>
19027
19028         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19029         * lib/getlogin_r.c, getlogin_r.h: New files.
19030
19031 2005-05-25  Bruno Haible  <bruno@clisp.org>
19032             Derek Price  <derek@ximbiot.com>
19033
19034         * lib/getlogin_r.h: Simplify API documentation.
19035
19036 2005-05-23  Derek Price  <derek@ximbiot.com>
19037
19038         * modules/minmax (Files): Add m4/minmax.m4.
19039         (configure.ac): Add gl_MINMAX.
19040
19041 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19042
19043         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19044         so that unistd-safer.h (GPL'ed code) need not be included.
19045
19046 2005-05-22  Bruno Haible  <bruno@clisp.org>
19047
19048         * m4/minmax.m4: New file.
19049         Based on a patch by Derek Price <derek@ximbiot.com>.
19050
19051 2005-05-22  Bruno Haible  <bruno@clisp.org>
19052
19053         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19054         (INT64_MIN): Fix definition.
19055         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19056
19057         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19058         NEED_SIGNED_INT_TYPES.
19059
19060         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19061         HAVE_SYSTEM_INTTYPES.
19062
19063 2005-05-22  Bruno Haible  <bruno@clisp.org>
19064
19065         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19066         Also include <sys/param.h> if it defines MIN, MAX.
19067         Based on a patch by Derek Price <derek@ximbiot.com>.
19068
19069 2005-05-21  Jim Meyering  <jim@meyering.net>
19070
19071         * modules/fts (Files): Add m4/inttypes-pri.m4.
19072         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19073
19074 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19075
19076         New fts module.
19077         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19078         (setup_dir, free_dir): New functions.
19079         (enter_dir, leave_dir): Define trivial
19080         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19081         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19082         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19083         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19084         Move to fts-cycle.c.
19085         (fts_open): Use setup_dir.
19086         (fts_close): Use free_dir.
19087         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19088         This adds a label and some gotos, but the alternatives were messier.
19089         Check for memory allocation failure when entering a dir.
19090         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19091         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19092         (FTS): New member fts_cycle, that is a union that contains the
19093         old active_dir_ht and cycle_state.  All uses changed to mention
19094         fts_cycle.ht and fts_cycle.state.
19095         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19096         fts.c, with the following changes:
19097         (setup_dir, free_dir): New functions.
19098         (enter_dir): Now returns bool.  Return true if successful, false
19099         if memory exhausted.  All callers changed.
19100         Do not bother partly cleaning up on
19101         memory allocation failure; that is free_dir's job.
19102         However, free ad if hash_insert fails, to avoid memory leak.
19103         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19104         fts->fts_options to see which union member to use.
19105
19106 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19107
19108         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19109         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19110
19111 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19112
19113         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19114
19115 2005-05-20  Jim Meyering  <jim@meyering.net>
19116
19117         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19118         Now a macro, to pacify GCC.
19119
19120 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19121
19122         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19123         of -1.
19124
19125 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19126
19127         * lib/chown.c (rpl_chown): Return -1 on failure.
19128
19129 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19130
19131         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19132         Don't check for stddef.h.
19133         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19134         don't use its results.
19135         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19136         since we include them unconditionally.  Don't require
19137         AM_STDBOOL_H, since stdbool is a prerequisite.
19138         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19139         since we assume C89 or better.
19140         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19141         as we don't use their results.
19142         Don't check for fchdir, memmove, memset, strrchr, as we use
19143         them unconditionally.
19144         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19145         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19146
19147 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19148
19149         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19150         Include <stddef.h> unconditionally, since we assume C89 now.
19151         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19152         * lib/fts.c: Include fts_.h first, to check interface.
19153         Do not include intprops.h; no longer needed.
19154         Include cycle-check.h and hash.h, since fts_.h no longer does.
19155         Remove unnecessary casts of closedir to void.
19156         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19157         decide whether to decrement nlinks.
19158         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19159         (FTS): Use struct hash_table * instead of Hash_table, so that
19160         we no longer need to include hash.h here.
19161
19162 2005-05-18  Jim Meyering  <jim@meyering.net>
19163
19164         * modules/dirfd (License): Change to LGPL.  Most of the code
19165         is already in the public domain.
19166
19167 2005-05-18  Jim Meyering  <jim@meyering.net>
19168
19169         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19170         Reported by Yoann Vandoorselaere.
19171
19172 2005-05-17  Jim Meyering  <jim@meyering.net>
19173
19174         * m4/fts.m4: New file, from coreutils.
19175
19176 2005-05-17  Jim Meyering  <jim@meyering.net>
19177
19178         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19179
19180 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19181
19182         Sync from coreutils.
19183         * m4/unlinkdir.m4: New file.
19184
19185 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19186
19187         Sync from coreutils.
19188         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19189         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19190         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19191         White space changes only.
19192         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19193         special.
19194         * lib/yesno.c: Include getline.h, not ctype.h.
19195         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19196         Use getline to remove arbitrary restriction on response length.
19197
19198 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19199
19200         * config/srclist-update: Spell out "Street" in FSF postal
19201         mail address; this is the style the FSF seems to prefer.
19202
19203         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19204         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19205         this updates FSF postal mail address.
19206
19207         Sync from coreutils.
19208         * modules/unlinkdir: New file.
19209         * modules/yesno (Depends-on): Add getline.
19210         * MODULES.html.sh (File system functions): Add unlinkdir.
19211
19212 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19213
19214         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19215         lib/strsep.h:
19216         Change the initial comment to refer to GPL, not LGPL.
19217         gnulib-tool will change it to LGPL as needed.
19218
19219         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19220         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19221         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19222         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19223         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19224         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19225         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19226         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19227         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19228         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19229         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19230         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19231         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19232         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19233         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19234         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19235         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19236         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19237         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19238         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19239         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19240         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19241         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19242         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19243         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19244         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19245         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19246         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19247         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19248         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19249         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19250         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19251         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19252         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19253         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19254         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19255         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19256         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19257         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19258         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19259         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19260         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19261         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19262         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19263         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19264         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19265         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19266         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19267         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19268         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19269         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19270         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19271         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19272         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19273         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19274         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19275         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19276         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19277         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19278         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19279         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19280         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19281         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19282         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19283         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19284         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
19285         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
19286         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
19287         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
19288         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
19289         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
19290         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
19291         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
19292         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
19293         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
19294         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
19295         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
19296         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
19297         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
19298         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
19299         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
19300         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
19301         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
19302         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
19303         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
19304         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
19305         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
19306         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
19307         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
19308         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
19309         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
19310         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
19311         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
19312         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
19313         lib/yesno.c, lib/yesno.h:
19314         Update FSF postal mail address.
19315
19316 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19317
19318         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
19319         tests/test-memmem.c, tests/test-stpncpy.c:
19320         Update FSF postal mail address.
19321
19322 2005-05-13  Bruno Haible  <bruno@clisp.org>
19323
19324         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
19325         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
19326         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
19327         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
19328         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
19329         Add support for 64-bit integers in the MSVC compiler.
19330
19331 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19332
19333         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
19334
19335 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
19336
19337         * gnulib-tool (func_import): Sort and uniquify recommended includes.
19338
19339 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
19340
19341         * doc/getdate.texi (General date syntax): Don't say that date
19342         date --iso-8601=ns generates acceptable dates; it doesn't yet.
19343         Problem reported by Nic Ferrier.
19344
19345 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19346
19347         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
19348         specified in ai_socktype. Fix invalid ai_protocol
19349         check. ai_protocol is usually set to 0 or depending on
19350         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
19351         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
19352         ai_socktype / ai_protocol in the returned addrinfo structure.
19353
19354 2005-05-10  Simon Josefsson  <jas@extundo.com>
19355
19356         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
19357         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
19358
19359 2005-05-10  Karl Berry  <karl@gnu.org>
19360
19361         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
19362         (from http://www.gnu.org/licenses).
19363         * doc/COPYING.LIB: also rename to COPYING.LESSER.
19364         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
19365         fdl.texi suffices.
19366
19367 2005-05-10  Karl Berry  <karl@gnu.org>
19368
19369         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
19370         (COPYING.DOC): remove.
19371
19372         * config/srclist-update: new FSF address.
19373
19374 2005-05-10  Derek Price  <derek@ximbiot.com>
19375
19376         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
19377         possible.
19378
19379 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19380             Bruno Haible  <bruno@clisp.org>
19381
19382         * modules/inet_ntop: New file.
19383         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19384         inet_ntop.
19385
19386 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19387             Bruno Haible  <bruno@clisp.org>
19388
19389         * m4/inet_ntop.m4: New file.
19390
19391 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19392             Bruno Haible  <bruno@clisp.org>
19393
19394         * lib/inet_ntop.h: New file.
19395         * lib/inet_ntop.c: New file, from glibc with modifications.
19396
19397 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
19398
19399         * modules/time_r (License): Change to LGPL.
19400         * modules/extensions (License): Change to LGPL.  Actually,
19401         the license is more permissive than that, but currently gnulib-tool
19402         doesn't know how to handle more-permissive licenses.
19403
19404         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
19405         Problem reported by Dave Love.
19406
19407 2005-05-08  Jim Meyering  <jim@meyering.net>
19408
19409         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
19410         blank.
19411
19412 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19413
19414         * modules/argmatch (Depends-on): Add stdbool.
19415         * modules/backupfile (Depends-on): Likewise.
19416         * modules/chdir-long (Depends-on): Likewise.
19417         * modules/closeout (Depends-on): Likewise.
19418         * modules/cycle-check (Depends-on): Likewise.
19419         * modules/dirname (Depends-on): Likewise.
19420         * modules/fnmatch (Depends-on): Likewise.
19421         * modules/fsusage (Depends-on): Likewise.
19422         * modules/fwriteerror (Depends-on): Likewise.
19423         * modules/getcwd (Depends-on): Likewise.
19424         * modules/getloadavg (Depends-on): Likewise.
19425         * modules/hard-locale (Depends-on): Likewise.
19426         * modules/makepath (Depends-on): Likewise.
19427         * modules/mountlist (Depends-on): Likewise.
19428         * modules/nanosleep (Depends-on): Likewise.
19429         * modules/posixtm (Depends-on): Likewise.
19430         * modules/quotearg (Depends-on): Likewise.
19431         * modules/readtokens (Depends-on): Likewise.
19432         * modules/readtokens0 (Depends-on): Likewise.
19433         * modules/readutmp (Depends-on): Likewise.
19434         * modules/save-cwd (Depends-on): Likewise.
19435         * modules/strftime (Depends-on): Likewise.
19436         * modules/userspec (Depends-on): Likewise.
19437         * modules/utimecmp (Depends-on): Likewise.
19438         * modules/xgetcwd (Depends-on): Likewise.
19439         * modules/xnanosleep (Depends-on): Likewise.
19440         * modules/xstrtod (Depends-on): Likewise.
19441         * modules/yesno (Depends-on): Likewise.
19442
19443 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
19444
19445         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
19446         needless checks.
19447
19448 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19449
19450         Merge from coreutils.  Among other things,
19451         add bulletproofing for cases where stdin, stdout, or stderr are closed.
19452         * lib/fd-safer.c: New file.
19453         * lib/fcntl-safer.h, open-safer.c: Remove.
19454         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
19455         * lib/dup-safer.c: Include unistd-safer.h first.
19456         Don't include errno.h.
19457         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
19458         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
19459         * lib/file-type.c: Rely on file-type.h change.
19460         * lib/getloadavg.c: Include unistd-safer.h.
19461         (getloadavg): Use safer open.
19462         * lib/getusershell.c: Include "stdio-safer.h".
19463         (getusershell): Use safer fopen.
19464         * lib/long-options.c (long_options): Use NULL rather than 0.
19465         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
19466         'free'.
19467         * lib/modechange.c: Likewise.
19468         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
19469         (MODE_DONE): New constant.
19470         (struct mode_change): Remove 'next' member.
19471         (make_node_op_equals): New function; like the old one of the
19472         same name, except it allocates an array.
19473         (mode_compile, mode_create_from_ref): Use it.
19474         (mode_compile): Allocate result as an array, not a linked list.
19475         Parse octal string ourself, so that we catch mistakes like "+0".
19476         (mode_adjust): Arg is an array, not a linked list.
19477         * lib/modechange.c: Include stat-macros.h, xalloc.h.
19478         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
19479         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
19480         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
19481         Remove.  This is now stat-macros.h's job.
19482         (talloc): Remove.  All callers replaced by xalloc, so that
19483         our invokers don't have to worry about reporting memory failures.
19484         (make_node_op_equals): Remove.
19485         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19486         New constants.
19487         (struct mode_change): Moved here from modechange.h.
19488         (mode_append_entry): Remove.
19489         (mode_compile): Remove MASKED_OPS arg, since it encouraged
19490         apps to have incorrect behavior.  Use simpler algorithm for head
19491         and tail.  Don't futz with umask; that's now the job of mode_adjust.
19492         Detect more invalid usages rather than having somewhat-random behavior.
19493         Don't insert an "a=" action, as that leads to incorrect behavior.
19494         (mode_compile, mode_create_from_ref): Return NULL on error instead
19495         of an enum, since now there's only one way to have an error.  All
19496         callers changed.
19497         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
19498         at the correct time.  Simplify calculation of "+u" and its ilk.
19499         Don't mishandle "+X".
19500         (mode_free): Remove "register" and localize decls.
19501         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19502         (struct mode_change): Move to modechange.c; callers don't
19503         need to see this stuff.
19504         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
19505         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
19506         (mode_change, mode_adjust): Reflect the new signatures noted above.
19507         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
19508         that might redefine system include files.
19509         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
19510         (my_usleep): Use NULL rather than (void *) 0.
19511         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
19512         Use siginterrupt to specify that system calls should be interrupted.
19513         (rpl_nanosleep): Move initialization of suspended closer to call of
19514         my_usleep.
19515         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
19516         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
19517         (desirable_utmp_entry): New function.
19518         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
19519         using x2nrealloc, to simplify logic.
19520         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
19521         size calculation.  Do not assume utmp file is a regular file.
19522         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
19523         (READ_UTMP_CHECK_PIDS): New constant.
19524         * lib/save-cwd.c: Include unistd-safer.h.
19525         (save_cwd): Use fd_safer.
19526         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
19527         [!_LIBC] Include "stat-macros.h" instead.
19528         * lib/unistd-safer.h (fd_safer): New decl.
19529
19530 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19531
19532         * modules/getloadavg (Depends-on): Add unistd-safer.
19533         * modules/getusershell (Depends-on): Add stdio-safer.
19534         * modules/lstat (Depends-on): Remove xalloc.
19535         * modules/mkstemp (Depends-on): Add stat-macros.
19536         * modules/modechange (Depends-on): Remove xstrtol.
19537         Add stat-macros, xalloc.
19538         * modules/save-cwd (Depends-on): Add unistd-safer.
19539         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
19540         * modules/unistd-safer (Files): Add lib/fd-safer.c
19541         (Makefile.am): Remove lib_SOURCES.
19542
19543         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
19544         Remove fcntl-safer; unistd-safer supersedes it.
19545
19546 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19547
19548         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
19549         AC_HEADER_STAT.
19550         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
19551         (gl_PREREQ_CHOWN): Remove.
19552         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
19553         it.  Don't require AC_HEADER_STAT.
19554         (gl_PREREQ_LSTAT): Remove.
19555         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
19556         Don't require AC_HEADER_STAT.
19557         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
19558         (gl_PREREQ_RMDIR): Remove.
19559         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
19560         mention stat-macros.h or AC_HEADER_STAT, since we'll make
19561         the stat-macros module a prerequisite.
19562         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
19563         * m4/filemode.m4 (gl_FILEMODE): Likewise.
19564         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
19565         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
19566         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
19567         variable names.
19568         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
19569         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
19570         variable prefixes.
19571         * m4/fcntl-safer.m4: Remove.
19572         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
19573         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
19574         Invoke gl_PREREQ_FD_SAFER.
19575         (gl_PREREQ_FD_SAFER): New macro.
19576         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
19577         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
19578         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
19579         Remove duplicate call to AC_LIBOBJ(readutmp).
19580         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
19581
19582         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
19583         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
19584
19585 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19586
19587         * MODULES.html.sh (Misc): Add byteswap.
19588
19589 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19590
19591         * modules/getcwd (Depends-on): Add extensions.
19592         * modules/openat (Depends-on): Likewise.
19593
19594 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19595
19596         * modules/byteswap: New file.
19597
19598 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19599
19600         * m4/byteswap.m4: New file.
19601
19602 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19603
19604         * lib/byteswap_.h: New file.
19605
19606 2005-04-25  Karl Berry  <karl@gnu.org>
19607
19608         * m4/gettext.m4: Update from GNU gettext 0.14.4.
19609
19610 2005-04-25  Albert Chin  <china@thewrittenword.com>
19611
19612         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
19613         Toolkit C bug.
19614
19615 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
19616
19617         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
19618         (func_ln_if_changed) Remove forcibly for no error message
19619         in case file does not exist.
19620
19621 2005-04-19  Simon Josefsson  <jas@extundo.com>
19622
19623         * gnulib-tool (Options): Make --symlink mean --symbolic.
19624
19625 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
19626
19627         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
19628
19629 2005-04-16  Simon Josefsson  <jas@extundo.com>
19630
19631         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
19632
19633 2005-04-15  Simon Josefsson  <jas@extundo.com>
19634
19635         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
19636
19637 2005-04-15  Simon Josefsson  <jas@extundo.com>
19638
19639         * gnulib-tool: Rename --symlink to --symbolic.
19640
19641 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
19642
19643         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
19644         symbolic links to files instead of copying/moving.  Add --aux-dir,
19645         specifying directory relative --dir where auxiliary build tools
19646         are placed.
19647
19648 2005-04-14  Bruno Haible  <bruno@clisp.org>
19649
19650         * modules/allocsa (License): Change to LGPL.
19651         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
19652
19653 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
19654
19655         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
19656         that "UTC +1 second" continues to work.  Problem reported
19657         by Dmitry V. Levin.
19658         (relunit_snumber): New rule.
19659         (relunit): Use it.
19660
19661 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
19662
19663         * lib/getdate.y (universal_time_zone_table): New constant.
19664         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
19665         universal_time_zone_table.
19666         (lookup_zone): Prefer universal_time_zone_table to
19667         local_time_zone_table, so that "GMT" time stamps are allowed in
19668         London during the summer.  Problem reported by Ian Abbott.
19669
19670 2005-04-12  Jim Meyering  <jim@meyering.net>
19671
19672         * lib/human.c (humblock): Set *options even when returning due to
19673         xstrtoumax conversion failure.  Thanks to a used-uninitialized
19674         warning from gcc-4.
19675
19676 2005-04-09  Jim Meyering  <jim@meyering.net>
19677
19678         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
19679         -Wuninitialized: initialize tm0.tm_year.
19680
19681 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
19682
19683         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
19684         count, since there's no maximum.  All uses changed.
19685         Add member dsts_seen.
19686         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
19687         not being INT_MAX.
19688         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
19689         Use pc_rels_seen to decide whther a date is absolute.
19690
19691         * lib/getdate.y (number): Don't overwrite year.
19692         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
19693         check.
19694
19695 2005-04-02  Simon Josefsson  <jas@extundo.com>
19696
19697         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
19698         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
19699
19700 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
19701
19702         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
19703         where no absolute path name can be longer than PATH_MAX.
19704
19705 2005-03-27  Jim Meyering  <jim@meyering.net>
19706
19707         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
19708
19709 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
19710
19711         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
19712         "one's complement" -> "ones' complement" in comment, as per Knuth.
19713         "value of type" -> "type or expression" in comment.
19714         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
19715
19716 2005-03-26  Jim Meyering  <jim@meyering.net>
19717
19718         Comment nits.
19719         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
19720         Correct typos: s/or/of/.
19721
19722 2005-03-26  Jim Meyering  <jim@meyering.net>
19723
19724         * modules/check-include-files: Move to ../ and rename to...
19725         * check-module: ...this.
19726
19727 2005-03-25  Jim Meyering  <jim@meyering.net>
19728
19729         * modules/xvasprintf (Files): Add xalloc.h.
19730
19731 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
19732
19733         * modules/gettext (Files): config/config.rpath ->
19734         build-aux/config.rpath
19735         * modules/iconv (Files): Likewise.
19736         Problem reported by Oskar Liljeblad.
19737
19738 2005-03-23  Jim Meyering  <jim@meyering.net>
19739
19740         * modules/check-include-files: New script to check for
19741         missing dependencies, multiple includes, etc.
19742
19743         * modules/c-strtold (Depends-on): Add xalloc.
19744         * modules/c-strtod (Depends-on): Add xalloc.
19745         * modules/hash (Depends-on): Add xalloc.
19746         (Files): Remove lib/xalloc.h.
19747
19748         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
19749         * modules/userspec (Files): Add lib/inttostr.h.
19750
19751 2005-03-23  Jim Meyering  <jim@meyering.net>
19752
19753         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
19754
19755 2005-03-22  Jim Meyering  <jim@meyering.net>
19756
19757         * modules/stat-macros: New module.
19758         * modules/canonicalize, modules/euidaccess, modules/file-type,
19759         * modules/filemode, modules/lchown, modules/makepath,
19760         * modules/rmdir, modules/stat: Depend on new stat-macros module
19761         rather than listing lib/stat-macros.h manually.
19762         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
19763
19764 2005-03-22  Jim Meyering  <jim@meyering.net>
19765
19766         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
19767
19768 2005-03-22  Bruno Haible  <bruno@clisp.org>
19769
19770         * config/srclist.txt: Replace target directory 'config' with
19771         'build-aux'.
19772         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
19773         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
19774         ../build-aux/.
19775
19776 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
19777
19778         * modules/chdir-long (Depends-on): Add mempcpy.
19779
19780         * modules/acl, modules/backupfile, modules/c-strtod,
19781         modules/c-strtold, modules/canon-host, modules/canonicalize,
19782         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
19783         modules/exclude, modules/exitfail, modules/file-type,
19784         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
19785         modules/getdate, modules/getline, modules/getpagesize,
19786         modules/getpass, modules/getugroups, modules/group-member,
19787         modules/hard-locale, modules/hash, modules/human, modules/idcache,
19788         modules/inttostr, modules/long-options, modules/makepath,
19789         modules/md5, modules/memcasecmp, modules/memcoll,
19790         modules/modechange, modules/mountlist, modules/path-concat,
19791         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
19792         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
19793         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
19794         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
19795         modules/strftime, modules/strndup, modules/strverscmp,
19796         modules/timespec, modules/unlocked-io, modules/userspec,
19797         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
19798         modules/yesno:
19799         Remove lib_SOURCES line from Makefile.am section, as this is now
19800         done automatically by the corresponding Autoconf macro.
19801
19802 2005-03-21  Jim Meyering  <jim@meyering.net>
19803
19804         Changes imported from coreutils.
19805
19806         * lib/cycle-check.c: Don't include xalloc.h.
19807
19808         * lib/path-concat.c: Don't include assert.h.
19809         (path_concat): Remove assertion that would have triggered
19810         for ABASE starting with more than one slash.
19811         Reported by Andreas Schwab.
19812
19813         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
19814         properly when ABASE is an absolute file name.
19815         Correct the description of this function.
19816         Include <assert.h>.
19817         Add an assertion and a test driver.
19818         This fixes a bug introduced on 2004-07-02.
19819         Andreas Schwab reported the resulting failure of cp --parents:
19820         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
19821
19822 2005-03-21  Jim Meyering  <jim@meyering.net>
19823
19824         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
19825         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
19826
19827 2005-03-21  Jim Meyering  <jim@meyering.net>
19828         and  Paul Eggert  <eggert@cs.ucla.edu>
19829
19830         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
19831         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
19832         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
19833         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
19834         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
19835         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
19836         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
19837         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
19838         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
19839         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
19840         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
19841         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
19842         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
19843         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
19844         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
19845         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
19846         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
19847         for these modules.
19848
19849 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
19850
19851         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
19852         (which shouldn't happen), generate nothing instead of returning 0
19853         immediately, so that nstrftime (NULL, ...) doesn't return 0.
19854
19855 2005-03-16  Bruno Haible  <bruno@clisp.org>
19856
19857         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
19858         HAVE_LONGLONG_64BIT.
19859
19860 2005-03-16  Bruno Haible  <bruno@clisp.org>
19861
19862         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
19863         HAVE_LONGLONG_64BIT.
19864
19865 2005-03-16  Bruno Haible  <bruno@clisp.org>
19866
19867         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
19868         HAVE_LONGLONG_64BIT.
19869
19870 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
19871
19872         * lib/strftime.c (my_strftime): Prepend space to format so that we can
19873         reliably distinguish strftime failure from empty output on POSIX
19874         hosts.
19875
19876 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
19877
19878         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
19879         (iconv_string): Don't guess a size-zero buffer, as that might cause
19880         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
19881         result would be 'too large', where 'too large' is (heuristically)
19882         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
19883         overflow concerns.  This will prevent some unwanted malloc failures
19884         when the inputs are very large.
19885
19886 2005-03-15  Karl Berry  <karl@gnu.org>
19887
19888         * config/srclist.txt (config.rpath): from gettext.
19889         * config/config.rpath: update.
19890
19891 2005-03-15  Bruno Haible  <bruno@clisp.org>
19892
19893         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
19894         to 'negate'.
19895
19896         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
19897         variable.
19898
19899         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
19900         results.
19901
19902 2005-03-14  Simon Josefsson  <jas@extundo.com>
19903
19904         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
19905         <fx@gnu.org>.
19906
19907 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
19908
19909         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
19910         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
19911         intprops.h.
19912         * lib/strtol.c: Likewise.
19913
19914 2005-03-14  Jim Meyering  <jim@meyering.net>
19915
19916         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
19917         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
19918         to be nonzero so that we (and caller) can detect the difference
19919         between a valid zero-length expansion and an error return, even
19920         when the underlying strftime fails before writing anything into
19921         that location.
19922
19923 2005-03-14  Bruno Haible  <bruno@clisp.org>
19924
19925         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
19926         Update from GNU gettext 0.14.3.
19927
19928 2005-03-10  Jim Meyering  <jim@meyering.net>
19929
19930         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
19931
19932 2005-03-10  Jim Meyering  <jim@meyering.net>
19933
19934         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
19935         so that this module works on systems without fchdir.
19936
19937 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
19938
19939         Factor int-properties macros into a single file, except for
19940         glibc-related files.
19941         * lib/intprops.h: New file.
19942         * lib/getloadavg.c: Include it instead of limits.h.
19943         (INT_STRLEN_BOUND): Remove.
19944         * lib/human.c: Include intprops.h.
19945         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
19946         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
19947         302/1000.
19948         * lib/inttostr.h: Include intprops.h instead of limits.h.
19949         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
19950         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
19951         for consistency with intprops.h.
19952         (time_t_is_integer, twos_complement_arithmetic): Use them.
19953         * lib/sig2str.h: Include <signal.h>, intprops.h.
19954         (INT_STRLEN_BOUND): Remove.
19955         * lib/strftime.c (TYPE_SIGNED): Remove.
19956         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
19957         * lib/strtol.c: Adjust comments to match intprops.h.
19958         * lib/userspec.c: Include intprops.h.
19959         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
19960         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
19961         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
19962         instead of rolling our own expressions.
19963         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
19964
19965         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
19966         instead of int.
19967         (my_strftime): Do not mishandle years close to INT_MAX, by doing
19968         the right thing even if adding 1900 would overflow.  Similarly
19969         for tm_mon + 1 and tm_yday + 1.
19970         Make %Y always equivalent to %C%y, and similarly for %G and %g.
19971         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
19972         (DO_SIGNED_NUMBER): New macro.
19973         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
19974
19975 2005-03-07  Bruno Haible  <bruno@clisp.org>
19976
19977         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
19978
19979 2005-03-07  Bruno Haible  <bruno@clisp.org>
19980
19981         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
19982
19983 2005-03-04  Derek R. Price  <derek@ximbiot.com>
19984
19985         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
19986         (func_import): Only replace files via --import when they have actually
19987         changed.
19988
19989 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19990
19991         * m4/mmap-anon.m4: New file.
19992         * m4/pagealign_alloc.m4: New file.
19993
19994 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19995             Bruno Haible  <bruno@clisp.org>
19996
19997         * modules/pagealign_alloc: New file.
19998         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
19999
20000 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20001             Bruno Haible  <bruno@clisp.org>
20002
20003         * lib/pagealign_alloc.h: New file.
20004         * lib/pagealign_alloc.c: New file.
20005
20006 2005-03-03  Bruno Haible  <bruno@clisp.org>
20007
20008         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20009         Use an all-permissive copyright notice, recommended by RMS.
20010
20011 2005-03-02  Bruno Haible  <bruno@clisp.org>
20012
20013         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20014         of AIX, the replacement has to be done only after <string.h> is
20015         included, therefore not in config.h. stpncpy.h does the replacement,
20016         and stpncpy.c uses it.
20017
20018 2005-03-02  Bruno Haible  <bruno@clisp.org>
20019
20020         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20021         stpncpy.c uses it.
20022
20023 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20024
20025         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20026         The workaround isn't strictly needed for POSIX conformance, and
20027         it's too much of a pain to configure and maintain.  We'll ask
20028         people to fix their kernels instead.
20029         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20030         (NANOSLEEP_BUG_WORKAROUND): Remove.
20031         (xnanosleep): Remove the workaround.
20032
20033 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20034
20035         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20036         Reported by Derek Price.
20037         (Include): Add "timespec.h".
20038
20039         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20040
20041 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20042
20043         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20044         to detect nanosleep bug.
20045
20046 2005-03-01  Bruno Haible  <bruno@clisp.org>
20047
20048         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20049
20050 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20051
20052         * modules/gethrxtime: New file.
20053         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20054         (Depends-on): Add gethrxtime.
20055         (configure.ac): Add gl_XNANOSLEEP.
20056         (Makefile.am): Remove lib_SOURCES line.
20057
20058 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20059
20060         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20061         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20062
20063 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20064
20065         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20066         * lib/timespec.h (gettime): Return void, since it always
20067         succeeds now.  All uses changed.
20068         * lib/gettime.c (gettime) Likewise.
20069         [HAVE_NANOTIME]: Prefer nanotime.
20070         Assume gettimeofday succeeds, as POSIX requires.
20071         Assime time () succeeds, since other code already does.
20072         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20073         (timespec_subtract): Remove.
20074         (NANOSLEEP_BUG_WORKAROUND): New constant.
20075         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20076         things considerably.  Use it only on GNU/Linux hosts, since the
20077         workaround shouldn't be needed elsewhere.
20078
20079 2005-02-24  Bruno Haible  <bruno@clisp.org>
20080
20081         * modules/gettext (Files): Add m4/glibc2.m4.
20082
20083 2005-02-24  Bruno Haible  <bruno@clisp.org>
20084
20085         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20086         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20087         * m4/progtest.m4:
20088         Update from GNU gettext 0.14.2.
20089         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20090
20091 2005-02-24  Bruno Haible  <bruno@clisp.org>
20092
20093         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20094         * lib/config.charset: Update from GNU gettext 0.14.2.
20095
20096 2005-02-24  Bruno Haible  <bruno@clisp.org>
20097
20098         * lib/gettext.h: Update from GNU gettext 0.14.2.
20099
20100 2005-02-23  Simon Josefsson  <jas@extundo.com>
20101
20102         * m4/iconvme.m4: New file.
20103
20104 2005-02-23  Jim Meyering  <jim@meyering.net>
20105
20106         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20107         change.
20108         Thanks to Bruno Haible for catching it.
20109
20110 2005-02-22  Simon Josefsson  <jas@extundo.com>
20111
20112         * modules/iconvme: New file.
20113
20114         * MODULES.html.sh: Add iconvme.
20115
20116 2005-02-22  Simon Josefsson  <jas@extundo.com>
20117
20118         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20119
20120 2005-02-22  Simon Josefsson  <jas@extundo.com>
20121
20122         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20123
20124 2005-02-22  Jim Meyering  <jim@meyering.net>
20125
20126         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20127         s/ifndef/ifdef/.
20128
20129 2005-02-20  Neil Conway  <neilc@samurai.com>
20130
20131         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20132         returned by OSX/Darwin if the specified buffer is not large
20133         enough for the hostname.
20134
20135 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20136
20137         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20138         pass it to _help, otherwise the latter coredumps trying to
20139         dereference state.root_argp.
20140
20141 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20142
20143         * modules/chdir-long (Depends-on): Add memrchr.
20144         * modules/memrchr (Files): Add lib/memrchr.h.
20145         (Include): "memrchr.h".
20146
20147 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20148
20149         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20150
20151 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20152
20153         * lib/memrchr.h: New file.
20154         * lib/chdir-long.c: Include it.
20155         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20156         Don't bother including stddef.h.
20157
20158 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20159
20160         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20161         inclusion.
20162         Include <sys/types.h>, for dev_t.
20163         (ME_DUMMY, ME_REMOTE): Move from here....
20164         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20165         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20166         Dmitry V. Levin.
20167         Include mountlist.h first, to test the interface.
20168
20169 2005-01-29  Bruno Haible  <bruno@clisp.org>
20170
20171         * lib/progname.c (program_name): Initialize.
20172         Needed when linking statically on MacOS X.
20173
20174 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20175
20176         Sync from coreutils.
20177         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20178         (Depends-on): Add c-strtod.
20179         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20180
20181 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20182
20183         Sync from coreutils.
20184         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20185
20186         Remove files that are specific to coreutils.
20187         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20188
20189 2005-01-28  Bruno Haible  <bruno@clisp.org>
20190
20191         * modules/javacomp: New file.
20192         * MODULES.html.sh (Java): Add javacomp.
20193
20194 2005-01-28  Bruno Haible  <bruno@clisp.org>
20195
20196         * m4/javacomp.m4: New file, from GNU gettext.
20197
20198 2005-01-28  Bruno Haible  <bruno@clisp.org>
20199
20200         * lib/javacomp.sh.in: New file, from GNU gettext.
20201         * lib/javacomp.h: New file, from GNU gettext.
20202         * lib/javacomp.c: New file, from GNU gettext.
20203
20204 2005-01-26  Simon Josefsson  <jas@extundo.com>
20205
20206         * lib/gai_strerror.c: Use GPL in header.
20207
20208 2005-01-26  Bruno Haible  <bruno@clisp.org>
20209
20210         * modules/javaexec: New file.
20211         * MODULES.html.sh (Java): Add javaexec.
20212
20213 2005-01-26  Bruno Haible  <bruno@clisp.org>
20214
20215         * m4/javaexec.m4: New file, from GNU gettext.
20216
20217 2005-01-26  Bruno Haible  <bruno@clisp.org>
20218
20219         * lib/javaexec.sh.in: New file, from GNU gettext.
20220         * lib/javaexec.h: New file, from GNU gettext.
20221         * lib/javaexec.c: New file, from GNU gettext.
20222
20223 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20224
20225         * modules/lchown (Depends-on): Remove lchown.h
20226
20227 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20228
20229         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20230         must be defined if the header file was not found, in order
20231         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20232
20233 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20234
20235         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20236         initializers for struct pentry_state.
20237         (__argp_error): Check return value of __asprintf
20238         (__argp_failure): Translate error message
20239
20240         * lib/argp-parse.c: Removed braces around the expansion of N_()
20241
20242 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20243
20244         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20245         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20246         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20247         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20248         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20249         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20250         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20251         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20252         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20253         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20254         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20255         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20256         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20257         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20258         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20259         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20260         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20261         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20262         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20263         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20264         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20265         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20266         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20267         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20268         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20269         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20270         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20271         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20272         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20273         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20274         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20275         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20276         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20277         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20278         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20279         Use an all-permissive copyright notice, recommended by RMS.
20280
20281 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20282
20283         * modules/chdir-long (Depends-on): Remove mempcpy.
20284
20285 2005-01-21  Jim Meyering  <jim@meyering.net>
20286
20287         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
20288         same value as for Solaris 9.
20289
20290         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
20291         component length.  This included changing the parameter to be
20292         of type `char *' rather than `char const *'.
20293         * lib/chdir-long.h (chdir_long): Update prototype.
20294
20295         * lib/openat.c (fdopendir, fstatat): New functions.
20296         * lib/openat.h: Include headers required for use of DIR and struct
20297         stat.
20298         [AT_SYMLINK_NOFOLLOW]: Define.
20299         (fdopendir, fstatat): Add prototypes.
20300
20301 2005-01-21  Bruno Haible  <bruno@clisp.org>
20302
20303         * modules/classpath: New file.
20304         * MODULES.html.sh (Java): Add classpath.
20305
20306 2005-01-21  Bruno Haible  <bruno@clisp.org>
20307
20308         * lib/classpath.h: New file, from GNU gettext.
20309         * lib/classpath.c: New file, from GNU gettext.
20310
20311 2005-01-20  Simon Josefsson  <jas@extundo.com>
20312
20313         * modules/version-etc-fsf: New file.
20314
20315 2005-01-20  Simon Josefsson  <jas@extundo.com>
20316
20317         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
20318         * lib/version-etc.c: Remove version_etc_copyright.
20319         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
20320         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
20321
20322 2005-01-20  Simon Josefsson  <jas@extundo.com>
20323
20324         * lib/base64.h (isbase64): Add.
20325
20326         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
20327         using a unsigned prototype, don't inline.
20328         (base64_decode): Use it.
20329
20330 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20331
20332         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
20333         it.
20334
20335 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20336
20337         * lib/save-cwd.c (save_cwd): Remove code to support the case
20338         where fchdir is missing or flaky.
20339
20340 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20341
20342         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
20343
20344 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
20345
20346         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
20347         AC_LIBSOURCES now does this.
20348         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
20349         with new ullong_max module.
20350
20351 2005-01-19  Bruno Haible  <bruno@clisp.org>
20352
20353         * modules/sh-quote: New file.
20354         * MODULES.html.sh (Executing programs): Add sh-quote.
20355
20356 2005-01-19  Bruno Haible  <bruno@clisp.org>
20357
20358         * lib/sh-quote.h: New file, from GNU gettext.
20359         * lib/sh-quote.c: New file, from GNU gettext.
20360
20361 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20362
20363         Merge from coreutils.
20364         * m4/ullong_max.m4: New file.
20365         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
20366         (gl_MACROS): Assume localeconv exists.
20367
20368 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20369
20370         Merge changes from coreutils, as described below in several
20371         changelogs dated today.
20372
20373         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
20374         (O_DIRECTORY): Remove; not needed here, since "." must be
20375         a directory.  All uses removed.
20376         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
20377         universal on Suns, and we also need to test for IRIX.
20378         Revamp code to use 'if' rather than '#if'.
20379         Avoid unnecessary comparison of cwd->desc to 0.
20380
20381         * lib/utimens.c (futimens): Robustify the previous patch, by checking
20382         for known valid error numbers rather than observed invalid ones.
20383
20384 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20385
20386         * modules/ullong_max: New file.
20387
20388         * modules/chdir-long, modules/openat: New files.
20389         * modules/save-cwd (Depends-on): Depend on chdir-long.
20390         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
20391
20392 2005-01-18  Jim Meyering  <jim@meyering.net>
20393
20394         Merge from coreutils.
20395         * m4/chdir-long.m4, m4/openat.m4: New files.
20396         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
20397         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
20398         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
20399         is sane and DOES follow symlinks.  Besides, testing 20 different
20400         systems found no broken chown implementations.
20401         Prompted by a change in rsync's copy of this macro.
20402         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
20403
20404         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
20405
20406         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
20407         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
20408         NULL-means-set-to-current-time semantics.
20409         Remove temporary file immediately, rather than waiting
20410         for configure's at-exit trap code to do it.
20411
20412 2005-01-18  Jim Meyering  <jim@meyering.net>
20413
20414         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20415
20416         * lib/utimens.c (futimens): Account for the fact that futimes
20417         can also fail with errno == ENOSYS or errno == ENOENT.
20418         Patch from Dmitry V. Levin.
20419
20420         Change the name of the robust chdir function from chdir to chdir_long.
20421         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
20422         (restore_cwd): Use chdir_long, not chdir.
20423         * lib/chdir-long.c: Renamed from chdir.c.
20424         * lib/chdir-long.h: Renamed from chdir.h.
20425         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
20426         Hurd.
20427
20428 2005-01-18  Bruno Haible  <bruno@clisp.org>
20429
20430         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
20431         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
20432         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
20433         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
20434         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
20435         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
20436         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
20437         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
20438         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
20439         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
20440         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
20441         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
20442         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
20443         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
20444         Use an all-permissive copyright notice, recommended by RMS.
20445
20446 2005-01-18  Bob Proulx  <bob@proulx.com>
20447
20448         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
20449         simplify offsetof() macro construct to avoid compile failure with
20450         native HP-UX 11.0 ANSI C compiler.
20451
20452 2005-01-17  Bruno Haible  <bruno@clisp.org>
20453
20454         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
20455         redundant because stpncpy.m4 takes care of it.
20456
20457 2005-01-17  Bruno Haible  <bruno@clisp.org>
20458
20459         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
20460
20461 2005-01-17  Bruno Haible  <bruno@clisp.org>
20462
20463         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
20464         used.
20465
20466 2005-01-17  Bruno Haible  <bruno@clisp.org>
20467
20468         * lib/fwriteerror.h (fwriteerror): Change specification to include
20469         fclose.
20470         * lib/fwriteerror.c: Include <stdbool.h>.
20471         (fwriteerror): At the end, close the file stream. Record whether
20472         stdout was already closed.
20473
20474 2005-01-17  Bruno Haible  <bruno@clisp.org>
20475
20476         * lib/execute.c (environ): Declare if needed.
20477         * lib/pipe.c (environ): Likewise.
20478         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
20479
20480 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20481
20482         * modules/argp: Depend on vsnprintf
20483
20484 2005-01-10  Jim Meyering  <jim@meyering.net>
20485
20486         * modules/closeout (Depends-on): Add atexit.
20487
20488 2005-01-06  Bruno Haible  <bruno@clisp.org>
20489
20490         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
20491
20492 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
20493
20494         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
20495         definitions to be after all include files, to avoid collisions.
20496         Problem reported by Bob Proulx.
20497
20498 2005-01-04  Jim Meyering  <jim@meyering.net>
20499
20500         Changes imported from coreutils.
20501         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
20502         as the mkstemp template, use a temporary directory and an
20503         8.3-friendly template to avoid trouble on systems like DJGPP.
20504         Reported by Juan M. Guerrero via Stepan Kasal.
20505         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
20506         close. Remove the temporary directory right away, rather than waiting
20507         for configure's at-exit trap code to do it.
20508         Suggestion from Stepan Kasal.
20509
20510 2005-01-01  Simon Josefsson  <jas@extundo.com>
20511
20512         * gnulib-tool: Print #include directives when --import'ing.
20513
20514 2004-12-28  Simon Josefsson  <jas@extundo.com>
20515
20516         * tests/test-base64.c: Include required header files.  Remove
20517         unused variables.
20518
20519 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20520
20521         * modules/error (Depends-on): Remove gettext.
20522
20523 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20524
20525         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
20526         not needed.  This removes a dependency on the gettext module.
20527         [defined _LIBC]: Do not include <libintl.h>; not needed.
20528
20529 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20530
20531         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
20532         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
20533
20534 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20535
20536         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
20537         HAVE_DECL_STRTOLD.
20538
20539 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20540
20541         * modules/getdate (Depends-on): Remove alloca-opt.
20542
20543 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20544
20545         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
20546
20547 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20548
20549         * lib/argp-parse.c: Include <stddef.h>.
20550         (alignof, alignto): New macros.
20551         (parser_init): Don't assume that void * is aligned sufficiently
20552         for struct option.
20553
20554         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
20555         need to extend the stack.
20556         (YYINITDEPTH): New macro, so that the initial stack isn't overly
20557         large.
20558
20559 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20560
20561         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
20562
20563 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20564
20565         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
20566         (2004-10-24) change.  Apparently this was a false alarm.
20567
20568         * modules/getdate: Depend on alloca-opt, not alloca.
20569
20570 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20571
20572         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
20573         Remove now-obsolete comment about AIX.
20574         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
20575         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
20576         (YYMAXDEPTH): New macro.
20577
20578 2004-12-18  Simon Josefsson  <jas@extundo.com>
20579
20580         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
20581
20582 2004-12-18  Bruno Haible  <bruno@clisp.org>
20583
20584         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
20585
20586 2004-12-18  Bruno Haible  <bruno@clisp.org>
20587
20588         * lib/fatal-signal.c (fatal_signals): Make non-const.
20589         (init_fatal_signals): New function.
20590         (uninstall_handlers, install_handlers): Ignore signals that were set to
20591         SIG_IGN.
20592         (at_fatal_signal): Call init_fatal_signals.
20593         (init_fatal_signal_set): Likewise. Ignore signals that were set to
20594         SIG_IGN.
20595         Reported by Paul Eggert.
20596
20597 2004-12-18  Bruno Haible  <bruno@clisp.org>
20598
20599         * doc/alloca.texi: New file.
20600         * doc/alloca-opt.texi: New file.
20601
20602 2004-12-17  Jim Meyering  <jim@meyering.net>
20603
20604         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
20605         Otherwise, install-sh could exit with improper exit status when
20606         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
20607
20608 2004-12-16  Simon Josefsson  <jas@extundo.com>
20609
20610         * tests/test-base64.c: Add license.
20611
20612 2004-12-15  Stepan Kasal  <address@hidden>
20613
20614         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
20615
20616 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
20617
20618         * modules/getcwd (Files): Add m4/d-ino.m4.
20619         Suggested by Mark D. Baushke.
20620
20621 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20622
20623         * lib/getdate.y (textint): New member "negative".
20624         (time_zone_hhmm): New function.
20625         Expect 14 shift-reduce conflicts, not 13.
20626         (o_colon_minutes): New rule.
20627         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
20628         (yylex): Set the "negative" member of signed numbers.
20629
20630 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20631
20632         * doc/getdate.texi (Time of day items, Time zone items):
20633         Describe new formats +00:00, UTC+00:00.
20634
20635 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
20636
20637         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
20638         spurious "-l"s.  Problem reported by Stepan Kasal.
20639
20640 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
20641
20642         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
20643         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
20644
20645 2004-12-04  Simon Josefsson  <jas@extundo.com>
20646
20647         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
20648         Vandoorselaere <yoann@prelude-ids.org>.
20649
20650 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20651
20652         Changes imported from coreutils.
20653         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
20654         exist.
20655         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
20656
20657 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20658
20659         Changes imported from coreutils.
20660         * lib/hard-locale.c: Assume <locale.h> exists.
20661         Include "strdup.h".
20662         (GLIBC_VERSION): New macro.
20663         (hard_locale): Assume setlocale exists.
20664         Rewrite to avoid #ifdef.
20665         Use strdup rather than malloc + strcpy.
20666         * lib/human.c: Assume <locale.h> exists.
20667         (human_readable): Assume localeconv exists.
20668
20669 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20670
20671         * modules/hard-locale (Depends-on): Add strdup.
20672
20673 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
20674
20675         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
20676         convert T2, not T.  (Imported from libc.)
20677
20678 2004-11-30  Simon Josefsson  <jas@extundo.com>
20679
20680         * modules/restrict (License): Change to LGPL.
20681
20682 2004-11-30  Simon Josefsson  <jas@extundo.com>
20683
20684         * m4/restrict.m4: Add copyright and copying conditions.
20685
20686 2004-11-30  Simon Josefsson  <jas@extundo.com>
20687
20688         * m4/base64.m4: New file.
20689
20690 2004-11-30  Simon Josefsson  <jas@extundo.com>
20691
20692         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
20693         base64.
20694
20695         * tests/test-base64.c: New file.
20696
20697         * modules/base64: New file.
20698
20699 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20700
20701         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
20702         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
20703
20704         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
20705
20706 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20707
20708         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
20709         (__getcwd.c): Don't restore errno; glibc doesn't.
20710         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
20711         first, falling back to our code only if its results look suspicious.
20712         Ensure that the resulting buffer is only as large as necessary.
20713
20714         * lib/readutmp.c: Include readutmp.h first.
20715         Include <errno.h>, since readutmp.h no longer does that.
20716         * lib/readutmp.h: Don't include <errno.h>,
20717         <sys/param.h>, <time.h>; not needed to establish interface.
20718         (errno): Remove decl.
20719         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
20720         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
20721         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
20722
20723 2004-11-28  Simon Josefsson  <jas@extundo.com>
20724
20725         * lib/base64.h, base64.c: New file.
20726
20727 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
20728
20729         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
20730
20731 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
20732
20733         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
20734         (Depends-on): Remove pathmax, same.  Add mempcpy.
20735         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
20736         (Makefile.am): Append getcwd.h to lib_SOURCES.
20737         (Include): Add getcwd.h.
20738         (Maintainer): Change from Jim Meyering to "all, glibc",
20739         since getdate now uses intended-for-glibc code.
20740         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
20741         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
20742
20743 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20744
20745         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
20746         HP's ANSI C compiler.
20747         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
20748         Declaring int functions causes warnings on some modern systems and
20749         shouldn't be needed to compile on ancient ones.
20750         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
20751         defined.
20752
20753         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
20754         with the following changes.
20755         (__set_errno): Parenthesize properly.
20756         Include <stdbool.h>.
20757         (MIN, MAX, MATCHING_INO): New macros.
20758         (__getcwd): Define with prototype, not K&R form.
20759         Use heuristics to allocate default buffer on stack if possible.
20760         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
20761         behavior, and to avoid the PATH_MAX limit when computing
20762         ../../../../...
20763         Use MATCHING_INO to compare inode number to file.
20764         Check for arithmetic overflow in size calculations.
20765         Fix bug in reallocation of dot array that caused getcwd to fail
20766         on directories nested deeper than 75.
20767         Be more careful about saving errno on error.
20768         Do not use realloc; use only free+malloc, as this is a bit
20769         more flexible and avoids a needless copy operation.
20770         Do not inspect st_dev and st_ino for symbolic links; POSIX
20771         doesn't specify the latter.
20772         Check for closedir errors.
20773         Avoid needless casts.
20774         Use "#ifdef weak_alias" around weak_alias, to be like other
20775         glibc code.
20776         The following changes to getcwd.c have effect only when used in
20777         gnulib; they have no effect inside glibc proper.
20778         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
20779         as alloca isn't used.
20780         (alloca, __alloca): Likewise.
20781         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
20782         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20783         unconditionally, as gnulib assumes C89 or better.
20784         Do not include <sys/param.h>.
20785         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
20786         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
20787         better.
20788         (NULL) [!defined NULL]: Remove; we assume C89 or better.
20789         Include <dirent.h> in a way that is compatible with modern Autoconf.
20790         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
20791         New macros, if not already defined.
20792         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
20793         Use "_LIBC", not "defined _LIBC", for consistency.
20794         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
20795         a mempcpy module.
20796         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
20797         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
20798         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
20799         credit only to Jim Meyering and adjust the copyright dates.
20800         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
20801         <stdlib.h>, <unistd.h>, "pathmax.h".
20802         Instead, include "xgetcwd.h" (first) and "getcwd.h".
20803         (INITIAL_BUFFER_SIZE): Remove.
20804         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
20805
20806 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20807
20808         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
20809         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
20810         Use the _ONCE methods, for efficiency.
20811         Check for fcntl.h.  In test program, include <errno.h>
20812         and <fcntl.h> if available.  Remove old K&R cruft from
20813         test program.  Check for common errors in GNU/Linux,
20814         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
20815         don't do AC_LIBOBJ, as that's getcwd.m4's job.
20816         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
20817         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
20818         name accordingly.
20819         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
20820         accommodate new getcwd.c.
20821         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
20822         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
20823         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
20824         that's all we need now.
20825
20826 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20827
20828         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
20829         argp-parse.c depends on getopt internals, that means we should
20830         always use our getopt, to be on the safe side.
20831         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
20832         order not to spoil the result of an eventual previous invocation
20833         of gl_GETOPT_SUBSTITUTE.
20834
20835 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20836
20837         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
20838         redefinition warnings. To avoid them, include the defines
20839         in `#if !defined __need_getopt ... #endif'. The only place
20840         where __getopt_argv_const is used is in definitions
20841         of getopt_long and getopt_long_only below, which are as well
20842         protected by `#ifndef __need_getopt'.
20843         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
20844         __need_getopt after including <stdio.h> and <unistd.h> These
20845         headers might have defined it.
20846
20847 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
20848
20849         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
20850
20851 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
20852
20853         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
20854         (futimens): New function, which uses futimes if available.
20855         (futimens, utimens): Support timespec==NULL, with same semantics
20856         as utime and utimens.
20857         * lib/utimens.h (futimens): New decl.
20858
20859 2004-11-23  Jim Meyering  <jim@meyering.net>
20860
20861         * lib/getopt_.h: Remove trailing blanks.
20862
20863 2004-11-23  Jim Meyering  <jim@meyering.net>
20864
20865         * lib/__fpending.c: Add comment.
20866
20867 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
20868
20869         * modules/canonicalize (Depends-on): Add xreadlink.
20870         Problem reported by James Youngman.
20871
20872 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
20873
20874         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
20875         New macros.
20876         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
20877         optopt): Use them instead of invoking ## directly; otherwise, the
20878         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
20879
20880 2004-11-19  Bruno Haible  <bruno@clisp.org>
20881
20882         * lib/strtok_r.c: Move comments from here...
20883         * lib/strtok_r.h: ... to here.
20884
20885 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
20886
20887         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
20888         implementations that mishandle size_t overflow.
20889
20890 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
20891
20892         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
20893         might fail.  Problem reported by Yoann Vandoorselaere.
20894         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
20895         implementations that mishandle size_t overflow.
20896
20897 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20898
20899         * modules/canon-host (Depends-on): Add strdup.
20900
20901 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20902
20903         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
20904
20905 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20906
20907         * lib/canon-host.c: Include "strdup.h".
20908         (canon_host): Use getaddrinfo if available, so that IPv6 works.
20909         Use strdup instead of malloc/strcpy to duplicate strings.
20910
20911         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
20912         (human_space_before_unit): New constant.
20913         * lib/human.c (human_readable): Support it.
20914
20915         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
20916         (xgetcwd): Set errno correctly when failing.
20917         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
20918         the failure is actually due to a PATH_MAX problem.
20919
20920         Further getopt changes to make it more likely that glibc will
20921         buy the changes back.
20922         * lib/getopt.c (POSIXLY_CORRECT): New constant.
20923         (getopt): Use it, so to preserve glibc semantic
20924         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
20925         when compiling for libc.
20926         * lib/getopt_.h (__getopt_argv_const): Bring it back.
20927         (getopt_long, getopt_long_only): Use it.
20928
20929         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
20930         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
20931         (getopt): Argv is now char * const *, as per standard.
20932         (_getopt_internal_r, _getopt_internal): Argv is now char **,
20933         not char *__getopt_argv_const *.
20934         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
20935         _getopt_long_only_r): Likewise.
20936         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
20937         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
20938         _getopt_long_r, _getopt_long_only_r): Likewise.
20939         * lib/getopt_.h (__getopt_argv_const): Remove.
20940         (getopt): Argv is now char * const *, as per standard.
20941
20942         * lib/getdate.y (tORDINAL): New token.
20943         (day, relunit): Allow it for relative times.
20944         (relative_time_table): Use tORDINAL for ordinals.
20945
20946 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20947
20948         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
20949         Document that "second" isn't allowed as an ordinal number.
20950
20951 2004-11-16  Jim Meyering  <jim@meyering.net>
20952
20953         * modules/closeout (Depends-on): Add fpending.
20954
20955 2004-11-15  Jim Meyering  <jim@meyering.net>
20956
20957         * lib/closeout.c: Include "__fpending.h" once again.
20958         Include <stdbool.h>.
20959         (close_stdout): Don't fail just because stdout was closed initially,
20960         since some programs don't write to stdout in the normal course of
20961         operation (other than --version and --help), and we don't want this
20962         function to make e.g. `touch file >&-' fail.
20963         But do fail if it was closed and someone has tried to write to it.
20964         E.g., `printf foo >&-' must fail.
20965
20966 2004-11-13  Jim Meyering  <jim@meyering.net>
20967
20968         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
20969
20970 2004-11-12  Simon Josefsson  <jas@extundo.com>
20971
20972         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
20973         small doc fix is still pending.
20974
20975 2004-11-11  Simon Josefsson  <jas@extundo.com>
20976
20977         * modules/strtok_r: New file.
20978
20979         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20980         strtok_r.
20981
20982 2004-11-11  Simon Josefsson  <jas@extundo.com>
20983
20984         * m4/strtok_r.m4: New file.
20985
20986         * m4/getopt.m4: Replace opterr.
20987
20988 2004-11-11  Simon Josefsson  <jas@extundo.com>
20989
20990         * lib/strtok_r.h, strtok_r.c: New file.
20991
20992 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
20993
20994         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
20995         of replacing opterr, getopt, etc.  This should handle the
20996         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
20997
20998 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
20999
21000         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21001         we can stop lying to compilers about the constness of argv when we
21002         are compiled outside glibc.
21003         (getopt, getopt_long, getopt_long_only): Use it.
21004         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21005         _getopt_internal, getopt): Likewise.
21006         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21007         _getopt_long_only_r): Likewise.
21008         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21009         _getopt_long_r, _getopt_long_only_r): Likewise.
21010
21011         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21012         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21013         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21014         the other external symbols.
21015         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21016         declaration, since the above renaming now works around collisions.
21017
21018 2004-11-11  Jim Meyering  <jim@meyering.net>
21019
21020         * lib/linebreak.c: Remove trailing blanks.
21021         * lib/alloca_.h: Likewise.
21022         * lib/acosl.c: Likewise.
21023         * lib/euidaccess.c: Likewise.
21024         * lib/allocsa.h: Likewise.
21025
21026 2004-11-10  Simon Josefsson  <jas@extundo.com>
21027
21028         * m4/getaddrinfo.m4: New file.
21029
21030 2004-11-10  Simon Josefsson  <jas@extundo.com>
21031
21032         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21033
21034 2004-11-10  Simon Josefsson  <jas@extundo.com>
21035
21036         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21037         getaddrinfo.
21038
21039         * modules/getaddrinfo: New file.
21040
21041 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21042
21043         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21044
21045 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21046
21047         * lib/mktime.c (SHR): New macro, which is a portable
21048         substitute for >> that should work even on Crays.
21049         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21050         Problem reported by Mark D. Baushke in
21051         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21052         * lib/getdate.y (SHR): Likewise.
21053         (tm_diff): Use it.
21054         * lib/strftime.c (SHR): Likewise.
21055         (tm_diff): Use it.
21056         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21057         quote_these_too, so that right shifts are well defined.  All uses
21058         changed.
21059
21060 2004-11-10  Jim Meyering  <jim@meyering.net>
21061
21062         Ensure that no close failure goes unreported.
21063         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21064         return early when it seems there's nothing to flush.
21065         Don't include __fpending.h.
21066
21067 2004-11-10  Jim Meyering  <jim@meyering.net>
21068
21069         * modules/closeout (Depends-on): Remove fpending.
21070
21071 2004-11-10  Jim Meyering  <jim@meyering.net>
21072
21073         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21074
21075 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21076
21077         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21078         gl_FUNC_STRFTIME.
21079         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21080         and AC_REQUIRE when possible, to avoid duplicate checks.
21081         Check for <wchar.h>.
21082
21083 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21084
21085         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21086
21087 2004-11-09  Bruno Haible  <bruno@clisp.org>
21088
21089         * m4/sockpfaf.m4: New file.
21090
21091 2004-11-05  Bruno Haible  <bruno@clisp.org>
21092
21093         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21094         Reported by Mark D. Baushke <mdb@cvshome.org>.
21095
21096 2004-11-04  Bruno Haible  <bruno@clisp.org>
21097
21098         2004-09-11  Bruno Haible  <bruno@clisp.org>
21099                 * allocsa.valgrind: New file.
21100         2004-02-06  Bruno Haible  <bruno@clisp.org>
21101                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21102                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21103                 Reported by Christopher Seip <chris.seip@hp.com>.
21104
21105 2004-11-04  Bruno Haible  <bruno@clisp.org>
21106
21107         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21108         (Makefile.am): Distribute it.
21109
21110 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21111
21112         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21113         with errno == ERANGE if the buffer is too small.
21114         Problem reported by Mark D. Baushke.
21115
21116 2004-11-03  Albert Chin  <china@thewrittenword.com>
21117             Paul Eggert  <eggert@cs.ucla.edu>
21118
21119         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21120         equivalent, substitute $ac_type for equivalent type rather than
21121         blindly using uint32_t *always* which won't work if uint32_t is not
21122         available.  Define _UINT32_T to work around typedef of uint32_t if
21123         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21124         2.5.1.
21125
21126 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21127
21128         * m4/jm-macros.m4: Sync from coreutils.
21129         (gl_MACROS): Check for mbrlen, for pathchk.
21130         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21131
21132 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21133
21134         * lib/xreadlink.c (MAXSIZE): New macro.
21135         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21136         size does not exceed MAXSIZE.  Avoid cast.
21137         As suggested by Mark D. Baushke in
21138         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21139         if readlink fails with buffer size just under MAXSIZE, try again
21140         with MAXSIZE.
21141
21142 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21143
21144         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21145
21146 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21147         and  Paul Eggert  <eggert@cs.ucla.edu>
21148
21149         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21150         (get_date): Overparenthesize to avoid GCC warning.
21151
21152 2004-11-02  Bruno Haible  <bruno@clisp.org>
21153
21154         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21155         returns void.
21156
21157 2004-11-02  Bruno Haible  <bruno@clisp.org>
21158
21159         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21160         function returns void.
21161
21162 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21163
21164         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21165         fflush_unlocked, flockfile, funlockfile, funlockfile,
21166         fputs_unlocked, putc_unlocked.
21167
21168 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21169
21170         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21171         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21172         already declared.
21173
21174 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21175
21176         * modules/getdate (Files): Add doc/getdate.texi.
21177         (Depends-on): Add setenv, xalloc.
21178
21179 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21180
21181         * lib/getdate.y: Add support for TZ="foo" within a date string.
21182         Fix some bugs near time_t boundaries.  Reject dates with
21183         out-of-range components, e.g., "Sept 31".
21184         Include <stdlib.h>, "setenv.h", "xalloc.h".
21185         (ISDIGIT_LOCALE): Remove; unused.
21186         Note that the TZ and time functions used here are not reentrant.
21187         (mktime_ok, get_tz): New functions.
21188         (TZBUFSIZE): New constant.
21189         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21190         This requires that we sometimes generate our own TZ="XXX..." setting.
21191
21192 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21193
21194         * doc/getdate.texi: New file, from coreutils with modifications for
21195         the new TZ parsing.
21196
21197 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21198
21199         * lib/mktime.c (not_equal_tm): Remove redundant check.
21200
21201 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21202
21203         * modules/regex (lib_SOURCES): Add regex.c.
21204         Reported by James Youngman in
21205         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21206
21207 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21208
21209         * lib/getdate.y: Use Bison 1.875 features, and some minor
21210         code cleanups.  This change does not affect semantics.
21211         Don't include <stdlib.h>; no longer needed.
21212         Don't include unlocked-io.h; only the "#if TEST" code uses
21213         stdio, and performance isn't crucial there.
21214         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21215         Bison 1.875 features as described below.
21216         All uses of "PC." replaced by "pc->".
21217         (YYSTYPE): Add a forward declaration.
21218         (yylex, yyerror): Use full prototypes in forward decls.
21219         Use "%pure-parser" rather than obsolescent "%pure_parser".
21220         Use %parse-param and %lex-param instead of obsolescent
21221         YYPARSE_PARAM and YYLEX_PARAM.
21222         (meridian_table, month_and_day_table, time_units_table,
21223         relative_time_table, time_zone_table, military_table,
21224         lookup_zone, lookup_word, get_date):
21225         Use NULL instead of 0 where appropriate.
21226         (to_hour): Avoid abort (), to avoid a dependency on
21227         stdlib.h.
21228         (yyerror, yylex): Now accepts parser_control * arg.
21229         (main) [TEST]: Use '\0' rather than 0 for char.
21230
21231 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21232
21233         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21234
21235 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21236
21237         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21238         It's now the caller's responsibility to handle the case where
21239         !HAVE_GETPAGESIZE && !defined getpagesize.
21240
21241         * lib/mktime.c (leapyear): Arg is long int, not int.
21242
21243 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21244
21245         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21246
21247 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21248
21249         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21250         missing.  Problem reported by James Youngman.
21251
21252 2004-10-16  Simon Josefsson  <jas@extundo.com>
21253
21254         * gnulib-tool: Fix comments.  Fix parse problem.
21255         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21256
21257 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21258
21259         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21260         implementation of getopt_long.  Problem reported by Alexander Taler in:
21261         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21262
21263 2004-10-15  Bruno Haible  <bruno@clisp.org>
21264
21265         * gnulib-tool: Untabify. Initialize supplied_libname.
21266         (func_usage): More homogenous output.
21267         (func_modules_transitive_closure, func_modules_to_filelist,
21268         func_emit_lib_Makefile_am): New functions.
21269         (func_import): New function, extracted from big case statement. Use
21270         func_get_license, func_modules_transitive_closure,
21271         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21272         opt_lgpl. Don't use test -a, as it's not portable.
21273         (func_create_testdir): Use func_modules_transitive_closure,
21274         func_modules_to_filelist, func_emit_lib_Makefile_am.
21275
21276 2004-10-15  Bruno Haible  <bruno@clisp.org>
21277
21278         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21279
21280 2004-10-15  Bruno Haible  <bruno@clisp.org>
21281
21282         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21283         the portions belonging to each module.
21284         Suggested by Derek Robert Price <derek@ximbiot.com>.
21285
21286 2004-10-12  Simon Josefsson  <jas@extundo.com>
21287
21288         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21289         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
21290         to real functions.
21291
21292 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21293
21294         * modules/vsnprintf: New file.
21295
21296 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21297
21298         * m4/vsnprintf.m4: New file.
21299
21300 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21301
21302         * lib/vsnprintf.h: New file.
21303         * lib/vsnprintf.c: New file.
21304
21305 2004-10-11  Bruno Haible  <bruno@clisp.org>
21306
21307         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
21308         vsnprintf.
21309
21310 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
21311
21312         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
21313
21314 2004-10-07  Bruno Haible  <bruno@clisp.org>
21315
21316         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
21317         fits into the provided buffer.
21318
21319 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
21320
21321         * lib/diacrit.c, diacrit.h: Add GPL notice.
21322
21323         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
21324         notice.
21325         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
21326         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
21327         This avoids a potential constant-folding bug.
21328
21329 2004-10-05  Bruno Haible  <bruno@clisp.org>
21330
21331         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
21332         for the declaration of strsep.
21333
21334 2004-10-05  Bruno Haible  <bruno@clisp.org>
21335
21336         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
21337
21338 2004-10-04  Simon Josefsson  <jas@extundo.com>
21339
21340         * modules/memmem: New file.
21341         * tests/test-memmem.c: New file.
21342         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
21343
21344 2004-10-04  Simon Josefsson  <jas@extundo.com>
21345
21346         * m4/memmem.m4: New file.
21347
21348 2004-10-04  Simon Josefsson  <jas@extundo.com>
21349
21350         * lib/memmem.h: New file.
21351         * lib/memmem.c: New file, taken from glibc.
21352
21353 2004-10-04  Simon Josefsson  <jas@extundo.com>
21354
21355         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
21356         '#ifdef USE_UNLOCKED_IO'.
21357
21358 2004-10-04  Simon Josefsson  <jas@extundo.com>
21359
21360         * config/srclist.txt: Add memmem from glibc.
21361
21362 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21363
21364         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
21365
21366         * modules/argmatch, modules/argp, modules/closeout, modules/error,
21367         modules/exclude, modules/getdate, modules/getline,
21368         modules/getndelim2, modules/getpass, modules/getpass-gnu,
21369         modules/getusershell, modules/linebuffer, modules/md5,
21370         modules/mountlist, modules/posixtm, modules/readtokens,
21371         modules/readutmp, modules/regex, modules/sha1,
21372         modules/version-etc, modules/yesno:
21373         Remove dependency on unlocked-io.
21374
21375 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21376
21377         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
21378
21379         * m4/unlocked-io.m4: Add copyright notice.
21380         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
21381
21382 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21383
21384         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
21385         * lib/xmalloc.c (xmemdup): Likewise.
21386         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
21387         XFREE): Remove these long-obsolescent macros.
21388         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
21389         * lib/xstrdup.c: Remove.
21390
21391         * lib/regex.c (re_comp): Cast gettext return value to char *,
21392         Problem reported by Martin Neitzel via Mark D. Baushke.
21393
21394 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21395
21396         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
21397         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
21398         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
21399         regex.c, sha1.c, version-etc.c, yesno.c:
21400         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
21401         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
21402         the includer's responsibility.
21403
21404         Sync from coreutils.
21405
21406         * lib/modechange.c (mode_compile): Don't decrement a pointer that
21407         points to the start of a string, as the C Standard says the
21408         resulting behavior is undefined.
21409
21410         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
21411         simple -> simple_backups, numbered_existing ->
21412         numbered_existing_backups, numbered -> numbered_backups
21413         to avoid shadowing problems.  All uses changed.
21414         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
21415         * lib/backupfile.c (check_extension, numbered_backup):
21416         Rename locals to avoid shadowing 'basename'.
21417         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
21418         once.
21419
21420         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
21421         * lib/.cvsignore: Add getopt.h.
21422
21423 2004-10-04  Bruno Haible  <bruno@clisp.org>
21424
21425         * modules/README: New file.
21426         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
21427         not a module.
21428
21429 2004-10-02  Jim Meyering  <jim@meyering.net>
21430
21431         * lib/dirfd.h, getpagesize.h: Add copyright notice.
21432
21433 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21434
21435         * modules/strsep: New file.
21436
21437 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21438
21439         * m4/strsep.m4: New file.
21440
21441 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21442
21443         * lib/strsep.h: New file.
21444         * lib/strsep.c: New file.
21445
21446 2004-10-01  Simon Josefsson  <jas@extundo.com>
21447
21448         * lib/snprintf.c (snprintf): Handle size==0.
21449
21450 2004-10-01  Simon Josefsson  <jas@extundo.com>
21451             Bruno Haible  <bruno@clisp.org>
21452
21453         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
21454         (snprintf): Declare 'args'.
21455
21456 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
21457
21458         * lib/snprintf.c: Remove comments as to why each header is needed.
21459
21460 2004-10-01  Bruno Haible  <bruno@clisp.org>
21461
21462         * MODULES.html.sh: Add strsep.
21463
21464 2004-09-30  Simon Josefsson  <jas@extundo.com>
21465
21466         * modules/snprintf: New file.
21467
21468 2004-09-30  Simon Josefsson  <jas@extundo.com>
21469
21470         * m4/snprintf.m4: New file.
21471
21472 2004-09-30  Simon Josefsson  <jas@extundo.com>
21473
21474         * lib/snprintf.h, lib/snprintf.c: New files.
21475
21476 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21477
21478         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
21479         (hol_entry_help): Never translate an empty string.
21480         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
21481         * lib/argp.h (OPTION_NO_TRANS): New option.
21482
21483 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21484
21485         * modules/argp (Maintainer): Replace Simon Josefsson
21486         by Sergey Poznyakoff.
21487
21488 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21489
21490         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
21491         changes merged back into glibc.
21492
21493 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21494
21495         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
21496
21497 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
21498
21499         * lib/xvasprintf.c: Include xalloc.h.
21500         (xvasprintf): Use xalloc_die, not xmalloc_die.
21501
21502 2004-09-29  Bruno Haible  <bruno@clisp.org>
21503
21504         * modules/alloca-opt: New file, derived from modules/alloca.
21505         * modules/allocsa: Depend on alloca-opt instead of alloca.
21506         * modules/setenv: Likewise.
21507         * modules/vasnprintf: Likewise.
21508         * MODULES.html.sh: Add alloca-opt.
21509
21510 2004-09-28  Simon Josefsson  <jas@extundo.com>
21511
21512         * gnulib-tool: New parameter --lgpl, to asseert that modules are
21513         LGPL, and to replace license template from GPL to LGPL.
21514
21515 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21516
21517         * modules/dummy: Change license to LGPL.
21518
21519 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21520
21521         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
21522
21523 2004-09-24  Simon Josefsson  <jas@extundo.com>
21524
21525         * modules/minmax (License): Change from GPL to LGPL.
21526
21527 2004-09-23  Simon Josefsson  <jas@extundo.com>
21528
21529         * gnulib-tool (--import): Typo.
21530
21531 2004-09-23  Simon Josefsson  <jas@extundo.com>
21532
21533         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
21534
21535 2004-09-22  Bruno Haible  <bruno@clisp.org>
21536
21537         * modules/*: Add 'License' field.
21538         * gnulib-tool: Accept --extract-license option.
21539         (func_get_license): New function.
21540
21541 2004-09-21  Bruno Haible  <bruno@clisp.org>
21542
21543         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
21544         Reported by Simon Josefsson.
21545
21546 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21547
21548         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
21549         gl_AC_TYPE_LONG_LONG.
21550
21551 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21552
21553         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
21554
21555 2004-09-18  Simon Josefsson  <jas@extundo.com>
21556         and  Paul Eggert  <eggert@cs.ucla.edu>
21557
21558         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
21559         calls with autoreconf.  Define GL_LIB.
21560
21561 2004-09-14  Karl Berry  <karl@gnu.org>
21562
21563         * config/srclist.txt: unsync setenv.c, sigh.
21564
21565 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21566
21567         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
21568         Problem reported by Bruno Haible in:
21569         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
21570
21571 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21572
21573         * config/srclist.txt: Comment out argp-pvh.c.
21574
21575 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
21576
21577         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
21578         in case some system header has #define'd it.  Problem reported by
21579         Soeren D. Schulze in
21580         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
21581
21582 2004-09-09  Karl Berry  <karl@gnu.org>
21583
21584         * regex.[ch]: delete from the root.  These were supposed to be
21585                 synced with emacs cvs, but this has not happened for about
21586                 a year, and anyway nothing else uses emacs regex.[ch].
21587                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
21588                 lib/regex[.ch] is untouched.
21589
21590 2004-09-09  Bruno Haible  <bruno@clisp.org>
21591
21592         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
21593
21594 2004-09-09  Bruno Haible  <bruno@clisp.org>
21595
21596         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
21597         modifications.
21598         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
21599
21600 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21601
21602         * modules/xvasprintf: New file.
21603         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
21604
21605 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21606
21607         * lib/xvasprintf.h: New file.
21608         * lib/xvasprintf.c: New file.
21609         * lib/xasprintf.c: New file.
21610
21611 2004-09-08  Bruno Haible  <bruno@clisp.org>
21612
21613         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
21614
21615 2004-09-08  Bruno Haible  <bruno@clisp.org>
21616
21617         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
21618         length is > INT_MAX.
21619         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
21620         more.
21621
21622 2004-09-08  Bruno Haible  <bruno@clisp.org>
21623
21624         * lib/stdint_.h: New file, taken from GNU clisp.
21625
21626 2004-09-08  Bruno Haible  <bruno@clisp.org>
21627             Oskar Liljeblad  <oskar@osk.mine.nu>
21628
21629         * modules/stdint: New file.
21630         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
21631
21632 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21633
21634         Import from coreutils.
21635         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
21636         strings on unbounded length.  alloca's performance benefits aren't
21637         that important here.
21638         (V_STRDUP): Remove.
21639         (parse_with_separator): New function, with most of the internals
21640         of the old parse_user_spec.  Allow user to omit both user and group,
21641         for compatibility with FreeBSD.
21642         Clone only the user name, not the entire spec.
21643         Do not set *uid, *gid unless entirely successful.
21644         Avoid memory leak in some failing cases.
21645         Fix regression for USER.GROUP reported by Dmitry V. Levin in
21646         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
21647         (parse_user_spec): Rewrite to use parse_with_separator.
21648
21649 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21650
21651         * modules/userspec: Don't depend on alloca.
21652
21653 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21654
21655         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
21656
21657 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
21658
21659         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
21660         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
21661         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
21662
21663 2004-08-16  Simon Josefsson  <jas@extundo.com>
21664
21665         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
21666         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
21667         Add --dry-run for --import.
21668         Let user provided command line parameters override configure.ac
21669         settings.
21670
21671 2004-08-12  Simon Josefsson  <jas@extundo.com>
21672
21673         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
21674         as discussed with Paul Eggert in threads rooted at
21675         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
21676         and
21677         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
21678         Before, the test was empty, and relied on ELIDE_CODE in source
21679         code.)
21680         (gl_PREREQ_GETOPT): New macro.
21681         (gl_GETOPT): Use them.
21682
21683 2004-08-12  Simon Josefsson  <jas@extundo.com>
21684
21685         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
21686         * lib/getopt_.h: Renamed from getopt.h.
21687
21688 2004-08-12  Simon Josefsson  <jas@extundo.com>
21689
21690         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
21691         Change default library name from libfoo to libgnu.
21692         Now, if you have a configure.ac that says:
21693                 gl_SOURCE_BASE(gl)
21694                 gl_M4_BASE(gl/m4)
21695                 gl_MODULES(error getopt etcetera)
21696                 gl_INIT
21697         you can import all you need by running:
21698                 ../gnulib/gnulib-tool --import
21699
21700         * modules/getopt (Files): Rename getopt.h to getopt_.h.
21701         (Makefile.am): Rewrite, use logic from argz.
21702         (Include): Use <getopt.h> instead of "getopt.h".
21703
21704 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21705
21706         * modules/argp (Files): Add m4/unlocked-io.m4.
21707         (Depends-on): Add extensions.
21708
21709 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21710
21711         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
21712         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
21713         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
21714         Check for program_invocation_name, program_invocation_short_name,
21715         flockfile, funlockfile, features.h, _getopt_long_only_r.
21716
21717 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21718
21719         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
21720         its complicated substitute.
21721         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
21722         and program_invocation_name.
21723         (__argp_basename) [!_LIBC]: Remove; the only use was
21724         replaced by its body.
21725         (__argp_short_program_name): Change condition from
21726         !defined __argp_short_program_name to
21727         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
21728         to match argp-namefrob.h.
21729         (__argp_failure): Don't assume strerror_r returns char *.
21730         * lib/argp-parse.c (N_): Define unconditionally.
21731         (argp_default_options): Fill out initializers with 0 to avoid
21732         gcc warnings.
21733
21734 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21735
21736         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
21737         getopt1.c.
21738
21739 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21740
21741         Merge from coreutils.
21742
21743         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
21744
21745         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
21746         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
21747
21748 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21749
21750         Merge from coreutils.
21751
21752         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
21753         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
21754         for Reliant Unix 5.43.
21755
21756         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
21757         (union fooround): Use uintmax_t, not long int.
21758         The rest is a merge from libc:
21759         [defined _LIBC]: Include <shlib-compat.h>.
21760         (_obstack) [defined _LIBC]: Remove after 2.3.4.
21761
21762         * lib/settime.c (settime): Recode to avoid warning with
21763         Sun Forte C 6U2.
21764
21765         * lib/strverscmp.c: Convert to UTF-8.
21766
21767 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21768
21769         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
21770         m4/uintmax_t.m4.
21771
21772 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21773
21774         * modules/xalloc-die: New file.
21775         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
21776
21777         * modules/md5 (Files): Add m4/uint32_t.m4.
21778         * modules/sha1: Renamed from modules/sha.
21779         (Files):
21780         Rename lib/sha.h to lib/sha1.h.
21781         Rename lib/sha.c to lib/sha1.c.
21782         Rename m4/sha.m4 to m4/sha1.m4.
21783         (lib_SOURCES): Likewise.
21784         (configure.ac): Rename gl_SHA to gl_SHA1.
21785         (Include): sha.h -> sha1.h.
21786
21787 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21788
21789         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
21790         * m4/sha1.m4: Renamed from sha.m4.
21791         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
21792
21793 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21794
21795         * lib/obstack.h (obstack_empty_p):
21796         Don't assume that chunk->contents is suitably aligned.
21797         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
21798         Likewise. Problem reported by Benno in
21799         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
21800
21801         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
21802         readable.  This could be improved further but it'd take some work.
21803
21804 2004-08-08  Simon Josefsson  <jas@extundo.com>
21805
21806         * modules/xgethostname (Depends-on): Remove exit and error (not
21807         used).
21808
21809         * modules/getpass-gnu: Add getpass.h.
21810         (Depends-on): Add stdbool.
21811         * modules/getpass: Add getpass.h.
21812
21813 2004-08-08  Simon Josefsson  <jas@extundo.com>
21814
21815         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
21816         Check getpass declaration.
21817
21818 2004-08-08  Simon Josefsson  <jas@extundo.com>
21819
21820         * lib/xgethostname.c: Don't include error.h (not used).
21821
21822         * lib/getpass.h: Add.
21823         * lib/getpass.c: Include getpass.h first.
21824
21825 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
21826
21827         * lib/xalloc-die.c: New file.
21828         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
21829         All uses removed.
21830         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
21831         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
21832         xalloc-die.c.
21833         (_, N_, xalloc_die): Move to xalloc-die.c.
21834         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
21835         so that we needn't mess with xalloc_msg_memory_exhausted.
21836
21837         * lib/sha1.h: Renamed from sha.h.
21838         (SHA1_H): Renamed from _SHA_H.
21839         (sha1_ctx): Renamed from sha_ctx.
21840         (sha1_init_ctx): Renamed from sha_init_ctx.
21841         (sha1_process_block): Renamed from sha_process_block.
21842         (sha1_process_bytes): Renamed from sha_process_bytes.
21843         (sha1_finish_ctx): Renamed from sha_finish_ctx.
21844         (sha1_read_ctx): Renamed from sha_read_ctx.
21845         (sha1_stream): Renamed from sha_stream.
21846         (sha1_buffer): Renamed from sha_buffer.
21847         * lib/sha1.c: Likewise; renamed from sha.c.
21848         Do not include <sys/types.h>.
21849         Include <stddef.h> rather than <stdlib.h>.
21850
21851 2004-08-08  Bruno Haible  <bruno@clisp.org>
21852
21853         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
21854         FILESYSTEM_PREFIX_LEN.
21855         * lib/progreloc.c: Likewise.
21856         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
21857
21858 2004-08-06  Simon Josefsson  <jas@extundo.com>
21859
21860         * modules/progname (Depends-on): Don't depend on stdbool.
21861
21862 2004-08-06  Simon Josefsson  <jas@extundo.com>
21863
21864         * modules/getsubopt: New file.
21865         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21866         getsubopt.
21867
21868 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21869
21870         More merge from coreutils.
21871
21872         * m4/utimens.m4, m4/utimecmp.m4: New files.
21873         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
21874         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
21875         prereq.m4, sha.m4: Import changes from coreutils.
21876
21877 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21878
21879         More merge from coreutils.
21880         * modules/raise, modules/readtokens0, modules/utimens:
21881         * modules/utimecmp, module/xnanosleep: New files.
21882         * modules/strftime: Add lib/strftime.h.
21883         Change include from <time.h> to "strftime.h".
21884         * modules/yesno: Add lib/yesno.h.
21885         * modules/backupfile: Remove lib/addext.c.
21886         * modules/euidaccess: Add stat-macros.h.
21887         * modules/canonicalize, modules/euidaccess,
21888         modules/filemode, modules/lchown, modules/makepath,
21889         modules/rmdir, modules/stat: Likewise.
21890
21891 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21892
21893         Merge from tar.
21894         * lib/argp-help.c (make_hol, hol_append): Don't assume that
21895         SIZE_MAX is a valid preprocessor constant.
21896         (__argp_basename): Change from "#ifndef _LIBC"
21897         to "#ifndef __argp_short_program_name", so that
21898         we don't compile these functions for tar.
21899
21900         More merges from coreutils.
21901         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
21902         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
21903         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
21904         * lib/addext.c: Remove; no longer needed.
21905         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
21906         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
21907         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
21908         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
21909         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
21910         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
21911         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
21912         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
21913         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
21914         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
21915         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
21916         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
21917         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
21918         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
21919         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
21920         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
21921         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
21922         Import changes from coreutils.
21923
21924 2004-08-05  Simon Josefsson  <jas@extundo.com>
21925
21926         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
21927
21928 2004-08-05  Simon Josefsson  <jas@extundo.com>
21929
21930         * m4/getsubopt.m4: New file.
21931
21932 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21933
21934         Merge from coreutils.
21935
21936         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
21937         * m4/getcwd-path-max.m4: New files.
21938
21939         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
21940         FILESYSTEM_PREFIX_LEN ->
21941         FILE_SYSTEM_PREFIX_LEN.
21942         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
21943         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
21944         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
21945         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
21946
21947         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
21948         prerequisite modules now handle the DOS stuff.
21949         Don't check for unistd.h.
21950
21951 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21952
21953         Merge from coreutils.
21954
21955         * lib/.gdb-history: Remove; this doesn't belong here.
21956
21957         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
21958         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
21959         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
21960         * lib/getcwd.c: New files.
21961
21962         * lib/dirname.h: Include <stdbool.h>.
21963         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
21964         for consistency with POSIX terminology.  All uses changed.
21965         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
21966         (strip_trailing_slashes): Use bool for booleans.
21967         * lib/stripslash.c (strip_trailing_slashes): Likewise.
21968
21969         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
21970         sometimes returns a positive errno value even when it succeeds.
21971         (print_errno_message) [!LIBC]: Fall back on strerror if
21972         __strerror_r fails.
21973
21974         * lib/path-concat.c (mempcpy): Don't define if a system header defines
21975         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
21976         (longest_relative_suffix): New function.
21977         (path_concat): Use it.  Assume first argument is not NULL.
21978         Port to DOS.  Omit redundant separators.
21979         Report an error instead of returning NULL.
21980         Use mempcpy instead of memcpy.
21981         (xpath_concat): Remove: not declared or used.
21982
21983         * lib/same.h: Include <stdbool.h>
21984         (same_name): Return bool, not int.
21985         * lib/same.c (same_name): Likewise.
21986         (errno): Don't declare; we assume C89 or better now.
21987
21988         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
21989         if not already defined.
21990
21991         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
21992         * lib/dup-safer.c (errno): Likewise.
21993
21994 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21995
21996         Merge from coreutils.
21997         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
21998         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
21999         * modules/path-concat: Don't depend on strdup.
22000
22001 2004-08-03  Simon Josefsson  <jas@extundo.com>
22002
22003         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22004         * lib/progname.h: Don't include stdbool.h.
22005
22006 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22007
22008         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22009         * MODULES.html.sh (func_all_modules): Remove fatal.
22010
22011 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22012
22013         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22014
22015 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22016
22017         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22018         working.
22019
22020 2004-08-02  Simon Josefsson  <jas@extundo.com>
22021
22022         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22023         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22024         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22025
22026 2004-08-01  Simon Josefsson  <jas@extundo.com>
22027
22028         * lib/xgetdomainname.c: Include stdlib.h, for free().
22029
22030 2004-07-19  Bruno Haible  <bruno@clisp.org>
22031
22032         * MODULES.html.sh (func_all_modules): Add dummy.
22033
22034 2004-07-16  Simon Josefsson  <jas@extundo.com>
22035
22036         * modules/dummy: New file.
22037
22038 2004-07-16  Simon Josefsson  <jas@extundo.com>
22039
22040         * lib/dummy.c: New file.
22041
22042 2004-07-16  Bruno Haible  <bruno@clisp.org>
22043
22044         * lib/backupfile.h: Add extern "C" for C++.
22045         * lib/closeout.h: Likewise.
22046         * lib/copy-file.h: Likewise.
22047         * lib/findprog.h: Likewise.
22048         * lib/full-write.h: Likewise.
22049         * lib/pathname.h: Likewise.
22050         * lib/progname.h: Likewise.
22051         * lib/stpcpy.h: Likewise.
22052         * lib/stpncpy.h: Likewise.
22053         * lib/strcase.h: Likewise.
22054         * lib/strstr.h: Likewise.
22055         * lib/xalloc.h: Likewise.
22056
22057         * lib/mbswidth.h: Add extern "C" for C++.
22058         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22059
22060 2004-07-13  Robert Millan  <robertmh@gnu.org>
22061
22062         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22063
22064 2004-07-09  Simon Josefsson  <jas@extundo.com>
22065
22066         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22067         failed without this.)
22068
22069 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22070
22071         * modules/chown (Files): Add lib/fchown-stub.c, since
22072         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22073
22074 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22075
22076         * lib/fchown-stub.c: New file.
22077
22078 2004-06-24  Jim Meyering  <jim@meyering.net>
22079
22080         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22081
22082 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22083
22084         * modules/argz: Omit "#include".
22085
22086         * MODULES.html.sh (func_all_modules): Add calloc, to match
22087         2004-06-01 addition of calloc module.
22088
22089 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22090
22091         * m4/argz.m4: New file, which is autoupdated from libtool.
22092
22093 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22094
22095         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22096         libtool.
22097
22098 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22099
22100         * config/srclist-update: Don't insist on "USA." before the
22101         close-comment, as libtool omits the period and puts the */ on a
22102         separate line.
22103         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22104         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22105
22106 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22107
22108         * modules/argz: New file.
22109         * MODULES.html.sh (func_all_modules): Add argz.
22110
22111 2004-06-12  Jim Meyering  <jim@meyering.net>
22112         and  Paul Eggert  <eggert@cs.ucla.edu>
22113
22114         * modules/hash (Files): Add lib/xalloc.h.
22115         * modules/pipe (Depends-on): Add wait-process.
22116         * modules/stat (Depends-on): Add xalloc.
22117         * modules/userspec (Files): Add lib/userspec.h.
22118         * modules/xstrto
22119
22120         Upgrade from gettext-0.13.
22121         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22122         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22123         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22124
22125 2004-06-10  Jim Meyering  <jim@meyering.net>
22126
22127         * lib/calloc.c: New file.
22128
22129 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22130
22131         * lib/getdate.y (yylex): Allow space between sign and number.
22132         Problem reported by Dan Jacobson.
22133
22134 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22135
22136         Merge from coreutils CVS.
22137
22138         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22139         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22140         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22141         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22142         xstrtol.m4: Fix copyright date and/or serial number.
22143
22144         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22145         See if we need an fchown replacement.
22146         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22147         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22148         and use the replacement function if we detect either defect.
22149
22150         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22151         gl_UTIMECMP.
22152
22153 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22154         and  Jim Meyering  <jim@meyering.net>
22155
22156         Merge from coreutils CVS.
22157
22158         * lib/stat-macros.h: New file, with contents from file-type.h
22159         and coreutils' system.h.
22160         * lib/file-type.c: Include "stat-macros.h".
22161         * lib/file-type.h (file_type): Move all macro definitions to new file,
22162         stat-macros.h.
22163
22164         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22165         Wrap old code with this conditional.
22166         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22167         function that does not dereference symlinks.
22168         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22169
22170         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22171         dependency problems.
22172         (xreadlink): Accept new arg SIZE, for efficiency.
22173         All decls and uses changed.
22174         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22175
22176         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22177         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22178
22179         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22180         sysexits.h.
22181
22182 2004-06-01  Jim Meyering  <jim@meyering.net>
22183
22184         * m4/calloc.m4: New file.
22185
22186 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22187
22188         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22189         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22190         Also, fix a typo in a diagnostic.
22191
22192 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22193
22194         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22195         or AC_FUNC_REALLOC.
22196
22197 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22198
22199         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22200         macros to be defined.
22201         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22202         the allocator returns NULL because the requested size is zero.
22203
22204 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22205
22206         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22207         var.  Add comment explaining why libc still defines it.  This
22208         merges the following patch from glibc:
22209         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22210
22211 2004-05-20  Andreas Schwab  <schwab@suse.de>
22212
22213         * m4/free.m4: Replace free if it not known to work, not the other
22214         way round.
22215
22216 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22217
22218         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22219         present in glibc since revision 1.1 of this file.
22220         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22221         obstack_alignment_mask, obstack_alloc, obstack_base,
22222         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22223         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22224         obstack_grow0, obstack_init, obstack_int_grow,
22225         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22226         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22227         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22228         nonexistent functions.
22229
22230 2004-05-18  Karl Berry  <karl@gnu.org>
22231
22232         * config/srclist.txt: break link for vasnprintf.c.
22233
22234 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22235
22236         Port obstack to the AS/400, where pointers are 16 bytes wide and
22237         you cannot cast an integer to a valid pointer.  This patch is
22238         currently waiting to be integrated into glibc; see
22239         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22240
22241         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22242         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22243         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22244         (struct obstack): temp member is now a union of a pointer and
22245         an integer, instead of an integer.  All integer uses changed.
22246         This does not affect the physical layout of struct obstack,
22247         except on hosts (like the AS/400) where the size or alignment of
22248         void * is greater than that of ptrdiff_t.
22249         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22250         __STDC__)]: Store temporary in pointer member of union, not
22251         integer member.
22252         * lib/obstack.c: Include <stddef.h>, for offsetof.
22253         (struct fooalign): Remove; it doesn't need a name.
22254         (union fooround): Change double to long double, and add void *.
22255         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22256         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22257         not a macro.  Hence the values are always int; so remove all
22258         casts-to-int in uses.
22259
22260 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22261
22262         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22263         we can get this patch merged into glibc.
22264
22265 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22266             Paul Eggert  <eggert@cs.ucla.edu>
22267
22268         * m4/argp: Depend on alloca.
22269
22270 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22271             Paul Eggert  <eggert@cs.ucla.edu>
22272
22273         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22274         freecoding.
22275
22276 2004-05-17  Bruno Haible  <bruno@clisp.org>
22277
22278         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22279         precision that consists of a '.' followed by an empty digit string.
22280         Patch by Tor Lillqvist <tml@iki.fi>.
22281
22282 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22283
22284         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
22285         for backward compatibility with older code.  We need our own
22286         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
22287         it under some other name, and our alloca.h will define it.
22288
22289 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22290             Derek Price  <derek@ximbiot.com>
22291
22292         * lib/alloca.c: Include <alloca.h>, to get our interface.
22293         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
22294         include <alloca.h> first.  Use C89 prototype for alloca; this
22295         requires including <stddef.h> for size_t.  Use extern "C" if C++.
22296         Use #elif for simplicity, since we can assume C89 now.
22297         Don't try to source the system alloca.h since it will not be found
22298         and to prevent recursively including its replacement.
22299         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
22300         * lib/regex.c: Likewise.
22301
22302 2004-05-16  Derek Price  <derek@ximbiot.com>
22303             Paul Eggert  <eggert@cs.ucla.edu>
22304
22305         getline cleanup.  This changes the getndelim2 API: both order of
22306         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
22307         no delimiter).
22308
22309         * lib/getline.c: Don't include stddef.h or stdio.h, since our
22310         interface does that.
22311         (getline): Always use getdelim, so that we don't have two
22312         copies of this code.
22313         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
22314         if available.
22315         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
22316         (GETNDELIM2_MAXIMUM): New macro.
22317         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
22318         instead of the old practice of delim2==0.  All callers changed.
22319         Return -1 on overflow, instead of returning junk.
22320         Do not set *linesize unless allocation succeeds.
22321         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
22322         that we include sys/types.h.
22323         * lib/getnline.h: Likewise.
22324         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
22325         (getndelim2): Reorder arguments.
22326         * lib/getnline.c (getnline, getndelim):
22327         Don't discard the NMAX argument.
22328         (getnline): Invoke getndelim, to avoid code duplication.
22329         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
22330         of (size_t) -1 by callers of the getnline family.
22331
22332 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22333
22334         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
22335         Check for gettimeofday.
22336         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
22337         Check for settimeofday, stime.
22338
22339 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22340
22341         * lib/nanosleep.c (suspended): Change its type from int to
22342         sig_atomic_t volatile.
22343         (first_call): Make it private to rpl_nanosleep, and have it
22344         be zero initially as that's a bit faster.
22345         (my_usleep): Round up fractional times instead of truncating them,
22346         as this is the usual meaning for 'sleep'.
22347
22348         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
22349         doesn't work.
22350         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
22351         (ENOSYS): Define if not defined.
22352         (settime): Fall back on stime if it exists and settimeofday fails.
22353         But don't bother with fallbacks if a method fails with errno == EPERM.
22354
22355 2004-05-11  Jim Meyering  <jim@meyering.net>
22356
22357         Prior to this change, the save_cwd caller required read access to the
22358         current directory on most systems (ones with the fchdir function).
22359
22360         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
22361         fails, try write-only, and finally, resort to using xgetcwd.
22362
22363 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
22364
22365         * lib/obstack.c, obstack.h: Import changes from libc.
22366
22367 2004-04-28  Bruno Haible  <bruno@clisp.org>
22368
22369         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
22370         also implicitly appends .exe to executables.
22371         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
22372         accepts Windows pathnames.
22373         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22374         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22375         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22376         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22377         Reported by Derek Robert Price <derek@ximbiot.com>.
22378
22379 2004-04-21  Karl Berry  <karl@gnu.org>
22380
22381         * config/srclist.txt (localcharset.c): break sync.
22382
22383 2004-04-20  Paul Eggert  <eggert@twinsun.com>
22384
22385         * m4/host-os.m4: Add a copyright notice.
22386
22387 2004-04-20  Jim Meyering  <jim@meyering.net>
22388
22389         Change UTILS_ to gl_ in AC_DEFINE'd names.
22390         Change utils_- and jm_-prefixed variables, too.
22391         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
22392         UTILS_FUNC_MKDIR_TRAILING_SLASH.
22393         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
22394
22395         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
22396         Don't emit trailing blanks.
22397         Also rename jm_-prefixed variables to have gl_ prefix.
22398
22399         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
22400         Also rename jm_-prefixed variables to have gl_ prefix.
22401
22402         * m4/jm-macros.m4: Reflect the renamings.
22403         * m4/prereq.m4: Likewise.
22404
22405 2004-04-20  Jim Meyering  <jim@meyering.net>
22406
22407         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
22408         memory.
22409
22410 2004-04-20  Jim Meyering  <jim@meyering.net>
22411             Bruno Haible  <bruno@clisp.org>
22412
22413         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
22414         memory when realloc fails.
22415
22416 2004-04-19  Jim Meyering  <jim@meyering.net>
22417
22418         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
22419         now that readutmp.c may call `free (0)'.
22420
22421 2004-04-19  Bruno Haible  <bruno@clisp.org>
22422
22423         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
22424         * m4/inttypes_h.m4: Likewise.
22425         * m4/stdint_h.m4: Likewise.
22426         * m4/intmax_t.m4: Likewise.
22427         * m4/uintmax_t.m4: Likewise.
22428
22429 2004-04-18  Jim Meyering  <jim@meyering.net>
22430
22431         * m4/prereq.m4: Don't forbid jm_ prefix.
22432
22433         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
22434         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
22435         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
22436         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
22437         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
22438         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
22439         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
22440         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
22441         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
22442         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
22443         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
22444         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
22445         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
22446         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
22447         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
22448         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
22449         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
22450         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
22451         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
22452
22453 2004-04-18  Jim Meyering  <jim@meyering.net>
22454
22455         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
22456         failure, don't leak memory and do call END_UTMP_ENT.
22457
22458 2004-04-16  Jim Meyering  <jim@meyering.net>
22459
22460         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
22461         coreutils' stat program.
22462         (gl_PREREQ): Don't require jm_PREREQ_STAT.
22463
22464 2004-04-11  Paul Eggert  <eggert@twinsun.com>
22465
22466         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
22467         C89.
22468         (CHAR_BIT): Remove, since we assume C89.
22469         Include <stdint.h> if available, as per current Autoconf CVS advice.
22470
22471 2004-03-31  Jim Meyering  <jim@meyering.net>
22472
22473         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
22474         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
22475         * m4/xalloc.m4: Likewise.
22476
22477 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22478
22479         Merge from coreutils.
22480
22481         * m4/inttostr.m4: New file.
22482         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
22483         Require AM_STDBOOL_H and gl_TIMESPEC instead.
22484         Require gl_CLOCK_TIME.
22485         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
22486
22487 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22488
22489         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
22490         not bool, to be more consistent with Unix conventions.
22491         Suggested by Bruno Haible.
22492
22493         Merge from coreutils.
22494
22495         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
22496         * lib/umaxtostr.c: New files.
22497
22498         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
22499         the usual <time.h> dance.
22500         (get_date): Change signature to support fractional time stamps.
22501         All callers changed.
22502         * lib/getdate.y: Include "getdate.h" first, as we can now
22503         assume C89 and don't need to worry about 'const'.
22504         Similarly, include "unlocked-io.h" near start, not in middle.
22505         Include <limits.h>.
22506         (textint.value): Use long int rather than int.
22507         (textint.digits): Use size_t rather than int.
22508         (BILLION, LOG10_BILLION): New constants.
22509         (parser_control): New member rel_ns.  Members day_ordinal,
22510         time_zone, month, day, hour, minutes, rel_year, rel_month,
22511         rel_day, rel_hour, rel_minutes, rel_seconds
22512         are now long int, not int.  Member seconds is now struct timespec,
22513         not int.  New member timespec_seen.  Members dates_seen, days_seen,
22514         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
22515         not int.
22516         (%union.intval): Now long int, not int.
22517         New member timespec.
22518         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
22519         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
22520         (spec): Now is a timespec or an item list.
22521         (timespec, items): New nonterminals.
22522         (time, rel, relunit, number, get_date):
22523         Add support for fractional seconds.
22524         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
22525         (gmtime, localtime, mktime): Remove decls; not needed with C89.
22526         (to_hour): First arg is now long int, not int.
22527         (to_year): Returns long int, not int.
22528         Don't treat year -70 like 70.
22529         (tm_diff): Returns long int, not int.
22530         (lookup_word): Use bool instead of int when appropriate.
22531         (yylex): Use size_t for count, not int.
22532         Detect overflow when parsing large integer constants.
22533         Add support for fractions.
22534         (get_date): Make pointers 'const' if possible.
22535         Use more-portable code to detect integer overflow.
22536         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
22537         Don't use ctime; it's not reliable if the year has >4 digits.
22538
22539         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
22540         This is for compatibility with BSD.
22541
22542         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
22543         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
22544         From coreutils' system.h.
22545
22546         * lib/userspec.c: Don't include "posixver.h".
22547         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
22548         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
22549         compatible extension.  Simplify code by removing a boolean int
22550         that was always nonzero if a string was nonnull.
22551
22552 2004-03-30  Jim Meyering  <jim@meyering.net>
22553
22554         Merge from coreutils.
22555
22556         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
22557         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
22558         on some systems one must include <grp.h> before it.
22559         Reported by Christian Krackowizer.
22560
22561 2004-03-30  Jim Meyering  <jim@meyering.net>
22562
22563         Merge from coreutils.
22564
22565         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
22566
22567         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
22568         an empty input stream.
22569
22570         * lib/readtokens.c: Include <stdbool.h>.
22571         (readtoken): Use `size_t' rather than int/long.
22572         All callers adjusted.
22573         Use `bool' rather than `int' where appropriate.
22574         Use memset rather than an explicit loop.
22575         Use x2nrealloc rather than xrealloc.
22576         Allow the use of `\0' as a delimiter.
22577         (readtokens): Likewise.
22578         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
22579
22580 2004-03-30  Jim Meyering  <jim@meyering.net>
22581
22582         * m4/realloc.m4: Remove file, since now it does no more than
22583         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
22584         the `configure.ac' section of module/realloc.
22585         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
22586
22587 2004-03-30  Bruno Haible  <bruno@clisp.org>
22588
22589         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
22590         nonnull.
22591
22592 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22593
22594         Merge changes to getloadavg.c from coreutils and Emacs.
22595
22596         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
22597         Define to an expression, not to the empty string.
22598         Include cloexec.h and xalloc.h.
22599         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
22600         Use set_cloexec_flag rather than rolling our own.
22601         * lib/cloexec.c, lib/cloexec.h: New files.
22602
22603 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22604
22605         * m4/cloexec.m4: New file.
22606
22607 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22608
22609         * lib/getopt.h: Sync with libc CVS.
22610
22611 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22612             Bruno Haible  <bruno@clisp.org>
22613
22614         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
22615         mbswidth.
22616
22617 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22618             Bruno Haible  <bruno@clisp.org>
22619
22620         * lib/mbswidth.h: Include <wchar.h> only if
22621         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
22622         <wchar.h>.
22623         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
22624
22625 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22626
22627         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
22628         Sync with libc CVS.
22629         * lib/getopt_int.h: New file, also synced from libc.
22630
22631 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22632
22633         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
22634         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
22635         Bring back getopt.c, getopt.h, getopt1.c.
22636
22637 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22638
22639         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
22640         All uses changed.  Check for sa_sigaction member; this fixes
22641         a bug first reported by Jason Andrade in
22642         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22643
22644 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22645
22646         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
22647         '#if' expressions.  Unlike the code it replaces, it does not
22648         depend on (defined _SC_PAGESIZE).  However, it does depend on
22649         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
22650         first reported by Jason Andrade in
22651         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22652
22653 2004-02-25  Simon Josefsson  <jas@extundo.com>
22654
22655         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
22656
22657 2004-02-25  Simon Josefsson  <jas@extundo.com>
22658
22659         * lib/strdup.h: New file.
22660         * lib/strdup.c: Include it.
22661         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
22662         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
22663
22664 2004-02-23  Karl Berry  <karl@gnu.org>
22665
22666         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
22667         (from fencepost.gnu.org:/gd/gnuorg).
22668
22669 2004-02-23  Karl Berry  <karl@gnu.org>
22670
22671         * config/srclistvars.sh (GNUORG) [karl]: redefine.
22672         * config/srclist.txt: add maintain/standards documents.
22673
22674 2004-02-18  Bruno Haible  <bruno@clisp.org>
22675
22676         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
22677         Reported by Derek Robert Price <derek@ximbiot.com>.
22678
22679 2004-02-16  Karl Berry  <karl@gnu.org>
22680
22681         * config/mkinstalldirs, install-sh: update from automake.
22682
22683 2004-02-06  Karl Berry  <karl@gnu.org>
22684
22685         * m4/po.m4: update from gettext 0.14.1.
22686
22687 2004-02-06  Karl Berry  <karl@gnu.org>
22688
22689         * lib/config.charset: update from gettext 0.14.1.
22690
22691 2004-02-05  Paul Eggert  <eggert@twinsun.com>
22692
22693         Add comments and code, prompted by suggestions from Bruno Haible
22694         for sh-quote.
22695         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
22696         describing the enum quoting_style values.
22697         * lib/quotearg.c (quotearg_alloc): New function.
22698         (quotearg_buffer_restyled): Treat lone { and } as special.
22699         Treat = as special.  Work around bug with older shells
22700         that "see" a '\' that is really the 2nd byte of a multibyte char.
22701         Quote empty string with shell_quoting_style.
22702
22703 2004-02-03  Bruno Haible  <bruno@clisp.org>
22704
22705         * m4/pipe.m4: New file, from GNU gettext.
22706
22707 2004-02-03  Bruno Haible  <bruno@clisp.org>
22708
22709         * lib/pipe.h: New file, from GNU gettext.
22710         * lib/pipe.c: New file, from GNU gettext.
22711
22712 2004-01-27  Bruno Haible  <bruno@clisp.org>
22713
22714         * m4/execute.m4: New file, from GNU gettext.
22715
22716 2004-01-27  Bruno Haible  <bruno@clisp.org>
22717
22718         * lib/execute.h: New file, from GNU gettext.
22719         * lib/execute.c: New file, from GNU gettext.
22720         * lib/w32spawn.h: New file, from GNU gettext.
22721
22722 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22723
22724         Merge from diffutils.
22725
22726         * lib/file-type.c (file_type): Add typed memory objects.
22727         * lib/file-type.h (S_TYPEISTMO): New macro.
22728
22729         * lib/c-stack.h (c_stack_action): Remove argv argument.
22730         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
22731         (die): Don't calculate message unless segv_action returns.
22732         (get_stack_location, min_address_from_argv, max_address_from_argv,
22733         volatile stack_base, volatile_stack_size): Remove.
22734         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
22735         that every segmentation violation is a stack overflow.  (Ouch!)
22736         See Debian bug 136249 (still outstanding) for more info about why
22737         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
22738
22739 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22740
22741         Exit-status fix from coreutils.
22742
22743         Use exit_failure consistently in place of EXIT_FAILURE,
22744         so that program exit statuses are consistent on failure.
22745
22746         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
22747         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
22748         * lib/argmatch.h: Comment fix to match the above.
22749         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
22750         Now a macro referring to exit_failure, instead of a separate
22751         variable.  Include "exitfail.h" to get it.
22752         * lib/xstrtol.h: Include "exitfail.h".
22753         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
22754
22755         * lib/long-options.c (parse_long_options): Use prototype
22756         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
22757         for clarity.
22758
22759 2004-01-21  Jim Meyering  <jim@meyering.net>
22760
22761         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
22762         so as not to conflict with a different-sized __mktime_internal
22763         function in GNU libc.
22764         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
22765         Problem building statically-linked `ls' reported by Michael Brunnbauer.
22766
22767 2004-01-20  Karl Berry  <karl@gnu.org>
22768
22769         * config/config.guess: update from config.
22770
22771         * config/srclistvars.sh: GNUWWWLICENSES for karl.
22772
22773 2004-01-20  Bruno Haible  <bruno@clisp.org>
22774
22775         Safer stack allocation.
22776         * lib/setenv.c: Include allocsa.h.
22777         (alloca): Remove fallback definition.
22778         (freea): Remove macro.
22779         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
22780         instead of freea.
22781
22782 2004-01-20  Bruno Haible  <bruno@clisp.org>
22783
22784         * m4/eealloc.m4: New file, from GNU gettext.
22785
22786 2004-01-20  Bruno Haible  <bruno@clisp.org>
22787
22788         * m4/allocsa.m4: New file, from GNU gettext.
22789
22790 2004-01-20  Bruno Haible  <bruno@clisp.org>
22791
22792         * lib/xallocsa.h: New file, from GNU gettext.
22793         * lib/xallocsa.c: New file, from GNU gettext.
22794
22795 2004-01-20  Bruno Haible  <bruno@clisp.org>
22796
22797         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
22798
22799 2004-01-20  Bruno Haible  <bruno@clisp.org>
22800
22801         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
22802         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
22803         specially.
22804
22805 2004-01-20  Bruno Haible  <bruno@clisp.org>
22806
22807         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
22808         patch.
22809
22810 2004-01-20  Bruno Haible  <bruno@clisp.org>
22811
22812         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
22813
22814 2004-01-20  Bruno Haible  <bruno@clisp.org>
22815
22816         * lib/eealloc.h: New file.
22817
22818 2004-01-20  Bruno Haible  <bruno@clisp.org>
22819
22820         * lib/binary-io.h: Avoid warnings on Cygwin.
22821
22822 2004-01-20  Bruno Haible  <bruno@clisp.org>
22823
22824         * lib/allocsa.h: New file, from GNU gettext.
22825         * lib/allocsa.c: New file, from GNU gettext.
22826
22827 2004-01-18  Karl Berry  <karl@gnu.org>
22828
22829         * doc/gpl.texi, doc/lgpl.texi: new files.
22830
22831 2004-01-18  Karl Berry  <karl@gnu.org>
22832
22833         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
22834         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
22835
22836 2004-01-15  Paul Eggert  <eggert@twinsun.com>
22837
22838         Merge from coreutils.
22839
22840         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
22841         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
22842         (gl_DEFAULT_POSIX2_VERSION): Move
22843         the documentation from 'configure' into 'config.hin',
22844         so that 'configure --help' isn't burdened by it and
22845         we don't have to worry about its formatting there.
22846         Reword the documentation so that it's more succinct
22847         and can be run together into a single paragraph.
22848         * m4/same.m4 (gl_SAME): Check for pathconf.
22849
22850 2004-01-15  Paul Eggert  <eggert@twinsun.com>
22851
22852         Merge from coreutils.
22853
22854         * lib/posixver.c: Include posixver.h.
22855
22856         * lib/same.c: Include <stdbool.h>, <limits.h>.
22857         (_POSIX_NAME_MAX): Define if not defined.
22858         (MIN): New macro.
22859         (same_name): If file names are silently truncated, report
22860         that the file names are the same if they are the same after
22861         the silent truncation.
22862
22863         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
22864         conversion function.
22865         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
22866         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
22867         longer needed.
22868
22869 2004-01-15  Jim Meyering  <jim@meyering.net>
22870
22871         Merge from coreutils.
22872
22873         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
22874         if no library is required.
22875         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
22876         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
22877         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
22878         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
22879         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
22880         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
22881         value, $ac_cv_search_crypt, if it's "none required".
22882         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
22883         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
22884         not gl_FUNC_GETLOADAVG.
22885         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
22886         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
22887
22888 2004-01-15  Jim Meyering  <jim@meyering.net>
22889
22890         Merge from coreutils.
22891
22892         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
22893         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
22894         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
22895
22896         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
22897         optional configure-time default.
22898
22899         * lib/version-etc.c (version_etc_copyright): Update copyright date.
22900
22901         * lib/xreadlink.c (xreadlink): Correct outdated comment.
22902
22903 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
22904
22905         Merge from coreutils.
22906
22907         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
22908         value, $ac_cv_search_nanosleep, if it's "none required".
22909
22910 2004-01-14  Paul Eggert  <eggert@twinsun.com>
22911
22912         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
22913         with like-named macro in fnmatch.c.
22914         (EXT): Use an internal constant instead.
22915
22916         Merge fnmatch patches from glibc.
22917         * lib/fnmatch.c (mbsinit): Remove define.
22918         Add libc_hidden_ver (__fnmatch, fnmatch).
22919         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
22920         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
22921
22922 2004-01-14  Karl Berry  <karl@gnu.org>
22923
22924         * config/install-sh: update from automake.
22925
22926 2004-01-13  Karl Berry  <karl@gnu.org>
22927
22928         * config/install-sh: update from automake.
22929
22930 2004-01-09  Karl Berry  <karl@gnu.org>
22931
22932         * config/install-sh: update from automake.
22933
22934 2004-01-05  Karl Berry  <karl@gnu.org>
22935
22936         * config/config.{sub,guess}: update from config.
22937
22938 2003-12-31  Karl Berry  <karl@gnu.org>
22939
22940         * config/depcomp: update from automake.
22941
22942 2003-12-14  Karl Berry  <karl@gnu.org>
22943
22944         * lib/config.charset: update from gettext-runtime.
22945
22946 2003-12-03  Paul Eggert  <eggert@twinsun.com>
22947
22948         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
22949         Bug reported by Alfred M. Szmidt.
22950
22951 2003-12-03  Bruno Haible  <bruno@clisp.org>
22952
22953         * m4/gettext.m4: Upgrade from gettext-0.13.
22954         * m4/po.m4: Upgrade from gettext-0.13.
22955         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
22956         * m4/intmax.m4: New file, from gettext-0.13.
22957         * m4/printf-posix.m4: New file, from gettext-0.13.
22958
22959 2003-11-29  Karl Berry  <karl@gnu.org>
22960
22961         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
22962
22963 2003-11-25  Paul Eggert  <eggert@twinsun.com>
22964             Bruno Haible  <bruno@clisp.org>
22965
22966         * lib/printf-parse.h: Don't include sys/types.h.
22967         (ARG_NONE): New macro.
22968         (char_directive): Change type of *arg_index fields to size_t.
22969         * lib/printf-parse.c: Don't include sys/types.h.
22970         (SSIZE_MAX): Remove macro.
22971         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
22972         Remove unnecessary overflow check.
22973         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
22974         fields.
22975
22976 2003-11-25  Bruno Haible  <bruno@clisp.org>
22977
22978         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
22979
22980 2003-11-25  Bruno Haible  <bruno@clisp.org>
22981
22982         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
22983         gt_TYPE_SSIZE_T.
22984
22985 2003-11-24  Paul Eggert  <eggert@twinsun.com>
22986
22987         * modules/alloca: Remove dependency on xalloc.
22988
22989 2003-11-24  Paul Eggert  <eggert@twinsun.com>
22990
22991         * lib/alloca.c: Remove dependency on xalloc module.
22992         (xalloc_die): Remove.
22993         (memory_full) [!defined emacs]: New macro.
22994         [!defined emacs]: Don't include xalloc.h.
22995         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
22996         address arithmetic overflows.  Change datatypes a bit to avoid
22997         unnecessary casts.
22998
22999 2003-11-22  Jim Meyering  <jim@meyering.net>
23000
23001         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23002         s/size/size_t/.
23003
23004 2003-11-21  Karl Berry  <karl@gnu.org>
23005
23006         * config/config.{sub,guess}: update from config.
23007
23008 2003-11-18  Karl Berry  <karl@gnu.org>
23009
23010         * config/config.{sub,guess}: update from config.
23011
23012         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23013
23014 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23015
23016         * README: Mention that S+T cannot overflow if S is the size of
23017         an existing object and T is sufficiently small.
23018
23019 2003-11-17  Jim Meyering  <jim@meyering.net>
23020
23021         On systems without utime and without a utimes function capable of
23022         dealing with a NULL struct utimbuf* argument, this utime replacement
23023         could -- in unusual circumstances -- leak a file descriptor.
23024         * lib/utime.c: Include <unistd.h> and <errno.h>.
23025         (utime_null): Be sure to close `fd' and to preserve errno.
23026         Reported by Geoff Collyer via Arnold Robbins.
23027
23028 2003-11-17  Bruno Haible  <bruno@clisp.org>
23029
23030         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23031         (Depends-on): Add xsize.
23032
23033 2003-11-17  Bruno Haible  <bruno@clisp.org>
23034
23035         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23036
23037 2003-11-17  Bruno Haible  <bruno@clisp.org>
23038
23039         * lib/vasnprintf.c (alloca): Remove fallback definition.
23040         (freea): Remove definition.
23041         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23042         Reported by Paul Eggert.
23043
23044 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23045             Bruno Haible  <bruno@clisp.org>
23046
23047         Protect against address arithmetic overflow.
23048         * lib/printf-args.h: Include stddef.h.
23049         (arguments): Change type of field 'count' to size_t.
23050         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23051         'unsigned int' where appropriate.
23052         * lib/printf-parse.h: Include sys/types.h.
23053         (char_directive): Change type of *arg_index fields to ssize_t.
23054         (char_directives): Change type of fields 'count', max_*_length to
23055         size_t.
23056         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23057         (SSIZE_MAX): Define fallback value.
23058         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23059         instead of 'int' where appropriate. Check a_allocated, d_allocated
23060         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23061         * lib/vasnprintf.c: Include xsize.h.
23062         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23063         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23064         overflow. Avoid wraparound when converting a width or precision from
23065         decimal to binary.
23066
23067 2003-11-16  Bruno Haible  <bruno@clisp.org>
23068
23069         Update from GNU gettext.
23070         * lib/printf-parse.c: Generalize to it can be compiled for wide
23071         strings.
23072         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23073         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23074         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23075         SNPRINTF): New macros.
23076         Don't include <alloca.h> if the file is used inside libintl.
23077         (local_wcslen): New function, for Solaris 2.5.1.
23078         (VASNPRINTF): Use it instead of wcslen.
23079
23080 2003-11-16  Bruno Haible  <bruno@clisp.org>
23081
23082         * lib/xsize.h (xmax): New function.
23083         (xsum, xsum3, xsum4): Declare as "pure" functions.
23084
23085 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23086
23087         * modules/xalloc (Files): Undo latest change, since xalloc.h
23088         no longer needs SIZE_MAX or PTRDIFF_MAX.
23089
23090 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23091
23092         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23093         gl_PTRDIFF_MAX.
23094
23095 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23096
23097         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23098         "return", to pacify some unknown compiler.  Problem reported
23099         by Joerg Schilling.
23100
23101 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23102
23103         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23104         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23105         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23106         heuristic is just as accurate as far as we know, and it removes a
23107         dependency on size_max.m4 and ptrdiff_max.m4.
23108
23109 2003-11-11  Bruno Haible  <bruno@clisp.org>
23110
23111         * modules/xsize (Files): Add m4/size_max.m4.
23112         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23113
23114 2003-11-11  Bruno Haible  <bruno@clisp.org>
23115
23116         * m4/size_max.m4: New file.
23117         * m4/ptrdiff_max.m4: New file.
23118         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23119         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23120         (gl_XALLOC): Invoke it.
23121
23122 2003-11-11  Bruno Haible  <bruno@clisp.org>
23123
23124         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23125         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23126         defined.
23127
23128 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23129
23130         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23131         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23132         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23133         From Bruno Haible.
23134         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23135         not (size_t) -1, since it's defined here.
23136
23137 2003-11-09  Karl Berry  <karl@gnu.org>
23138
23139         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23140
23141 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23142
23143         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23144         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23145         Reject sizes of exactly SIZE_MAX bytes.
23146         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23147         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23148
23149 2003-11-05  Bruno Haible  <bruno@clisp.org>
23150
23151         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23152         SIZE_MAX defined in <limits.h> on Solaris.
23153
23154 2003-11-04  Jim Meyering  <jim@meyering.net>
23155
23156         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23157         variable names, rather than @VAR@.
23158         * modules/poll: Likewise.
23159
23160 2003-11-04  Bruno Haible  <bruno@clisp.org>
23161
23162         * modules/xsize: New file.
23163         * modules/linebreak: Depend on xsize.
23164         * MODULES.html.sh (func_all_modules): Add xsize.
23165
23166 2003-11-04  Bruno Haible  <bruno@clisp.org>
23167
23168         * m4/xsize.m4: New file.
23169
23170 2003-11-04  Bruno Haible  <bruno@clisp.org>
23171
23172         * lib/xsize.h: New file.
23173         * lib/linebreak.c: Include xsize.h.
23174         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23175         argument for overflow.
23176         Suggested by Paul Eggert.
23177
23178 2003-11-03  Karl Berry  <karl@gnu.org>
23179
23180         * config/config.{guess,sub}: update from config.
23181
23182 2003-11-03  Jim Meyering  <jim@meyering.net>
23183
23184         * modules/userspec (lib_SOURCES): Add userspec.h.
23185         (Include): Add "userspec.h".
23186         Improve description.
23187
23188 2003-11-03  Jim Meyering  <jim@meyering.net>
23189
23190         * lib/userspec.c: Include "userspec.h".
23191         * lib/userspec.h: New file.
23192
23193 2003-11-03  Bruno Haible  <bruno@clisp.org>
23194
23195         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23196
23197 2003-11-03  Bruno Haible  <bruno@clisp.org>
23198
23199         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23200         available, to avoid (extremely rare) race condition.
23201         Suggested by Paul Eggert.
23202
23203 2003-11-02  Karl Berry  <karl@gnu.org>
23204
23205         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23206
23207 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23208
23209         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23210         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23211         (read_filesystem_list): Set and use me_type_malloced.
23212         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23213         whatever the type happens to be), for brevity and consistency.
23214         Check for size calculation overflow on Alphas running OSF/1.
23215
23216 2003-10-31  Jim Meyering  <jim@meyering.net>
23217
23218         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23219
23220         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23221
23222 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23223             Bruno Haible  <bruno@clisp.org>
23224
23225         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23226         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23227
23228 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23229
23230         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23231         netbsd*-gnu*.  Suggested by Robert Millan.
23232
23233 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23234
23235         * modules/group-member: Depend on stdbool.
23236
23237 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23238
23239         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23240
23241 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23242
23243         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23244         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23245         after the 'gnu' in these cases.  This fixes some bugs in the
23246         previous change, and is based on suggestions by Robert Millan.
23247
23248 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23249
23250         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23251         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23252         no longer needed.
23253         * lib/quotearg.c (quotearg_n_options): Use it.
23254         * lib/group-member.c: Include <stdbool.h>.
23255         (free_group_info): Arg is now const *; don't free arg.
23256         (get_group_info): Now returns bool and accepts struct group_info *,
23257         rather than returning a malloc'ed struct group_info *.
23258         All uses changed.  Check for overflow in internal size calculation.
23259
23260         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23261         rather than xmalloc/xrealloc.
23262         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23263         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23264         conformance bug: the old code used a pointer after freeing the
23265         storage that it addressed.
23266         * lib/hash.c (hash_initialize): Simplify the code by using
23267         xalloc_oversized rather than doing it by hand.
23268         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23269         the buffer preserved.  Use free and xmalloc instead.
23270         * lib/quotearg.c (quotearg_n_options): Likewise.
23271         Use a simpler test for size overflow.  Don't use xalloc_oversized
23272         because unsigned int might be wider than size_t (!); this suggests
23273         that we should switch from unsigned int to size_t for slot numbers.
23274
23275 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23276
23277         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23278         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23279         NetBSD kernels.  Requested by Richard Stallman.
23280
23281 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23282
23283         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23284         to allocate the returned structure.  Do not allocate a subarray,
23285         as x2nrealloc will do that.
23286         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
23287         instead of xnrealloc.
23288         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
23289
23290 2003-10-27  Bruno Haible  <bruno@clisp.org>
23291
23292         * lib/stdbool_.h: Better support for BeOS.
23293
23294 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23295
23296         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
23297         now uses inline.
23298
23299 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23300
23301         * lib/xalloc.h (xalloc_oversized): New static inline function, for
23302         callers that want to do their own size-overflow checking.  Include
23303         <stdbool.h>, since xalloc_oversized returns bool.
23304         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
23305         to use xalloc_oversized.
23306
23307         Add two functions x2realloc, x2nrealloc, for programs that grow
23308         arrays dynamically by doubling their sizes.
23309         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
23310         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
23311         New functions.
23312
23313         Port to C99 semantics for 'inline' of external functions.
23314         Bug reported by Bruno Haible.
23315         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
23316         with the old contents of xnmalloc.
23317         (xnmalloc, xmalloc): Use it.
23318         (xnrealloc_inline): New static inline function,
23319         with the old contents of xnrealloc.
23320         (xnrealloc, xrealloc): Use it.
23321
23322         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
23323         that.
23324
23325 2003-10-26  Karl Berry  <karl@gnu.org>
23326
23327         * config/srclist.txt (COPYING.DOC): no longer available from
23328         /gd/gnuorg; don't know where the ultimate source is.
23329
23330 2003-10-25  Paul Eggert  <eggert@twinsun.com>
23331
23332         Fix several address-calculation bugs in the hash modules,
23333         plus some minor code cleanup.
23334
23335         * lib/hash.h: Include <stdbool.h>, for bool.
23336         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
23337         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
23338         hash_get_n_entries, hash_get_max_bucket_length,
23339         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
23340         hash_rehash): Use size_t rather than unsigned.
23341         * lib/hash.c (struct hash_table, hash_get_n_buckets,
23342         hash_get_n_buckets_used, hash_get_n_entries,
23343         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
23344         hash_get_entries, hash_do_for_each, hash_string, is_prime,
23345         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
23346         Likewise.
23347         (SIZE_MAX): Define if not defined.
23348         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
23349         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
23350         hash_print):
23351         Use const * when possible.
23352         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
23353         (check_tuning): Fix bug: if tuning parameters were very close to
23354         0 or 1, rounding errors could have caused subscript violations.
23355         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
23356         (hash_initialize): Add 'fail:' label
23357         to free table and return NULL, and use it to simplify code.
23358         Use calloc rather than clearing the storage ourself.
23359         (hash_initialize, hash_rehash): Check for arithmetic overflow in
23360         buffer size calculations.
23361         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
23362         Include <stddef.h>, for size_t.
23363         * lib/hash-pjw.c (hash_pjw): Likewise.
23364         Switch to method described by Bruno Haible.
23365         Include <limits.h>, for CHAR_BIT.
23366         (SIZE_BITS): New macro.
23367
23368 2003-10-23  Paul Eggert  <eggert@twinsun.com>
23369
23370         * m4/getline.m4 (AM_FUNC_GETLINE):
23371         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
23372         hosts.  Problem reported by Derek Robert Price in
23373         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
23374         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
23375         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
23376
23377 2003-10-21  Paul Eggert  <eggert@twinsun.com>
23378
23379         * lib/getndelim2.c (getndelim2): When size calculation overflows,
23380         ceiling the allocation at NMAX bytes rather than silently
23381         discarding input bytes before NMAX is reached.  This makes
23382         a difference only if NMAX exceeds SIZE_MAX / 2.
23383
23384         * lib/obstack.c: Merge from glibc.
23385         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
23386         Add libc_hidden_def (_obstack_newchunk).
23387         (_obstack_free) [! defined _LIBC]: Remove.
23388         [defined _LIBC]: Make a strong alias from obstack_free, rather than
23389         a clone of the function body.
23390         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
23391         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
23392
23393         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
23394         glibc.
23395         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
23396         arg to memcpy.
23397
23398         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
23399         (obstack_ptr_grow_fast, obstack_int_grow_fast):
23400         Don't use lvalue casts, as GCC plans to remove support for them
23401         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
23402         was also present in the non-GCC version, indicating that this
23403         code had always been buggy and had never been widely used.
23404         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
23405         Use the fast variant of each macro, rather than copying the
23406         definiens of the fast variant; that way, we'll be more likely to
23407         catch future bugs in the fast variants.
23408
23409 2003-10-20  Bruno Haible  <bruno@clisp.org>
23410
23411         * modules/wait-process: New file.
23412         * MODULES.html.sh (func_all_modules): Add wait-process.
23413
23414 2003-10-20  Bruno Haible  <bruno@clisp.org>
23415
23416         * m4/wait-process.m4: New file.
23417
23418 2003-10-20  Bruno Haible  <bruno@clisp.org>
23419
23420         * lib/wait-process.h: New file, from GNU gettext.
23421         * lib/wait-process.c: New file, from GNU gettext.
23422
23423 2003-10-19  Jim Meyering  <jim@meyering.net>
23424
23425         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
23426         HPUX 10.20.
23427
23428 2003-10-18  Karl Berry  <karl@gnu.org>
23429
23430         * config/config.guess: update from config.
23431
23432 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23433
23434         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
23435         (getgroups): First arg is int, not size_t.
23436         Don't let 'free' mangle errno.
23437
23438 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23439
23440         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
23441
23442 2003-10-16  Karl Berry  <karl@gnu.org>
23443
23444         * config/config.{guess,sub}: update from config.
23445
23446 2003-10-16  Jim Meyering  <jim@meyering.net>
23447
23448         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
23449         memcpy.
23450
23451 2003-10-15  Paul Eggert  <eggert@twinsun.com>
23452
23453         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
23454         (SIZE_MAX): Remove.
23455         (new_exclude, add_exclude_file): Initial size no longer needs to
23456         be a power of 2.
23457         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
23458         our own address arithmetic overflow checking.
23459
23460         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
23461         (fnmatch): Do not alloca more than 2000 wide characters;
23462         instead, use malloc for large buffers.
23463         Check for address arithmetic overflow, and return -1
23464         with errno set to ENOMEM in that case.
23465         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
23466         (NEW_PATTERN): Do not alloca more than 8000 bytes;
23467         instead, return -1.  Check for address arithmetic overflow.
23468
23469 2003-10-14  Paul Eggert  <eggert@twinsun.com>
23470
23471         Handle invalid suffixes and overflow independently, so that
23472         callers can treat them independently as needed.  Fix some bugs in
23473         suffix handling, e.g., "100k@" was not diagnosed as an invalid
23474         suffix for a human-readable blocksize.  The major caller-visible
23475         change is the addition of a new
23476         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
23477         that both overflow and suffix chars were found.
23478
23479         * lib/human.c (humblock): Don't check separately for invalid suffix
23480         char; that is xstrtoumax's job (now that its bug is fixed).
23481         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
23482         INTMAX_MAX]: New macros.
23483         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
23484         TYPE_MAXIMUM): New macros.
23485         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
23486         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
23487         if overflow occurs, as it's what __strtol does and it's more useful
23488         in practice.
23489         (__xstrtol): If __strtol reports some error other than ERANGE,
23490         reflect it to the caller as LONGINT_INVALID.  If it reports
23491         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
23492         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
23493         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
23494         value.
23495         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
23496         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
23497         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
23498         [defined UINTMAX_MAX]: New macros.
23499
23500 2003-10-14  Bruno Haible  <bruno@clisp.org>
23501
23502         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
23503
23504 2003-10-14  Bruno Haible  <bruno@clisp.org>
23505
23506         * m4/sig_atomic_t: New file, from GNU gettext.
23507         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
23508
23509 2003-10-14  Bruno Haible  <bruno@clisp.org>
23510
23511         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
23512         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
23513         Also use volatile where needed.
23514
23515 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23516
23517         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
23518         Change maintainer from Bruno Haible to 'all'.
23519
23520 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23521
23522         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
23523
23524 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23525
23526         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
23527         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
23528         and define in terms of the other primitives.
23529         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
23530         (SIZE_MAX): Define if not already defined.
23531         (array_size_overflow): New function.
23532         (xalloc_die): Abort instead of exiting if 'error' returns.
23533         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
23534         (xmalloc, xrealloc): Use them.
23535         (xcalloc): Check for address arithmetic overflow.
23536         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
23537         a bit faster than strcpy.
23538
23539 2003-10-10  Simon Josefsson  <jas@extundo.com>
23540
23541         * modules/argp (Depends-on): Add restrict and strcase.
23542
23543 2003-10-10  Simon Josefsson  <jas@extundo.com>
23544
23545         * m4/argp.m4: Add AC_C_INLINE.
23546
23547 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23548
23549         Merge getpass from libc, plus a few fixes.
23550
23551         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
23552         Include <stdbool.h>.
23553         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
23554         __fsetlocking to empty.
23555         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
23556         do include <bits/libc-lock.h>.
23557         Do not include <fcntl.h>; not needed.
23558         [_LIBC]: Include <wchar.h>.
23559         (NOTCANCEL_MODE): New macro.
23560         (flockfile, funlockfile) [_LIBC]: New macros.
23561         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
23562         [!_LIBC]: New macros.
23563         (call_fclose): New function.
23564         (getpass): Use it.  Save tty stream separately; this simplifies the
23565         code and makes it more reliable if stdin happens to equal stdout.
23566         Invoke __fsetlocking on tty.
23567         Handle thread cancellation if needed.
23568         Namespace cleanup (use __tcgetattr, __getline).
23569         Use bool for Booleans.
23570         [USE_IN_LIBIO]: Handle wide streams.
23571         [!_LIBC]: Unconditionally do the fseek, since we don't know what
23572         stream might go where.
23573
23574         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
23575         doesn't have to include <stdio.h> before us.
23576         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
23577         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
23578         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
23579         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
23580         if not declared, so that we can use getpass.c code from libc without
23581         rewriting it.
23582         (flockfile, ftrylockfile, funlockfile): New macros.
23583
23584 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23585
23586         * modules/getpass: Depend on stdbool.
23587
23588 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23589
23590         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
23591
23592 2003-10-07  Karl Berry  <karl@gnu.org>
23593
23594         * config/config.{guess,sub}: update from config.
23595
23596 2003-10-06  Jim Meyering  <jim@meyering.net>
23597             Bruno Haible  <bruno@clisp.org>
23598
23599         This lets translators provide better translations for the
23600         "Written by ..." part of --version output.
23601         * lib/version-etc.h: Include stdarg.h.
23602         (version_etc_copyright): Declare as readonly.
23603         (version_etc): Make this function variadic with a NULL-terminated list
23604         of author name strings.
23605         (version_etc_va): New declaration.
23606         * lib/version-etc.c: Include stdarg.h, stdlib.h.
23607         (version_etc_copyright): Declare as readonly.
23608         (version_etc_va): New function. Provide a different translatable string
23609         for each possible number of authors < 10. Abbreviate when there are 10
23610         authors or more.
23611         (version_etc): Make this function variadic. Call version_etc_va.
23612         Suggestion from Gary V. Vaughan.
23613
23614         * lib/long-options.h (parse_long_options): Change prototype: the
23615         authors string is moved to the end and becomes variadic.
23616         * lib/long-options.c: Include stdarg.h.
23617         (parse_long_options): Make this function variadic, too.
23618         Call version_etc_va, not version_etc.
23619
23620 2003-10-06  Bruno Haible  <bruno@clisp.org>
23621
23622         * modules/version-etc-2: Remove file.
23623         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
23624
23625 2003-10-06  Bruno Haible  <bruno@clisp.org>
23626
23627         * modules/fatal-signal: New file.
23628         * MODULES.html.sh (func_all_modules): Add fatal-signal.
23629
23630 2003-10-06  Bruno Haible  <bruno@clisp.org>
23631
23632         * m4/fatal-signal.m4: New file.
23633         * m4/signalblocking.m4: New file, from GNU gettext.
23634
23635 2003-10-06  Bruno Haible  <bruno@clisp.org>
23636
23637         * lib/version-etc-2.h: Remove file.
23638         * lib/version-etc-2.c: Remove file.
23639
23640 2003-10-06  Bruno Haible  <bruno@clisp.org>
23641
23642         * lib/fatal-signal.h: New file, from GNU gettext.
23643         * lib/fatal-signal.c: New file, from GNU gettext.
23644
23645 2003-10-05  Paul Eggert  <eggert@twinsun.com>
23646
23647         * README: Rework advice for preventing empty .o files.
23648         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
23649         not <sys/types.h>.
23650
23651 2003-10-04  Karl Berry  <karl@gnu.org>
23652
23653         * lib/argp*: update from libc.
23654
23655 2003-10-04  Karl Berry  <karl@gnu.org>
23656
23657         * config/config.{guess,sub}: update from config.
23658
23659 2003-10-02  Bruno Haible  <bruno@clisp.org>
23660
23661         * modules/lchown (Include): Add lchown.h.
23662         * modules/time_r (Include): Use "..." syntax.
23663         * modules/xgetdomainname (Include): Add xgetdomainname.h.
23664
23665 2003-10-01  Simon Josefsson  <jas@extundo.com>
23666
23667         * MODULES.html.sh (func_all_modules): Move gethostname from section
23668         'based on' to section 'lacking' POSIX:2001.
23669
23670 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
23671
23672         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
23673         to output mode on the same stream.
23674
23675 2003-09-29  Paul Eggert  <eggert@twinsun.com>
23676
23677         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
23678         Fix arg typo in previous patch.
23679
23680 2003-09-28  Jim Meyering  <jim@meyering.net>
23681
23682         * lib/error.c: Correct cpp indentation.
23683
23684 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23685
23686         * modules/free: New file.
23687
23688 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23689
23690         * m4/free.m4: New file.
23691
23692 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23693
23694         * lib/minmax.h (MIN, MAX)
23695         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
23696         Omit the special code that used __typeof__, since we worry that
23697         it could be more trouble than it's worth.  See:
23698         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
23699         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
23700
23701         * lib/free.c: New file.
23702
23703 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
23704
23705         Trivial fixes to Makefile.am parts of module listings.
23706         * modules/strstr: Append strstr.h to lib_SOURCES.
23707         * modules/strcase: Likewise, for strcase.h.
23708
23709 2003-09-27  Karl Berry  <karl@gnu.org>
23710
23711         * config/mkinstalldirs: update from automake.
23712
23713 2003-09-26  Paul Eggert  <eggert@twinsun.com>
23714
23715         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
23716         (error_tail): Do not loop, reallocating temporary buffer, since
23717         the output cannot contain more wide characters than the input
23718         contains bytes, the size must be big enough already.  This avoids
23719         one potential size overflow calculation.  Check for size overflow
23720         when calculating temporary buffer size.  Free temporary buffer
23721         when done, if it was allocated with malloc; this plugs a memory
23722         leak.  Remove casts from void * to pointers, that are no longer
23723         needed now that we're assuming C89 or better.
23724
23725         Merge error changes from glibc.
23726
23727         * lib/error.c, error.h: Update copyright notice header to match glibc.
23728         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
23729         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
23730         Disable cancellation while printing error.
23731         * lib/error.h: Prepend __ to parameter names.
23732
23733 2003-09-26  Jim Meyering  <jim@meyering.net>
23734
23735         * lib/error.c (error_tail): Move some declarations
23736         into inner scope where the local variables are used.
23737
23738 2003-09-26  Bruno Haible  <bruno@clisp.org>
23739
23740         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
23741         stpncpy().
23742         Don't define stpncpy through config.h; it's now done through stpncpy.h.
23743
23744 2003-09-26  Bruno Haible  <bruno@clisp.org>
23745
23746         * lib/stpncpy.h (gnu_stpncpy): New declaration.
23747         (stpncpy): Define as alias for gnu_stpncpy.
23748         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
23749
23750 2003-09-25  Simon Josefsson  <jas@extundo.com>
23751
23752         * lib/xgetdomainname.h: New file.
23753         * lib/xgetdomainname.c: New file.
23754
23755 2003-09-25  Simon Josefsson  <jas@extundo.com>
23756             Bruno Haible  <bruno@clisp.org>
23757
23758         * modules/getdomainname: New file.
23759         * modules/xgetdomainname: New file.
23760         * MODULES.html.sh (func_all_modules): Add getdomainname,
23761         xgetdomainname.
23762
23763 2003-09-25  Simon Josefsson  <jas@extundo.com>
23764             Bruno Haible  <bruno@clisp.org>
23765
23766         * m4/getdomainname.m4: New file.
23767
23768 2003-09-25  Simon Josefsson  <jas@extundo.com>
23769             Bruno Haible  <bruno@clisp.org>
23770
23771         * lib/getdomainname.h: New file.
23772         * lib/getdomainname.c: New file.
23773
23774 2003-09-25  Karl Berry  <karl@gnu.org>
23775
23776         * lib/argp-fmtstream.c, argp-help.c: update from libc.
23777
23778 2003-09-25  Karl Berry  <karl@gnu.org>
23779
23780         * config/install-sh: update from automake.
23781
23782 2003-09-25  Bruno Haible  <bruno@clisp.org>
23783
23784         * modules/version-etc-2: New file, from modules/version-etc with
23785         modifications.
23786         * MODULES.html.sh (func_all_modules): Add version-etc-2.
23787
23788 2003-09-25  Bruno Haible  <bruno@clisp.org>
23789
23790         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
23791         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
23792
23793 2003-09-24  Simon Josefsson  <jas@extundo.com>
23794
23795         * modules/xgethostname: Add xgethostname.h.
23796
23797 2003-09-24  Paul Eggert  <eggert@twinsun.com>
23798
23799         * lib/linebuffer.c (freebuffer): Don't free the argument, just
23800         the buffer associated with the argument.  Bug reported by
23801         Simon Josefsson.
23802
23803 2003-09-24  Paul Eggert  <eggert@twinsun.com>
23804
23805         * README: Document assumptions that 'int' is at least 32 bits
23806         wide, that integer arithmetic is 2's complement without overflow,
23807         that there are no holes in integer values, that adding sizes of
23808         two nonoverlapping objects can't overflow, and that all-bits-zero
23809         yields scalar zero.  Fix spelling and capitalization typos.
23810
23811 2003-09-19  Karl Berry  <karl@gnu.org>
23812
23813         * lib/argp.h: update from libc.
23814
23815 2003-09-17  Paul Eggert  <eggert@twinsun.com>
23816
23817         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
23818         to avoid spurious warnings like "AC_RUN_IFELSE was called before
23819         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
23820
23821 2003-09-17  Paul Eggert  <eggert@twinsun.com>
23822
23823         * gnulib-tool: Use "test -h", not "test -L", for portability
23824         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
23825         (tags_regexp): Remove, since \| doesn't conform to POSIX.
23826         (sed_extract_prog): Issue s commands one-by-one, rather than
23827         using \| in one s command.
23828
23829 2003-09-16  Paul Eggert  <eggert@twinsun.com>
23830
23831         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
23832         input error, instead of returning NULL the next time we are called
23833         (and therefore losing track of errno).
23834
23835 2003-09-16  Bruno Haible  <bruno@clisp.org>
23836
23837         * gnulib-tool (func_create_testdir): Warn about duplicated
23838         dependencies.
23839
23840 2003-09-15  Paul Eggert  <eggert@twinsun.com>
23841
23842         * modules/argmatch, modules/fatal, modules/obstack,
23843         modules/xalloc, modules/xgethostname: Sort dependencies by
23844         importance, not alphabetically.
23845
23846 2003-09-15  Paul Eggert  <eggert@twinsun.com>
23847
23848         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
23849         fails, so that the caller gets the proper errno.
23850
23851         * lib/readutmp.c (read_utmp): Likewise.
23852         Check for fstat error.  Close stream and free storage
23853         when failing.
23854
23855 2003-09-14  Karl Berry  <karl@gnu.org>
23856
23857         * config/srclist.txt (strdup.c): disable for c89 changes.
23858
23859 2003-09-14  Jim Meyering  <jim@meyering.net>
23860
23861         * lib/getloadavg.c: Correct cpp indentation.
23862         * lib/strdup.c: Likewise.
23863         * lib/vasnprintf.c: Likewise.
23864
23865 2003-09-14  Bruno Haible  <bruno@clisp.org>
23866
23867         * modules/fwriteerror: New file.
23868         * MODULES.html.sh (func_all_modules): Add fwriteerror.
23869
23870 2003-09-14  Bruno Haible  <bruno@clisp.org>
23871
23872         * lib/fwriteerror.h: New file.
23873         * lib/fwriteerror.c: New file.
23874
23875 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23876
23877         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
23878         modules/xgethostname, modules/xalloc: Depend on exit.
23879
23880 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23881
23882         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
23883
23884         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
23885         and AC_MINIX, too, so that their extensions are available.
23886
23887         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
23888         This macro has been superseded by gl_BACKUPFILE.
23889
23890         More patches to assume C89 or better.
23891
23892         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
23893
23894         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
23895         unconditionally.
23896         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
23897         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
23898         Include <string.h>, <stdlib.h> unconditionally.
23899         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
23900         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
23901         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
23902         headers or for string.h.
23903         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
23904         or strtoul.
23905
23906         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
23907         headers.
23908         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
23909         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23910         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
23911         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
23912         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23913         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
23914         memcpy, memset.
23915         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
23916         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
23917         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
23918         strtol.
23919         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
23920         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
23921         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
23922         strtoul.
23923
23924 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23925
23926         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
23927         * lib/obstack.c [!defined _LIBC]: Likewise.
23928         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
23929         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
23930         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
23931
23932         More changes to assume C89 or better.
23933
23934         * lib/error.c (error_tail): Assume vprintf.
23935
23936         * lib/argmatch.c (getenv): Remove decl.
23937         * lib/progreloc.c (get_full_program_name): Define via prototype.
23938         * lib/setenv.c (clearenv): Likewise.
23939         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
23940         needed.
23941         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
23942         (malloc, memcpy): Remove decls.
23943         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
23944         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
23945         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
23946         (memcpy): Remove macro.
23947         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
23948         (__P): Remove.  All uses removed.
23949         (PTR): Remove.  All uses changed to void *.
23950         (CHAR_BIT, NULL): Remove.
23951         (spaces, zeros, memset_space, memset_zero)
23952         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
23953         Remove.
23954         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
23955         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
23956         Define with prototype.
23957         Remove now-unnecessary prototype decl.
23958         (extra_args_spec): Assume ANSI C.  All uses changed.
23959         (extra_args_spec_iso): Remove.
23960         (my_strftime, emacs_strftimeu): Define via prototype.
23961         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
23962         unconditionally.
23963         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
23964         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
23965         (strtoul, strtol): Remove decls.
23966         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
23967         LONG_MAX): Remove.
23968         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
23969         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
23970         (LOCALE_PARAM_PROTO): New macro.
23971         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
23972         (INTERNAL (strtol), strtol): Define with a prototype.
23973         (PARAMS): Remove.  All uses removed.
23974         * lib/tempname.c: Include <string.h> unconditionally.
23975         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
23976         * lib/xgethostname.c (main): Define with a prototype.
23977         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
23978         Include <stdlib.h> unconditionally.
23979         (calloc, malloc, realloc, free): Remove decls.
23980         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
23981         Include <stdlib.h> unconditionally.  Sort include file names.
23982         (strtod): Remove.
23983         (xstrtod): Define with a prototype.
23984         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
23985         (strtol, strtoul): Remove decls.
23986
23987 2003-09-11  Paul Eggert  <eggert@twinsun.com>
23988
23989         More patches to assume C89 or better.
23990         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
23991         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
23992         string.h, memchr, STDC_HEADERS.
23993
23994 2003-09-11  Paul Eggert  <eggert@twinsun.com>
23995
23996         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
23997         Include <stdlib.h>, <string.h> unconditionally.
23998         Remove now-unnecessary cast to char *.
23999         * lib/strnlen.c: Include <string.h> unconditionally.
24000         * lib/yesno.c (yesno): Define with a prototype.
24001
24002 2003-09-11  Bruno Haible  <bruno@clisp.org>
24003
24004         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24005
24006 2003-09-10  Jim Meyering  <jim@meyering.net>
24007
24008         * lib/error.c: Correct indentation of cpp directives.
24009
24010 2003-09-10  Bruno Haible  <bruno@clisp.org>
24011
24012         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24013         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24014         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24015         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24016         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24017         <stdlib.h> and <string.h> checks.
24018         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24019         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24020
24021 2003-09-10  Bruno Haible  <bruno@clisp.org>
24022
24023         * lib/strcspn.c: Include <string.h> unconditionally.
24024         * lib/strpbrk.c: Include <string.h> unconditionally.
24025         * lib/strstr.c: Include <string.h> unconditionally.
24026         * lib/unicodeio.c: Include <string.h> unconditionally.
24027         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24028         * lib/unsetenv.c: Likewise.
24029         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24030         * lib/yesno.c: Include <stdlib.h> unconditionally.
24031         (rpmatch): Add prototype.
24032
24033 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24034
24035         More patches to assume C89 or better.
24036         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24037         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24038         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24039         or for string.h.
24040         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24041         stdlib.h.
24042         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24043         C headers.
24044         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24045         string.h.
24046         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24047         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24048         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24049         or for string.h.
24050         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24051         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24052         C headers.
24053         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24054         memcpy.
24055         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24056         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24057         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24058         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24059         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24060         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24061         string.h, free.
24062         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24063         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24064         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24065         C headers, or for string.h.
24066         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24067         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24068         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24069         headers, memory.h, stdlib.h, string.h, strings.h.
24070         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24071         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24072         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24073         strchr.
24074         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24075         headers, memory.h, string.h.
24076         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24077         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24078         free.
24079         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24080         headers.
24081         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24082         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24083         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24084         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24085         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24086
24087 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24088
24089         More K&R removal.
24090
24091         * lib/acosl.c (main): Use a prototype.
24092         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24093         tanl.c: Likewise.
24094
24095         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24096
24097         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24098         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24099         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24100         with a prototype.
24101         * lib/getopt.c (const): Remove macro.
24102         Include <string.h> unconditionally.
24103         (my_index): Remove; all uses changed to strchr.
24104         (strlen): Remove decl.
24105         (exchange): Remove forward decl; no longer needed.
24106         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24107         Define with prototype.
24108         * lib/getopt1.c (const): Remove macro.
24109         (getopt_long, getopt_long_only, main): Define with prototype.
24110
24111         * lib/getugroups.c: Include <string.h> unconditionally.
24112
24113         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24114         (getusershell, setusershell, endusershell, readname, main):
24115         Define with prototypes.
24116
24117         * lib/group-member.c: Include group-member.h first.
24118         Include <stdlib.h> unconditionally.
24119
24120         * lib/hard-locale.c: Include hard-locale.h first.
24121         Include <stdlib.h>, <string.h> unconditionally.
24122
24123         * lib/hash.c (free, malloc): Remove decls.
24124         Include <stdlib.h> unconditionally.
24125
24126         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24127         (getenv): Do not declare.
24128
24129         * lib/idcache.c: Include <string.h> unconditionally.
24130
24131         * lib/long-options.c: Include long-options.h first, to test interface.
24132         Include <stdlib.h> unconditionally.
24133
24134         * lib/makepath.c: Include makepath.h first, to test interface.
24135         Include <stdlib.h> and <string.h> unconditionally.
24136
24137         * lib/linebuffer.c: Include <stdlib.h>.
24138         (free): Remove decl.
24139
24140         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24141         stddef.h. rpl_malloc returns void *, not char *.
24142         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24143         prototype.
24144
24145         * lib/md5.h: Include <limits.h> unconditionally.
24146         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24147         (__P): Remove; all uses removed.
24148         * lib/md5.c: Include "md5.h" first.
24149         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24150         md5_buffer, md5_process_bytes, md5_process_block):
24151         Define with prototypes.
24152         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24153         * lib/sha.c: Include "sha.h" first.
24154         Include <stdlib.h>, <string.h> unconditionally.
24155
24156         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24157         * lib/memcmp.c (__ptr_t): Likewise.
24158         * lib/memrchr.c (__ptr_t): Likewise.
24159         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24160         Include <string.h> unconditionally.
24161         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24162         * lib/memchr.c: Include <stdlib.h> unconditionally.
24163         * lib/memchr.c (LONG_MAX): Remove.
24164         * lib/memrchr.c (LONG_MAX): Likewise.
24165         * lib/memchr.c (__memchr): Define via a prototype.
24166         * lib/memrchr.c (__memrchr): Likewise.
24167         * lib/memcmp.c (__P): Remove, and remove all uses.
24168         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24169         Remove forward decls; no longer needed.
24170         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24171         Use types required by C89 in prototype.
24172
24173         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24174         * lib/savedir.c: Likewise.
24175         * lib/mkdir.c (free): Remove decl.
24176         * lib/rmdir.c (rmdir): Define with a prototype.
24177         * lib/savedir.c: Include savedir.h first, to test interface.
24178
24179         * lib/mktime.c (STDC_HEADERS): Remove.
24180         Include <stdlib.h>, <string.h> unconditionally.
24181
24182         * lib/modechange.c: Include <stdlib.h> unconditionally.
24183         (malloc): Remove decl.
24184
24185         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24186         (free): Remove decl.
24187
24188         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24189         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24190         (This type really should be intptr_t, but that's a C99ism.)
24191         (_obstack_memcpy): Remove: all uses changed to memcpy.
24192         Include <string.h> unconditionally.
24193         (struct obstack): Assume __STDC__ for types of members
24194         chunkfun, freefun, extra_arg.
24195         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24196         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24197         obstack_begin, obstack_specify_allocation,
24198         obstack_specify_allocation_with_arg, obstack_chunkfun,
24199         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24200         Remove unprototyped decls and the macros that use them.
24201         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24202         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24203         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24204         (defined __STDC__ && __STDC__)]:
24205         Remove nonprototyped code.
24206         Include <stdlib.h> unconditionally.
24207         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24208         _obstack_allocated_p, _obstack_free, obstack_free,
24209         _obstack_memory_used, print_and_abort):
24210         Define using prototypes.
24211         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24212         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24213         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24214         obstack_next_free, obstack_object_size, obstack_room) [0]:
24215         Remove unused, unprototyped code.
24216
24217         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24218
24219         * lib/physmem.c (physmem_total, physmem_available, main): Define
24220         with prototypes.
24221
24222         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24223         (main): Define with a prototype.
24224
24225         * lib/posixver.c (getenv): Remove decl.
24226
24227         * lib/putenv.c (malloc): Returns void *, not char *.
24228         Include <string.h> unconditionally.
24229         (strchr, memcpy, NULL): Do not define.
24230
24231         * lib/readtokens.c: Include readtokens.h first, to test interface.
24232         Include <stdlib.h>, <string.h> unconditionally.
24233         (init_tokenbuffer): Define with a prototype.
24234
24235         * lib/regex.c (PARAMS): Remove.  All uses removed.
24236         All uses of _RE_ARGS removed, too.
24237         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24238         unconditionally.
24239         (bzero): Assume memset exists.
24240         (memcmp, memcpy, NULL): Remove.
24241         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24242         char, or assignments to local vars of type signed char.
24243         (init_syntax_once, PREFIX(extract_number_and_incr),
24244         PREFIX(print_partial_compiled_pattern),
24245         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24246         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24247         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24248         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24249         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24250         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24251         wcs_compile_range, byte_compile_range, truncate_wchar,
24252         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24253         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24254         count_mbs_length, wcs_re_match_2_internal,
24255         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24256         PREFIX(alt_match_null_string_p),
24257         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24258         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24259         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24260         now-unnecessary declaration, if any.
24261         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24262         regcomp, regexec):
24263         Remove now-unnecessary casts among pointer types.
24264         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24265
24266         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24267         (free): Remove decl.
24268
24269         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24270
24271         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24272         (free): Remove decl.
24273
24274         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24275         * lib/xgetcwd.c: Likewise.
24276
24277         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24278         (free): Remove decl.
24279
24280         * lib/strchrnul.c (strchrnul): Define with a prototype.
24281         Fix bug: c_in was not converted to char before searching.
24282
24283         The following changes are not K&R related:
24284
24285         * lib/group-member.h: Include <sys/types.h>, so that this file is
24286         self-contained.
24287         * lib/makepath.h: Likewise.
24288
24289         * lib/getusershell.c (readname, default_index, line_size, readname):
24290         Use size_t, not int, for sizes.
24291         (readname): If the size overflows, report an error instead of
24292         looping forever.
24293
24294 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24295
24296         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
24297         libc.
24298
24299 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24300
24301         * README: New section: portability guidelines.
24302
24303 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24304
24305         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
24306         C89 spec.
24307
24308 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24309
24310         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
24311
24312 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24313
24314         Assume C89 or better; remove K&R cruft.
24315         A few of these changes were first proposed by Derek Robert Price
24316         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
24317
24318         * lib/addext.c: Include <string.h> unconditionally.
24319         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
24320         Don't declare getenv or malloc.
24321
24322         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
24323         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
24324         (NULL): Remove.
24325         (find_stack_direction, alloca): Use prototypes.
24326
24327         * lib/atexit.c (atexit): Define using a prototype.
24328
24329         * lib/basename.c, dirname.c, stripslash.c:
24330         Include <string.h> unconditionally.
24331
24332         * lib/bcopy.c: Include <stddef.h>.
24333         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
24334
24335         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
24336
24337         * lib/error.h (error, error_at_line, error_print_progname)
24338         [! (defined (__STDC__) && __STDC__)]: Remove decls.
24339         * lib/error.c: Include error.h first, to check interface.
24340         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24341         (VA_START): Remove; all uses changeed to va_start.
24342         (exit, strerror): Remove decls.
24343         (error_print_progname): Prototype uncondionally.
24344         Don't include <errno.h>; no longer needed.
24345         (private_strerror): Remove.
24346         (error_tail): Always define.
24347         (error, error_at_line): Assume C89 or better; always use prototypes.
24348         * lib/fatal.c: Include "fatal.h" first, to test interface.
24349         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24350         (VA_START): Remove; all uses changed to va_start.
24351         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
24352         this case.
24353         (exit): Remove decl.
24354         (fatal): Prototype unconditionally.  Assume va_start works.
24355         Abort at end, to pacify gcc.
24356
24357         * lib/euidaccess.c (main): Define with a prototype.
24358
24359         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
24360
24361         * lib/exitfail.c: Include <stdlib.h> unconditionally.
24362
24363         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
24364         prototypes.
24365         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
24366         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
24367         (getenv): Remove decl.
24368         (fnmatch): Define using a prototype.
24369         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
24370         (FCT): Define using a prototype.
24371
24372         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
24373
24374         * lib/gethostname.c: Include <stddef.h>.
24375         (gethostname): Define with prototype.  Length is size_t, not int.
24376
24377 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24378
24379         Assume C89 or better; remove K&R cruft.
24380         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
24381         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
24382         string.h, getenv, malloc.
24383         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
24384         headers.
24385         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
24386         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
24387         do not check for strerror.
24388         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
24389         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
24390         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
24391         do not check for doprnt or vprintf.
24392         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
24393         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
24394
24395 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24396
24397         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
24398         getversion.c should have been removed then, but was accidentally
24399         preserved.
24400
24401         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
24402         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
24403
24404 2003-09-08  Karl Berry  <karl@gnu.org>
24405
24406         * config/config.sub, config.guess, srclistvars.sh: update from savannah
24407                 config, forget about prep.
24408
24409         * config/depcomp, missing: update from automake.
24410
24411 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24412
24413         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
24414         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24415
24416 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24417
24418         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
24419         copy_tm_result.  Bug reported by Simon Josefsson in
24420         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24421
24422 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24423
24424         * m4/time_r.m4: New file.
24425         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
24426         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
24427         is. Check for timegm declaration.
24428         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
24429         Do not check for gmtime_r.
24430         Replace mktime if __mktime_internal does not exist and if mktime
24431         hasn't been replaced already.
24432
24433 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24434
24435         * lib/time_r.c, lib/time_r.h: New files.
24436
24437         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
24438         __localtime_r.
24439         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
24440         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
24441
24442         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
24443         __gmtime_r.
24444         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
24445         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
24446         Include <time_r.h>.
24447
24448         * lib/timegm.c: Switch to glibc implementation, with the following
24449         changes:
24450         [defined HAVE_CONFIG_H]: Include <config.h>.
24451         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
24452         (__mktime_internal) [!defined _LIBC]: New decl.
24453         (__gmtime_r) [!defined _LIBC]: New macro and function.
24454         (timegm): Use a prototype, since gnulib assumes C89.
24455         Do not bother declaring tmp to be const, as it's not really usefu.
24456         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
24457         (timegm): Declare only if HAVE_DECL_TIMEGM.
24458
24459 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24460
24461         * MODULES.html.sh (func_all_modules): Add time_r.
24462         * modules/time_r: New file.
24463         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
24464         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
24465
24466 2003-09-03  Paul Eggert  <eggert@twinsun.com>
24467
24468         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
24469         Bug reported by Lute Kamstra in
24470         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
24471
24472         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
24473         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
24474         course with correspondingly smaller numbers for tomorrow and
24475         yesterday.  From Tadayoshi Funaba.  Originally installed into
24476         sh-utils on 1999-08-07, but the patch got lost (I guess during the
24477         coreutils merge?).
24478
24479 2003-08-31  Simon Josefsson  <jas@extundo.com>
24480
24481         * modules/timegm: New file.
24482         * MODULES.html.sh (func_all_modules): Add timegm.
24483
24484 2003-08-31  Simon Josefsson  <jas@extundo.com>
24485
24486         * m4/timegm.m4: New file.
24487
24488 2003-08-31  Simon Josefsson  <jas@extundo.com>
24489
24490         * lib/timegm.h: New file.
24491         * lib/timegm.c: New file.  Based on
24492         wget-1.8.2/src/http.c:mktime_from_utc.
24493
24494 2003-08-31  Karl Berry  <karl@gnu.org>
24495
24496         * lib/argp.h: update from libc.
24497
24498 2003-08-28  Bruno Haible  <bruno@clisp.org>
24499
24500         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
24501         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
24502         followed by '#define fnmatch fnmatch_posix' gives an error.
24503
24504 2003-08-28  Bruno Haible  <bruno@clisp.org>
24505
24506         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
24507         warning on QNX, which defines O_BINARY to 000000.
24508
24509 2003-08-27  Jim Meyering  <jim@meyering.net>
24510
24511         * m4/mkstemp.m4: Require that the system mkstemp be able to create
24512         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
24513         would fail after 32.  Reported by Danny Levinson.  Details here:
24514         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
24515
24516 2003-08-24  Bruno Haible  <bruno@clisp.org>
24517
24518         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
24519         MSVC7 <stdio.h> is included later.
24520
24521 2003-08-22  Simon Josefsson  <jas@extundo.com>
24522
24523         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
24524
24525 2003-08-20  Karl Berry  <karl@gnu.org>
24526
24527         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
24528
24529 2003-08-20  Bruno Haible  <bruno@clisp.org>
24530
24531         * modules/progname: New file.
24532         * MODULES.html.sh (func_all_modules): Add progname.
24533
24534 2003-08-20  Bruno Haible  <bruno@clisp.org>
24535
24536         * lib/progname.h: New file, from GNU gettext.
24537         * lib/progname.c: New file, from GNU gettext.
24538         * lib/progreloc.c: New file, from GNU gettext.
24539
24540 2003-08-19  Jim Meyering  <jim@meyering.net>
24541
24542         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
24543         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
24544
24545 2003-08-19  Bruno Haible  <bruno@clisp.org>
24546
24547         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
24548         more.
24549
24550 2003-08-19  Bruno Haible  <bruno@clisp.org>
24551
24552         * lib/xstrdup.c: Assume <string.h> exists.
24553
24554 2003-08-18  Paul Eggert  <eggert@twinsun.com>
24555
24556         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
24557         in makefile rules.
24558
24559 2003-08-18  Jim Meyering  <jim@meyering.net>
24560
24561         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
24562         * m4/lib-ld.m4: Likewise.
24563
24564 2003-08-18  Jim Meyering  <jim@meyering.net>
24565
24566         * lib/setenv.h: Indent nested cpp directive.
24567         * lib/vasnprintf.c: Remove trailing blanks.
24568
24569 2003-08-17  Simon Josefsson  <jas@extundo.com>
24570
24571         * modules/xstrndup: New file.
24572         * MODULES.html.sh (func_all_modules): Add xstrndup.
24573
24574 2003-08-17  Simon Josefsson  <jas@extundo.com>
24575
24576         * modules/argp: Fix autoconf macro name. Add more dependencies.
24577
24578 2003-08-17  Simon Josefsson  <jas@extundo.com>
24579
24580         * m4/xstrndup.m4: New file.
24581
24582 2003-08-17  Simon Josefsson  <jas@extundo.com>
24583
24584         * m4/argp.m4: New file.
24585
24586 2003-08-17  Simon Josefsson  <jas@extundo.com>
24587             Bruno Haible  <bruno@clisp.org>
24588
24589         * lib/xstrndup.h: New file.
24590         * lib/xstrndup.c: New file.
24591
24592 2003-08-17  Bruno Haible  <bruno@clisp.org>
24593
24594         * modules/strndup (Files, Include): Add lib/strndup.h.
24595
24596 2003-08-17  Bruno Haible  <bruno@clisp.org>
24597
24598         * modules/euidaccess (Files): Add lib/euidaccess.h.
24599
24600 2003-08-17  Bruno Haible  <bruno@clisp.org>
24601
24602         * lib/strndup.h: New file.
24603
24604 2003-08-17  Bruno Haible  <bruno@clisp.org>
24605
24606         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
24607         like AC_GNU_SOURCE.
24608         * modules/extensions (configure.ac): Comment out the invocation of
24609         gl_USE_SYSTEM_EXTENSIONS.
24610
24611 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24612
24613         Merges from coreutils, etc.
24614         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
24615         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
24616         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
24617         fixing a typo.
24618         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
24619         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
24620
24621 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24622
24623         Document merge from coreutils.
24624         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
24625         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
24626         * modules/utime: Add m4/utimes-null.m4.
24627
24628 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24629
24630         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
24631         space, undoing this 2003-08-12 change:
24632         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24633
24634 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24635
24636         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
24637         strtoul.c from libc, undoing this 2003-08-12 change:
24638         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24639
24640 2003-08-16  Jim Meyering  <jim@meyering.net>
24641
24642         Merges from coreutils.
24643         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
24644         prefix.  Adjust cache variables similarly.  Create 500 rather than
24645         just 300 files, to exercise bug on Darwin6.5, too.
24646         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
24647         $missing_dir.
24648         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
24649         AM_SYS_POSIX_TERMIOS.
24650         Reported by mkc@mathdogs.com.
24651         Also change use of $am_cv_sys_posix_termios
24652         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
24653         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
24654         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
24655         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
24656         in /proc/mounts until it finds one with matching device number.  This
24657         is unnecessary when the FILE argument *is* a mount point.  No stat call
24658         is necessary in that case.  So, disable the statvfs-testing code on
24659         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
24660         as RedHat bug# 84846.
24661         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24662         to 1MB, so as not to render systems with no stack size limit (e.g.,
24663         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24664         Include <unistd.h>.  On some systems,
24665         it is required for the definition of _SC_PAGESIZE.
24666
24667 2003-08-16  Jim Meyering  <jim@meyering.net>
24668
24669         Merge from coreutils.
24670         * lib/xstrtoimax.c: #else #if -> #elif.
24671         * lib/xstrtoumax.c: Likewise.
24672
24673 2003-08-16  Jim Meyering  <jim@meyering.net>
24674
24675         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
24676         * m4/utimes.m4: Removed.
24677         * m4/utimes-null.m4: Renamed from utimes.m4.
24678
24679         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24680         to 1MB, so as not to render systems with no stack size limit (e.g.,
24681         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24682         Include <unistd.h>.  On some systems,
24683         it is required for the definition of _SC_PAGESIZE.
24684
24685 2003-08-16  Jim Meyering  <jim@meyering.net>
24686         and Paul Eggert  <eggert@cs.ucla.edu>
24687
24688         Merges from coreutils, etc.
24689
24690         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
24691         using the latest version from cvs.  This avoids problems with #line
24692         directives using a vendor (Sun) compiler.
24693         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
24694         Don't set GETGROUPS_LIB here; now it's
24695         done via getgroups.m4's wrapper function.
24696         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
24697         rather than just in sh-util/configure.in, so that the
24698         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
24699         same.
24700         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
24701         AC_FUNC_GETLOADAVG where to find getloadavg.c.
24702         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
24703         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
24704         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
24705         Remove code that is now done by the newly-required macros.
24706         Append $(EXEEXT) to DF_PROG.
24707         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
24708         Do not invoke or require the following here,
24709         since prereq.m4 or some gnulib .m4 now does this for us:
24710         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
24711         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
24712         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
24713         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
24714         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
24715         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
24716         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
24717         AC_FUNC_OBSTACK.
24718         Do not replace the following functions, as this is now the job
24719         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
24720         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
24721         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
24722         atexit getpass, strdup, getpagesize.
24723         Replace 'raise'.
24724         Do not check for the following functions, as this is now the job
24725         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
24726         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
24727         setregid.
24728         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
24729         Check for sys/sysctl.h.
24730         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
24731         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
24732         of checking for ssize_t ourselves.
24733
24734         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
24735         Require every macro that gnulib/modules/* suggests for us.
24736         (jm_PREREQ_ADDEXT): New macro.
24737         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
24738         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
24739
24740         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
24741         (gl_PHYSMEM): Use it.
24742         Also check for `table' function.
24743         Check for new headers and functions.
24744         Add check for sys/sysmp.h.
24745         With suggestions from Kaveh Ghazi.
24746         Ignore headers that are present but cannot be compiled.  This
24747         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
24748         C 5.4.
24749
24750 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24751
24752         Document merge from coreutils.
24753         * modules/userspec: Depend on posixver.
24754         * modules/strftime: Depend on tzset.
24755
24756 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24757
24758         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
24759         rather than tab, after '#' in shell-script copyright notices.
24760         Suggested by Bruno Haible.
24761
24762 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24763
24764         * config/srclist-update: Use three spaces, rather than tab, after '#'
24765         in shell-script copyright notices.  Suggested by Bruno Haible.
24766         Remove unnecessary parenthesization in regular expression.
24767
24768 2003-08-15  Jim Meyering  <jim@meyering.net>
24769
24770         Merge from coreutils.
24771         * lib/xgethostname.c: Include <stdlib.h>.
24772         (xghostname): Don't exit for anything other than memory-related
24773         failure; just return NULL.
24774         * lib/userspec.c: Include "posixver.h".
24775         (parse_user_spec): Accept `.' as a separator only
24776         in pre-POSIX-200112 mode.
24777         * lib/strtoimax.c: Use #elif rather than #else #if.
24778         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
24779         Remove function, now that we can rely on a working tzset function.
24780         [!_LIBC]: Ensure that the required autoconf test has been run.
24781         [!defined _NL_CURRENT && HAVE_STRFTIME]:
24782         Use underlying_strftime for %r.
24783         * lib/sha.c: Merge in some clean-up and optimization changes from
24784         glibc.
24785         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
24786         Ensure that it is a multiple of 64.
24787         Rearrange loop exit tests so as to avoid performing an
24788         additional fread after encountering an error or EOF.
24789         * lib/realloc.c: Update copyright date.
24790
24791 2003-08-15  Jim Meyering  <jim@meyering.net>
24792         and Paul Eggert  <eggert@twinsun.com>
24793
24794         Merge from coreutils.
24795         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
24796         member but strut utmpx does not.  Needed for AIX 4.3.3.
24797         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
24798
24799 2003-08-15  Jim Meyering  <jim@meyering.net>
24800         and Paul Eggert  <eggert@cs.ucla.edu>
24801
24802         Merges from coreutils, etc.
24803         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
24804         Require gl_FUNC_TZSET_CLOBBER.
24805         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
24806         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
24807         members.
24808
24809 2003-08-14  Paul Eggert  <eggert@twinsun.com>
24810
24811         Help the merge from coreutils.
24812         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
24813         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
24814         * m4/tzset.m4: Use it too.
24815
24816 2003-08-14  Paul Eggert  <eggert@twinsun.com>
24817
24818         * modules/tzset: New file.
24819
24820 2003-08-14  Jim Meyering  <jim@meyering.net>
24821
24822         Merges from coreutils.
24823         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
24824         variable names, rather than @FNMATCH_H@.
24825         * modules/alloca: Likewise for $(ALLOCA_H).
24826
24827         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
24828         the three copies of the literal target, `fnmatch.h'.
24829         * modules/alloca (alloca.h): Likewise.
24830
24831 2003-08-14  Jim Meyering  <jim@meyering.net>
24832
24833         Merge from coreutils.
24834         * m4/tzset.m4: New file.
24835         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
24836         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
24837         otherwise, AIX 5.1 systems would end up using the latter.
24838         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
24839         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
24840         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
24841         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
24842
24843 2003-08-14  Jim Meyering  <jim@meyering.net>
24844
24845         Merge from coreutils.
24846         * lib/obstack.h: Whitespace changes.
24847         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
24848         and xcalloc return values.
24849         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
24850         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
24851         hang on OSF/1 5.1 for DIR on both local and remote file systems.
24852         Reported by (and fix confirmed by) Nelson H. F. Beebe.
24853         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
24854         error from mntctl.
24855         Use mntctl's return value to drive the entry-processing loop, since
24856         we can't rely on the value of the vmt_length member in the last
24857         entry.  On some systems doing so could result in exhausting
24858         virtual memory.  Based in part on a patch from Mike Jetzer.
24859
24860 2003-08-14  Jim Meyering  <jim@meyering.net>
24861         and Paul Eggert  <eggert@twinsun.com>
24862
24863         Merges from coreutils, plus other fixes.
24864         * lib/physmem.c: Merge in portability changes from gcc/libiberty
24865         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
24866         for credits and details.  Thanks to Kaveh Ghazi for helping
24867         to keep these files in sync.
24868         (ARRAY_SIZE): Define it.
24869         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
24870         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
24871         (memcasecmp): Don't assume size_t fits in unsigned int.
24872         Remove casts and duplicate code.
24873         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
24874         (memcpy): Remove definition.
24875         Merge in some clean-up and optimization changes from glibc.
24876         [BLOCKSIZE]: Move definition to top of file.
24877         Ensure that it is a multiple of 64.
24878         Rearrange loop exit tests so as to avoid performing an
24879         additional fread after encountering an error or EOF.
24880         * lib/md5.h (md5_uintptr): Define.
24881         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
24882         return to the initial working directory.  Preserve errno
24883         for caller.
24884         * lib/idcache.c: Include "xalloc.h".
24885         (xmalloc, xrealloc): Remove decls.
24886         (getuser): Remove casts no longer required in C89.
24887         * lib/human.c: Include stdio.h, for sprintf.
24888         * lib/group-member.c: Include "xalloc.h".
24889         (xmalloc, xrealloc): Remove decls.
24890         (get_group_info): Remove casts no longer required in C89.
24891         * lib/getusershell.c (readname): Remove casts no longer required in
24892         C89.
24893         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
24894         * lib/getline.c: Whitespace fix, from coreutils.
24895
24896 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24897
24898         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
24899         Check for isascii.
24900
24901         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24902         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
24903         Undo previous (whitespace-only) change.
24904
24905 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24906
24907         * lib/exclude.c: Include <ctype.h>
24908         (IN_CTYPE_DOMAIN): New macro.
24909         (is_space): New fn.
24910         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
24911         and empty lines.
24912
24913         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
24914         Undo previous (whitespace-only) change.
24915
24916 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24917
24918         * config/srclist-update: Change update back to the old behavior,
24919         leaving whitespace alone.  Use one 'sed' command rather than a
24920         pipeline.
24921         (fixlicense): Now a variable, not a function.
24922         (remove_trailing_blanks): Remove.
24923         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
24924         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24925         Undo previous (whitespace-only) change.
24926
24927 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24928
24929         Merge from coreutils.
24930         * modules/euidaccess: Add lib_SOURCES, include for new
24931         file euidaccess.h
24932
24933 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24934
24935         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24936         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
24937         Normalize leading white space and remove trailing white space.
24938
24939         Merge from coreutils
24940         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
24941
24942         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
24943         0.12.1.  These files are now being upgraded automatically by
24944         ../config/srclist-update.
24945
24946 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24947
24948         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
24949         Normalize leading white space and remove trailing white space.
24950         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
24951         notice, as per ../config/srclist-update.
24952
24953         Merge from coreutils.
24954         * lib/euidaccess.h: New file.
24955         * lib/euidaccess.c: Include it.
24956         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
24957         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
24958         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
24959
24960 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24961
24962         * config/srclist-update: Add copyright notice.
24963         (remove_id_lines, remove_trailing_blanks): New constants.
24964         (fixfile): Use them to normalize spacing a bit in copied files.
24965         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24966         Normalize leading white space and remove trailing white space.
24967
24968         * config/texinfo.tex: Sync with texinfo.
24969
24970         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
24971         strtoul.c from libc, to merge coreutils whitespace changes.
24972
24973         * config/srclist.txt: Get the following m4 files from gettext:
24974         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
24975         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
24976         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
24977         wint_t.m4.
24978
24979 2003-08-12  Karl Berry  <karl@gnu.org>
24980
24981         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
24982         been made.
24983
24984 2003-08-11  Paul Eggert  <eggert@twinsun.com>
24985
24986         * modules/gnu-source, m4/gnu-source.m4:
24987         Remove; we're assuming Autoconf 2.54 or later now.
24988         Suggested by Bruno Haible.
24989         * MODULES.html.sh (func_all_modules): Remove gnu-source.
24990
24991 2003-08-11  Bruno Haible  <bruno@clisp.org>
24992
24993         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
24994
24995 2003-08-11  Bruno Haible  <bruno@clisp.org>
24996
24997         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
24998         (vasnprintf): Use it instead of wcslen.
24999
25000 2003-08-11  Bruno Haible  <bruno@clisp.org>
25001
25002         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25003         value to ensure that _Bool promotes to int. Use #define for _Bool when
25004         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25005
25006 2003-08-10  Karl Berry  <karl@gnu.org>
25007
25008         * lib/regex.h: update from libc (whitespace fix).
25009
25010 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25011
25012         Merge some files from coreutils.  These changes were
25013         originally made by Jim Meyering.
25014         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25015         many older Unixes require this.
25016         * lib/alloca.c (alloca): Remove cast to argument of free;
25017         no longer needed in C89.
25018         * lib/alloca_.h, regex.h: Fix white space to match
25019         what GNU indent does.
25020
25021 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25022
25023         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25024         apparently Emacs's Unicode mode got confused before my 2003-08-05
25025         checkin.
25026
25027 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25028
25029         * m4/extensions.m4: New file.
25030         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25031         Require gl_USE_SYSTEM_EXTENSIONS.
25032         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25033         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25034
25035 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25036
25037         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25038         * modules/extensions, modules/gnu-source: New files.
25039         * modules/timespec, modules/unlocked-io: Depend on extensions.
25040
25041 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25042
25043         * modules/restrict: New file.
25044         * MODULES.html.sh (func_all_modules): Add restrict.
25045         * modules/regex: Depend on restrict.
25046
25047 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25048
25049         * m4/restrict.m4: New file.
25050         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25051
25052 2003-08-07  Bruno Haible  <bruno@clisp.org>
25053
25054         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25055         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25056
25057 2003-08-07  Bruno Haible  <bruno@clisp.org>
25058
25059         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25060         makes the module 'getndelim2' compatible with the module 'getline'.
25061
25062 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25063
25064         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25065         byte with "\201" to avoid glitches when editing that source file
25066         with multi-gnome-terminal.
25067
25068 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25069
25070         * lib/bumpalloc.h: Remove.
25071
25072 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25073
25074         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25075         * modules/bumpalloc: Remove.
25076
25077 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25078
25079         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25080         GNU coding style.
25081
25082         Merge from coreutils.
25083         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25084         1. From glibc.
25085         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25086         from Karl Berry, implemented by Jim Meyering.
25087         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25088         from Dmitry V. Levin.
25089         Remove anachronistic cast of xrealloc.
25090         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25091         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25092         type. Otherwise, it wouldn't compile with at least /bin/cc on
25093         ymp-cray-unicos9.0.2.X.
25094         Combine two mostly-identical uses of alloca into one.
25095         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25096
25097 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25098
25099         [From Emacs.]
25100
25101         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25102         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25103         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25104         obsolete NLIST_NAME_UNION.
25105         [__GNU__]: Undef BSD and FSCALE.
25106         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25107
25108 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25109
25110         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25111         an enum type, so that it's guaranteed to promote to int.  See:
25112         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25113
25114 2003-08-03  Karl Berry  <karl@gnu.org>
25115
25116         * config/depcomp: update from automake.
25117
25118 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25119
25120         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25121         (strerror): Don't assume that a printable int fits in 14 bytes.
25122
25123 2003-07-31  Bruno Haible  <bruno@clisp.org>
25124
25125         * modules/getpass-gnu: New file.
25126         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25127
25128 2003-07-31  Bruno Haible  <bruno@clisp.org>
25129
25130         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25131
25132 2003-07-24  Karl Berry  <karl@gnu.org>
25133
25134         * config/missing: update from automake.
25135
25136 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25137             Bruno Haible  <bruno@clisp.org>
25138
25139         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25140         * lib/getline.c (getline, getdelim): Likewise.
25141         Remove _GNU_SOURCE define; now it's defined in config.h through
25142         m4/getline.m4.
25143
25144 2003-07-23  Karl Berry  <karl@gnu.org>
25145
25146         * config/config.sub: update from prep.
25147
25148 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25149
25150         * modules/xalloc (Depends-on): Add exitfail.
25151         * modules/xmemcoll: Likewise.
25152
25153 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25154
25155         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25156         over-parenthesization in macros.
25157
25158         Sync with coreutils.
25159
25160         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25161         required by C99.
25162
25163         Use `exit_failure' for xalloc and xmemcoll instead of their own
25164         private exit-failure variables.
25165         * lib/xalloc.h (xalloc_exit_failure): Remove.
25166         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25167         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25168         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25169         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25170         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25171
25172 2003-07-20  Jim Meyering  <jim@meyering.net>
25173
25174         * modules/closeout (Depends-on): Add exitfail.
25175         Suggestion from Bruno Haible.
25176
25177 2003-07-19  Karl Berry  <karl@gnu.org>
25178
25179         * config/config.sub: update from prep.
25180
25181 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25182
25183         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25184         Remove.
25185         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25186         to test that it can stand by itself.  Include "exitfail.h".
25187         Clients should set exit_failure instead.
25188         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25189
25190 2003-07-18  Bruno Haible  <bruno@clisp.org>
25191
25192         * modules/getndelim2: New file.
25193         * modules/getline: Share files with module getndelim2.
25194         * modules/getnline: Depend on getndelim2 instead of sharing files with
25195         it. Add getnline.c to lib_SOURCES.
25196         * MODULES.html.sh (func_all_modules): Add getndelim2.
25197
25198 2003-07-18  Bruno Haible  <bruno@clisp.org>
25199
25200         * m4/getndelim2.m4: New file.
25201         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25202         invoke gl_PREREQ_GETNDELIM2.
25203         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25204         gl_PREREQ_GETNDELIM2.
25205         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25206         gl_GETNDELIM2.
25207
25208 2003-07-18  Bruno Haible  <bruno@clisp.org>
25209
25210         * lib/getndelim2.h: New file.
25211         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25212         getndelim2.h.
25213         (getndelim2): Make non-static. Change return type to ssize_t.
25214         * lib/getline.h: Change argument names.
25215         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25216         * lib/getnline.c: Include getndelim2.h.
25217
25218 2003-07-18  Andreas Schwab  <schwab@suse.de>
25219
25220         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25221
25222 2003-07-17  Karl Berry  <karl@gnu.org>
25223
25224         * config/config.sub: update from prep.
25225
25226 2003-07-17  Bruno Haible  <bruno@clisp.org>
25227
25228         * modules/getnline: New file.
25229         * modules/getline: Add lib/getndelim2.c to source file list.
25230         * MODULES.html.sh (func_all_modules): Add getnline.
25231
25232 2003-07-17  Bruno Haible  <bruno@clisp.org>
25233
25234         * m4/getnline.m4: New file.
25235
25236 2003-07-17  Bruno Haible  <bruno@clisp.org>
25237
25238         * m4/Makefile.am.in: Remove file.
25239         * m4/Makefile.am: Remove file.
25240         * m4/Makefile.in: Remove file.
25241
25242 2003-07-17  Bruno Haible  <bruno@clisp.org>
25243
25244         * lib/getnline.h: New file.
25245         * lib/getnline.c: New file.
25246         * lib/getndelim2.c: New file, extracted from getline.c.
25247         (getndelim2): Renamed from getdelim2, with added nmax argument.
25248         * lib/getline.c: Include getndelim2.c.
25249         (getdelim2): Moved out to getndelim2.c.
25250         (getline, getdelim): Update.
25251
25252 2003-07-17  Bruno Haible  <bruno@clisp.org>
25253
25254         * lib/Makefile.am: Remove file.
25255         * lib/Makefile.in: Remove file.
25256
25257 2003-07-17  Bruno Haible  <bruno@clisp.org>
25258
25259         * configure.in: Remove file.
25260         * Makefile.in: Remove file.
25261
25262 2003-07-17  Bruno Haible  <bruno@clisp.org>
25263
25264         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25265
25266 2003-07-16  Karl Berry  <karl@gnu.org>
25267
25268         * config/srclist-update: was running fixlicense twice, which caused
25269                 texinfo.tex to be nullified for some reason.  Simplify,
25270                 $gplsrc is no longer needed as far as I can see?
25271
25272 2003-07-16  Jim Meyering  <jim@meyering.net>
25273
25274         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25275
25276 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25277
25278         * config/srclist.txt: Get the following files from gettext-runtime/intl
25279         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25280         ref-del.sin.  From Bruno Haible.
25281         * config/srclist-update (fixfile): Change grep pattern again, since the
25282         previous fix didn't work (there was another trailing $).  Use
25283         '[$]' to escape the $s.
25284
25285 2003-07-15  Karl Berry  <karl@gnu.org>
25286
25287         * lib/vasnprintf.c: update from gettext.
25288
25289 2003-07-15  Karl Berry  <karl@gnu.org>
25290
25291         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
25292         gets expanded when surrounded by '$'.
25293
25294 2003-07-15  Jim Meyering  <jim@meyering.net>
25295
25296         * modules/save-cwd: Don't depend on error.  From Derek Price.
25297
25298 2003-07-15  Jim Meyering  <jim@meyering.net>
25299
25300         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
25301
25302 2003-07-14  Simon Josefsson  <jas@extundo.com>
25303
25304         * modules/mempcpy: New file.
25305         * MODULES.html.sh (func_all_modules): Add mempcpy.
25306
25307 2003-07-14  Simon Josefsson  <jas@extundo.com>
25308
25309         * m4/mempcpy.m4: New file.
25310
25311 2003-07-14  Simon Josefsson  <jas@extundo.com>
25312
25313         * lib/mempcpy.h: New file.
25314         * lib/mempcpy.c: New file.
25315
25316 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25317
25318         * modules/getdate, modules/posixtm: Depend on mktime.
25319
25320 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25321
25322         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
25323         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
25324         unicodeio.c, unicodeio.h, unlocked-io.h:
25325         Switch from LGPL to GPL.
25326
25327 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25328
25329         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
25330         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
25331         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
25332         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
25333         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
25334         updated automatically by ../config/srclist-update.  This changes
25335         their license from LPGL to GPL.
25336
25337 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25338
25339         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
25340         assumed to refer to the root of the most recent stable gettext version.
25341         * config/srclistvars.sh: Add defaults for eggert.
25342         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
25343         Match "This program" as well as "The program".  This is needed
25344         for gettext.
25345
25346 2003-07-14  Jim Meyering  <jim@meyering.net>
25347
25348         Don't emit diagnostics.  Let callers do that.
25349         * lib/save-cwd.c: Don't include "error.h".
25350         (save_cwd): Don't call error.  Ensure that errno is valid
25351         when returning nonzero.
25352
25353         * lib/save-cwd.h (restore_cwd): Update prototype.
25354         * lib/save-cwd.c (restore_cwd): Remove two parameters.
25355         Simplify.  Don't call error upon failure.  Let callers do that.
25356         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
25357         when auditing is enabled.  But don't bother updating the #if.
25358
25359 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
25360
25361         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
25362         it breaks C++ compilation.
25363         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
25364
25365 2003-07-10  Simon Josefsson  <jas@extundo.com>
25366
25367         * modules/strchrnul (Makefile.am): Add strchrnul.h.
25368
25369 2003-07-10  Jim Meyering  <jim@meyering.net>
25370
25371         * m4/clock_time.m4: Remove trailing blank.
25372         * m4/intmax_t.m4: Likewise.
25373
25374 2003-07-10  Jim Meyering  <jim@meyering.net>
25375
25376         * lib/vasnprintf.c: Remove trailing blanks.
25377         Make cpp indentation consistent.
25378
25379 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25380
25381         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
25382         posixver.c, strftime.c, strnlen.c, strverscmp.c:
25383         Switch from LGPL to GPL.
25384
25385 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25386
25387         * config/srclist.txt: Sort sublists.  Add
25388         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
25389         that differ from gnulib for one reason or another; we'd like this list
25390         to be smaller but for now let's document what we have.
25391
25392 2003-07-08  Paul Eggert  <eggert@twinsun.com>
25393
25394         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
25395         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
25396         and sweeter "eval x=$x".
25397         * config/srclist.txt: Get lib/argp* from glibc.
25398
25399 2003-07-07  Paul Eggert  <eggert@twinsun.com>
25400
25401         * lib/mktime.c: Fix some boundary cases and remove need for floating
25402         point.
25403
25404         Issue a compile-time diagnostic if time_t is floating point, or if
25405         two's complement arithmetic is not in effect, or if arithmetic
25406         right shift does not propagate the sign.  These assumptions were
25407         all in the original code but they weren't checked.
25408
25409         (TIME_T_MIDPOINT, verify): New macros.
25410         (__isleap): Remove; it has integer overflow problems.
25411         (leapyear): New function, without those problems.
25412         (ydhms_tm_diff): Remove; splitting into two parts.
25413         (ydhms_diff): New function, containing the arithmetic part of
25414         the old ydhms_tm_diff function.  Issue a compile-time
25415         diagnostic if we are not using C99 integer division.
25416         Avoid casts when possible.
25417         (guess_time_tm): New function, containing the checking part of
25418         the old ydhms_tm_diff function.  Return the new value, rather than
25419         the difference between it and the old.  Accept a new argument T
25420         so that *T specifies the old value.  Check for overflow in the result.
25421
25422         (__mktime_internal): Use a time_t offset, not a long int offset.
25423         This undoes the 2003-06-04 change, which is no longer needed now
25424         that we have better overflow checking.
25425         (localtime_offset): Likewise.
25426
25427         (__mktime_internal): Avoid harmful overflow on hosts where time_t
25428         and long are 64-bit but int is only 32-bit.
25429         (ydhms_diff): Use long int to store year1 and yday1.
25430         Issue a compile-time diagnostic if long int is not wide enough.
25431
25432         (__mktime_internal): Use long int to store adjusted year and yday.
25433         Use plain C rather than preprocessor commands, if that doesn't
25434         affect efficiency.
25435         Check for overflow (and try to repair) after each probe
25436         rather than checking only at the very end.  This avoids some bugs
25437         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
25438         does not equal GMT offset at maximum time).
25439         Use integer to check for overflow rather than floating point; this
25440         is more portable to non-IEEE hosts, and is a tad faster.
25441         When we detect that we are oscillating between two values,
25442         don't check whether tm_isdst has the requested value, since
25443         we already know the answer.  When tm_isdst has the wrong value,
25444         use a different heuristic to find the right one, based on the
25445         extreme values actually observed in practice in tz2003a,
25446         rather than the (overly optimistic) "previous 3 calendar quarters".
25447
25448         (not_equal_tm, print_tm, check_result): Use "const T" rather than
25449         "T const" to accommodate glibc style.
25450         (check_result): Use less-confusing report format.  "long" -> "long int.
25451         (main): Likewise.
25452         Don't loop if the iteration overflows time_t.
25453         Allow a negative step in the iteration.
25454
25455 2003-07-06  Karl Berry  <karl@gnu.org>
25456
25457         * config/depcomp: update from automake.
25458         * config/config.sub: update from prep.
25459
25460 2003-07-03  Karl Berry  <karl@gnu.org>
25461
25462         * config/config.guess: update from prep.
25463
25464 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25465
25466         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
25467         xreadlink.c now includes it unconditionally.
25468
25469 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25470
25471         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
25472         having it depend on HAVE_SYS_TYPES_H.
25473
25474 2003-07-01  Bruno Haible  <bruno@clisp.org>
25475
25476         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
25477         <sys/types.h> should be sufficient.
25478         Reported by Paul Eggert.
25479
25480 2003-06-26  Karl Berry  <karl@gnu.org>
25481
25482         * config/depcomp: update from automake.
25483
25484 2003-06-26  Bruno Haible  <bruno@clisp.org>
25485
25486         * modules/human: Depend on module stdbool.
25487
25488 2003-06-25  Bruno Haible  <bruno@clisp.org>
25489
25490         * modules/readlink: New file.
25491         * modules/xreadlink: Depend on it.
25492         * MODULES.html.sh (func_all_modules): Add readlink.
25493
25494 2003-06-25  Bruno Haible  <bruno@clisp.org>
25495
25496         * m4/readlink.m4: New file.
25497
25498 2003-06-25  Bruno Haible  <bruno@clisp.org>
25499
25500         * lib/readlink.c: New file.
25501
25502 2003-06-22  Karl Berry  <karl@gnu.org>
25503
25504         * config/srclist.txt: update mkinstalldirs from automake.
25505         * config/mkinstalldirs: update.
25506
25507 2003-06-22  Bruno Haible  <bruno@clisp.org>
25508
25509         Portability to mingw32.
25510         * m4/ssize_t.m4: New file, from GNU gettext.
25511         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
25512         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
25513
25514 2003-06-22  Bruno Haible  <bruno@clisp.org>
25515
25516         * modules/safe-read: Add m4/ssize_t.m4.
25517         * modules/xreadlink: Add m4/ssize_t.m4.
25518
25519 2003-06-20  Bruno Haible  <bruno@clisp.org>
25520
25521         Assume C89, so PARAMS isn't needed.
25522         * lib/unicodeio.h (PARAMS): Remove.
25523         * lib/unicodeio.c: Don't use PARAMS.
25524
25525 2003-06-18  Karl Berry  <karl@gnu.org>
25526
25527         * config/config.{guess,sub}: update from prep.
25528
25529 2003-06-18  Jim Meyering  <jim@meyering.net>
25530
25531         Merge changes from coreutils.
25532         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
25533         Remove explicit declarations of xmalloc and realloc.
25534         Include xalloc.h.
25535         (read_utmp): Remove anachronistic cast of xmalloc.
25536
25537 2003-06-17  Paul Eggert  <eggert@twinsun.com>
25538
25539         Assume C89, so PARAMS isn't needed.
25540         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
25541         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
25542         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
25543         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
25544         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
25545         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
25546         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
25547         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
25548         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
25549         lib/xstrtod.h, lib/xstrtol.h: Likewise.
25550         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
25551         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
25552         no longer needed. Anyway, config.h should always be included before any
25553         other file.
25554
25555 2003-06-11  Simon Josefsson  <jas@extundo.com>
25556
25557         * modules/sysexits: New file.
25558         * MODULES.html.sh (func_all_modules): Add sysexits.
25559
25560 2003-06-11  Simon Josefsson  <jas@extundo.com>
25561
25562         * lib/sysexit_.h: New file.
25563
25564 2003-06-11  Derek Price  <derek@ximbiot.com>
25565
25566         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
25567         necessary.
25568
25569 2003-06-11  Bruno Haible  <bruno@clisp.org>
25570
25571         * m4/sysexits.m4: New file.
25572
25573 2003-06-10  Simon Josefsson  <jas@extundo.com>
25574
25575         * lib/argp.h: New file, from glibc.
25576         * lib/argp-ba.c: New file, from glibc.
25577         * lib/argp-eexst.c: New file, from glibc.
25578         * lib/argp-fmtstream.c: New file, from glibc.
25579         * lib/argp-fmtstream.h: New file, from glibc.
25580         * lib/argp-fs-xinl.c: New file, from glibc.
25581         * lib/argp-help.c: New file, from glibc.
25582         * lib/argp-namefrob.h: New file, from glibc.
25583         * lib/argp-parse.c: New file, from glibc.
25584         * lib/argp-pv.c: New file, from glibc.
25585         * lib/argp-pvh.c: New file, from glibc.
25586         * lib/argp-xinl.c: New file, from glibc.
25587
25588 2003-06-10  Simon Josefsson  <jas@extundo.com>
25589
25590         * modules/strchrnul: New file.
25591
25592 2003-06-10  Simon Josefsson  <jas@extundo.com>
25593
25594         * modules/argp: New file.
25595
25596 2003-06-10  Simon Josefsson  <jas@extundo.com>
25597
25598         * m4/strchrnul.m4: New file.
25599
25600 2003-06-10  Simon Josefsson  <jas@extundo.com>
25601
25602         * lib/strchrnul.h: New file.
25603         * lib/strchrnul.c: New file.
25604
25605 2003-06-10  Bruno Haible  <bruno@clisp.org>
25606
25607         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
25608
25609 2003-06-07  Karl Berry  <karl@gnu.org>
25610
25611         * config/config.{guess,sub}: update from prep.
25612
25613 2003-06-07  Jim Meyering  <jim@meyering.net>
25614
25615         * modules/strtod: Use $(...) notation, not @...@ for
25616         AC_REPLACE'd variables.
25617         * modules/localcharset: Likewise.
25618
25619 2003-06-07  Jim Meyering  <jim@meyering.net>
25620
25621         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
25622         in place of my name in the copyright comment.
25623         Remove definition and uses of __P.
25624
25625         From coreutils.
25626         * lib/stat.c: Don't declare xmalloc explicitly.
25627         Instead, include "xalloc.h".
25628         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
25629         xrealloc, and xcalloc return values.
25630         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
25631         Improve comment.
25632         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
25633
25634 2003-06-07  Bruno Haible  <bruno@clisp.org>
25635
25636         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
25637         avoid AC_CONFIG_LINKS.
25638         * modules/fnmatch (Makefile.am): Use explicit creation rule for
25639         fnmatch.h, to avoid AC_CONFIG_LINKS.
25640         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
25641
25642 2003-06-07  Bruno Haible  <bruno@clisp.org>
25643
25644         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
25645         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
25646         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25647         directory.
25648         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
25649         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25650         directory.
25651
25652 2003-06-06  Jim Meyering  <jim@meyering.net>
25653
25654         Merge from coreutils.
25655         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
25656         Consolidate declarations and initializations of *_base* locals.
25657
25658         Merge from coreutils.
25659         This avoids a core dump on systems without GNU putenv,
25660         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
25661         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
25662         (unsetenv): New static function, from GNU libc.
25663         (rpl_putenv): Use it.
25664
25665         * lib/modechange.c: Remove trailing blanks.
25666
25667         Merge from coreutils.
25668         * lib/fsusage.c: Remove declaration of statfs.
25669         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
25670
25671         * lib/posixtm.c: Include <stdbool.h> unconditionally.
25672
25673 2003-06-06  Jim Meyering  <jim@meyering.net>
25674
25675         * lib/stdbool_.h: Renamed from stdbool.h.in.
25676
25677 2003-06-06  Jim Meyering  <jim@meyering.net>
25678             Bruno Haible  <bruno@clisp.org>
25679
25680         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
25681         Adjust Makefile.am snippet not to redirect directly to target.
25682         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
25683
25684 2003-06-05  Paul Eggert  <eggert@twinsun.com>
25685
25686         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
25687         mismatch, look in future quarters as well as past.  This fixes a
25688         bug when processing fall-backwards gaps immediately after a long
25689         period of daylight-saving time.
25690
25691         * lib/mktime.c: Assume freestanding C89 or better.
25692         (HAVE_LIMITS_H): Remove.  Assume it's 1.
25693         (__P): Remove; not used.
25694         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
25695         (mktime, not_equal_tm, print_tm, check_result,
25696         main): Use prototypes.  Use const * where appropriate.
25697         (main): Fix typo in testing code that uncovered by above changes.
25698         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
25699
25700 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25701
25702         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
25703         locale.h, localeconv.  This merges changes from coreutils.
25704
25705         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
25706         It can be removed after the next Autoconf is released.
25707         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
25708         needed.
25709
25710 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25711
25712         * lib/mktime.c: Fix Debian bug 177940
25713         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
25714         (localtime_offset): Now long int, not time_t, because we want it
25715         to be guaranteed to be signed.  All uses changed.
25716         (__mktime_internal): If overflow would occur when adding offset,
25717         don't add it.
25718
25719         Merge 'human' changes from coreutils.  Rewrite to support
25720         locale-specific notations like thousands separators.
25721         * lib/human.c: Simplify authorship notice.
25722         Include human.h immediately after config.h.
25723         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
25724         <limits.h>: Do not include, since human.h does.
25725         (SIZE_MAX, UINTMAX_MAX): New macros.
25726         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
25727         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
25728         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
25729         (power_letter): Renamed from suffixes.
25730         (generate_suffix_backwards): Remove.
25731         (adjust_value): Now takes int style (because of human.h changes)
25732         and long double value (for greater precision on some platforms).
25733         (group_number): New function.
25734         (human_readable): Use it.  Use integer options, not enum.
25735         Put the options before the sizes in the arg list.
25736         Support all the new options.
25737         The old human_readable function has been removed;
25738         use inttostr.h instead.
25739         (human_readable, default_block_size, humblock):
25740         Use uintmax_t, not int, for block sizes.
25741         (human_readable_inexact, block_size_types): Remove.
25742         (block_size_opts): New constant.
25743         (human_options): Renamed from human_block_size, with new signature
25744         that allows block sizes up to UINTMAX_MAX.  All callers changed.
25745         * lib/human.h: Add copyright and authorship notice.
25746         Include <limits.h> and <stdbool.h> unconditionally.
25747         (PARAMS): Remove.  All uses removed.
25748         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
25749         (enum human_inexact_style): Remove tag; now a nameless enum.
25750         (human_floor, human_ceiling, human_round_to_even): Now have
25751         values 2, 0, 1 rather than -1, 1, 0.
25752         (human_group_digits, human_suppress_point_zero, human_autoscale,
25753         human_base_1024, human_SI, human_B): New constants.
25754         (human_readable_inexact, human_block_size): Remove.
25755         (human_readable): Size args are now uintmax_t, not int.
25756         (human_options): New decl.
25757
25758         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
25759         unnecessary now that we assume C89 or better.  This change
25760         imported from coreutils.
25761
25762         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
25763         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
25764         in the 2003-05-30 sync from glibc.
25765
25766         .h files should stand alone, but we shouldn't include <sys/types.h>
25767         if we can get away with just <stddef.h>.
25768
25769         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
25770         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
25771         rather than <sys/types.h>, as we merely need size_t.
25772         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
25773         to get size_t.
25774         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
25775         Include <stdio.h>, to get FILE.
25776         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
25777         memcasecmp.h has included <stddef.h> and all we need is size_t.
25778         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
25779         our interface, instead of including <sys/types.h>
25780
25781 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25782
25783         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
25784         now, as glibc mktime is buggy on non-glibc systems.
25785
25786 2003-06-03  Karl Berry  <karl@gnu.org>
25787
25788         * config/config.sub: update from prep.
25789
25790 2003-06-02  Paul Eggert  <eggert@twinsun.com>
25791
25792         [from coreutils]
25793         Fix some minor time-related bugs with POSIX time arguments.
25794         Some valid time stamps were being rejected (notably -1, and
25795         time stamps before 1900 on 64-bit hosts).  And some invalid
25796         time stamps were being accepted, e.g. September 31.
25797
25798         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
25799         that we can return (time_t) -1 successfully.
25800         * lib/posixtm.c: Likewise.
25801         [HAVE_STDBOOL_H]: Include <stdbool.h>.
25802         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
25803         (t): Remove static var.
25804         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
25805         of static var.  All uses changed.
25806         (year): Do not reject years before 1900; they can occur with
25807         64-bit time_t.
25808         (posix_time_parse): Do not check for out-of-range components;
25809         that is now the caller's responsibility, since our checks were
25810         only approximations.
25811         (posixtime): Use mktime to check for out-of-range components,
25812         since it knows them exactly.
25813         If mktime returns (time_t) -1, check whether an error actually occurred
25814         by invoking localtime on -1.
25815         (main) [TEST_POSIXTIME]: Check for input data errors, and report
25816         posixtime failures better.
25817         Improve the test data (in comments only).
25818
25819 2003-06-02  Karl Berry  <karl@gnu.org>
25820
25821         * config/mkinstalldirs (version): new variable.
25822         (--version): new option.
25823         (usage): improve message.
25824
25825 2003-05-30  Karl Berry  <karl@gnu.org>
25826
25827         * lib/mktime.c: update from libc.
25828
25829 2003-05-30  Bruno Haible  <bruno@clisp.org>
25830
25831         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
25832         * config/config.rpath: Upgrade to gettext-0.12.1.
25833
25834 2003-05-30  Bruno Haible  <bruno@clisp.org>
25835
25836         * m4/gettext.m4: Upgrade to gettext-0.12.1.
25837         * m4/nls.m4: New file, from gettext-0.12.1.
25838         * m4/po.m4: New file, from gettext-0.12.1.
25839         * m4/progtest.m4: Upgrade to gettext-0.12.1.
25840
25841 2003-05-30  Bruno Haible  <bruno@clisp.org>
25842
25843         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
25844         * lib/localcharset.h: Likewise.
25845         * lib/localcharset.c: Likewise.
25846
25847 2003-05-29  Karl Berry  <karl@gnu.org>
25848
25849         * config/config.rpath: update from gettext.
25850
25851 2003-05-28  Paul Eggert  <eggert@twinsun.com>
25852
25853         Assume the headers required for C89 freestanding compilers.
25854         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
25855         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
25856         * m4/human.m4 (gl_HUMAN): Likewise.
25857         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
25858         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
25859         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25860         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
25861         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25862         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
25863
25864 2003-05-28  Paul Eggert  <eggert@twinsun.com>
25865
25866         Assume the headers required for C89 freestanding compilers.
25867         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
25868         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
25869         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
25870         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
25871         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
25872         define, since <limits.h> is guaranteed to do that.
25873         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
25874         * lib/exclude.c: Include <stdbool.h> unconditionally.
25875         * lib/tempname.c: Include <stddef.h> unconditionally.
25876         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
25877         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
25878         <stddef.h> does that.
25879         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
25880         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
25881         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
25882         needed.
25883         * lib/xstrtol.c: Likewise.
25884         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
25885         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
25886
25887         * lib/addext.c (addext): Use assignment rather than cast, to avoid
25888         warnings on some platforms.
25889
25890         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
25891         arbitrarily.
25892
25893 2003-05-26  Jim Meyering  <jim@meyering.net>
25894
25895         Merge in a change from coreutils:
25896         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
25897         that is guaranteed to be `no'.  Use `no_such_member' to indicate
25898         that condition, rather than `-1' which is slightly misleading.
25899         Change the name of the cache variable to have the gl_ prefix.
25900         Prompted by a patch from Richard Dawe for DJGPP.
25901
25902 2003-05-24  Karl Berry  <karl@gnu.org>
25903
25904         * config/config.guess: update from prep.
25905
25906 2003-05-22  Karl Berry  <karl@gnu.org>
25907
25908         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
25909
25910 2003-05-20  Karl Berry  <karl@gnu.org>
25911
25912         * config/config.guess: update from prep.
25913
25914 2003-05-18  Karl Berry  <karl@gnu.org>
25915
25916         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
25917         might actually be set by the user.
25918
25919         * config/depcomp, install-sh, mdate-sh: update from automake.
25920
25921 2003-05-17  Bruno Haible  <bruno@clisp.org>
25922
25923         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
25924         invalid expansion for AC_EGREP_CPP.
25925         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
25926         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
25927         Suggested by Akim Demaille <akim@epita.fr> in
25928         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
25929
25930 2003-05-12  Jim Meyering  <jim@meyering.net>
25931
25932         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
25933         the space-padded-by-default conversion specifiers, %e, %k, %l.
25934
25935 2003-05-12  Bruno Haible  <bruno@clisp.org>
25936
25937         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
25938         the string is longer than 4 KB.
25939
25940 2003-05-11  Karl Berry  <karl@gnu.org>
25941
25942         * config/config.{guess,sub}: update from prep.
25943
25944 2003-05-09  Bruno Haible  <bruno@clisp.org>
25945
25946         * modules/error: Add m4/strerror_r.m4 to file list.
25947
25948 2003-05-03  Bruno Haible  <bruno@clisp.org>
25949
25950         Upgrade to Unicode-4.0.
25951         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
25952         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
25953         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
25954         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
25955         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
25956         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
25957         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
25958         Change width of U+E0100..U+E01EF from 1 to 0.
25959
25960 2003-04-25  Jim Meyering  <jim@meyering.net>
25961
25962         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
25963         of type size_t, not int.
25964
25965 2003-04-25  Bruno Haible  <bruno@clisp.org>
25966
25967         * lib/copy-file.c: Include <stddef.h>, for size_t.
25968
25969 2003-04-21  Paul Eggert  <eggert@twinsun.com>
25970
25971         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
25972         code which expansion is under static control.  Patch imported from
25973         Akim Demaille's patch to Bison; see
25974         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
25975
25976 2003-04-14  Bruno Haible  <bruno@clisp.org>
25977
25978         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
25979
25980 2003-04-11  Jim Meyering  <jim@meyering.net>
25981
25982         Merge changes from Coreutils.
25983
25984         2003-03-22  Jim Meyering  <jim@meyering.net>
25985
25986         * lib/strftime.c (widen): Cast alloca return value to proper type.
25987
25988         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
25989
25990         From GNU libc.
25991         * lib/strftime.c (my_strftime): Handle very large width
25992         specifications for numeric values correctly.  Improve checks for
25993         overflow.
25994
25995         2003-01-19  Jim Meyering  <jim@meyering.net>
25996
25997         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
25998         definitions.
25999         (nl_get_alt_digit) [! defined my_strftime]: Define.
26000         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26001         _nl_get_alt_digit and _nl_get_walt_digit.
26002
26003         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26004         libc. These changes have no effect outside of _LIBC.
26005
26006 2003-04-10  Bruno Haible  <bruno@clisp.org>
26007
26008         * modules/findprog: New file.
26009         * MODULES.html.sh (func_all_modules): Add it.
26010
26011 2003-04-10  Bruno Haible  <bruno@clisp.org>
26012
26013         * m4/findprog.m4: New file.
26014         * m4/eaccess.m4: New file.
26015
26016 2003-04-10  Bruno Haible  <bruno@clisp.org>
26017
26018         * lib/findprog.h: New file, from GNU gettext.
26019         * lib/findprog.c: New file, from GNU gettext.
26020
26021 2003-04-05  Jim Meyering  <jim@meyering.net>
26022
26023         Merge changes from Coreutils.
26024
26025         * lib/exclude.h (PARAMS): Remove definition and uses.
26026         * lib/exclude.c: Remove uses of `PARAMS'.
26027
26028         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26029         Add test-cases for DOS filenames. Declare program_name.
26030         (main): Set up program_name.  Patch by Rich Dawe.
26031
26032         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26033         error from mntctl.
26034         Use mntctl's return value to drive the entry-processing loop, since
26035         we can't rely on the value of the vmt_length member in the last
26036         entry.  On some systems doing so could result in exhausting
26037         virtual memory.  Based in part on a patch from Mike Jetzer.
26038
26039 2003-04-04  Bruno Haible  <bruno@clisp.org>
26040
26041         * modules/linebreak: New file.
26042         * MODULES.html.sh (func_all_modules): Add it.
26043
26044 2003-04-04  Bruno Haible  <bruno@clisp.org>
26045
26046         * m4/linebreak.m4: New file.
26047
26048 2003-04-04  Bruno Haible  <bruno@clisp.org>
26049
26050         * lib/linebreak.h: New file, from GNU gettext.
26051         * lib/linebreak.c: New file, from GNU gettext with slight
26052         modifications.
26053         * lib/lbrkprop.h: New file, from GNU gettext.
26054
26055 2003-04-03  Bruno Haible  <bruno@clisp.org>
26056
26057         * modules/utf8-ucs4: New file.
26058         * modules/utf16-ucs4: New file.
26059         * modules/ucs4-utf8: New file.
26060         * modules/ucs4-utf16: New file.
26061         * MODULES.html.sh (func_all_modules): Add them.
26062
26063 2003-04-03  Bruno Haible  <bruno@clisp.org>
26064
26065         * m4/utf-ucs4.m4: New file.
26066         * m4/ucs4-utf.m4: New file.
26067
26068 2003-04-03  Bruno Haible  <bruno@clisp.org>
26069
26070         * lib/utf8-ucs4.h: New file, from GNU gettext.
26071         * lib/utf16-ucs4.h: New file, from GNU gettext.
26072         * lib/ucs4-utf8.h: New file, from GNU gettext.
26073         * lib/ucs4-utf16.h: New file, from GNU gettext.
26074
26075 2003-04-02  Bruno Haible  <bruno@clisp.org>
26076
26077         * modules/binary-io: New file.
26078         * MODULES.html.sh (func_all_modules): Add it.
26079
26080 2003-04-02  Bruno Haible  <bruno@clisp.org>
26081
26082         * lib/binary-io.h: New file, from GNU gettext.
26083
26084 2003-04-01  Bruno Haible  <bruno@clisp.org>
26085
26086         * modules/pathname: New file.
26087         * MODULES.html.sh (func_all_modules): Add it.
26088
26089 2003-04-01  Bruno Haible  <bruno@clisp.org>
26090
26091         * lib/pathname.h: New file, from GNU gettext.
26092         * lib/concatpath.c: New file, from GNU gettext.
26093
26094 2003-03-30  Bruno Haible  <bruno@clisp.org>
26095
26096         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26097
26098 2003-03-30  Bruno Haible  <bruno@clisp.org>
26099
26100         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26101         function chown() doesn't exist.
26102
26103 2003-03-28  Bruno Haible  <bruno@clisp.org>
26104
26105         * modules/copy-file: New file.
26106         * MODULES.html.sh (func_all_modules): Add it.
26107
26108 2003-03-28  Bruno Haible  <bruno@clisp.org>
26109
26110         * m4/copy-file.m4: New file.
26111
26112 2003-03-28  Bruno Haible  <bruno@clisp.org>
26113
26114         * lib/copy-file.h: New file, from GNU gettext.
26115         * lib/copy-file.c: New file, from GNU gettext.
26116
26117 2003-03-18  Jim Meyering  <jim@meyering.net>
26118
26119         * lib/quote.c (quote_n): Fix typo in comment.
26120
26121 2003-03-18  Bruno Haible  <bruno@clisp.org>
26122
26123         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26124         checking.
26125         * m4/onceonly_2_57.m4: Likewise.
26126
26127 2003-03-17  Bruno Haible  <bruno@clisp.org>
26128
26129         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26130         (m4_quote): Remove macro.
26131         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26132
26133 2003-03-14  Jim Meyering  <jim@meyering.net>
26134
26135         Merge changes from Coreutils.
26136         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26137         to be const, in order to avoid warnings.
26138         (obstack_room): Likewise.
26139         (obstack_empty_p): Likewise.
26140
26141 2003-03-14  Bruno Haible  <bruno@clisp.org>
26142
26143         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26144         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26145
26146 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26147
26148         Merge changes from Bison.
26149         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26150         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26151         when compiling Bison 1.875's `bitset bset = obstack_alloc
26152         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26153         * lib/hash.c: Include <stdbool.h> unconditionally.
26154
26155 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26156
26157         * m4/onceonly.m4 (m4_quote): New macro.
26158         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26159         Quote AC_FOREACH variable-expansions properly.
26160
26161 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26162
26163         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26164
26165 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26166
26167         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26168         Reported by Bruce Becker; see:
26169         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26170
26171 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26172             Bruno Haible  <bruno@clisp.org>
26173
26174         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26175         Reported by John Hughes, see
26176         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26177
26178 2003-02-20  Bruno Haible  <bruno@clisp.org>
26179
26180         * MODULES.html.sh (func_all_modules): Add poll.
26181
26182 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26183
26184         * modules/poll: New file.
26185
26186 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26187
26188         * lib/poll_.h: New file.
26189         * lib/poll.c: New file.
26190
26191 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26192
26193         * m4/poll.m4: New file.
26194
26195 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26196
26197         * modules/mathl: New file.
26198
26199 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26200
26201         * lib/mathl.h: New file.
26202         * lib/acosl.c: New file.
26203         * lib/asinl.c: New file.
26204         * lib/atanl.c: New file.
26205         * lib/ceill.c: New file.
26206         * lib/cosl.c: New file.
26207         * lib/expl.c: New file.
26208         * lib/floorl.c: New file.
26209         * lib/frexpl.c: New file.
26210         * lib/ldexpl.c: New file.
26211         * lib/logl.c: New file.
26212         * lib/sincosl.c: New file.
26213         * lib/sinl.c: New file.
26214         * lib/sqrtl.c: New file.
26215         * lib/tanl.c: New file.
26216         * lib/trigl.c: New file.
26217         * lib/trigl.h: New file.
26218
26219 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26220
26221         * m4/mathl.m4: New file.
26222
26223 2003-02-18  Bruno Haible  <bruno@clisp.org>
26224
26225         * MODULES.html.sh (func_all_modules): Add mathl.
26226
26227 2003-02-17  Bruno Haible  <bruno@clisp.org>
26228
26229         * modules/mkdtemp: New module.
26230         * MODULES.html.sh (func_all_modules): Add it.
26231
26232 2003-02-17  Bruno Haible  <bruno@clisp.org>
26233
26234         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26235
26236 2003-02-17  Bruno Haible  <bruno@clisp.org>
26237
26238         * lib/mkdtemp.h: New file, from GNU gettext.
26239         * lib/mkdtemp.c: New file, from GNU gettext.
26240
26241 2003-02-02  Jim Meyering  <jim@meyering.net>
26242
26243         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26244         e.g. glibc-2.2.93.
26245
26246 2003-01-31  Bruno Haible  <bruno@clisp.org>
26247
26248         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26249         'rpl_rename'.
26250         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26251         'rpl_strnlen'.
26252         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26253         'rpl_strtod'.
26254         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26255         'rpl_utime'.
26256
26257 2003-01-31  Bruno Haible  <bruno@clisp.org>
26258
26259         * lib/rename.c: #undef rename before defining rpl_rename.
26260         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26261
26262 2003-01-30  Bruno Haible  <bruno@clisp.org>
26263
26264         * modules/vasnprintf, modules/vasprintf: New modules.
26265         * MODULES.html.sh (func_all_modules): Add them.
26266
26267 2003-01-30  Bruno Haible  <bruno@clisp.org>
26268
26269         * m4/signed.m4: New file, from GNU gettext.
26270         * m4/longdouble.m4: New file, from GNU gettext.
26271         * m4/wchar_t.m4: New file, from GNU gettext.
26272         * m4/wint_t.m4: New file, from GNU gettext.
26273         * m4/vasnprintf.m4: New file.
26274         * m4/vasprintf.m4: New file.
26275
26276 2003-01-30  Bruno Haible  <bruno@clisp.org>
26277
26278         * lib/printf-args.h: New file, from GNU gettext.
26279         * lib/printf-args.c: New file, from GNU gettext.
26280         * lib/printf-parse.h: New file, from GNU gettext.
26281         * lib/printf-parse.c: New file, from GNU gettext.
26282         * lib/vasnprintf.h: New file, from GNU gettext.
26283         * lib/vasnprintf.c: New file, from GNU gettext.
26284         * lib/asnprintf.c: New file, from GNU gettext.
26285         * lib/vasprintf.h: New file, from GNU gettext with modifications.
26286         * lib/vasprintf.c: New file, from GNU gettext.
26287         * lib/asprintf.c: New file, from GNU gettext.
26288
26289 2003-01-29  Bruno Haible  <bruno@clisp.org>
26290
26291         * modules/stpncpy: New module.
26292         * MODULES.html.sh (func_all_modules): Add it.
26293
26294 2003-01-29  Bruno Haible  <bruno@clisp.org>
26295
26296         * m4/stpncpy.m4: New file.
26297
26298 2003-01-29  Bruno Haible  <bruno@clisp.org>
26299
26300         * lib/stpncpy.h: New file, from GNU gettext with modifications.
26301         * lib/stpncpy.c: New file, from GNU gettext with modifications.
26302
26303 2003-01-28  Bruno Haible  <bruno@clisp.org>
26304
26305         * modules/c-ctype: New module.
26306         * MODULES.html.sh (func_all_modules): Add it.
26307
26308 2003-01-28  Bruno Haible  <bruno@clisp.org>
26309
26310         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
26311         Paul Eggert.
26312         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
26313         Paul Eggert.
26314
26315 2003-01-27  Bruno Haible  <bruno@clisp.org>
26316
26317         * modules/xsetenv: New module.
26318         * MODULES.html.sh (func_all_modules): Add it.
26319
26320 2003-01-27  Bruno Haible  <bruno@clisp.org>
26321
26322         * lib/xsetenv.h: New file, from GNU gettext.
26323         * lib/xsetenv.c: New file, from GNU gettext.
26324
26325 2003-01-23  Jim Meyering  <jim@meyering.net>
26326
26327         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
26328         from working on systems without dirfd (at least Irix and OSF1/Tru64).
26329
26330 2003-01-23  Bruno Haible  <bruno@clisp.org>
26331
26332         * modules/minmax: New module.
26333         * MODULES.html.sh (func_all_modules): Add it.
26334
26335 2003-01-23  Bruno Haible  <bruno@clisp.org>
26336
26337         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
26338         Eggert.
26339
26340 2003-01-22  Bruno Haible  <bruno@clisp.org>
26341
26342         * modules/exit: New module.
26343         * MODULES.html.sh (func_all_modules): Add it.
26344
26345 2003-01-22  Bruno Haible  <bruno@clisp.org>
26346
26347         * lib/exit.h: New file, from GNU gettext.
26348
26349 2003-01-19  Bruno Haible  <bruno@clisp.org>
26350
26351         * gnulib-tool: Recognize option --extract-maintainer.
26352         (func_get_maintainer): New function.
26353         * modules/*: Add Maintainer entry.
26354
26355 2003-01-16  Jim Meyering  <jim@meyering.net>
26356
26357         * m4/regex.m4: The `regex' struct is both input and output.
26358         Initialize it before each use.  Patch by Tim Waugh.
26359
26360 2003-01-16  Bruno Haible  <bruno@clisp.org>
26361
26362         * MODULES.html.sh: Add a table of contents. Add the module name as
26363         leftmost column. Add hyperlinks.
26364
26365 2003-01-15  Bruno Haible  <bruno@clisp.org>
26366
26367         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
26368
26369 2003-01-15  Bruno Haible  <bruno@clisp.org>
26370
26371         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
26372         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
26373         suffix.
26374
26375 2003-01-15  Bruno Haible  <bruno@clisp.org>
26376
26377         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
26378
26379 2003-01-15  Bruno Haible  <bruno@clisp.org>
26380
26381         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
26382         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
26383
26384 2003-01-14  Jim Meyering  <jim@meyering.net>
26385
26386         * lib/same.c (same_name): Tweak a comment.
26387
26388 2003-01-14  Bruno Haible  <bruno@clisp.org>
26389
26390         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
26391         when a string comparison is sufficient.
26392
26393 2003-01-14  Bruno Haible  <bruno@clisp.org>
26394
26395         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
26396         'unsigned int'.
26397
26398 2003-01-14  Bruno Haible  <bruno@clisp.org>
26399
26400         * lib/hash-pjw.c: Add comment about low quality of this function.
26401
26402 2003-01-13  Bruno Haible  <bruno@clisp.org>
26403
26404         * modules/stpcpy: Distribute lib/stpcpy.h.
26405         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
26406
26407 2003-01-13  Bruno Haible  <bruno@clisp.org>
26408
26409         * modules/*: Add a description.
26410         * modules/strpbrk: Fix Makefile.am snippet.
26411         * modules/strtoimax: Fix dependencies.
26412         * modules/strtoumax: Likewise.
26413
26414 2003-01-13  Bruno Haible  <bruno@clisp.org>
26415
26416         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
26417         * modules/alloca (Makefile.am): All object files depend on alloca.h.
26418         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
26419
26420 2003-01-13  Bruno Haible  <bruno@clisp.org>
26421
26422         * gnulib-tool (func_create_testdir): Store config/* files in the main
26423         directory.
26424         * config.rpath: Move to ...
26425         * config/config.rpath: ... here.
26426         * modules/gettext: Contains config/config.rpath, not config.rpath.
26427         * modules/iconv: Likewise.
26428
26429 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26430
26431         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26432         to avoid collisions with libcurses and libreadline.
26433
26434         * m4/getstr.m4: Remove.
26435         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
26436
26437 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26438
26439         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26440         to avoid collisions with libcurses and libreadline.
26441
26442         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
26443         * lib/getstr.h, getstr.c: Remove.
26444         * lib/getline.c: Include "getline.h", to check interface.
26445         Move body of old getstr.c here: this defines MIN_CHUNK and
26446         declares getdelim2, which is renamed from getstr.
26447         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
26448
26449         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
26450         All uses changed.
26451         * lib/linebuffer.h: Likewise.
26452         (readline): Remove backward-compatibility macro.
26453
26454 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26455
26456         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26457         to avoid collisions with libcurses and libreadline.
26458         * getstr: Remove.
26459         * MODULES.html.sh: Remove getstr.
26460         * modules/getline: Depend on unlocked-io, not getstr.
26461
26462 2003-01-12  Jim Meyering  <jim@meyering.net>
26463
26464         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
26465
26466 2003-01-10  Bruno Haible  <bruno@clisp.org>
26467
26468         * modules/alloca: Change Makefile.am requirements. Simplify Include
26469         requirements. Add lib/alloca_.h to file list.
26470
26471 2003-01-10  Bruno Haible  <bruno@clisp.org>
26472
26473         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
26474
26475 2003-01-10  Bruno Haible  <bruno@clisp.org>
26476
26477         * lib/alloca_.h: New file.
26478         * lib/getdate.y: Unconditionally include alloca.h.
26479         * lib/makepath.c: Likewise.
26480         * lib/setenv.c: Likewise.
26481         * lib/userspec.c: Likewise.
26482
26483 2003-01-09  Karl Berry  <karl@gnu.org>
26484
26485         * MODULES.html.sh: include `dirname $0` in PATH, to find
26486         gnulib-tool.
26487
26488 2003-01-09  Bruno Haible  <bruno@clisp.org>
26489
26490         * modules/stdbool: Change configure.ac, Makefile.am requirements.
26491         Simplify Include requirements. Add lib/stdbool.h.in to file list.
26492
26493 2003-01-09  Bruno Haible  <bruno@clisp.org>
26494
26495         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
26496
26497 2003-01-09  Bruno Haible  <bruno@clisp.org>
26498
26499         * lib/stdbool.h.in: New file.
26500
26501 2003-01-09  Bruno Haible  <bruno@clisp.org>
26502
26503         * gnulib-tool (func_all_modules): Ignore files ending in ~.
26504         * MODULES.html.sh: Likewise.
26505
26506 2003-01-08  Jim Meyering  <jim@meyering.net>
26507
26508         * lib/full-write.c: Undefine and define-away `const' after inclusion
26509         of errno.h, not before.  Suggestion from Bruno Haible.
26510
26511 2003-01-08  Bruno Haible  <bruno@clisp.org>
26512
26513         * modules/full-read: Depend on full-write.
26514
26515 2003-01-08  Bruno Haible  <bruno@clisp.org>
26516
26517         * lib/safe-read.c: Include specification header first, to ensure its
26518         selfcontainedness.
26519         * lib/full-write.c: Likewise.
26520
26521 2003-01-07  Jim Meyering  <jim@meyering.net>
26522
26523         * lib/full-write.c: Rework so that it may serve to define full_read,
26524         too.
26525         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
26526
26527 2003-01-07  Bruno Haible  <bruno@clisp.org>
26528
26529         * lib/strtoimax.c: Include <stdint.h> as an alternative to
26530         <inttypes.h>.
26531         * lib/xstrtol.h: Likewise.
26532         * lib/xstrtoimax.c: Likewise.
26533         * lib/xstrtoumax.c: Likewise.
26534         * lib/human.h: Likewise.
26535
26536         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
26537         on systems that have <inttypes.h> but not <stdint.h>.
26538
26539 2003-01-07  Bruno Haible  <bruno@clisp.org>
26540
26541         * MODULES.html.sh: Add copyright notice.
26542         (missed_files): Omit CVS directory entries.
26543         (func_module): Make it work with sed-3.02.
26544         * MODULES.txt: Remove file.
26545
26546 2003-01-06  Jim Meyering  <jim@meyering.net>
26547
26548         * lib/version-etc.c: Update year in translatable copyright string.
26549
26550 2003-01-03  Karl Berry  <karl@gnu.org>
26551
26552         * config/config.{guess,sub}: update from prep.
26553
26554 2003-01-02  Karl Berry  <karl@gnu.org>
26555
26556         * doc/COPYING.DOC: belatedly updated to 1.2.
26557
26558 2003-01-01  Karl Berry  <karl@gnu.org>
26559
26560         * gnulib-tool (func_verify_module): report module name $module in
26561         error message, not $1.
26562         * gnulib-tool (create-testdir): don't complain if destdir couldn't
26563         be created, only if it doesn't exist.
26564         * gnulib-tool (last_checkin_date): don't expand the $Date here.
26565
26566 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26567
26568         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
26569
26570 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26571
26572         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
26573         memcmp if strcoll doesn't work.
26574
26575 2002-12-31  Bruno Haible  <bruno@clisp.org>
26576
26577         * lib/utime.c (utime_null): No need to call ftruncate if the file was
26578         nonempty.
26579
26580 2002-12-31  Bruno Haible  <bruno@clisp.org>
26581
26582         * lib/memcoll.c (STRCOLL): New macro.
26583         (memcoll): Use it.
26584
26585 2002-12-31  Bruno Haible  <bruno@clisp.org>
26586
26587         * lib/localcharset.h: New file.
26588         * lib/localcharset.c: Include it.
26589         * lib/unicodeio.c: Likewise.
26590
26591 2002-12-31  Bruno Haible  <bruno@clisp.org>
26592
26593         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
26594         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
26595
26596 2002-12-31  Bruno Haible  <bruno@clisp.org>
26597
26598         * lib/getline.h: Include <stddef.h>, for size_t.
26599
26600         * lib/unicodeio.h: Include <stddef.h>, for size_t.
26601         * lib/unicodeio.c: Don't include <stddef.h>.
26602
26603 2002-12-31  Bruno Haible  <bruno@clisp.org>
26604
26605         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
26606         HAVE_TM_ZONE.
26607
26608 2002-12-24  Karl Berry  <karl@gnu.org>
26609
26610         * config/config.guess: update from prep.
26611
26612 2002-12-24  Bruno Haible  <bruno@clisp.org>
26613
26614         General infrasructure.
26615         * m4/README: Rewritten.
26616         * m4/onceonly.m4: New file.
26617         * m4/onceonly_2_57.m4: New file.
26618
26619         Module atexit.
26620         * m4/atexit.m4: New file.
26621
26622         Module strtod.
26623         * m4/strtod.m4: New file.
26624
26625         Module strtol.
26626         * m4/strtol.m4: New file.
26627
26628         Module strtoul.
26629         * m4/strtoul.m4: New file.
26630
26631         Module memchr.
26632         * m4/memchr.m4: New file.
26633
26634         Module memcmp.
26635         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
26636         (jm_FUNC_MEMCMP): Invoke it.
26637
26638         Module memcpy.
26639         * m4/memcpy.m4: New file.
26640
26641         Module memmove.
26642         * m4/memmove.m4: New file.
26643
26644         Module memset.
26645         * m4/memset.m4: New file.
26646
26647         Module strcspn.
26648         * m4/strcspn.m4: New file.
26649
26650         Module strpbrk.
26651         * m4/strpbrk.m4: New file.
26652
26653         Module strstr.
26654         * m4/strstr.m4: New file.
26655
26656         Module strerror.
26657         * m4/strerror.m4: New file.
26658
26659         Module mktime.
26660         * m4/mktime.m4: Renamed from jm-mktime.m4.
26661         (gl_PREREQ_MKTIME): New macro.
26662         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
26663
26664         Module malloc.
26665         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
26666         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
26667         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
26668
26669         Module realloc.
26670         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
26671         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
26672         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
26673
26674         Module strftime.
26675         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
26676         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
26677         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
26678         gl_TM_GMTOFF.
26679         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
26680
26681         Module xalloc.
26682         * m4/xalloc.m4: New file.
26683
26684         Module alloca.
26685         * m4/alloca.m4: New file.
26686
26687         Module putenv.
26688         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
26689         (jm_FUNC_PUTENV): Invoke it.
26690
26691         Module setenv.
26692         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
26693         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
26694         when invoked twice.
26695         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
26696         gt_FUNC_SETENV.
26697
26698         Module memrchr.
26699         * m4/memrchr.m4: New file.
26700
26701         Module stpcpy.
26702         * m4/stpcpy.m4: New file.
26703
26704         Module strcase.
26705         * m4/strcase.m4: New file.
26706
26707         Module strdup.
26708         * m4/strdup.m4: New file.
26709
26710         Module strnlen.
26711         * m4/strnlen.m4: New file.
26712
26713         Module strndup.
26714         * m4/strndup.m4: New file.
26715
26716         Module xstrtod.
26717         * m4/xstrtod.m4: New file.
26718
26719         Module xstrtol.
26720         * m4/xstrtol.m4: New file.
26721
26722         Module getdate.
26723         * m4/getdate.m4: New file.
26724
26725         Module unlocked-io.
26726         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
26727         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
26728         * m4/jm-glibc-io.m4n: Remove file.
26729
26730         Module long-options.
26731         * m4/long-options.m4: New file.
26732
26733         Module md5.
26734         * m4/md5.m4: New file.
26735
26736         Module sha.
26737         * m4/sha.m4: New file.
26738
26739         Module getstr.
26740         * m4/getstr.m4: New file.
26741
26742         Module getline.
26743         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
26744         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
26745         <sys/types.h>, for size_t. Use the function name gnu_getline, not
26746         simply getline. Infoke gl_PREREQ_GETLINE.
26747
26748         Module obstack.
26749         * m4/obstack.m4: New file.
26750
26751         Module hash.
26752         * m4/hash.m4: New file.
26753
26754         Module readtokens.
26755         * m4/readtokens.m4: New file.
26756
26757         Module strverscmp.
26758         * m4/strverscmp.m4: New file.
26759
26760         Module stdbool.
26761         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
26762         OSF/1.
26763
26764         Module strtoll.
26765         * m4/strtoll.m4: New file.
26766
26767         Module strtoull.
26768         * m4/strtoull.m4: New file.
26769
26770         Module strtoimax.
26771         * m4/strtoimax.m4: New file.
26772
26773         Module strtoumax.
26774         * m4/strtoumax.m4: New file.
26775
26776         Module xstrtoimax.
26777         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
26778         jm_AC_PREREQ_XSTRTOIMAX.
26779         Moved the strtol prerequisites to strtol.m4.
26780         Moved the strtoll prerequisites to strtoll.m4.
26781         Moved the strtoimax prerequisites to strtoimax.m4.
26782
26783         Module xstrtoumax.
26784         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
26785         jm_AC_PREREQ_XSTRTOUMAX.
26786         Moved the strtoul prerequisites to strtoul.m4.
26787         Moved the strtoull prerequisites to strtoull.m4.
26788         Moved the strtoumax prerequisites to strtoumax.m4.
26789
26790         Module chown.
26791         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
26792         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
26793
26794         Module dup2.
26795         * m4/dup2.m4: New file.
26796
26797         Module ftruncate.
26798         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
26799         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
26800
26801         Module getgroups.
26802         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
26803         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
26804
26805         Module gettimeofday.
26806         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
26807         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
26808         gl_PREREQ_GETTIMEOFDAY.
26809
26810         Module mkdir.
26811         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
26812         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
26813
26814         Module mkstemp.
26815         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
26816         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
26817         jm_AC_TYPE_UINTMAX_T.
26818         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
26819
26820         Module stat.
26821         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
26822         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
26823
26824         Module lstat.
26825         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
26826         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
26827
26828         Module timespec.
26829         * m4/timespec.m4 (gl_TIMESPEC): New macro.
26830         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
26831         * m4/st_mtim.m4: Indentation.
26832
26833         Module nanosleep.
26834         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
26835         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
26836         gl_PREREQ_NANOSLEEP.
26837
26838         Module regex.
26839         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
26840         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
26841         (gl_REGEX): New macro.
26842
26843         Module rename.
26844         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
26845         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
26846
26847         Module rmdir.
26848         * m4/rmdir.m4: New file.
26849
26850         Module utime.
26851         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
26852         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
26853         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
26854
26855         Module dirname.
26856         * m4/dirname.m4: New file.
26857
26858         Module getopt.
26859         * m4/getopt.m4: New file.
26860
26861         Module unistd-safer.
26862         * m4/unistd-safer.m4: New file.
26863
26864         Module fnmatch.
26865         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
26866         declaration.
26867         (gl_PREREQ_FNMATCH_EXTRA): New macro.
26868         (gl_FUNC_FNMATCH_POSIX): New macro.
26869         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
26870         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
26871         simply fnmatch.
26872
26873         Module exclude.
26874         * m4/exclude.m4: New file.
26875
26876         Module human.
26877         * m4/human.m4: New file.
26878
26879         Module acl.
26880         * m4/acl.m4: Nop.
26881
26882         Module backupfile.
26883         * m4/backupfile.m4: New file.
26884         * m4/d-ino.m4: Indentation.
26885
26886         Module fsusage.
26887         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
26888         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
26889         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
26890
26891         Module dirfd.
26892         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
26893         requirements.
26894
26895         Module euidaccess.
26896         * m4/euidaccess.m4: New file.
26897
26898         Module file-type.
26899         * m4/file-type.m4: New file.
26900
26901         Module fileblocks.
26902         * m4/fileblocks.m4: New file.
26903
26904         Module filemode.
26905         * m4/filemode.m4: New file.
26906
26907         Module isdir.
26908         * m4/isdir.m4: New file.
26909
26910         Module lchown.
26911         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
26912         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
26913
26914         Module makepath.
26915         * m4/makepath.m4: New file.
26916
26917         Module modechange.
26918         * m4/modechange.m4: New file.
26919
26920         Module mountlist.
26921         * m4/mountlist.m4: New file.
26922         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
26923         Indentation.
26924
26925         Module path-concat.
26926         * m4/path-concat.m4: New file.
26927
26928         Module pathmax.
26929         * m4/pathmax.m4: New file.
26930
26931         Module same.
26932         * m4/same.m4: New file.
26933
26934         Module save-cwd.
26935         * m4/save-cwd.m4: New file.
26936
26937         Module savedir.
26938         * m4/savedir.m4: New file.
26939
26940         Module xgetcwd.
26941         * m4/xgetcwd.m4: New file.
26942         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
26943
26944         Module xreadlink.
26945         * m4/xreadlink.m4: New file.
26946
26947         Module safe-read.
26948         * m4/safe-read.m4: New file.
26949
26950         Module safe-write.
26951         * m4/safe-write.m4: New file.
26952
26953         Module closeout.
26954         * m4/closeout.m4: New file.
26955
26956         Module stdio-safer.
26957         * m4/stdio-safer.m4: New file.
26958
26959         Module getpass.
26960         * m4/getpass.m4: New file.
26961
26962         Module getugroups.
26963         * m4/getugroups.m4: New file.
26964
26965         Module group-member.
26966         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
26967         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
26968
26969         Module idcache.
26970         * m4/idcache.m4: New file.
26971
26972         Module userspec.
26973         * m4/userspec.m4: New file.
26974
26975         Module gettime.
26976         * m4/clock_time.m4: New file.
26977         * m4/gettime.m4: New file.
26978
26979         Module settime.
26980         * m4/settime.m4: New file.
26981
26982         Module posixtm.
26983         * m4/posixtm.m4: New file.
26984
26985         Module gethostname.
26986         * m4/gethostname.m4: New file.
26987
26988         Module canon-host.
26989         * m4/canon-host.m4: New file.
26990
26991         Module gettext.
26992         * m4/codeset.m4: New file, from gettext-0.11.5.
26993         * m4/gettext.m4: New file, from gettext-0.11.5.
26994         * m4/glibc21.m4: New file, from gettext-0.11.5.
26995         * m4/iconv.m4: New file, from gettext-0.11.5.
26996         * m4/intdiv0.m4: New file, from gettext-0.11.5.
26997         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
26998         * m4/inttypes.m4: New file, from gettext-0.11.5.
26999         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27000         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27001         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27002         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27003         * m4/lib-link.m4: New file, from gettext-0.11.5.
27004         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27005         * m4/progtest.m4: New file, from gettext-0.11.5.
27006         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27007         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27008         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27009
27010         Module localcharset.
27011         * m4/localcharset.m4: New file.
27012
27013         Module hard-locale.
27014         * m4/hard-locale.m4: New file.
27015
27016         Module mbswidth.
27017         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27018         onceonly macros.
27019         * m4/mbrtowc.m4: Add comment.
27020
27021         Module memcasecmp.
27022         * m4/memcasecmp.m4: New file.
27023
27024         Module memcoll.
27025         * m4/memcoll.m4: New file.
27026
27027         Module unicodeio.
27028         * m4/unicodeio.m4: New file.
27029
27030         Module rpmatch.
27031         * m4/rpmatch.m4: New file.
27032
27033         Module yesno.
27034         * m4/yesno.m4: New file.
27035
27036         Module exitfail.
27037         * m4/exitfail.m4: New file.
27038
27039         Module c-stack.
27040         * m4/c-stack.m4 (gl_C_STACK): New macro.
27041         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27042
27043         Module error.
27044         * m4/error.m4 (gl_ERROR): New macro.
27045         (jm_PREREQ_ERROR): Use onceonly macros.
27046
27047         Module fatal.
27048         * m4/fatal.m4: New file.
27049
27050         Module getloadavg.
27051         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27052         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27053
27054         Module getpagesize.
27055         * m4/getpagesize.m4: New file.
27056
27057         Module getusershell.
27058         * m4/getusershell.m4: New file.
27059
27060         Module physmem.
27061         * m4/physmem.m4: New file.
27062
27063         Module posixver.
27064         * m4/posixver.m4: New file.
27065
27066         Module quotearg.
27067         * m4/quotearg.m4: New file.
27068
27069         Module quote.
27070         * m4/quote.m4: New file.
27071
27072         Module readutmp.
27073         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27074
27075         Module sig2str.
27076         * m4/sig2str.m4: New file.
27077
27078         Other.
27079         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27080         ulonglong.m4.
27081         * m4/intmax_t.m4: New file.
27082         * m4/d-type.m4: Indentation.
27083         * m4/jm-macros.m4: Update.
27084         * m4/prereq.m4 (jm_PREREQ): Update.
27085         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27086         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27087         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27088         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27089         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27090         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27091         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27092         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27093         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27094         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27095         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27096         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27097         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27098         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27099         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27100         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27101         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27102         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27103         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27104
27105 2002-12-24  Bruno Haible  <bruno@clisp.org>
27106
27107         * MODULES.txt: Update according to m4/ changes.
27108
27109         Module gettext.
27110         * config.rpath: New file, from gettext-0.11.5.
27111
27112         * modules/*: New module descriptions.
27113         * gnulib-tool: New file.
27114         * MODULES.html.sh: New file.
27115
27116 2002-12-21  Karl Berry  <karl@gnu.org>
27117
27118         * doc/fdl.texi: update to version 1.2.
27119
27120 2002-12-19  Karl Berry  <karl@gnu.org>
27121
27122         * config/config.guess: update from prep.
27123
27124 2002-12-18  Bruno Haible  <bruno@clisp.org>
27125
27126         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27127         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27128
27129 2002-12-17  Bruno Haible  <bruno@clisp.org>
27130
27131         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27132         stdlib.h, string.h.
27133
27134 2002-12-17  Bruno Haible  <bruno@clisp.org>
27135
27136         * lib/canon-host.c (strdup): Remove unused declaration.
27137
27138         * lib/fsusage.c: Include full_read.h.
27139         (get_fs_usage): Use full_read instead of safe_read.
27140
27141         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27142
27143 2002-12-12  Karl Berry  <karl@gnu.org>
27144
27145         * config/config.guess: update from prep.
27146
27147 2002-12-11  Bruno Haible  <bruno@clisp.org>
27148
27149         * m4/setenv.m4: New file, from gettext-0.11.5.
27150
27151 2002-12-11  Bruno Haible  <bruno@clisp.org>
27152
27153         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27154         not unsetenv().
27155         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27156         modifications:
27157
27158         2002-12-11  Bruno Haible  <bruno@clisp.org>
27159
27160                 * setenv.c (alloca): Fall back to malloc.
27161                 (freea): New macro.
27162                 (setenv): Use freea() to free memory allocated with alloca().
27163
27164         2002-11-13  Bruno Haible  <bruno@clisp.org>
27165
27166                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27167                 function declarations.
27168                 * unsetenv.c (unsetenv): Likewise.
27169
27170         2002-03-04  Bruno Haible  <bruno@clisp.org>
27171
27172                 Portability to AIX 4.3.3.
27173                 * unsetenv.c: New file, extracted from setenv.c.
27174                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27175
27176         2001-12-20  Bruno Haible  <bruno@clisp.org>
27177
27178                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27179                 use malloc instead. For SunOS 4.
27180
27181         2001-12-11  Bruno Haible  <bruno@clisp.org>
27182
27183                 * setenv.c: Declare alloca.
27184                 (compar_fn_t): New typedef.
27185                 (KNOWN_VALUE, STORE_VALUE): Use it.
27186
27187         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27188         setenv.h.
27189
27190 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27191
27192         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27193         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27194         Choose values that are less likely to collide with system fnmatch
27195         options.
27196         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27197         defined (e.g., a pure POSIX system).
27198         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27199         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27200
27201 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27202
27203         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27204         a pain in practice to deal with generated m4 files.  This change
27205         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27206
27207         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27208         and jm-glibc-io.m4, as they are no longer a special case.
27209         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27210         kludge and the auto-generation stuff.  Check only whether the
27211         functions are declared, not whether they exist, since older hosts
27212         that don't declare the functions can't use the optimization anyway.
27213
27214 2002-12-06  Jim Meyering  <jim@meyering.net>
27215
27216         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27217
27218         Merge in changes from libc's misc/error.c, in preparation
27219         for the merge of gnulib's changes back into libc.
27220
27221         * lib/error.c (_): Define only if not already defined.
27222         Move definition to follow all #include directives.
27223         Include unlocked-io.h only if !_LIBC.
27224         [_LIBC]: Include <libio/libioP.h>.
27225         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27226         (fflush): Tweak definition to use INTUSE.
27227         (putc): Define.
27228
27229 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27230
27231         * lib/alloca.c [defined emacs]: Include "lisp.h".
27232         (xalloc_die) [defined emacs]: New macro.
27233         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27234         [! defined emacs]: Include <xalloc.h>.
27235         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27236         (pointer): Typedef to POINTER_TYPE *.
27237         (malloc): Remove decl; we now always use xmalloc.
27238         (alloca): Use old-style definition, since Emacs needs this.
27239         Check for arithmetic overflow when computing combined size.
27240
27241 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27242
27243         Do not generate unlocked-io.h automatically, since it's easier to
27244         maintain it by hand.
27245
27246         * lib/unlocked-io.h: New file, from GNU diffutils,
27247         but with proper copyright notice and attribution.
27248         * lib/gen-uio: Remove.
27249         * lib/Makefile.am: Add copyright notice.
27250         (libfetish_a_SOURCES): Add unlocked-io.h.
27251         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27252         (DISTCLEANFILES, io_functions): Remove macros.
27253         (EXTRA_DIST): Remove gen_uio.
27254         (unlocked-io.h): Remove rule.
27255
27256 2002-12-04  Jim Meyering  <jim@meyering.net>
27257
27258         Reflect the fact that stat.c and lstat.c are no longer generated.
27259         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27260         (DISTCLEANFILES): Likewise.
27261         (EXTRA_DIST): Likewise.
27262         (all_local): Don't depend on stat.c or lstat.c.
27263         (stat.c, lstat.c): Remove rules.
27264         (EXTRA_DIST): Remove xstat.in.
27265
27266         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27267         * lib/stat.c: New file.  Contents mostly from xstat.in.
27268         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27269         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27270
27271         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27272         too.
27273         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27274
27275 2002-12-03  Jim Meyering  <jim@meyering.net>
27276
27277         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27278         but not semantics, to minimize the differences between these two files.
27279         (safe_read): Change comment to mention SAFE_READ_ERROR.
27280
27281         * lib/safe-read.c (IS_EINTR): Define.
27282         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27283
27284 2002-12-02  Jim Meyering  <jim@meyering.net>
27285
27286         * lib/safe-read.c (EINTR): Define.
27287         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27288         (INT_MAX): Provide fallback.
27289         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
27290
27291         * lib/safe-read.h (SAFE_READ_ERROR): Define.
27292
27293 2002-12-02  Bruno Haible  <bruno@clisp.org>
27294
27295         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
27296         Define, taken from safe-read.c.
27297         (INT_MAX): Provide fallback.
27298         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
27299         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
27300
27301         * lib/safe-read.c (EINTR): Remove definition.
27302         (safe_read): Don't use EINTR if it is absent.
27303
27304 2002-12-01  Jim Meyering  <jim@meyering.net>
27305
27306         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
27307         zero.
27308         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
27309
27310 2002-11-27  Paul Eggert  <eggert@twinsun.com>
27311
27312         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
27313         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
27314         with `if (! (value < limit)) abort ();', for readability.
27315
27316 2002-11-26  Karl Berry  <karl@gnu.org>
27317
27318         * lib/strdup.c: copy from libc again, with jim's ok.
27319         * lib/.cppi-disable: re-add strdup.c
27320
27321 2002-11-25  Karl Berry  <karl@gnu.org>
27322
27323         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
27324         instead of "strtol.c".
27325
27326 2002-11-25  Karl Berry  <karl@gnu.org>
27327
27328         * config/install-sh: update from automake for variable quoting, $0 in
27329         error msgs, etc.
27330
27331         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
27332         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
27333         entry.
27334
27335 2002-11-25  Jim Meyering  <jim@meyering.net>
27336
27337         * lib/mktime.c: Sync from libc, now that it has the latest fix.
27338
27339 2002-11-24  Karl Berry  <karl@gnu.org>
27340
27341         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
27342         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
27343
27344 2002-11-24  Jim Meyering  <jim@meyering.net>
27345
27346         Update from coreutils:
27347
27348         * lib/mktime.c: Merge in changes from libc.
27349
27350         Avoid a link-time failure on some Linux systems.
27351         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
27352         (otherwise).
27353         (__mon_yday): Declare with the STATIC attribute.
27354         (__mktime_internal): Likewise.
27355         Based on a report from Greg Schafer.
27356
27357 2002-11-23  Jim Meyering  <jim@meyering.net>
27358
27359         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
27360         Use `unsigned', not `int', as type of index.
27361
27362         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
27363
27364         * lib/fsusage.c: Remove unneeded parentheses around operands of
27365         `defined'.
27366
27367 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27368
27369         * lib/quotearg.h: Allow multiple inclusion by surrounding with
27370         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
27371         so that we can be included first.
27372         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
27373         * lib/quotearg.c: Include quotearg.h immediately after config.h.
27374         No need to include stddef.h or sys/types.h any more.
27375         Surround local include files with "", not "<>".
27376         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
27377         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
27378         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
27379         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
27380         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
27381         (ISPRINT): Remove; no longer needed now that we assume C89.
27382
27383         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
27384         Preserve errno.
27385
27386         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
27387         quotearg_char): Use SIZE_MAX rather than
27388         (size_t) -1 when we are talking about "infinity".
27389
27390         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
27391
27392 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27393
27394         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
27395         hint that one should use `if (! x) abort ();' rather than `assert
27396         (x);', and anyway it's one less thing to worry about configuring.
27397         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
27398         hash_rehash, hash_insert): Use abort rather than assert.
27399
27400 2002-11-22  Bruno Haible  <bruno@clisp.org>
27401
27402         * lib/safe-read.h: Assume C89. Add comments.
27403         (safe_read): Change return type to size_t.
27404         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
27405         byte counts > SSIZE_MAX correctly.
27406         * lib/safe-write.h: New file.
27407         * lib/safe-write.c: New file.
27408         * lib/full-read.h: New file.
27409         * lib/full-read.c: New file.
27410         * lib/full-write.h: Assume C89. Add comments.
27411         * lib/full-write.c: Include safe-write.h.
27412         (full_write): Rewritten to use safe_write.
27413         Suggested by Jim Meyering and Paul Eggert.
27414
27415 2002-11-21  Jim Meyering  <jim@meyering.net>
27416
27417         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
27418
27419         Merge in changes from the coreutils.
27420
27421         2002-09-25  Paul Eggert  <eggert@twinsun.com>
27422         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
27423         <stdint.h>.
27424         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
27425         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
27426         int.  Work more efficiently if X is the same width as uintmax_t.
27427         Do not compare X to -1, to avoid bogus compiler warning.
27428         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
27429         Don't assume that f_frsize and f_bsize are the same type.
27430
27431         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
27432         warning on FreeBSD.
27433
27434         * lib/makepath.c (make_path): Restore umask *before* creating the final
27435         component.
27436         (make_path): Minor reformatting.
27437
27438         * lib/xmalloc.c: Adjust to work with new autoconf macros,
27439         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
27440         HAVE_MALLOC/HAVE_REALLOC.
27441
27442         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
27443         dummy ones.  At least on GNU/Linux systems, `auto' means something
27444         else.
27445         From Michael Stone.
27446
27447 2002-11-21  Bruno Haible  <bruno@clisp.org>
27448
27449         Remove case insensitive option matching.
27450         * lib/argmatch.h (argcasematch): Remove declaration.
27451         (ARGCASEMATCH): Remove macro.
27452         (__xargmatch_internal): Remove case_sensitive argument.
27453         (XARGMATCH): Update.
27454         (XARGCASEMATCH): Remove macro.
27455         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
27456         case_sensitive argument.
27457         (argcasematch): Remove function.
27458         (__xargmatch_internal): Remove case_sensitive argument.
27459         (main): Use XARGMATCH instead of XARGCASEMATCH.
27460
27461         * lib/xmalloc.c: Change compile-time error message. Add comment about
27462         required autoconf version.
27463
27464 2002-11-20  Paul Eggert  <eggert@twinsun.com>
27465
27466         Merge argmatch cleanups from Bison.  Assume C89.
27467
27468         * lib/argmatch.c: Include config.h here, not in argmatch.h.
27469         Include stdlib.h, for EXIT_FAILURE.
27470         Always include <string.h>, since we assume C89.
27471         (EXIT_FAILURE): Remove pre-C89 bug workaround.
27472         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
27473         Include <stddef.h> instead, since it's all we need for size_t.
27474         (PARAMS): Remove.  All uses removed.
27475         (ARRAY_CARDINALITY): Do not bother to #undef.
27476         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
27477         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27478         Remove unnecessary parentheses.
27479         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27480         Insert necessary parentheses.
27481         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
27482         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
27483
27484 2002-11-19  Bruno Haible  <bruno@clisp.org>
27485
27486         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
27487         * lib/mbswidth.h: Include <stddef.h>, for size_t.
27488
27489         * lib/mbswidth.h (PARAMS): Remove macro.
27490         (mbswidth, mbsnwidth): Use ANSI C function declarations.
27491         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
27492
27493         * lib/gcd.h (PARAMS): Remove macro.
27494         (gcd): Use ANSI C function declarations.
27495         * lib/gcd.c (gcd): Likewise.
27496
27497 2002-11-15  Bruno Haible  <bruno@clisp.org>
27498
27499         * lib/strcspn.c: Include <stddef.h>.
27500         (strcspn): Use ANSI C function declaration. Change return type to
27501         size_t. Use NULL.
27502         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
27503         (strpbrk): Use NULL.
27504         * lib/strpbrk.h (PARAMS): Remove macro.
27505         (strpbrk): Use ANSI C function declaration.
27506         * lib/strstr.c: Don't include <sys/types.h>.
27507         * lib/strstr.h (PARAMS): Remove macro.
27508         (strstr): Use ANSI C function declarations.
27509
27510 2002-11-14  Karl Berry  <karl@gnu.org>
27511
27512         * config/mkinstalldirs: `do' on separate line, instead of
27513         `for var; do'.
27514
27515 2002-11-06  Bruno Haible  <bruno@clisp.org>
27516
27517         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
27518         * lib/gcd.c (gcd): Likewise.
27519
27520 2002-11-05  Bruno Haible  <bruno@clisp.org>
27521
27522         * lib/gcd.h: New file, from gettext-0.11.5.
27523         * lib/gcd.c: New file, from gettext-0.11.5.
27524
27525 2002-11-05  Bruno Haible  <bruno@clisp.org>
27526
27527         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27528         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27529         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27530         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27531
27532         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
27533         <libintl.h>.
27534         * lib/makepath.c: Include gettext.h instead of <locale.h> and
27535         <libintl.h>.
27536
27537         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
27538         * lib/human.c: Include gettext.h instead of <libintl.h>.
27539         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
27540         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
27541         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
27542         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
27543         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
27544         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
27545         (textdomain): Remove definition.
27546         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
27547
27548         * lib/long-options.c: Remove include of <libintl.h> and definition of
27549         _.
27550         * lib/same.c: Remove include of <libintl.h> and definition of _.
27551
27552 2002-11-04  Owen Taylor  <otaylor@redhat.com>
27553
27554         * lib/config.charset: A few additions for Solaris.
27555
27556 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27557
27558         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
27559         * lib/localcharset.c (locale_charset): Declare as extern "C".
27560
27561 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27562
27563         * lib/config.charset: msdos in uk_UA uses CP1125.
27564
27565 2002-11-04  Bruno Haible  <bruno@clisp.org>
27566
27567         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
27568         * lib/strcase.h: New file, from GNU gettext-0.11.5.
27569         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
27570         * lib/strstr.h: New file, from GNU gettext-0.11.5.
27571         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
27572
27573 2002-11-04  Bruno Haible  <bruno@clisp.org>
27574
27575         * lib/localcharset.c (locale_charset): Don't return an empty string.
27576
27577 2002-11-04  Bruno Haible  <bruno@clisp.org>
27578
27579         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
27580         aliases.
27581
27582 2002-11-04  Bruno Haible  <bruno@clisp.org>
27583
27584         * lib/config.charset: Update for newest glibc. Add canonical names
27585         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
27586
27587 2002-11-04  Bruno Haible  <bruno@clisp.org>
27588
27589         * lib/config.charset: Add support for NetBSD.
27590
27591 2002-11-04  Bruno Haible  <bruno@clisp.org>
27592
27593         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
27594
27595 2002-11-01  Bruno Haible  <bruno@clisp.org>
27596
27597         * configure.in: Add AC_CONFIG_AUX_DIR call.
27598         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
27599         test/Makefile.
27600         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
27601
27602 2002-09-28  Karl Berry  <karl@gnu.org>
27603
27604         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
27605         installed automake until the next release, since changes have been
27606         made.
27607
27608 2002-09-25  Karl Berry  <karl@gnu.org>
27609
27610         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
27611         * lib/getopt*: copy from libc/posix.
27612         * lib/gettext.h: copy from gettext.
27613         * lib/.cppi-disable: add strdup.c, gettext.h.
27614
27615 2002-09-25  Karl Berry  <karl@gnu.org>
27616
27617         * config/srclist.txt: enable gettext.h check.
27618         * config/config.{guess,sub}: update from prep.
27619         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
27620                 from automake 1.6.3.
27621         See srclist*.
27622
27623 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
27624
27625         * regex.c (PATFETCH): Remove the translating fetch.
27626         (PATFETCH_RAW): Rename to PATFETCH.
27627         (set_image_of_range): New fun.
27628         (SET_RANGE_TABLE_WORK_AREA): Use it.
27629         (regex_compile): Don't translate the pattern chars so eagerly.
27630         Only do it when inserting an `exactn' bytecode or when handling
27631         a char-range.
27632         (mutually_exclusive_p): Avoid empty statement.
27633
27634 2002-07-06  Jim Meyering  <meyering@lucent.com>
27635
27636         * m4/README: Don't mention Makefile.am.in.
27637         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
27638
27639 2002-07-01  Jim Meyering  <meyering@lucent.com>
27640
27641         * lib/c-stack.c: Include sys/time.h.
27642         From Volker Borchert.
27643
27644 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27645
27646         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
27647
27648 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27649
27650         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
27651         New macro.  Use it uniformly instead of
27652         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
27653         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
27654         reported by Vin Shelton.
27655
27656 2002-06-22  Paul Eggert  <eggert@twinsun.com>
27657
27658         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
27659         Do not assume SA_SIGINFO behavior.
27660         Bug reported by Jim Meyering on NetBSD 1.5.2.
27661
27662 2002-06-22  Jim Meyering  <meyering@lucent.com>
27663
27664         * m4/c-stack.m4: New file, from diffutils-2.8.2.
27665         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
27666
27667         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
27668         now that configure.ac uses AC_GNU_SOURCE.
27669         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
27670         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
27671
27672         Update to latest tools.  Suggestions from Paul Eggert.
27673         * m4/stdbool.m4: New file, from diffutils-2.8.2.
27674         * m4/gnu-source.m4: Update from diffutils-2.8.2.
27675         * m4/fnmatch.m4: Likewise.
27676         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
27677         to AC_HEADER_STDBOOL
27678
27679 2002-06-22  Jim Meyering  <meyering@lucent.com>
27680
27681         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
27682         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
27683
27684 2002-06-22  Jim Meyering  <meyering@lucent.com>
27685
27686         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
27687
27688         * lib/exitfail.c, exitfail.h: Likewise.
27689         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
27690
27691         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
27692         of fnmatch.h.
27693         (EXTRA_DIST): Add fnmatch_loop.c.
27694         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
27695
27696         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
27697         * lib/fnmatch.c: Update from diffutils-2.8.2.
27698         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
27699         * lib/fnmatch.h: Remove file.
27700
27701 2002-06-21  Jim Meyering  <meyering@lucent.com>
27702
27703         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
27704         * m4/mbrtowc.m4: Likewise.
27705
27706         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
27707         * m4/mbswidth.m4: Reflect name change:
27708         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
27709         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27710
27711         * m4/lib-link.m4: Update from gettext-0.11.2.
27712         * m4/gettext.m4: Likewise.
27713
27714         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
27715         From Alfred M. Szmidt.
27716
27717 2002-06-18  Paul Eggert  <eggert@twinsun.com>
27718
27719         * lib/file-type.h: Report an error if neither S_ISREG nor
27720         S_IFREG is defined, instead of using a test specific to glibc
27721         2.2.  This should be safe, since POSIX requires S_ISREG and
27722         Unix Version 7 had S_IFREG.  We don't need to check for
27723         <sys/types.h> since we don't use any symbols that it defines.
27724
27725 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
27726
27727         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
27728         $@-t, so that each temporary file name is unique and valid in the first
27729         8 characters, for operation under DOS.
27730
27731 2002-06-15  Paul Eggert  <eggert@twinsun.com>
27732
27733         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
27734
27735 2002-06-15  Jim Meyering  <meyering@lucent.com>
27736
27737         Work even with DJGPP 2.03, which lacks support for symlinks.
27738         From Richard Dawe.
27739         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
27740         is defined.
27741         * lib/lchown.c (S_ISLNK): Likewise.
27742
27743 2002-06-15  Jim Meyering  <meyering@lucent.com>
27744
27745         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
27746         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
27747         have been included before this file.
27748
27749 2002-06-14  Jim Meyering  <meyering@lucent.com>
27750
27751         * lib/file-type.h: Use the version from diffutils-2.8.2.
27752         * lib/file-type.c: Likewise.
27753
27754 2002-06-07  Jim Meyering  <meyering@lucent.com>
27755
27756         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
27757         They're needed at least for NetBSD 1.5.2.
27758         ($statxfs_includes): Include those same headers.
27759         ($statxfs_includes): Include sys/vfs.h if available.
27760         ($statxfs_includes): Likewise for sys/statvfs.h.
27761         Check for the following members in both structs statfs and statvfs:
27762         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
27763
27764 2002-06-01  Jim Meyering  <meyering@lucent.com>
27765
27766         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
27767         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
27768
27769 2002-05-28  Jim Meyering  <meyering@lucent.com>
27770
27771         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
27772         Reported by Volker Borchert.
27773
27774 2002-05-27  Jim Meyering  <meyering@lucent.com>
27775
27776         Fix a problem seen only on nonconforming systems whereby ls.c's
27777         use of localtime, and then of gettimeofday would cause trouble:
27778         the localtime call used to initialize rpl_gettimeofday's save
27779         mechanism would clobber ls's current local time information so
27780         that in any long listing the first file would always be listed
27781         with date 1970-01-01.  Analysis by Volker Borchert.
27782
27783         * lib/gettimeofday.c (localtime): Undefine.
27784         (rpl_localtime): New function.
27785
27786 2002-05-27  Jim Meyering  <meyering@lucent.com>
27787
27788         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
27789         localtime.
27790
27791         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
27792         use the replacement function; it wouldn't resolve at link time.
27793         Reported by Volker Borchert.
27794
27795 2002-05-22  Jim Meyering  <meyering@lucent.com>
27796
27797         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
27798         file-type.h.
27799         * lib/file-type.h: New file.
27800         * lib/file-type.c (file_type): New file/function.  Extracted from
27801         diffutils.
27802
27803 2002-04-30  Jim Meyering  <meyering@lucent.com>
27804
27805         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
27806
27807 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27808
27809         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
27810
27811 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27812
27813         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
27814         Do not check for alloca.h (no longer used) or stdbool.h (was never
27815         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
27816
27817 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27818
27819         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
27820
27821 2002-04-29  Jim Meyering  <meyering@lucent.com>
27822
27823         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
27824         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
27825         Use AC_FUNC_STRNLEN here instead.
27826
27827         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
27828         With autoconf-2.53a, it's part of AC_PROG_CC.
27829
27830 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27831
27832         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
27833         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
27834
27835 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27836
27837         * lib/sig2str.h, lib/sig2str.c: New files.
27838         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
27839
27840 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27841
27842         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
27843         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
27844         of 127, since 64 is the largest conceivable number for ancient
27845         nonstandard hosts.
27846         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
27847
27848 2002-04-28  Jim Meyering  <meyering@lucent.com>
27849
27850         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
27851
27852 2002-04-24  Jim Meyering  <meyering@lucent.com>
27853
27854         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
27855         (jm_PREREQ): Use it.
27856
27857         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
27858         mach/mach.h fcntl.h.
27859         Check for this function: setlocale.
27860
27861 2002-04-24  Jim Meyering  <meyering@lucent.com>
27862
27863         * lib/gettext.h: New file, from Gettext.
27864         * lib/Makefile.am (INCLUDES): Remove -I../intl.
27865         (libfetish_a_SOURCES): Add gettext.h.
27866
27867 2002-04-16  Jim Meyering  <meyering@lucent.com>
27868
27869         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
27870         ut_pid, ut_id, ut_exit.
27871
27872 2002-04-16  Jim Meyering  <meyering@lucent.com>
27873
27874         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
27875         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
27876         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
27877
27878 2002-04-12  Jim Meyering  <meyering@lucent.com>
27879
27880         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
27881         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
27882         existence of the getmntinfo function.  Needed for Darwin 5.3.
27883
27884         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
27885         This is necessary at least on Darwin 5.3.
27886
27887         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
27888         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
27889         strnlen.o in the library, and that makes some versions of ranlib
27890         object.
27891
27892 2002-04-12  Jim Meyering  <meyering@lucent.com>
27893
27894         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
27895
27896 2002-04-09  Jim Meyering  <meyering@lucent.com>
27897
27898         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
27899         to be more precise.  Rather than saying we're checking whether the
27900         function `works', say what we're testing.
27901         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
27902         Reported by Bruno Haible.
27903
27904 2002-03-10  Jim Meyering  <meyering@lucent.com>
27905
27906         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
27907         Suggestion from Santiago Vila.
27908
27909 2002-03-08  Jim Meyering  <meyering@lucent.com>
27910
27911         * lib/rename.c: Mention that this wrapper is needed also on
27912         mips-dec-ultrix4.4 systems.
27913
27914 2002-03-02  Jim Meyering  <meyering@lucent.com>
27915
27916         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
27917         not HAVE_CLOCK_SETTIME.
27918
27919 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27920
27921         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
27922         Check for clock_settime.
27923
27924 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27925
27926         * lib/nanosleep.h: Rename to....
27927         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
27928
27929         * lib/gettime.c: New file.
27930         * lib/settime.c: New file.
27931         * lib/stime.c: Remove.
27932
27933         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
27934         timespec.h.  Remove nanosleep.h.
27935
27936 2002-02-25  Paul Eggert  <eggert@twinsun.com>
27937
27938         * m4/acl.m4: New file.
27939         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
27940         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
27941
27942 2002-02-25  Paul Eggert  <eggert@twinsun.com>
27943
27944         * lib/acl.c, lib/acl.h: New files.
27945         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
27946
27947 2002-02-24  Jim Meyering  <meyering@lucent.com>
27948
27949         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
27950         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
27951         cause trouble.  Reported by Nelson Beebe.
27952
27953 2002-02-23  Paul Eggert  <eggert@twinsun.com>
27954
27955         * lib/path-concat.c (xpath_concat): Reorder code to pacify
27956         compilers that don't know that xalloc_die never returns.
27957
27958 2002-02-20  Jim Meyering  <meyering@lucent.com>
27959
27960         * lib/getdate.c: Regenerate using bison-1.33.
27961
27962 2002-02-17  Jim Meyering  <meyering@lucent.com>
27963
27964         * config/config.guess (main): Don't use `head -1'; it's no longer
27965         portable. Use `sed 1q' instead.
27966
27967 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
27968
27969         * m4/codeset.m4: Upgrade to gettext-0.11.
27970         * m4/gettext.m4: Upgrade to gettext-0.11.
27971         * m4/glibc21.m4: Upgrade to gettext-0.11.
27972         * m4/iconv.m4: Upgrade to gettext-0.11.
27973         * m4/isc-posix.m4: Upgrade to gettext-0.11.
27974         * m4/lcmessage.m4: Upgrade to gettext-0.11.
27975         * m4/lib-ld.m4: New file, from gettext-0.11.
27976         * m4/lib-link.m4: New file, from gettext-0.11.
27977         * m4/lib-prefix.m4: New file, from gettext-0.11.
27978         * m4/progtest.m4: Upgrade to gettext-0.11.
27979
27980 2002-02-15  Paul Eggert  <eggert@twinsun.com>
27981
27982         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
27983         (jm_PREREQ): Use it.
27984
27985 2002-02-15  Paul Eggert  <eggert@twinsun.com>
27986
27987         * lib/posixver.c, lib/posixver.h: New files.
27988         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
27989
27990 2002-02-02  Paul Eggert  <eggert@twinsun.com>
27991             Bruno Haible  <bruno@clisp.org>
27992
27993         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
27994         (fwrite_success_callback): New declaration.
27995         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
27996         print_unicode_char. Call failure callback instead of error.
27997         (fwrite_success_callback): New function.
27998         (exit_failure_callback): New function.
27999         (fallback_failure_callback): New function.
28000         (print_unicode_char): Call unicode_to_mb.
28001
28002 2002-01-26  Jim Meyering  <meyering@lucent.com>
28003
28004         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28005         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28006
28007 2002-01-26  Jim Meyering  <meyering@lucent.com>
28008
28009         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28010
28011 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28012
28013         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28014
28015 2002-01-22  Jim Meyering  <meyering@lucent.com>
28016
28017         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28018         Otherwise, some versions of automake would omit the rule that makes
28019         Makefile from Makefile.in.
28020
28021 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28022
28023         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28024         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28025         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28026         (memcoll): Set errno to zero if there is no error.
28027
28028         * lib/quotearg.c (quotearg_buffer_restyled):
28029         Fix bug with quoting buffers containing NUL when backslashing escapes.
28030         This bug was exposed by the other changes in this patch.
28031         (quotearg_n_options): New arg ARGSIZE.
28032         All callers changed.
28033         (quoting_options_from_style): New function.
28034         (quotearg_n_style): Use it.
28035         (quotearg_n_style_mem): New function.
28036
28037         * lib/quotearg.h (quotearg_n_style_mem): New function.
28038
28039 2002-01-19  Jim Meyering  <meyering@lucent.com>
28040
28041         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28042         Remove useless quotes: DF_PROG="df".
28043         * m4/strnlen.m4: New file.
28044
28045 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28046
28047         * lib/backupfile.c (ISDIGIT): Comment fix.
28048         * lib/getdate.y (ISDIGIT): Likewise.
28049         * lib/posixtm.c (ISDIGIT, year): Likewise.
28050         * lib/strverscmp.c (ISDIGIT): Likewise.
28051         * lib/userspec.c (ISDIGIT): Likewise.
28052
28053 2002-01-16  Jim Meyering  <meyering@lucent.com>
28054
28055         * lib/getdate.y: Add three semicolons, each just before a closing
28056         brace. Bison (as of version 1.31) no longer papers over that mistake.
28057
28058 2002-01-05  Jim Meyering  <meyering@lucent.com>
28059
28060         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28061
28062 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28063
28064         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28065         not silently exit merely because the output buffer happens to
28066         have nothing pending.
28067
28068 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28069
28070         See the big note in ../ChangeLog.
28071         * lib/human.c (suffixes): Prefer K to k for 1024.
28072         (generate_suffix_backwards): New function.
28073         (human_readable_inexact): Use it.
28074         * lib/xstrtol.c (__xstrtol): If there is no number but there
28075         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28076         Accept 'K' as well as 'k'.
28077
28078 2001-12-15  Jim Meyering  <meyering@lucent.com>
28079
28080         * lib/regex.h (__restrict_arr): Update from libc.
28081
28082         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28083         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28084         (STREQ): Define.
28085
28086 2001-12-14  Jim Meyering  <meyering@lucent.com>
28087
28088         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28089         Suggestion from Bruno Haible.
28090
28091 2001-12-10  Jim Meyering  <meyering@lucent.com>
28092
28093         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28094         xrealloc, Instead, include "xalloc.h".
28095         (initbuffer): Don't cast xmalloc return value to char*.
28096         (readline): Reword comment.
28097         Don't cast xrealloc return value to char*
28098         Return NULL, not 0.
28099
28100 2001-12-09  Jim Meyering  <meyering@lucent.com>
28101
28102         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28103         about `signed and unsigned type in conditional expression'.
28104         * lib/posixtm.c (posix_time_parse): Likewise.
28105
28106         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28107
28108         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28109         to avoid a pedantic warning.
28110
28111         * lib/getstr.c: Don't include assert.h.
28112         (getstr): Remove warning-evoking assertions.
28113         Return -1 if offset parameter is out of bounds.
28114         Change the type of a local from int to size_t.
28115
28116         * lib/strftime.c (my_strftime_localtime_r): Include this function
28117         definition in the `#if ! HAVE_TM_GMTOFF' block.
28118
28119         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28120         Include xalloc.h instead.
28121
28122 2001-12-02  Jim Meyering  <meyering@lucent.com>
28123
28124         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28125         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28126         included.
28127
28128         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28129         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28130
28131 2001-11-30  Akim Demaille  <akim@epita.fr>
28132
28133         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28134         before being defined.
28135
28136 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28137
28138         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28139         First arg is int, not unsigned.
28140         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28141         (SIZE_MAX, UINT_MAX): New macros.
28142         (quotearg_n_options): Abort if N is negative.
28143         Avoid overflow check on hosts where size_t is 64 bits and int
28144         is 32 bits, as overflow is impossible there.
28145         Fix off-by-one typo that caused unnecessary reallocation.
28146
28147 2001-11-27  Jim Meyering  <meyering@lucent.com>
28148
28149         * lib/tempname.c: Merge with version from libc.
28150         * lib/regex.c: Likewise.
28151
28152         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28153         systems for which STDC_HEADERS is 0, it was not included, resulting in
28154         a warning about an integer-to-pointer conversion problem with getenv.
28155         Reported by Volker Borchert.
28156
28157 2001-11-26  Jim Meyering  <meyering@lucent.com>
28158
28159         * lib/gtod.h: Remove file.
28160         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28161         * lib/gettimeofday.c: Don't include gtod.h.
28162         (GTOD_init): Remove function.
28163         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28164         Suggestion from Volker Borchert.
28165
28166 2001-11-23  Jim Meyering  <meyering@lucent.com>
28167
28168         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28169         it.
28170         * lib/hash.c (struct hash_table): Define it here instead.
28171
28172 2001-11-22  Jim Meyering  <meyering@lucent.com>
28173
28174         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28175
28176 2001-11-20  Jim Meyering  <meyering@lucent.com>
28177
28178         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28179         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28180
28181 2001-11-19  Jim Meyering  <meyering@lucent.com>
28182
28183         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28184         directory.  Use "conftestXXXXXX" as the template.
28185         Suggestion from Paul Eggert.
28186
28187         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28188         immediately, so the test doesn't mistakenly hit the max-open-files
28189         limit.
28190
28191 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28192
28193         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28194         (TEMPORARIES): New macro.
28195         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28196         removes an artificial limitation (e.g. HP-UX 10.20, where
28197         TMP_MAX is 17576).
28198
28199 2001-11-18  Jim Meyering  <meyering@lucent.com>
28200
28201         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28202
28203 2001-11-18  Jim Meyering  <meyering@lucent.com>
28204
28205         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28206         on SunOS 4.
28207
28208         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28209         files will be created before anything else.
28210
28211 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28212
28213         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28214         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28215
28216 2001-11-17  Jim Meyering  <meyering@lucent.com>
28217
28218         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28219         Prompted by a report from Bob Proulx.
28220
28221         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28222         Instead, require UTILS_FUNC_MKSTEMP.
28223
28224 2001-11-17  Jim Meyering  <meyering@lucent.com>
28225
28226         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28227         Now, that's done as part of AC_FUNC_STRTOD.
28228
28229 2001-11-17  Jim Meyering  <meyering@lucent.com>
28230
28231         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28232         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28233         rather than group writable.  Patch by Juan F. Codagnone.
28234
28235         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28236         xrealloc, Instead, include "xalloc.h".
28237
28238         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28239         Remove explicit declarations of xmalloc, xrealloc,
28240         and xstrdup.  Instead, include "xalloc.h".
28241
28242         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28243         unlocked-io.h.
28244         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28245         Likewise.
28246         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28247
28248         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28249         Reported by Padraig Brady.
28250
28251         * lib/mkstemp.c: #undef mkstemp.
28252         Include config.h.
28253         (rpl_mkstemp): Rename from mkstemp.
28254         Protoize.
28255
28256 2001-11-16  Jim Meyering  <meyering@lucent.com>
28257
28258         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28259         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28260         determine the amount of total physical memory, use pstat_getstatic.
28261         HPUX-11 doesn't define _SC_PHYS_PAGES.
28262         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28263         If sysconf couldn't be used to determine the amount of available
28264         physical memory, use both pstat_getstatic and pstat_getdynamic.
28265         Based on a patch from Bob Proulx.
28266
28267 2001-11-10  Jim Meyering  <meyering@lucent.com>
28268
28269         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28270         (jm_PREREQ): Use it.
28271
28272 2001-11-09  Jim Meyering  <meyering@lucent.com>
28273
28274         * m4/jm-macros.m4: Require autoconf-2.52f.
28275         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28276         Use these AC_-prefixed names, not the AM_-prefixed ones.
28277
28278         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28279
28280 2001-11-05  Jim Meyering  <meyering@lucent.com>
28281
28282         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28283
28284 2001-11-04  Jim Meyering  <meyering@lucent.com>
28285
28286         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
28287         $DEFS.
28288
28289 2001-11-03  Jim Meyering  <meyering@lucent.com>
28290
28291         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
28292         of AC_DEFUN.
28293
28294         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
28295         know the name of the variable in the macro definition.
28296
28297 2001-11-03  Jim Meyering  <meyering@lucent.com>
28298
28299         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
28300         in argmatch_to_argument call.
28301
28302         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
28303         argument.
28304
28305         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
28306         e.g., a fault due to an attempt to free a NULL pointer.
28307
28308 2001-11-01  Jim Meyering  <meyering@lucent.com>
28309
28310         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
28311         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
28312
28313 2001-11-01  Jim Meyering  <meyering@lucent.com>
28314
28315         * lib/dirfd.c, lib/dirfd.h: New files.
28316         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
28317
28318         * lib/hash.c (hash_print) [TESTING]: Clean up.
28319
28320 2001-10-22  Paul Eggert  <eggert@twinsun.com>
28321
28322         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
28323         to avoid a warning if -Wall.
28324
28325 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
28326
28327         * README: New file
28328         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
28329         (per RMS's instructions, this is now the canonical source)
28330         * lgpl/, gpl/: New directories.
28331
28332 2001-10-21  Paul Eggert  <eggert@twinsun.com>
28333
28334         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
28335
28336 2001-10-21  Jim Meyering  <meyering@lucent.com>
28337
28338         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
28339         this code would end up calling gettext even in packages built
28340         with --disable-nls.
28341         * lib/getopt.c (_): Likewise.
28342         * lib/regex.c (_): Likewise.
28343
28344 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28345
28346         * m4/error.m4 (jm_PREREQ_ERROR):
28347         Do not invoke AC_CHECK_FUNCS with strerror_r, as
28348         AC_FUNC_STRERROR_R does that.
28349         Check for strerror declaration.
28350
28351         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
28352         are supposed to have them these days.
28353         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
28354         Merge changes from latest Autoconf CVS.
28355         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
28356         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
28357         POSIX decided to standardize on the int flavor of strerror_r.
28358
28359 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28360
28361         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
28362         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
28363         Use strerror_r that is only a macro, even if it is not a function.
28364         (strerror): Check for HAVE_DECL_STRERROR before declaring.
28365         (private_strerror): Use prototypes, not old-style function definition.
28366         (print_errno_message): New function.
28367         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
28368         char*-flavored one.
28369         (error_tail, error, error_at_line): Use it.
28370
28371 2001-10-11  Jim Meyering  <meyering@lucent.com>
28372
28373         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
28374         and quote_n (1, ... to avoid clobbering a buffer.
28375
28376 2001-10-05  Jim Meyering  <meyering@lucent.com>
28377
28378         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
28379         hash-pjw.h.
28380         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
28381         * lib/hash-pjw.h: New file.
28382
28383 2001-09-30  Jim Meyering  <meyering@lucent.com>
28384
28385         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
28386         `struct fsstat' has the `f_fstypename' member.
28387         Use that to define FS_TYPE, which is now used to make
28388         the getfsstat link test tighter.
28389
28390 2001-09-30  Jim Meyering  <meyering@lucent.com>
28391
28392         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
28393         Include <sys/ucred.h>, for Apple Darwin.
28394         Include sys/mount.h and sys/fs_types.h only if available.
28395         (FS_TYPE): Define.
28396         (read_filesystem_list): Use FS_TYPE.
28397
28398 2001-09-29  Paul Eggert  <eggert@twinsun.com>
28399
28400         * lib/exclude.c (excluded_filename): 0 -> false, since it's
28401         a boolean context.
28402
28403 2001-09-29  Jim Meyering  <meyering@lucent.com>
28404
28405         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28406         [one-argument getmntent function]): Include stdio.h before mntent.h.
28407         SunOS 4.1.x needs it for the declaration of `FILE'.
28408         Patch by Volker Borchert.
28409
28410         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28411         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
28412         sys/fs_types.h, and make the link-test for getfsstat guard #include
28413         directives with appropriate #if HAVE_*_H tests so that we can
28414         detect getfsstat on Apple Darwin1.3.7 systems.
28415         Reported by Nelson Beebe.
28416         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
28417
28418 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28419
28420         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28421         #defines strtoimax.  Also treat the other strto* functions
28422         like strtoimax.
28423
28424         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28425         Check for strtoul and strtoumax,
28426         as those declarations are made even in the signed case.
28427         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
28428         Likewise, for strtol and strtoimax.
28429
28430 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28431
28432         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28433         #defines strtoimax.  Also treat the other strto* functions
28434         like strtoimax.
28435
28436         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
28437         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
28438         (strtoimax, strtoumax): Do not declare if already defined as a macro.
28439
28440 2001-09-26  Jim Meyering  <meyering@lucent.com>
28441
28442         Most macros in unlocked-io.h had the wrong number of arguments.
28443         * lib/gen-uio: New script.
28444         (USE_UNLOCKED_IO): Define to 1 if not already defined.
28445         * lib/unlocked-io.hin: Remove file.
28446         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
28447         rather than trying to embed it here.
28448         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
28449         Reported by Padraig Brady.
28450
28451 2001-09-25  Volker Borchert  <bt@teknon.de>
28452
28453         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
28454         `result'.
28455
28456 2001-09-24  Jim Meyering  <meyering@lucent.com>
28457
28458         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
28459
28460 2001-09-23  Jim Meyering  <meyering@lucent.com>
28461
28462         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
28463         instead of the mere test for existence of mntent.h.  The latter
28464         would get a false-positive on AIX 3.4 systems.
28465         In the outer getmntent if-block, don't die if neither of the getmntent
28466         tests succeeds.  Instead, just fall through and continue with the
28467         remaining tests.
28468
28469 2001-09-23  Jim Meyering  <meyering@lucent.com>
28470
28471         * lib/mountlist.c: Remove useless parentheses in #if directives.
28472         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
28473         the deprecated MOUNTED symbol is no longer defined in mntent.h.
28474
28475 2001-09-22  Jim Meyering  <meyering@lucent.com>
28476
28477         * m4/gettext.m4: New file.  From gettext.
28478         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
28479         * m4/progtest.m4: Likewise
28480         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
28481         * m4/glibc21.m4: Likewise.
28482
28483         * m4/libintl.m4: Remove.  No longer used.
28484
28485 2001-09-22  Jim Meyering  <meyering@lucent.com>
28486
28487         * lib/localcharset.c: Update from latest gettext.
28488         * lib/config.charset: Likewise.
28489
28490 2001-09-20  Jim Meyering  <meyering@lucent.com>
28491
28492         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
28493         strtoimax.
28494         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
28495         strtoumax.
28496
28497 2001-09-20  Jim Meyering  <meyering@lucent.com>
28498
28499         * lib/xstrtol.c (strtoimax): Guard declaration with
28500         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
28501         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
28502         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
28503         (strtoumax): Likewise, for completeness (it wasn't necessary).
28504
28505 2001-09-17  Paul Eggert  <eggert@twinsun.com>
28506
28507         * lib/strtoimax.c (HAVE_LONG_LONG):
28508         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
28509         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
28510         to work around bug in IBM C compiler.
28511
28512 2001-09-17  Jim Meyering  <meyering@lucent.com>
28513
28514         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
28515         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
28516         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
28517         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
28518         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
28519         whenever the right hand side need not be expanded by the shell.
28520
28521 2001-09-16  Paul Eggert  <eggert@twinsun.com>
28522
28523         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
28524         library.  It's not correct, as some older glibcs are buggy.
28525         fnmatch wasn't fixed until glibc 2.2.
28526
28527         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
28528         special shell magic here.
28529
28530 2001-09-16  Jim Meyering  <meyering@lucent.com>
28531
28532         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
28533         * m4/jm-macros.m4: Require it.
28534
28535 2001-09-16  Jim Meyering  <meyering@lucent.com>
28536
28537         * lib/mkdir.c: New file.
28538
28539 2001-09-15  Jim Meyering  <meyering@lucent.com>
28540
28541         * m4/jm-macros.m4: Check for help2man.
28542
28543 2001-09-11  Jim Meyering  <meyering@lucent.com>
28544
28545         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
28546         The body, by Paul Eggert, was moved here from configure.in.
28547         * m4/jm-macros.m4: Require UTILS_HOST_OS.
28548
28549 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28550
28551         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
28552         (jm_PREREQ): Use it.
28553
28554 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28555
28556         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
28557         Use ssize_t, not int, to store result of readlink.
28558         Check for ssize_t overflow as well as size_t overflow,
28559         as POSIX says the result of readlink is implementation-defined
28560         when ssize_t overflows.
28561         Remove unnecessary cast to char*.
28562         Use free+malloc instead of realloc, as the storage doesn't need
28563         to be preserved and it's clearer and can be more efficient that way.
28564         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
28565         * lib/xreadlink.h (xreadlink): Update prototype.
28566
28567 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28568
28569         * lib/xgetcwd.c: Revert some of the previous change; intead,
28570         fix the HAVE_GETCWD_NULL code to behave more like the
28571         !HAVE_GETCWD_NULL code used to.
28572
28573         Include "xalloc.h".
28574         (xgetcwd): Do not return NULL when memory is exhausted; instead,
28575         invoke xalloc_die.
28576
28577 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28578
28579         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
28580         sys/param.h, as pathmax.h includes them.
28581
28582 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28583
28584         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
28585         (jm_PREREQ_XGETCWD): New macro.
28586
28587         * m4/getcwd.m4: New file.
28588
28589 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28590
28591         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
28592         like the HAVE_GETCWD_NULL code.
28593         Include pathmax.h if not HAVE_GETCWD.
28594         Do not include xalloc.h.
28595         (INITIAL_BUFFER_SIZE): New symbol.
28596         Do not use xmalloc / xrealloc, since the caller is responsible for
28597         handling errors.  Preserve errno around `free' during failure.
28598         Do not overrun buffer when using getwd.
28599
28600 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28601
28602         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
28603         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
28604         getcwd (NULL, 0).
28605
28606 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28607
28608         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
28609         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
28610         spotted by Jim Meyering.
28611
28612 2001-09-03  Jim Meyering  <meyering@lucent.com>
28613
28614         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
28615         failure.
28616
28617 2001-09-02  Jim Meyering  <meyering@lucent.com>
28618
28619         * lib/error.c: Update from GNU libc.
28620
28621 2001-09-01  Jim Meyering  <meyering@lucent.com>
28622
28623         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
28624         Used by df.
28625
28626 2001-09-01  Jim Meyering  <meyering@lucent.com>
28627
28628         * lib/xreadlink.c: New file.
28629         * lib/xreadlink.h: New file.
28630         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
28631         xreadlink.h.
28632
28633         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
28634         doesn't conflict with sparc Solaris 7's definition in
28635         /usr/include/sys/int_types.h.
28636
28637         * lib/exclude.c: Use `""', not `<>' to #include non-system header
28638         files.
28639         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
28640         and strncasecmp as r-values.  Unixware didn't have declarations.
28641
28642 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28643
28644         * lib/xstrtol.h: Add copyright notice.
28645         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
28646         LONGINT_INVALID_SUFFIX_CHAR.
28647
28648 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28649
28650         * lib/xstrtol.c (strtoimax): New decl.
28651
28652 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28653
28654         * lib/xgetcwd.c: Don't include pathmax.h.
28655         Include stdlib.h and unistd.h if available.
28656         Include xalloc.h.
28657         (xmalloc, xstrdup, free): Remove decls.
28658         (xgetcwd): Don't assume sizes fit in unsigned.
28659         Check for overflow when computing sizes.
28660         Simplify reallocation code.
28661
28662 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28663
28664         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
28665         a directory's st_size can have an arbitrary value, so the old
28666         usage could waste an arbitrary amount of memory.  All uses
28667         changed.
28668         * lib/savedir.h: Update prototype.
28669
28670 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28671
28672         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
28673
28674         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
28675         old strtoimax.c.
28676
28677         Also, make the following further changes to make this file's
28678         configuration more similar to that of strtol.c:
28679         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
28680         (strtoumax, uintmax_t, strtoull, strtol): Remove.
28681         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
28682         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
28683         changed to signed values.
28684
28685         And make the following changes as well:
28686         Fix copyright notice, as 1999 was missing.
28687         (verify): New macro.
28688         (strtoimax): Check sizes at compile-time, not run-time.
28689         Prefer strtol to strtoll if both work.
28690         (main): Remove; it was not that useful and was a pain to maintain.
28691
28692         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
28693
28694 2001-08-31  Jim Meyering  <meyering@lucent.com>
28695
28696         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
28697         Use an initial, malloc'd, buffer of length 128 rather than
28698         a statically allocated one of length 1024.
28699
28700 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28701
28702         Simplify code, partly by assuming autoconf 2.52 semantics.
28703
28704         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
28705
28706         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
28707         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
28708         All uses removed.
28709         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
28710         Move AC_REQUIRE to next-to-top level, to avoid confusion.
28711         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
28712         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
28713         jm_AC_HEADER_INTTYPES_H.
28714         * m4/jm-macros.m4 (jm_MACROS): Likewise.
28715
28716         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
28717
28718         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28719         Quote first arg of AC_DEFUN.
28720         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
28721         since they are needed to parse the include file even if we need
28722         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
28723         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
28724         but with opposite signedness.
28725
28726 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28727
28728         Merge 'exclude' changes from tar 1.13.22.
28729         This fixes one or two unlikely storage allocation overflow bugs,
28730         but doesn't change user-visible behavior otherwise.
28731
28732 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28733
28734         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
28735         (jm_PREREQ_EXCLUDE): New macro.
28736
28737 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28738
28739         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
28740         tm to be declared.
28741
28742 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28743
28744         * lib/hash.c: Remove '2001' from copyright notice.
28745
28746 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28747
28748         * lib/full-write.h: New file.
28749         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
28750         * lib/full-write.c: Correct credits, as cccp.c no longer
28751         exists and anyway it was so heavily changed from the old cccp
28752         code as to be unrecognizable.  Include full-write.h.
28753         (full_write) Return size_t, with short writes meaning failure.
28754         All callers changed.  This fixes a bug with large buffers
28755         on 64-bit hosts.
28756         * lib/utime.c: Include full-write.h.
28757
28758 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28759
28760         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
28761         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
28762         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
28763         Include if available.
28764         (<xalloc.h>): Include
28765         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
28766         (verify): New macro.  Use it to verify that EXCLUDE macros do not
28767         collide with FNM macros.
28768         (struct patopts): New struct.
28769         (struct exclude): Use it, as exclude patterns now come with options.
28770         (new_exclude): Support above changes.
28771         (new_exclude, add_exclude_file):
28772         Initial size must now be a power of two to simplify overflow checking.
28773         (free_exclude, fnmatch_no_wildcards): New function.
28774         (excluded_filename): No longer requires options arg, as the options
28775         are determined by add_exclude.  Now returns bool, not int.
28776         (excluded_filename, add_exclude):
28777         Add support for the fancy new exclusion options.
28778         (add_exclude, add_exclude_file): Now takes int options arg.
28779         Check for arithmetic overflow when computing sizes.
28780         (add_exclude_file): xrealloc might modify errno, so don't
28781         realloc until after errno might be used.
28782
28783         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
28784         New macros.
28785         (free_exclude): New decl.
28786         (add_exclude, add_exclude_file): Now takes int options arg.
28787         (excluded_filename): No longer requires options arg, as the options
28788         are determined by add_exclude.  Now returns bool, not int.
28789
28790 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28791
28792         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
28793
28794 2001-08-27  Jim Meyering  <meyering@lucent.com>
28795
28796         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
28797
28798         * lib/version-etc.c (N_): Remove definition.
28799         Revert most of last change.
28800         Instead, simply don't mark the `Copyright...' string for translation.
28801         Based on advice from Paul Eggert.
28802
28803         * lib/strtoxmax.c: Tweak comment.
28804
28805 2001-08-26  Jim Meyering  <meyering@lucent.com>
28806
28807         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
28808
28809         * m4/xstrtoimax.m4: New file.
28810         * m4/xstrtoumax.m4: Add comments explaining why we
28811         AC_REPLACE_FUNCS(strtol).
28812
28813 2001-08-26  Jim Meyering  <meyering@lucent.com>
28814
28815         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
28816         of copyright with `%s' so translators don't get an untranslated
28817         message in 2002.
28818         (COPYRIGHT_YEAR): Define.
28819         (version_etc): Use fprintf rather than fputs.
28820         Suggestion from Ulrich Drepper.
28821
28822         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
28823
28824         * lib/strtoll.c: New file, from GNU libc.
28825         * lib/xstrtoimax.c: New file.
28826
28827         * lib/xstrtol.h: Add xstrtoimax.
28828         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
28829         * lib/strtoimax.c: New file.  Likewise, but first define
28830         STRTOUXMAX_SIGNED.
28831
28832         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
28833         ...
28834         * lib/strtoxmax.c: ... then renamed to this.
28835
28836 2001-08-18  Paul Eggert  <eggert@twinsun.com>
28837
28838         * m4/inttypes.m4: Add AC_PREREQ(2.13).
28839         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
28840         (jm_AC_TYPE_INTMAX_T): New macro.
28841         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
28842
28843         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
28844
28845         * m4/longlong.m4: Renamed from ulonglong.m4.
28846         * m4/inttypes.m4: Renamed from inttypes_h.m4.
28847         * m4/uintmax_t.m4: Removed.
28848
28849 2001-08-13  Paul Eggert  <eggert@twinsun.com>
28850
28851         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
28852         Port to Solaris 8, where 'sed' requires a space after the 'r'
28853         command, and where sh dislikes "$/".  Clean up the spacing a bit.
28854         Redirect output to $tmp just once.
28855
28856 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
28857
28858         * lib/addext.c (<errno.h>): Include.
28859         (errno): Declare if not defined.
28860         (addext): Work correctly when pathconf returns -1 and leaves
28861         errno alone because there is no limit.  Also, work even if
28862         pathconf returns a value greater than SIZE_MAX.
28863
28864 2001-08-12  Jim Meyering  <meyering@lucent.com>
28865
28866         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
28867         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
28868         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
28869         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
28870         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
28871         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
28872         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
28873         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
28874         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
28875         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
28876         utime.m4, utimes.m4, xstrtoumax.m4:
28877         Quote the first argument in each use of AC_DEFUN.
28878
28879 2001-08-12  Jim Meyering  <meyering@lucent.com>
28880
28881         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
28882         Simply `return getcwd (NULL, 0);'.
28883         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
28884         Use 1300 as initial value for length, not PATH_MAX.
28885
28886         * lib/pathmax.h: Clean up cpp syntax.
28887
28888 2001-08-12  Jim Meyering  <meyering@lucent.com>
28889
28890         * lib/gettimeofday.c: New file.
28891         * lib/gtod.h: New file.
28892         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
28893
28894 2001-08-05  Jim Meyering  <meyering@lucent.com>
28895
28896         * m4/jm-macros.m4: Require autoconf-2.52.
28897
28898 2001-08-04  Jim Meyering  <meyering@lucent.com>
28899
28900         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
28901         stmt, to get in sync with glibc.
28902
28903 2001-08-03  Paul Eggert  <eggert@twinsun.com>
28904
28905         The following changes are from gettext 0.10.39 as maintained by
28906         Bruno Haible.
28907
28908         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
28909         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
28910         with inverted sense.  All uses changed.
28911
28912         * lib/mbswidth.c: Don't include <limits.h>.
28913         Include <stdlib.h> and <string.h> unconditionally.
28914         (iswcntrl, mbsinit, ISCNTRL): New macros.
28915         (mbsnwidth): Use K&R style function declarations.
28916         Don't bother checking for MB_LEN_MAX == 1, since the compiler
28917         can optimize it when MB_CUR_MAX == 1.
28918         The width of control characters is zero, not 1.
28919
28920 2001-08-03  Paul Eggert  <eggert@twinsun.com>
28921
28922         The following changes are from gettext 0.10.39 as maintained by
28923         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
28924
28925         * m4/codeset.m4: Upgrade to serial AM1.
28926         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
28927         all uses changed.  Quote first arg of AC_DEFUN.
28928         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
28929
28930         * m4/iconv.m4: Upgrade to serial AM2.
28931         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
28932         Add --with-libconv-prefix.
28933         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
28934         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
28935         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
28936         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
28937         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
28938
28939         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
28940         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
28941         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
28942         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
28943         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
28944         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
28945         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
28946         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
28947         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
28948
28949         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
28950         string.h any more.
28951
28952         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
28953         not the default value.
28954
28955         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
28956         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
28957         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
28958         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
28959         Also check for iswcntrl, used for wcwidth fallback.
28960         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
28961         to Autoconf 2.13.
28962
28963 2001-08-03  Jim Meyering  <meyering@lucent.com>
28964
28965         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
28966         as it was in the original.  Reported by Paul Eggert.
28967
28968 2001-07-16  Jim Meyering  <meyering@lucent.com>
28969
28970         * m4/gettimeofday.m4: New file.
28971         Prompted by a report from Bernhard Baehr.
28972
28973 2001-07-15  Jim Meyering  <meyering@lucent.com>
28974
28975         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
28976         stuff. Now it's in ../Makefile.cfg.
28977
28978 2001-07-15  Jim Meyering  <meyering@lucent.com>
28979
28980         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
28981         (BUILT_SOURCES): Add unlocked-io.h.
28982         (io_functions): Define.
28983         (unlocked-io.h): New rule.
28984         (DISTCLEANFILES): Add unlocked-io.h.
28985         (all-local): Depend on unlocked-io.h, to ensure it is created.
28986
28987         * lib/unlocked-io.hin: New file
28988
28989         * lib/regex.c: Update from glibc.
28990
28991 2001-07-05  Jim Meyering  <meyering@lucent.com>
28992
28993         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
28994         recommendation.
28995         (libfetish_a_SOURCES): Put all .h files here instead.
28996         Remove a thus-exposed (better checks in automake) duplicate and
28997         two unnecessary .h files.
28998
28999 2001-07-04  Jim Meyering  <meyering@lucent.com>
29000
29001         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29002         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29003         distcheck failure.
29004
29005 2001-07-02  Jim Meyering  <meyering@lucent.com>
29006
29007         The following changes were prompted by suggestions from Bruno Haible.
29008
29009         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29010         is now generated.
29011         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29012         definition of EXTRA_DIST.
29013         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29014         ensure that the generated file is created/updated whenever the list
29015         of $(unlocked_functions) is changed.
29016         (jm-glibc-io.m4): New rule.
29017         (unlocked-io.h): New rule -- currently unused.
29018
29019 2001-06-24  Jim Meyering  <meyering@lucent.com>
29020
29021         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29022         unmatched right bracket, rather than kludging it with an extra,
29023         falsely-matching quote in a comment.  Patch by Akim Demaille.
29024
29025 2001-06-11  Jim Meyering  <meyering@lucent.com>
29026
29027         * lib/regex.c: Update from GNU libc.
29028
29029 2001-05-27  Jim Meyering  <meyering@lucent.com>
29030
29031         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29032         Check for ut_type in struct utmp.
29033
29034 2001-05-27  Jim Meyering  <meyering@lucent.com>
29035
29036         * lib/readutmp.h (UT_TYPE): Define.
29037
29038 2001-05-24  Jim Meyering  <meyering@lucent.com>
29039
29040         * lib/argmatch.c: Include "quote.h".
29041         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29042         quote function.  Reported by Göran Uddeborg.
29043
29044 2001-05-22  Jim Meyering  <meyering@lucent.com>
29045
29046         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29047         now that we use the package-supplied version unconditionally.
29048         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29049
29050 2001-05-21  Jim Meyering  <meyering@lucent.com>
29051
29052         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29053         shell syntax errors.
29054
29055 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29056
29057         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29058
29059 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29060
29061         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29062         Don't bother to check library strftime, since
29063         we'll be using our own my_strftime function anyway.
29064         Define my_strftime instead of strftime.
29065
29066 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29067
29068         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29069         which is not yet declared.
29070
29071 2001-05-15  Jim Meyering  <meyering@lucent.com>
29072
29073         * m4/regex.m4: Use proper quoting so brackets appear in the test
29074         program.
29075         Reported by, and with help from, Bruno Haible.
29076
29077 2001-05-13  Jim Meyering  <meyering@lucent.com>
29078
29079         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29080         undefined.
29081
29082 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29083
29084         dirname code cleanup.  base_name now behaves more compatibly
29085         with POSIX basename when given file names that have trailing
29086         slashes, and similarly for dir_name.  Add new primitives
29087         base_len and dir_len.  Put the directory-name-related decls
29088         into dirname.h.
29089
29090         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29091         * lib/backupfile.c (base_name): Likewise.
29092         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29093         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29094         * lib/makepath.c (strip_trailing_slashes): Likewise.
29095         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29096         ISSLASH): Likewise.
29097         * lib/rename.c (strip_trailing_slashes): Likewise.
29098         * lib/same.c (base_name): Likewise.
29099         * lib/stripslash.c (ISSLASH): Likewise.
29100
29101         * lib/addext.c: Include <dirname.h> after size_t is defined.
29102         * lib/backupfile.c: Likewise.
29103
29104         * lib/addext.c (addext): Use base_len to trim redundant
29105         trailing slashes instead of doing it ourselves.
29106         But do not trim the last slash if it is not redundant.
29107
29108         * lib/backupfile.c (find_backup_file_name,
29109         max_backup_version): Use base_len instead of rolling it ourselves.
29110         Handle the case of "" and (on DOS) "C:" correctly.
29111
29112         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29113         needed. Include <string.h>, <dirname.h>.
29114         (base_name): Allow file names ending in slashes, other than names
29115         that are all slashes.  In this case, return the basename followed
29116         by the slashes.  This is more general, and can be used in places
29117         where the original base_name purposely had an assertion failure.
29118         (base_len): New function.
29119
29120         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29121         Do not include <assert.h>; no longer needed.
29122         Include xalloc.h.
29123         (memrchr): Remove decl.
29124         (dir_name_r): Remove.
29125         (dir_len): Renamed from dirlen.  All callers changed.
29126         Rewrite in terms of base_name, for simplicity and consistency.
29127         (dir_name): Never return NULL.  All callers changed.
29128         Do not include <stdlib.h> in test program; no longer needed.
29129         return 0; is fine for test program.
29130
29131         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29132         New macros.
29133         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29134
29135         * lib/path-concat.c (path_concat): Use base_len to compute
29136         base length, not strlen; this means we cannot rely on memcpy
29137         to null-terminate.
29138
29139         * lib/same.c (STREQ): Remove.
29140         (same_name): Handle the case where the basename ends in trailing '/'.
29141
29142         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29143         a slash was stripped.  Do not strip the last slash after a
29144         file system prefix.
29145
29146 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29147
29148         * lib/Makefile.am (libfetish_a_SOURCES):
29149         Add strftime.c, since we now compile it on all hosts.
29150
29151         * lib/strftime.c (my_strftime):
29152         Define to nstrftime if emacs, but only if my_strftime is not defined.
29153         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29154         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29155         Add one more extra argument: a nanoseconds value.
29156         All uses changed.
29157         (ns): New macro.
29158         (my_strftime function): Add %N format.
29159         (emacs_strftimeu): Renamed from emacs_strftime,
29160         with extra ut argument.
29161
29162 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29163
29164         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29165
29166 2001-04-21  Jim Meyering  <meyering@lucent.com>
29167
29168         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29169         doesn't interfere.
29170
29171 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29172
29173         * m4/ftruncate.m4: Check for chsize.
29174         Link with ftruncate.o unconditionally if ftruncate is missing.
29175         This was required when cross-compiling to i586-mingw32msvc.
29176
29177 2001-04-08  Jim Meyering  <meyering@lucent.com>
29178
29179         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29180         recomputed; that's necessary when the offset spans a DST transition.
29181         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29182
29183 2001-04-02  Jim Meyering  <meyering@lucent.com>
29184
29185         * lib/regex.h, regex.c: Update from GNU libc.
29186
29187 2001-03-24  Jim Meyering  <meyering@lucent.com>
29188
29189         * m4/jm-macros.m4: Require autoconf-2.49d.
29190
29191 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29192
29193         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29194
29195 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29196
29197         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29198
29199 2001-03-17  Jim Meyering  <meyering@lucent.com>
29200
29201         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29202         now that the version in autoconf is equivalent.
29203         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29204
29205         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29206         Suggestion from Akim Demaille.
29207
29208         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29209         (jm_PREREQ_TEMPNAME): New function.
29210
29211 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29212
29213         * lib/tempname.c (uint64_t): Define to uintmax_t if
29214         not defined, and if UINT64_MAX is not defined.
29215         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29216         Reported by John David Anglin.
29217
29218 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29219
29220         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29221         resolve alias if codeset is empty.
29222         * lib/config.charset (BeOS): Use wildcard syntax.
29223
29224 2001-03-13  Jim Meyering  <meyering@lucent.com>
29225
29226         * lib/path-concat.c (path_concat)
29227         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29228         concatenating e.g., `C:' and `foo'.
29229         From Bruno Haible.
29230
29231 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29232
29233         * lib/localcharset.c (locale_charset): Don't use
29234         setlocale(LC_CTYPE,NULL). Don't return NULL.
29235         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29236
29237 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29238
29239         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29240         support for DOS/DJGPP.
29241
29242 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29243
29244         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29245         lacks mkstemp.  Compile our own tempname.c if we compile our own
29246         mkstemp.c, as mkstemp relies on tempname.
29247
29248 2001-03-01  Jim Meyering  <meyering@lucent.com>
29249
29250         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29251         AH_VERBATIM really does output its argument verbatim.
29252
29253 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29254
29255         * lib/Makefile.am (libfetish_a_SOURCES):
29256         Add dup-safer.c, fopen-safer.c.
29257         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29258
29259         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29260         * lib/unistd-safer.h: New files.
29261
29262 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29263
29264         The mkstemp replacement is taken from glibc 2.2.2, with some
29265         portability fixes for use outside glibc, as follows:
29266
29267         * lib/tempname.c (struct_stat64): New macro.
29268         (direxists, __gen_tempname): Use it.
29269         This avoids a portability problem with Solaris 8.
29270
29271         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29272         (<stddef.h>, <stdint.h>, <string.h>):
29273         Include only if STDC_HEADERS || _LIBC.
29274         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29275         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29276         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29277         (__set_errno): Define this macro if <errno.h> doesn't.
29278         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29279         Define these macros if <stdio.h> doesn't.
29280         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29281         Define these macros if <sys/stat.h>
29282         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29283         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29284         __xstat64): Define if not _LIBC.
29285         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
29286         (__gen_tempname): Invoke gettimeofday only if
29287         HAVE_GETTIMEOFDAY || _LIBC;
29288         otherwise, fall back on plain "time".
29289         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
29290
29291         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
29292
29293         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
29294
29295 2001-02-18  Paul Eggert  <eggert@twinsun.com>
29296
29297         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
29298
29299 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29300
29301         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
29302         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
29303         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
29304         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
29305
29306 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29307
29308         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
29309         Remove workaround macros for hosts that have mbrtowc but not
29310         mbstate_t, as we now insist on proper declarations for both
29311         before using mbrtowc.
29312
29313 2001-02-17  Jim Meyering  <meyering@lucent.com>
29314
29315         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
29316         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
29317         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
29318         UnixWare 7.1.1.
29319
29320         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
29321         rather than AC_CACHE_VAL.
29322
29323 2001-02-17  Jim Meyering  <meyering@lucent.com>
29324
29325         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
29326         around included file name.
29327
29328         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
29329
29330         * lib/strftime.c: Update from GNU libc (the only changes were to
29331         comments).
29332
29333 2001-02-17  Jim Meyering  <meyering@lucent.com>
29334
29335         * lib/regex.c: Update from libc.
29336
29337 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
29338
29339         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
29340         clash.
29341
29342 2001-02-16  Paul Eggert  <eggert@twinsun.com>
29343
29344         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
29345         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
29346         Reported by Mark Hounschell via Paul Eggert.
29347
29348 2001-02-07  Jim Meyering  <meyering@lucent.com>
29349
29350         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
29351
29352 2001-02-05  Jim Meyering  <meyering@lucent.com>
29353
29354         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
29355         it includes the patch required for `large file' support with at least
29356         HP-UX's 10.20 /bin/cc.
29357
29358 2001-02-03  Jim Meyering  <meyering@lucent.com>
29359
29360         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
29361         AS_IF, now that it works once again (mysteriously).
29362         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29363
29364 2001-01-30  Jim Meyering  <meyering@lucent.com>
29365
29366         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
29367         * m4/chown.m4: Rename conftestchown to conftest.chown.
29368         * m4/rename.m4: s/conftestdir/conftest.d1/ and
29369         s/conftestdir2/conftest.d2/.
29370         * m4/utimes.m4: s/conftestdata/conftest.data/
29371         Inspired by Pavel Roskin's change in autoconf.
29372
29373 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
29374
29375         * lib/config.charset: Update for FreeBSD 4.2.
29376
29377 2001-01-27  Jim Meyering  <meyering@lucent.com>
29378
29379         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
29380         a use of AS_IF.
29381         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29382
29383 2001-01-26  Jim Meyering  <meyering@lucent.com>
29384
29385         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
29386         quotearg.c includes it.
29387
29388 2001-01-26  Jim Meyering  <meyering@lucent.com>
29389
29390         * lib/quotearg.c: Include stddef.h.
29391         * lib/quote.c: Include stddef.h.
29392         Reported by Axel Kittenberger.
29393
29394         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
29395         line in double quotes so that it evokes a better diagnostic.
29396         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
29397         Reported by Axel Kittenberger.
29398
29399 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
29400
29401         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
29402         as if it was a `charset'.
29403
29404 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29405
29406         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
29407         has const.
29408
29409 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29410
29411         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
29412         to avoid a warning.  Add back 'const' to inptr.
29413
29414 2001-01-20  Jim Meyering  <meyering@lucent.com>
29415
29416         Be sure that headers are checked before used in code compiled
29417         for the type checks.
29418         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
29419         In place of that, invoke jm_CHECK_ALL_TYPES.
29420         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
29421         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
29422         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
29423         The check for ssize_t was mistakenly run before the test for unistd.h.
29424
29425         The configure-time check for stdbool.h was missing.
29426         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
29427         (jm_PREREQ_HASH): New function.
29428
29429 2001-01-17  Jim Meyering  <meyering@lucent.com>
29430
29431         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
29432         for autoconf-2.49c.
29433         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
29434
29435 2001-01-16  Jim Meyering  <meyering@lucent.com>
29436
29437         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
29438         From Bruno Haible.
29439
29440 2001-01-14  Jim Meyering  <meyering@lucent.com>
29441
29442         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
29443         foo and bar.  Create conftestdir/ in the script, not in the C code.
29444         Remove directories in the script, not in the C code.
29445         Remove conftestdir{,2} before trying to create the directory.
29446         Make the entire configure script fail if the mkdir fails.
29447
29448 2001-01-14  Jim Meyering  <meyering@lucent.com>
29449
29450         * lib/rename.c: New file.  From Volker Borchert.
29451         Include stdlib.h, string.h or strings.h, and xalloc.h.
29452         Use strip_trailing_slashes rather than open-coding it.
29453
29454 2001-01-03  Paul Eggert  <eggert@twinsun.com>
29455
29456         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
29457
29458 2001-01-03  Jim Meyering  <meyering@lucent.com>
29459
29460         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
29461         of local `inptr' to avoid warning with some system declarations of
29462         iconv.
29463
29464 2001-01-02  Volker Borchert  <bt@teknon.de>
29465
29466         * m4/rename.m4: New file.
29467         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
29468
29469 2001-01-01  Jim Meyering  <meyering@lucent.com>
29470
29471         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
29472         even on systems with utmpx.h.  It's necessary for the declaration of
29473         utmp's ut_user member.  Reported by Andreas Jaeger.
29474
29475         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
29476         available. They are required for the declarations of getgrgid and
29477         getpwuid resp.
29478         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
29479         Reported by Andreas Jaeger.
29480
29481 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
29482
29483         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
29484         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
29485         so `make install' also works in VPATH builds.
29486
29487 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
29488
29489         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
29490         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
29491         can be used in subdirectories.
29492
29493 2000-12-29  Paul Eggert  <eggert@twinsun.com>
29494
29495         * lib/modechange.c: Do not assume that mode_t uses the
29496         traditional octal encoding.  E.g. "chmod 1 FOO" should set
29497         the other-execute bit of FOO even if S_IXOTH != 1.
29498
29499         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
29500         WOTH, XOTH, ALLM): New macros.
29501         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
29502          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
29503         Use them.
29504         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
29505         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
29506         (mode_compile):
29507         No need to use uintmax_t; unsigned long is long enough.
29508         Don't bother to get suffix since we don't use it.
29509
29510 2000-12-26  Jim Meyering  <meyering@lucent.com>
29511
29512         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
29513         better with autoheader.
29514
29515 2000-12-24  Jim Meyering  <meyering@lucent.com>
29516
29517         * lib/hash.c (is_prime): Return explicit boolean values.
29518         (hash_get_first): Return NULL to appease Irix5.6's 89.
29519         Reported by Nelson Beebe.
29520
29521 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
29522
29523         * lib/localcharset.c (locale_charset): Add support for Win32.
29524
29525 2000-12-18  Paul Eggert  <eggert@twinsun.com>
29526
29527         * lib/physmem.h, lib/physmem.c: New files.
29528
29529         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
29530         (noinst_HEADERS): Add physmem.h.
29531
29532         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
29533         't' for compatibility with Solaris 8 sort.
29534
29535 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
29536
29537         * lib/config.charset: Add support for BeOS.
29538
29539 2000-12-17  Jim Meyering  <meyering@lucent.com>
29540
29541         * m4/dos.m4 (jm_AC_DOS): New file and macro.
29542         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
29543
29544 2000-12-16  Jim Meyering  <meyering@lucent.com>
29545
29546         This bug had a serious impact on chown: `chown N:M FILE' (for integer
29547         N and M) would have treated it like `chown N:N FILE'.
29548
29549         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
29550
29551 2000-12-16  Jim Meyering  <meyering@lucent.com>
29552
29553         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
29554         SHELLS_FILE to a file name that's useful on djgpp systems.
29555         Include stdlib.h.
29556         (ADDITIONAL_DEFAULT_SHELLS): Define.
29557         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
29558         Based mostly on a patch from Prashant TR.
29559
29560 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
29561
29562         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
29563         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
29564         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
29565
29566 2000-12-08  Andreas Schwab  <schwab@suse.de>
29567
29568         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
29569         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
29570
29571 2000-12-07  Jim Meyering  <meyering@lucent.com>
29572
29573         * lib/stripslash.c (ISSLASH): Define.
29574         (strip_trailing_slashes): Use ISSLASH rather than comparing against
29575         `/'.
29576         From Prashant TR.
29577
29578         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
29579         (dir_name_r): Declare this function as static.
29580         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
29581         manifest itself on a name containing a mix of slashes and
29582         backslashes.
29583         Make this function work with names starting with a DOS-style
29584         drive letter and colon prefix.
29585         (dir_name): Append `.' if necessary.
29586         Based mostly on patches from Prashant TR and Eli Zaretskii.
29587
29588         * lib/dirname.h (dir_name_r): Remove prototype.
29589
29590 2000-12-06  Paul Eggert  <eggert@twinsun.com>
29591
29592         * m4/off_t-format.m4: Remove this file.
29593         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
29594
29595 2000-12-06  Jim Meyering  <meyering@lucent.com>
29596
29597         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
29598         replacement strtoull, we may well need the replacement strtoul, too.
29599         Check for declarations of strtoul and strtoull.
29600         Check for strtol.  Mainly as a cue to cause automake to include
29601         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
29602         Check for limits.h -- strtol.c needs it.
29603
29604 2000-12-05  Jim Meyering  <meyering@lucent.com>
29605
29606         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
29607
29608 2000-12-04  Jim Meyering  <meyering@lucent.com>
29609
29610         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
29611         Also include memory.h, stdlib.h, unistd.h if appropriate.
29612         Reported by Andreas Jaeger (conflicting declaration of malloc).
29613
29614 2000-12-02  Jim Meyering  <meyering@lucent.com>
29615
29616         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
29617         * m4/jm-macros.m4 (jm_MACROS): require it.
29618
29619 2000-12-02  Jim Meyering  <meyering@lucent.com>
29620
29621         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
29622
29623 2000-12-01  Paul Eggert  <eggert@twinsun.com>
29624
29625         * lib/memrchr.c: Include <config.h> before any system include file.
29626
29627 2000-11-30  Jim Meyering  <meyering@lucent.com>
29628
29629         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
29630
29631 2000-11-30  Jim Meyering  <meyering@lucent.com>
29632
29633         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
29634
29635 2000-11-29  Paul Eggert  <eggert@twinsun.com>
29636
29637         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
29638
29639 2000-11-26  Jim Meyering  <meyering@lucent.com>
29640
29641         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
29642
29643 2000-11-22  Paul Eggert  <eggert@twinsun.com>
29644
29645         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
29646         size of (size_t) -1; it's not portable.
29647
29648 2000-11-17  Jim Meyering  <meyering@lucent.com>
29649
29650         * lib/strstr.c: Update from GNU libc.
29651
29652 2000-11-17  Akim Demaille  <akim@epita.fr>
29653
29654         * lib/obstack.h: Formatting changes.
29655         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
29656         prevent type checking.
29657         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
29658         cast the value to (void *): assigning a `foo *' to a `void *'
29659         variable is valid.
29660         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
29661
29662 2000-11-16  Jim Meyering  <meyering@lucent.com>
29663
29664         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
29665
29666 2000-11-11  Jim Meyering  <meyering@lucent.com>
29667
29668         * lib/error.c: Add a couple #includes, merging from GNU libc version.
29669
29670 2000-11-10  Jim Meyering  <meyering@lucent.com>
29671
29672         * lib/obstack.h: Update from GNU libc.
29673         * lib/obstack.c: Likewise.
29674
29675 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
29676
29677         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
29678
29679 2000-11-06  Paul Eggert  <eggert@twinsun.com>
29680
29681         * lib/getusershell.c (setusershell): Use rewind rather than
29682         fseek/fseeko, to avoid configuration hassles with fseeko.
29683         Don't bother opening SHELLS_FILE if shellstream is NULL;
29684         it's not necessary.
29685
29686 2000-11-05  Jim Meyering  <meyering@lucent.com>
29687
29688         * lib/makepath.h (make_dir): Declare.
29689         * lib/makepath.c (make_dir): Remove `static' attribute.
29690         Tweak a comment.
29691
29692 2000-11-04  Jim Meyering  <meyering@lucent.com>
29693
29694         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
29695
29696 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
29697
29698         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
29699         last one in a bucket, advance to the next bucket.
29700
29701 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
29702
29703         * lib/fnmatch.c: Do not comment out all the code if we are using
29704         the GNU C library, because in some cases we are replacing buggy
29705         code in the GNU C library itself.
29706
29707 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
29708
29709         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
29710         (regex_compile): Catch bogus \(\1\).
29711
29712 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29713
29714         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
29715         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
29716         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
29717
29718 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29719
29720         * lib/error.h, getline.h, modechange.h:
29721         Remove "2000" from Copyright line, as the file hasn't been
29722         changed this year other than in the copyright notice.
29723
29724         * lib/xalloc.h: Add "2000" to Copyright line, as this file
29725         was changed this year.
29726
29727 2000-10-29  Jim Meyering  <meyering@lucent.com>
29728
29729         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
29730         renaming.
29731         * m4/ls-mntd-fs.m4: Likewise
29732
29733 2000-10-29  Jim Meyering  <meyering@lucent.com>
29734
29735         * lib/xstat.in: Fix grammar in comment.
29736
29737 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
29738
29739         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
29740         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
29741         doesn't define __restrict_arr.
29742
29743 2000-10-28  Jim Meyering  <meyering@lucent.com>
29744
29745         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
29746         (jm_PREREQ_MEMCHR): New function.
29747
29748 2000-10-28  Jim Meyering  <meyering@lucent.com>
29749
29750         * lib/memchr.c: Update from libc.
29751         Adjust for portability:
29752         [HAVE_STDLIB_H]: Include stdlib.h.
29753         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
29754         Undef __memchr, too.
29755         [!weak_alias]: Define __memchr to memchr.
29756
29757         * lib/regex.c: Update from libc.
29758         * lib/regex.h: Likewise.
29759         * lib/getopt1.c: Likewise.
29760         * lib/memcmp.c: Likewise.
29761
29762         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
29763         Avoid using fseek, when possible -- it's broken by design.
29764         Patch by Ulrich Drepper.
29765
29766 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
29767
29768         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
29769         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
29770         Giving in to popular pressure to shut up the compiler with casts.
29771
29772 2000-10-26  Jim Meyering  <meyering@lucent.com>
29773
29774         * lib/strftime.c: Update from libc.
29775
29776 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
29777
29778         * regex.c: More `unsigned char' -> `re_char' changes.
29779         Also change several `int' into `re_wchar_t'.
29780         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
29781         (PUSH_FAILURE_POINTER): Don't cast any more.
29782         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
29783         We want GCC to complain, since this piece of code makes
29784         re_match non-reentrant, which *should* be fixed.
29785         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
29786         (EXTEND_BUFFER): Use RETALLOC.
29787         (SET_LIST_BIT): Don't cast.
29788         (re_wchar_t): New type.
29789         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
29790         that those two functions will always properly return.
29791         (IMMEDIATE_QUIT_CHECK): Cast to void.
29792         (analyse_first): Use recursion rather than an explicit stack.
29793         (re_compile_fastmap): Can't fail anymore.
29794         (re_search_2): Don't check re_compile_fastmap for failure.
29795         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
29796         Now also sets the new value (passed in a new argument).
29797         (re_match_2_internal): Use it.
29798         Also, use a new var `reg' of type size_t when looping through regs
29799         rather than reuse the inappropriate `mcnt'.
29800
29801 2000-10-25  Jim Meyering  <meyering@lucent.com>
29802
29803         * lib/obstack.c: Update from libc.
29804
29805 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
29806
29807         * regex.c (regex_compile): Change the way of handling a range from
29808         a char less than 256 to a char not less than 256.
29809
29810 2000-10-24  Andrew Innes  <andrewi@gnu.org>
29811
29812         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
29813         NT-Emacs only.
29814         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
29815         so that re_search functions only quit when callers expect them to.
29816
29817 2000-10-23  Jim Meyering  <meyering@lucent.com>
29818
29819         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
29820         wrong.  That set_locale call must not have any side effects.
29821         From Paul Eggert.
29822
29823 2000-10-22  Jim Meyering  <meyering@lucent.com>
29824
29825         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
29826         [CYCLIC]: Remove now-unused definition.
29827
29828         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
29829         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
29830         Suggestion from Ulrich Drepper.
29831
29832 2000-10-21  Jim Meyering  <meyering@lucent.com>
29833
29834         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
29835         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
29836         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
29837
29838 2000-10-21  Jim Meyering  <meyering@lucent.com>
29839
29840         * lib/dirname.c (memrchr): Declare if necessary.
29841         (dir_name): Remove the restriction that there be no
29842         trailing slashes.  Now, this code skips past them, effectively
29843         ignoring them.
29844         [TEST_DIRNAME] (main): New unit tests.
29845
29846         * lib/memrchr.c: New file from GNU libc.
29847         Undef __memrchr, too.
29848         [!weak_alias]: Define __memrchr to memrchr.
29849         Guard weak_alias use with `#ifdef weak_alias'.
29850
29851 2000-10-21  Jim Meyering  <meyering@lucent.com>
29852
29853         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
29854         (dir_name): Use dir_name_r.
29855         * lib/dirname.h (dir_name_r): Declare it.
29856
29857 2000-10-17  Jim Meyering  <meyering@lucent.com>
29858
29859         * lib/quote.h (PARAMS): Define and use.
29860         Reported by Akim Demaille.
29861
29862         * lib/getopt.c: Update from libc.
29863
29864 2000-10-16  Jim Meyering  <meyering@lucent.com>
29865
29866         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
29867         setlocale.
29868         From Jan Fedak.
29869
29870 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
29871
29872         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
29873
29874 2000-09-25  Jim Meyering  <meyering@lucent.com>
29875
29876         * lib/md5.h (rol): Define (from GnuPG).
29877
29878         * lib/sha.c: Give credit (GnuPG) where due.
29879         (M): Use rol rather than open-coding it.
29880         Add a FIXME comment.
29881
29882 2000-09-21  Jim Meyering  <meyering@lucent.com>
29883
29884         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
29885         Reported by Michael Stone.
29886
29887 2000-09-20  Jim Meyering  <meyering@lucent.com>
29888
29889         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
29890         (noinst_HEADERS): Add sha.h.
29891         Based on code from Scott G. Miller and from GnuPG.
29892
29893 2000-09-18  Jim Meyering  <meyering@lucent.com>
29894
29895         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
29896         LIBS. Otherwise, everyone ends up linking with -lelf for some
29897         configurations.
29898         Reported by Mike Stone.
29899
29900 2000-09-15  Jim Meyering  <meyering@lucent.com>
29901
29902         * lib/regex.c: Update from libc.
29903
29904 2000-09-10  Jim Meyering  <meyering@lucent.com>
29905
29906         * lib/getopt.c (_getopt_internal): Update from glibc.
29907
29908 2000-09-09  Jim Meyering  <meyering@lucent.com>
29909
29910         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
29911         think it should be used as a general replacement for isascii.
29912         * lib/fnmatch.c: Likewise.
29913         * lib/mbswidth.c: Likewise
29914         * lib/regex.c: Likewise.
29915
29916         Don't use atoi.
29917         * lib/userspec.c: Include sys/param.h and limits.h.
29918         Include xstrtol.h.
29919         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
29920         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
29921         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
29922         UID, GID.  Check range.
29923
29924 2000-09-06  Jim Meyering  <meyering@lucent.com>
29925
29926         * lib/getopt.c (_getopt_internal): Update from glibc.
29927
29928 2000-08-30  Jim Meyering  <meyering@lucent.com>
29929
29930         * lib/strftime.c: Merge in changes from GNU libc.
29931
29932 2000-08-26  Jim Meyering  <meyering@lucent.com>
29933
29934         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
29935         * m4/fpending.m4: New file.
29936
29937 2000-08-26  Jim Meyering  <meyering@lucent.com>
29938
29939         * lib/closeout.c: Include "__fpending.h".
29940         (close_stdout_status): Return right away if there's nothing to flush.
29941
29942         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
29943         * lib/__fpending.c: New file.
29944         * lib/__fpending.h: New file.
29945
29946 2000-08-20  Jim Meyering  <meyering@lucent.com>
29947
29948         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
29949         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
29950         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
29951
29952 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
29953
29954         Improve fileutils installation on systems where running
29955         programs (like install) can't be unlinked.
29956         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
29957         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
29958
29959 2000-08-07  Paul Eggert  <eggert@twinsun.com>
29960
29961         Standardize on "memory exhausted" instead of "Memory exhausted"
29962         or "virtual memory exhausted".
29963         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
29964         "virtual memory exhausted".
29965         * lib/same.c (same_name): Invoke xalloc_die instead of printing
29966         our own message.
29967         * lib/userspec.c (parse_user_spec): Likewise.
29968         * lib/bumpalloc.h: comment fix
29969         * lib/same.c, userspec.c: Include xalloc.h.
29970
29971         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
29972         not char *const and pointing to a constant array.
29973         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
29974         (xrealloc): Comment fix.
29975
29976         * lib/userspec.c (parse_user_spec):
29977         Don't translate a message until just before returning,
29978         to avoid unnecessary translation.
29979
29980 2000-08-07  Jim Meyering  <meyering@lucent.com>
29981
29982         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
29983         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
29984         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
29985         getgroups.c, gethostname.c, getopt.h, group-member.c,
29986         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
29987         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
29988         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
29989         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
29990         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
29991         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
29992         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
29993         yesno.c: Back out Copyright date changes for each file with no change
29994         this year.  This eases coordination with other programs using the same
29995         source code modules.  From Paul Eggert.
29996
29997 2000-08-06  Paul Eggert  <eggert@twinsun.com>
29998
29999         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30000         not char, for compatibility with glibc 2.1.3 strftime.c.
30001
30002 2000-08-03  Greg McGary  <greg@mcgary.org>
30003
30004         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30005         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30006         (EXTEND_BUFFER): Use them.
30007
30008 2000-08-01  Jim Meyering  <meyering@lucent.com>
30009
30010         * lib/dirname.c (ISSLASH): Define.
30011         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30012         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30013         both `\' and `/' may be use as path separators.
30014         Based on a patch from Prashant TR.
30015
30016 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30017
30018         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30019         slot vector a constant, since it might get modified.
30020
30021 2000-07-31  Jim Meyering  <meyering@lucent.com>
30022
30023         * lib/xmalloc.c: Use `virtual memory exhausted', not
30024         `Memory exhausted'.
30025         * lib/obstack.c (print_and_abort): Likewise.
30026
30027 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30028
30029         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30030         buffer, so that the caller can always quote one small
30031         component of a "memory exhausted" message in slot 0.
30032         From a suggestion by Jim Meyering.
30033
30034 2000-07-30  Jim Meyering  <meyering@lucent.com>
30035
30036         * lib/makepath.c (make_path): Quote the other instance, too.
30037
30038         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30039         (STATIC_BUF_SIZE): Define.
30040         (quotearg_n_options): Use only statically allocated storage when
30041         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30042         than STATIC_BUF_SIZE.
30043
30044 2000-07-29  Jim Meyering  <meyering@lucent.com>
30045
30046         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30047         * lib/dirname.c (dir_name): Likewise.
30048
30049         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30050         `/'.
30051
30052         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30053         (dir_name): Assert that there are no trailing slashes.
30054
30055 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30056
30057         * lib/mbswidth.h (mbswidth): Add a flags argument.
30058         (mbswidth): New declaration.
30059         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30060         * lib/mbswidth.c (mbswidth): Add a flags argument.
30061         (mbsnwidth): New function.
30062
30063 2000-07-24  Jim Meyering  <meyering@lucent.com>
30064
30065         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30066
30067 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30068
30069         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30070
30071 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30072
30073         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30074         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30075         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30076         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30077         invoke multibyte primitives.
30078
30079 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30080
30081         * lib/quotearg.c:
30082         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30083         so that mbstate_t is always defined.
30084
30085         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30086         be 1 in at least one GCC installation, and this configuration
30087         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30088         performance on hosts that have mbrtowc but have only unibyte
30089         locales, but I assume these hosts are rare.
30090
30091 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30092
30093         * lib/mbswidth.c (_XOPEN_SOURCE):
30094         Don't define; this causes problems on Solaris 7.
30095         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30096
30097 2000-07-23  Jim Meyering  <meyering@lucent.com>
30098
30099         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30100         too: getgrgid, getpwuid, getuid.
30101
30102 2000-07-23  Jim Meyering  <meyering@lucent.com>
30103
30104         * lib/basename.c (base_name): Add an assertion.
30105
30106 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30107
30108         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30109         shadow its mbsinit function.
30110
30111 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30112
30113         * lib/mbswidth.h: New file.
30114         * lib/mbswidth.c: New file.
30115         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30116         (noinst_HEADERS): Add mbswidth.h.
30117
30118 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30119
30120         * lib/config.charset: Add support for FreeBSD. Improve support for
30121         HP-UX and IRIX 6.
30122
30123 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30124
30125         * m4/mbswidth.m4: New file.
30126         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30127
30128 2000-07-15  Jim Meyering  <meyering@lucent.com>
30129
30130         * lib/makepath.c: Include quote.h.
30131         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30132         corresponding argument in a `quote (...)' call.
30133         Give better diagnostics.
30134
30135         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30136         (noinst_HEADERS): Add quote.h.
30137
30138         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30139         from tar's src/misc.c.
30140         * lib/quote.h: New file.  Prototypes for same.
30141
30142 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30143
30144         From a suggestion by Bruno Haible.
30145         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30146         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30147         to decide whether to define the BeOS workaround macro;
30148         this adjusts to the change to AC_MBSTATE_T.
30149
30150 2000-07-14  Jim Meyering  <meyering@lucent.com>
30151
30152         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30153         jm_AC_TYPE_UINTMAX_T.
30154
30155 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30156
30157         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30158
30159         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30160         quotearg_buffer_restyled): Add support for
30161         clocale_quoting_style.  Undo previous change to
30162         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30163         and "{RIGHT QUOTATION MARK}" msgids.
30164
30165 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30166
30167         From a suggestion by Bruno Haible.
30168         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30169         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30170         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30171         and mbstate_t, to a single-part test that simply defines mbstate_t.
30172         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30173         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30174
30175 2000-07-10  Jim Meyering  <meyering@lucent.com>
30176
30177         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30178
30179         * m4/gnu-source.m4: Output to confdefs.h directly.
30180         Suggestion from Akim Demaille.
30181
30182 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30183
30184         The old behavior of quoting `like this' doesn't look good with
30185         newer, ISO-style fonts.  See:
30186         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30187
30188         Instead, quote "like this" by default.  Let the translator
30189         tailor the locale-specific quoting behavior by providing
30190         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30191
30192         * lib/quotearg.c (N_): New macro.
30193         (gettext_default): New function.
30194         (quotearg_buffer_restyled): Use
30195         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30196         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30197
30198 2000-07-09  Jim Meyering  <meyering@lucent.com>
30199
30200         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30201         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30202
30203         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30204         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30205
30206 2000-07-09  Jim Meyering  <meyering@lucent.com>
30207
30208         * lib/Most files: Update copyright dates to include 2000.
30209
30210 2000-07-08  Jim Meyering  <meyering@lucent.com>
30211
30212         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30213         if not defined.
30214         (xgethostname): Remove now-unnecessary #ifdef.
30215         Move declaration of `err' into loop where it's used.
30216
30217 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30218         and Bruno Haible  <haible@clisp.cons.org>
30219
30220         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30221         only if the test for an object-type mbstate_t fails.  This
30222         prevents us from mistakenly reporting that mbstate_t is a
30223         system object type after we "#define mbstate_t int" to work
30224         around its lack.
30225
30226 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30227         and Bruno Haible  <haible@clisp.cons.org>
30228
30229         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30230
30231 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30232
30233         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30234         to strerror_r.
30235         Include <ctype.h> for use of isalpha.
30236
30237 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30238
30239         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30240         by allocating a larger buffer. Test the gethostname return value for
30241         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30242         returns an error and ENAMETOOLONG isn't defined.
30243
30244 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30245
30246         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30247         dimension.
30248
30249 2000-07-04  Jim Meyering  <meyering@lucent.com>
30250
30251         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30252         of the deprecated AC_CHECKING.
30253
30254 2000-07-04  Jim Meyering  <meyering@lucent.com>
30255
30256         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30257         Reported by Bruno Haible.
30258
30259 2000-07-04  Jim Meyering  <meyering@lucent.com>
30260
30261         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30262         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30263         lacks mbrtowc.
30264
30265 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30266
30267         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30268         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30269
30270 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30271         and Bruno Haible  <haible@clisp.cons.org>
30272
30273         * lib/quotearg.c (mbrtowc):
30274         Assign to *pwc, and return 1 only if result is nonzero.
30275         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30276
30277 2000-07-03  Jim Meyering  <meyering@lucent.com>
30278
30279         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30280
30281 2000-07-03  Jim Meyering  <meyering@lucent.com>
30282
30283         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30284         This is necessary to get a definition of e.g., UTMP_FILE on
30285         HP-UX 10.20.
30286         From Bob Proulx.
30287
30288 2000-07-02  Jim Meyering  <meyering@lucent.com>
30289
30290         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
30291
30292         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
30293         AC_LIBOBJ(function_name).
30294         * m4/chown.m4: Likewise.
30295         * m4/fnmatch.m4: Likewise.
30296         * m4/ftruncate.m4: Likewise.
30297         * m4/getgroups.m4: Likewise.
30298         * m4/getline.m4: Likewise.
30299         * m4/group-member.m4: Likewise.
30300         * m4/jm-macros.m4: Likewise.
30301         * m4/lstat.m4: Likewise.
30302         * m4/malloc.m4: Likewise.
30303         * m4/memcmp.m4: Likewise.
30304         * m4/nanosleep.m4: Likewise.
30305         * m4/putenv.m4: Likewise.
30306         * m4/realloc.m4: Likewise.
30307         * m4/regex.m4: Likewise.
30308         * m4/stat.m4: Likewise.
30309         * m4/strftime.m4: Likewise.
30310
30311 2000-07-02  Jim Meyering  <meyering@lucent.com>
30312
30313         * lib/quotearg.c (mbstate_t): Don't define here.
30314
30315 2000-07-02  Jim Meyering  <meyering@lucent.com>
30316
30317         * lib/nanosleep.c (SIGCONT): Define if not already defined.
30318
30319 2000-07-01  Jim Meyering  <meyering@lucent.com>
30320
30321         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
30322
30323 2000-07-01  Jim Meyering  <meyering@lucent.com>
30324
30325         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
30326         problem.
30327
30328 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30329
30330         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
30331         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
30332
30333 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30334
30335         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
30336         per change in ../m4/ls-mntd-fs.m4.
30337         (read_filesystem_list): Ignore symbolic links.
30338
30339 2000-06-29  Jim Meyering  <meyering@lucent.com>
30340
30341         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
30342         for declaration of strcmp.
30343
30344         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
30345
30346         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
30347         Avoid warning by casting result to `char *' to remove `const'.
30348
30349 2000-06-28  Jim Meyering  <meyering@lucent.com>
30350
30351         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
30352         included by quotearg.c, for which we perform this test.  From
30353         Bruno Haible.
30354
30355 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30356
30357         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
30358         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
30359         <utmpx.h> exists, put readutmp.o into LIBOBJS.
30360
30361 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30362
30363         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
30364
30365 2000-06-26  Paul Eggert  <eggert@twinsun.com>
30366
30367         savedir now sets errno on failure and invokes xmalloc to get memory.
30368         Fix a couple of other minor bugs while we're at it.
30369
30370         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
30371         (NAMLEN): Remove macro.
30372         (malloc, realloc): Remove decls.
30373         (stpcpy): Likewise.
30374         ("xalloc.h"): Include.
30375         (NAME_SIZE_DEFAULT): New macro.
30376         (savedir): Use xmalloc / xrealloc to allocate memory.
30377         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
30378         Skip "" directory entries.
30379         Use strlen to calculate directory entry length, since the old method
30380         is rarely used these days and isn't worth supporting.
30381         Don't use a pointer after freeing it.
30382         Check for integer overflow when calculating allocation size.
30383         Use memcpy to copy entries, instead of stpcpy.
30384         Set errno properly when returning NULL.
30385         Check for readdir error.
30386
30387 2000-06-26  Jim Meyering  <meyering@lucent.com>
30388
30389         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
30390
30391 2000-06-25  Jim Meyering  <meyering@lucent.com>
30392
30393         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
30394         Linux header bug when _XOPEN_SOURCE is defined to 500.
30395
30396 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30397
30398         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
30399         deficiency.
30400
30401 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30402
30403         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
30404         Include xalloc.h.
30405         Don't include <stdlib.h>.  Don't declare malloc, realloc.
30406
30407 2000-06-24  Jim Meyering  <meyering@lucent.com>
30408
30409         * m4/strerror_r.m4: Revive this file -- to try out an experimental
30410         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
30411         for which strerror does return char*, but which lacks a conveniently
30412         accessible declaration of the function.  If the compile-test says
30413         strerror_r doesn't work, then resort to a `run'-test that works on
30414         BeOS and segfaults on DEC Unix.
30415
30416 2000-06-24  Jim Meyering  <meyering@lucent.com>
30417
30418         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
30419
30420 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30421
30422         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
30423         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
30424
30425 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30426
30427         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
30428         (mbrtowc, mbstate_t): Define substitutes if
30429         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
30430         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
30431         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
30432
30433 2000-06-23  Jim Meyering  <meyering@lucent.com>
30434
30435         * m4/afs.m4: Add missing AC_MSG_RESULT.
30436         Reported by Bruno Haible.
30437
30438         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
30439         Suggestion from Bruno Haible.
30440
30441 2000-06-23  Jim Meyering  <meyering@lucent.com>
30442
30443         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
30444
30445 2000-06-21  Jim Meyering  <meyering@lucent.com>
30446
30447         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
30448
30449 2000-06-21  Jim Meyering  <meyering@lucent.com>
30450
30451         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
30452         (noinst_HEADERS): Add getstr.h.
30453
30454         * lib/getline.c (getstr): Move into a separate file.
30455         * lib/getstr.c (getstr): New file, extracted from getline.c, with
30456         the following changes: new parameter, delim2; both delim[12]
30457         parameters have type `int', not `char'.  The latter would lose
30458         with 8-bit delimiters.
30459         * lib/getstr.h: New file.
30460
30461 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30462
30463         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
30464         than 1024, return a memory chunk of least possible size, instead
30465         of size PATH_MAX + 2. In the loop, increment the size proportionally.
30466         Use free/xmalloc instead of xrealloc to avoid copying for very long
30467         paths.
30468
30469 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30470
30471         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
30472         the empty string.
30473
30474 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30475
30476         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
30477         address, not strdup.  Include <stdlib.h> and don't declare free().
30478
30479 2000-06-19  Jim Meyering  <meyering@lucent.com>
30480
30481         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
30482
30483 2000-06-18  Jim Meyering  <meyering@lucent.com>
30484
30485         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
30486
30487         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
30488         `checking whether...' message to be consistent with that of the
30489         lstat test.
30490
30491 2000-06-18  Jim Meyering  <meyering@lucent.com>
30492
30493         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
30494         Besides, these days every porting target provides a mkdir function.
30495
30496         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
30497         needed. (this snippet comes from src/system.h).
30498
30499 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
30500
30501         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
30502
30503 2000-06-15  Paul Eggert  <eggert@twinsun.com>
30504
30505         * lib/human.c (adjust_value): New function.
30506         (human_readable_inexact): Apply rounding style even when
30507         printing approximate values.
30508
30509 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30510
30511         * lib/human.c (human_readable_inexact): Allow an input block
30512         size that is not a multiple of the output block size, and vice versa.
30513         Reported by Piergiorgio Sartor.
30514
30515 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30516
30517         * lib/getdate.y (get_date): Apply relative times after time
30518         zone indicator, not before.  Reported by Todd A. Jacobs.
30519
30520 2000-06-13  Jim Meyering  <meyering@lucent.com>
30521
30522         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
30523
30524         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
30525
30526 2000-06-12  Paul Eggert  <eggert@twinsun.com>
30527
30528         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
30529
30530 2000-06-12  Jim Meyering  <meyering@lucent.com>
30531
30532         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
30533         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
30534         optional argument.
30535         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
30536         the optional argument, `lib'.
30537
30538 2000-06-08  Jim Meyering  <meyering@lucent.com>
30539
30540         * m4/largefile.m4: Remove file (now that it's part of autoconf).
30541
30542 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30543
30544         Rewrite largefile configuration so that we don't need to run
30545         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
30546         AC_CANONICAL_HOST in configure.in -- jmm]
30547
30548         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
30549         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
30550         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
30551         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
30552         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
30553         All uses changed.
30554         Instead of inspecting the output of getconf, try to compile the
30555         test program without and with the macro definition.
30556         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
30557         for getconf.  Instead, check for the needed flags by compiling
30558         test programs.
30559
30560 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30561
30562         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
30563
30564 2000-06-04  Jim Meyering  <meyering@lucent.com>
30565
30566         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
30567         SunOS 4.1.4 for which gid_t is an unsigned type.
30568
30569 2000-06-03  Jim Meyering  <meyering@lucent.com>
30570
30571         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
30572         now that autoconf requires that.
30573
30574         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
30575         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
30576         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
30577
30578 2000-06-03  Jim Meyering  <meyering@lucent.com>
30579
30580         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
30581
30582 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30583
30584         * m4/glibc21.m4: New file.
30585         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
30586
30587 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30588
30589         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
30590         newer, don't install charset.alias.
30591         * lib/config.charset: Change the Linux/glibc rules so they become empty
30592         on glibc-2.1 or newer.
30593
30594 2000-06-02  Jim Meyering  <meyering@lucent.com>
30595
30596         * lib/mountlist.c: Back out last change.  Instead, do this...
30597         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
30598         me_dummy member using the same `ignore'-testing code.
30599         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
30600         fs_type strings.
30601         From Mark D. Roth.
30602
30603 2000-05-29  Jim Meyering  <meyering@lucent.com>
30604
30605         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
30606         mounts with the `ignore' attribute.  Based on a patch from
30607         Mark D. Roth.
30608
30609 2000-05-28  Jim Meyering  <meyering@lucent.com>
30610
30611         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
30612         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30613         * m4/stat.m4: Likewise.
30614         * m4/lstat.m4: Likewise.
30615         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
30616
30617         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
30618         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
30619
30620 2000-05-26  Jim Meyering  <meyering@lucent.com>
30621
30622         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
30623
30624 2000-05-24  Jim Meyering  <meyering@lucent.com>
30625
30626         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
30627         autoconf requires that.
30628         * m4/lib-check.m4: Likewise.
30629         * m4/jm-macros.m4: Likewise.
30630         * m4/strftime.m4: Likewise.
30631
30632         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
30633         AC_CHECK_DECLS, now that autoconf requires that.
30634
30635 2000-05-22  Jim Meyering  <meyering@lucent.com>
30636
30637         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30638         * m4/lstat.m4: Likewise.
30639
30640 2000-05-22  Jim Meyering  <meyering@lucent.com>
30641
30642         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
30643
30644 2000-05-20  Jim Meyering  <meyering@lucent.com>
30645
30646         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
30647         (jm_PREREQ): Use it.
30648
30649 2000-05-18  Jim Meyering  <meyering@lucent.com>
30650
30651         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
30652         back, too, since it may have been modified by allocate_entry.
30653         (hash_delete): Rewrite to use neither the assignment operator
30654         nor the comma operator in an if-expression.
30655
30656 2000-05-15  Paul Eggert  <eggert@twinsun.com>
30657
30658         * lib/closeout.c:
30659         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
30660         Remove; no longer needed.
30661         "quotearg.h": Add include.
30662         (file_name): Do not bother to explicitly initialize to NULL; it's less
30663         efficient on some hosts.
30664         (close_stdout_status): Remove test as to whether stdout was already
30665         closed; it breaks for the case "echo x | sort >&-".
30666         Quote file name colons.
30667         Do not assume that _("write error") lacks format strings.
30668
30669 2000-05-15  Jim Meyering  <meyering@lucent.com>
30670
30671         * lib/version-etc.c (version_etc_copyright): Update the copyright
30672         string used in all --version output.
30673
30674 2000-05-14  Jim Meyering  <meyering@lucent.com>
30675
30676         * lib/closeout.c (close_stdout_set_file_name): New function.
30677         (close_stdout_status): Use new file-scoped global.
30678         Return right away if fstat says the stdout file descriptor is invalid.
30679         * lib/closeout.h (close_stdout_set_file_name): Declare.
30680
30681 2000-05-10  Jim Meyering  <meyering@lucent.com>
30682
30683         * lib/closeout.c [default_exit_status]: New file-scoped variable.
30684         (close_stdout_set_status): New function.
30685         * lib/closeout.h (close_stdout_set_status): Declare.
30686
30687 2000-05-09  Jim Meyering  <meyering@lucent.com>
30688
30689         * m4/gettext.m4: Rename this...
30690         * m4/libintl.m4: ...to this.
30691
30692 2000-05-08  Jim Meyering  <meyering@lucent.com>
30693
30694         * lib/long-options.c: Don't include closeout.h.
30695         (parse_long_options): Don't call close_stdout for --version.
30696
30697 2000-05-06  Paul Eggert  <eggert@twinsun.com>
30698
30699         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
30700         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
30701         2.1.3 bug.  This avoids a clash when files like regex.c define
30702         _GNU_SOURCE.
30703
30704 2000-05-06  Jim Meyering  <meyering@lucent.com>
30705
30706         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
30707         (AC_REPLACE_FUNCS): Add strnlen.
30708
30709         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
30710         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
30711
30712         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
30713         AC_SEARCH_LIBS call for nanosleep.
30714         (LIB_NANOSLEEP): Set and AC_SUBST.
30715
30716 2000-05-06  Jim Meyering  <meyering@lucent.com>
30717
30718         * lib/strnlen.c: Undefine __strnlen and strnlen.
30719         [!weak_alias]: Define __strnlen to strnlen.
30720
30721         * lib/atexit.c: New file, from libiberty.
30722
30723 2000-05-06  Jim Meyering  <meyering@lucent.com>
30724
30725         * lib/closeout.c (close_stdout_status): Also check for errors on the
30726         stderr stream.
30727
30728 2000-05-05  Jim Meyering  <meyering@lucent.com>
30729
30730         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
30731         AC_SEARCH_LIBS call for clock_gettime.
30732         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
30733
30734         * m4/search-libs.m4: Update from autoconf.
30735
30736         su doesn't work on Solaris 2.6.
30737         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
30738         <shadow.h>.  Reported by Dragos Harabor.
30739
30740 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
30741
30742         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
30743         memcpy instead of xmalloc, xrealloc, path_concat.
30744         (locale_charset): Treat empty environment variables as absent.
30745         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
30746
30747 2000-05-04  Jim Meyering  <meyering@lucent.com>
30748
30749         * lib/getopt.c: Update from glibc.
30750         * lib/obstack.c: Likewise.
30751         * lib/obstack.h: Likewise.
30752         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
30753         file
30754
30755         * lib/regex.h: Likewise.
30756         * lib/strndup.c: Likewise.
30757         * lib/strnlen.c: New file, from glibc.
30758
30759 2000-05-03  Jim Meyering  <meyering@lucent.com>
30760
30761         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
30762
30763 2000-05-02  Paul Eggert  <eggert@twinsun.com>
30764
30765         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
30766         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
30767         compile-time test, rather than inspecting host and OS, to
30768         decide whether to define _LARGEFILE_SOURCE.
30769
30770 2000-05-01  Jim Meyering  <meyering@lucent.com>
30771
30772         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
30773
30774         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
30775         Based on a patch from Bruno Haible.
30776
30777 2000-05-01  Jim Meyering  <meyering@lucent.com>
30778
30779         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
30780
30781 2000-04-29  Jim Meyering  <meyering@lucent.com>
30782
30783         * lib/path-concat.c: Declare strdup only if it's not defined.
30784         * lib/canon-host.c: Likewise.
30785
30786 2000-04-28  Jim Meyering  <meyering@lucent.com>
30787
30788         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
30789         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
30790         is included first, then limits.h is included by locale.h by libintl.h.
30791         From John David Anglin.
30792
30793 2000-04-25  Jim Meyering  <meyering@lucent.com>
30794
30795         * lib/makepath.c (S_IRWXUGO): Define.
30796         (make_path): Always perform explicit chmod if MODE specifies any
30797         of the `special' permission bits.  Prompted by a bug report against
30798         install from Mate Wierdl and Joost van Baal.
30799
30800 2000-04-18  Jim Meyering  <meyering@lucent.com>
30801
30802         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
30803         (jm_PREREQ): Use it.
30804
30805 2000-04-18  Jim Meyering  <meyering@lucent.com>
30806
30807         * lib/README: New file.
30808
30809         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
30810         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
30811
30812 2000-04-17  Jim Meyering  <meyering@lucent.com>
30813
30814         Get it right :-)
30815         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
30816         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
30817         Suggestion from Akim Demaille.
30818
30819 2000-04-17  Jim Meyering  <meyering@lucent.com>
30820
30821         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
30822         the definition of it to rpl_strftime also defined-away the system's
30823         declaration.
30824
30825 2000-04-15  Jim Meyering  <meyering@lucent.com>
30826
30827         Use `C' to denote so-called `contiguous' files, the same way
30828         that tar does.
30829         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
30830         (ftypelet): Use S_ISCTG.
30831         From Michael Deutschmann.
30832
30833 2000-04-14  Jim Meyering  <meyering@lucent.com>
30834
30835         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
30836         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
30837         clobbered.
30838
30839 2000-04-14  Jim Meyering  <meyering@lucent.com>
30840
30841         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
30842
30843 2000-04-13  Jim Meyering  <meyering@lucent.com>
30844
30845         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
30846         AH_VERBATIM to insert required #ifndef into config.h.in.
30847         Suggestion from Akim Demaille.
30848
30849 2000-04-12  Jim Meyering  <meyering@lucent.com>
30850
30851         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
30852         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
30853         Christian Krackowizer.
30854
30855         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
30856         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
30857         (AC_SYS_LARGEFILE): Require.
30858         (AM_C_PROTOTYPES): Require.
30859
30860 2000-04-08  Jim Meyering  <meyering@lucent.com>
30861
30862         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
30863         names don't conflict.  Reported by Eli Zaretskii.
30864
30865 2000-04-07  Jim Meyering  <meyering@lucent.com>
30866
30867         * lib/putenv.c: Move inclusion of errno.h so it follows that of
30868         sys/types.h, to work around system header problems on AIX 3.2.5.
30869         From Bruno Haible.
30870
30871 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
30872
30873         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
30874         bug.  Deal with the different error behavior of Irix iconv.
30875
30876 2000-04-05  Paul Eggert  <eggert@twinsun.com>
30877
30878         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
30879         IRIX if the installer said otherwise.
30880
30881 2000-04-05  Jim Meyering  <meyering@lucent.com>
30882
30883         Portability tweaks required for ultrix4.3.
30884         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
30885         (jm_CHECK_DECLS): Add getutent to the list of functions.
30886         (_jm_DECL_HEADERS): Add utmpx.h.
30887         From John David Anglin.
30888
30889         * m4/strftime.m4: Back out the 2000-04-02 change.
30890         Instead of that change, simply undefine putenv in the test program.
30891
30892 2000-04-05  Jim Meyering  <meyering@lucent.com>
30893
30894         Portability tweaks required for ultrix4.3.
30895         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
30896         getutent.
30897         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
30898         * lib/canon-host.c: Declare strdup.
30899         * lib/path-concat.c: Likewise.
30900         From John David Anglin.
30901
30902 2000-04-04  Jim Meyering  <meyering@lucent.com>
30903
30904         Be more DOS 8.3-friendly.
30905         * lib/ref-add.sin: Renamed from ref-add.sed.in.
30906         * lib/ref-del.sin: Renamed from ref-del.sed.in.
30907         * lib/Makefile.am: Reflect renaming.
30908         Reported by Eli Zaretskii.
30909
30910         Use a temporary file name that won't clash with `charset.alias'
30911         in the DOS 8.3 name space.
30912         * lib/Makefile.am (charset_tmp): Define.
30913         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
30914         (uninstall-local): Likewise.
30915         Reported by Eli Zaretskii.
30916
30917 2000-04-03  Jim Meyering  <meyering@lucent.com>
30918
30919         * m4/gettext.m4: Fix typo in comment.
30920
30921         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
30922         textutils/configure.in).  Suggestion from Paul Eggert.
30923         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
30924
30925 2000-04-02  Paul Eggert  <eggert@twinsun.com>
30926
30927         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
30928         variable in the shell rather than using putenv, which isn't
30929         portable.  This avoids the configure-time inter-test dependency
30930         on the potentially-renamed putenv function.
30931
30932 2000-03-30  Paul Eggert  <eggert@twinsun.com>
30933
30934         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
30935         before checking struct stat.st_blksize, so that
30936         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
30937
30938 2000-03-29  Paul Eggert  <eggert@twinsun.com>
30939
30940         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
30941         since strftime.c uses HAVE_STRFTIME to decide whether to use
30942         the underlying strftime.
30943
30944 2000-03-29  Paul Eggert  <eggert@twinsun.com>
30945
30946         * lib/time/strftime.c (my_strftime): Make sure we call the system
30947         strftime, not ourselves, when invoking the underlying strftime.
30948
30949 2000-03-24  Jim Meyering  <meyering@lucent.com>
30950
30951         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
30952         (charset_alias): Define.
30953         (install-exec-local): Factor out common code.
30954         (uninstall-local): Split lines longer than 80.
30955         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
30956         (SUFFIXES): Define.
30957         (.sed.in.sed): New rule.  Don't redirect directly to $@.
30958         (CLEANFILES): Add ref-add.sed and ref-del.sed.
30959
30960 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
30961
30962         * lib/config.charset: Output a line containing "Packages using this
30963         file".
30964         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
30965         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
30966         ref-del.sed): New rules.
30967
30968 2000-03-17  Jim Meyering  <meyering@lucent.com>
30969
30970         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
30971         Otherwise, include <strings.h>
30972
30973 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
30974
30975         * lib/unicodeio.c (utf8_wctomb): New function.
30976         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
30977         format instead of in UCS-4 with platform dependent endianness.
30978
30979 2000-03-10  Jim Meyering  <meyering@lucent.com>
30980
30981         * m4/lib-check.m4: Look for getspnam in -lgen, too.
30982         From Marco Franzen.
30983
30984 2000-03-07  Paul Eggert  <eggert@twinsun.com>
30985
30986         * lib/savedir.c (savedir): Work even if directory size is
30987         negative; this can happen with some screwy NFS configurations.
30988
30989 2000-03-06  Jim Meyering  <meyering@lucent.com>
30990
30991         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
30992         if it's NULL (because we ran out of memory).  From Bruno Haible.
30993
30994 2000-03-05  Jim Meyering  <meyering@lucent.com>
30995
30996         * lib/localcharset.c ("path-concat.h"): Include.
30997         (get_charset_aliases): Use path_concat instead of ANSI string
30998         concatenation.
30999
31000         * lib/unicodeio.h (PARAMS): Define.
31001         Use it to guard prototype.
31002
31003 2000-03-04  Jim Meyering  <meyering@lucent.com>
31004
31005         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31006         for lib/localcharset.c.
31007
31008 2000-03-04  Jim Meyering  <meyering@lucent.com>
31009
31010         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31011         installing into it.
31012         (uninstall-local): Uncomment this rule so `make distcheck' works
31013         once again.
31014
31015         * lib/unicodeio.c (<errno.h>): Include it.
31016         (errno): Declare if not defined.
31017
31018         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31019
31020         * lib/config.charset: New version, incorporating remarks from a linux
31021         i18n mailing list.  From Bruno Haible.
31022
31023 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31024
31025         * m4/codeset.m4: New file.
31026         * m4/iconv.m4: New file.
31027         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31028
31029 2000-03-03  Jim Meyering  <meyering@lucent.com>
31030
31031         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31032
31033 2000-03-02  Jim Meyering  <meyering@lucent.com>
31034
31035         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31036         the messages come out on separate lines.
31037
31038         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31039         rather than jm_CHECK_DECLARATIONS.
31040         * m4/decl.m4: Remove now-unused file.
31041
31042         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31043         geteuid.
31044
31045 2000-03-02  Jim Meyering  <meyering@lucent.com>
31046
31047         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31048
31049 2000-03-01  Jim Meyering  <meyering@lucent.com>
31050
31051         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31052         * lib/unicodeio.c: Likewise.
31053
31054 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31055
31056         * lib/config.charset: New file.
31057         * lib/localcharset.c: New file.
31058         * lib/unicodeio.h, lib/unicodeio.c: New files.
31059         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31060         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31061         (noinst_HEADERS): Add unicodeio.h.
31062         (all-local, install-exec-local, charset.alias): New targets.
31063
31064 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31065
31066         * lib/quotearg.c (ALERT_CHAR): New macro.
31067         (quotearg_buffer_restyled): Use it.
31068
31069 2000-02-27  Jim Meyering  <meyering@lucent.com>
31070
31071         * m4/check-decl.m4: Add getenv to the list.
31072
31073 2000-02-27  Jim Meyering  <meyering@lucent.com>
31074
31075         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31076         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31077
31078         * lib/backupfile.c: Guard inclusion of stdlib.h with
31079         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31080         Declare malloc if needed.
31081
31082         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31083         `#ifndef HAVE_DECL..'
31084         now that autoconf always defines the HAVE_DECL_ symbols.
31085         * lib/human.c: Likewise.
31086         * lib/same.c: Likewise.
31087         * lib/strtoumax.c: Likewise.
31088
31089         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31090         declaration check was not run.
31091         * lib/hash.c: Likewise.
31092         * lib/human.c: Likewise.
31093         * lib/same.c: Likewise.
31094         * lib/strtoumax.c: Likewise.
31095
31096         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31097         `.', then first look up the entire `.'-containing string as a login
31098         name.
31099
31100 2000-02-23  Jim Meyering  <meyering@lucent.com>
31101
31102         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31103         in place of my hack.
31104
31105 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31106
31107         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31108         (textint): New typedef.
31109         (parser_control): Member year changed from int to textint.
31110         All uses changed.
31111         (YYSTYPE): Removed; replaced by %union with int and textint members.
31112         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31113         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31114         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31115         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31116         (date, number, to_year): Use width of number in digits, not its value,
31117         to determine whether it's a 2-digit year, or a 2-digit time.
31118         (yylex): Store number of digits of numeric tokens.
31119         Reported by John Kendall.
31120
31121         (parser_control): Changed from struct parser_control to typedef (for
31122         consistency).  All uses changed.
31123
31124         (tID): Removed; not used.
31125         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31126
31127 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31128
31129         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31130         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31131
31132 2000-02-12  Jim Meyering  <meyering@lucent.com>
31133
31134         * lib/userspec.c (ISDIGIT): Define it.
31135         (isdigit): Remove definition.
31136         (is_number): Use ISDIGIT, not isdigit.
31137         <libintl.h>: Include.
31138         (_ and N_): Define.
31139         (parse_user_spec): Mark translatable strings.
31140
31141 2000-02-10  Jim Meyering  <meyering@lucent.com>
31142
31143         With these changes, nanosleep.[ch] are finally enough like the other
31144         lib/* replacement files to compile on a few more losing systems.
31145
31146         * lib/nanosleep.h: Don't include config.h.
31147         Remove prototype from declaration of nanosleep.
31148         (PARAMS): Remove now-unneeded definition.
31149         * lib/nanosleep.c: #undef nanosleep.
31150         (rpl_nanosleep): Rename from nanosleep.
31151
31152 2000-02-10  Jim Meyering  <meyering@lucent.com>
31153
31154         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31155         gnu_nanosleep to rpl_nanosleep.
31156
31157 2000-02-09  Jim Meyering  <meyering@lucent.com>
31158
31159         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31160         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31161
31162 2000-02-08  Akim Demaille  <akim@epita.fr>
31163
31164         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31165         `[' and `]' and remove uses of `changequote'.
31166         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31167         (AC_SYS_LARGEFILE): Likewise.
31168         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31169         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31170         of changequote.
31171         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31172         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31173         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31174         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31175
31176 2000-02-05  Jim Meyering  <meyering@lucent.com>
31177
31178         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31179         Remove explicit use of AC_HEADER_TIME.  It is required by
31180         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31181         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31182         in autoconf whereby the expansion of the latter ended up preceding
31183         the expansion of its prerequisite, AC_HEADER_TIME.
31184         Reported by Volker Borchert.
31185
31186 2000-02-03  Jim Meyering  <meyering@lucent.com>
31187
31188         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31189
31190 2000-02-03  Jim Meyering  <meyering@lucent.com>
31191
31192         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31193         rather than with `#if HAVE_UTMPNAME'.
31194
31195 2000-02-02  Jim Meyering  <meyering@lucent.com>
31196
31197         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31198         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31199         Reported by Eli Zaretskii.
31200
31201 2000-02-01  Jim Meyering  <meyering@lucent.com>
31202
31203         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31204
31205 2000-01-31  Jim Meyering  <meyering@lucent.com>
31206
31207         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31208         functions.  Add the time.h and sys/time.h headers along with the
31209         AC_REQUIRE'ment of AC_HEADER_TIME.
31210
31211 2000-01-31  Jim Meyering  <meyering@lucent.com>
31212
31213         * lib/nanosleep.h (nanosleep): Guard declaration with
31214         `#if ! HAVE_DECL_NANOSLEEP'.
31215         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31216         the declaration in that vendor's sys/timers.h.
31217         Reported by Christian Krackowizer.
31218
31219         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31220         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31221         (ISPRINT): Likewise.
31222         Reported by Tom Tromey.
31223
31224 2000-01-30  Jim Meyering  <meyering@lucent.com>
31225
31226         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31227
31228         * m4/prereq.m4 (utmp_includes): Define.
31229         Check for ut_user and ut_name members in both struct utmpx
31230         and struct utmp.
31231
31232 2000-01-30  Jim Meyering  <meyering@lucent.com>
31233
31234         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31235         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31236         header files where only utmpx.ut_user is declared.
31237
31238         * lib/readutmp.h (UT_USER): Define.
31239
31240 2000-01-29  Jim Meyering  <meyering@lucent.com>
31241
31242         * m4/lib-check.m4: New file containing library-related checks from
31243         fileutils and sh-utils (textutils had none).
31244
31245 2000-01-28  Jim Meyering  <meyering@lucent.com>
31246
31247         * m4/perl.m4: Change format of warning message to look more like that
31248         from the missing script.  Suggestion from François Pinard.
31249
31250 2000-01-25  Jim Meyering  <meyering@lucent.com>
31251
31252         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31253         well as time.h in the compile check.
31254         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31255         Fix typo in cross-compiling case: s/yes/no/.
31256
31257 2000-01-23  Jim Meyering  <meyering@lucent.com>
31258
31259         * m4/jm-macros.m4: Move df-related tests here from
31260         fileutils/configure.in
31261
31262         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31263         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31264
31265         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31266         s/space/ac_fsusage_space/.
31267         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31268
31269         * m4/ftruncate.m4: New file (derived from part of
31270         fileutils/configure.in).
31271         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31272         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31273
31274         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31275         AC_SUBST these here, rather than just in sh-util/configure.in, so
31276         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31277         all the same.
31278         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31279         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31280         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31281         (AC_SUBST(POW_LIBM)): Likewise.
31282         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31283
31284 2000-01-23  Jim Meyering  <meyering@lucent.com>
31285
31286         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
31287         obstack.c.
31288
31289 2000-01-22  Jim Meyering  <meyering@lucent.com>
31290
31291         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
31292
31293         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
31294
31295         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
31296         configure.in
31297         (AC_CHECK_HEADERS): Likewise for sh-utils.
31298         (AC_CHECK_HEADERS): Likewise for textutils.
31299         Merge the three lists of headers.
31300
31301         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
31302         from fileutils' configure.in.
31303
31304         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
31305         code. Moved tests into their own function (_jm_DECL_HEADERS) in
31306         check-decl.m4.
31307
31308         * m4/check-decl.m4: Use #if rather than #ifdef.
31309         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
31310         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
31311         (_jm_DECL_HEADERS): Define new function.
31312         (jm_CHECK_DECLARATIONS): Require it.
31313
31314 2000-01-22  Jim Meyering  <meyering@lucent.com>
31315
31316         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
31317         [! HAVE_DECL_STRTOULL]: Declare strtoull.
31318         Required for some AIX systems.  Reported by Christian Krackowizer.
31319         [TESTING] (main): New function.
31320
31321         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
31322         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
31323         letters.
31324
31325         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
31326         iswprint.
31327
31328         * lib/strverscmp.c (ISDIGIT): Define.
31329         (strverscmp): Use ISDIGIT, not isdigit.
31330
31331 2000-01-19  Jim Meyering  <meyering@lucent.com>
31332
31333         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
31334         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
31335         defines `struct timespec' in <sys/time.h>
31336
31337         * m4/c-bs-a.m4: Remove uses of changequote altogether.
31338         Thanks to Akim for explaining.
31339
31340 2000-01-17  Paul Eggert  <eggert@twinsun.com>
31341
31342         * lib/nanosleep.c (nanosleep):
31343         Don't use SA_INTERRUPT to decide whether to call sigaction, as
31344         POSIX.1 doesn't require SA_INTERRUPT and some systems
31345         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
31346         it's been part of POSIX.1 since day 1 (in 1988).
31347
31348 2000-01-17  Jim Meyering  <meyering@lucent.com>
31349
31350         * lib/interlock: Remove unused file.  Reported by François Pinard.
31351
31352 2000-01-16  Paul Eggert  <eggert@twinsun.com>
31353
31354         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
31355         alert, backslash, formfeed, and vertical tab unnecessarily in
31356         shell quoting style.
31357
31358 2000-01-16  Jim Meyering  <meyering@lucent.com>
31359
31360         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
31361         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
31362         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
31363         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
31364
31365 2000-01-16  Jim Meyering  <meyering@lucent.com>
31366
31367         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
31368         because the latter didn't work.
31369
31370 2000-01-15  Jim Meyering  <meyering@lucent.com>
31371
31372         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
31373         (AC_REPLACE_FUNCS): Add memcpy and memset.
31374         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
31375         Add strpbrk.
31376         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
31377
31378 2000-01-12  Jim Meyering  <meyering@lucent.com>
31379
31380         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
31381         (jm_PREREQ): Use it.
31382         (jm_PREREQ_READUTMP): New macro.
31383         (jm_PREREQ): Use it.
31384
31385 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31386
31387         Quote multibyte characters correctly.
31388         * m4/c-bs-a.m4: New file.
31389         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
31390         (jm_PREREQ): Use it.
31391
31392 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31393
31394         * m4/uintmax_t.m4: Port to autoconf 2.13.
31395
31396 2000-01-08  Jim Meyering  <meyering@ascend.com>
31397
31398         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
31399         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
31400
31401 2000-01-04  Jim Meyering  <meyering@ascend.com>
31402
31403         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
31404         jm_STRUCT_DIRENT_D_TYPE.
31405         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
31406         jm_STRUCT_DIRENT_D_INO.
31407         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
31408         jm_STRUCT_UTIMBUF.
31409         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
31410         renamings.
31411         * m4/utime.m4: Likewise.
31412
31413         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
31414         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
31415
31416 2000-01-03  Paul Eggert  <eggert@twinsun.com>
31417
31418         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
31419         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
31420
31421 2000-01-02  Jim Meyering  <meyering@ascend.com>
31422
31423         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
31424         remember if this is necessary.
31425
31426 1999-12-26  Jim Meyering  <meyering@ascend.com>
31427
31428         * m4/jm-macros.m4: Use it here.
31429         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
31430
31431 1999-12-23  Jim Meyering  <meyering@ascend.com>
31432
31433         * m4/jm-macros.m4: Check for clock_gettime (moved from
31434         fileutils/configure.in)
31435         Check for gettimeofday.
31436
31437 1999-12-20  Jim Meyering  <meyering@ascend.com>
31438
31439         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
31440         autoconf-2.14a-1999-12-20.
31441
31442 1999-12-19  Jim Meyering  <meyering@ascend.com>
31443
31444         * m4/lstat-slash.m4: New file.
31445         * m4/jm-macros.m4: Use the new macro:
31446         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31447
31448 1999-12-07  Jim Meyering  <meyering@ascend.com>
31449
31450         * m4/perl.m4: Require that File::Compare be available, too.
31451         Too many systems seem to lack it.
31452
31453         * m4/strftime.m4: Add checks for most of the cpp macros tested in
31454         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
31455
31456 1999-11-18  Paul Eggert  <eggert@twinsun.com>
31457
31458         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
31459         problem with the QNX 4.25 shell, which doesn't propagate exit
31460         status of failed commands inside shell assignments.
31461
31462 1999-11-17  Jim Meyering  <meyering@ascend.com>
31463
31464         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
31465
31466 1999-11-07  Jim Meyering  <meyering@ascend.com>
31467
31468         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
31469
31470 1999-11-06  Jim Meyering  <meyering@ascend.com>
31471
31472         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
31473         * m4/jm-macros.m4 (jm_MACROS): Use it here.
31474
31475 1999-11-05  Jim Meyering  <meyering@ascend.com>
31476
31477         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
31478         configure.in of textutils, fileutils, and sh-utils into this one
31479         (shared between those packages) file.
31480         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
31481         AC_STRUCT_ST_BLKSIZE.
31482
31483 1999-11-03  Jim Meyering  <meyering@ascend.com>
31484
31485         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
31486         of AC_CHECK_TYPE checks includes unistd.h.
31487         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
31488         Suggestion from Akim Demaille.
31489
31490 1999-10-30  Jim Meyering  <meyering@ascend.com>
31491
31492         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
31493         m4-quoted string.
31494         * m4/ls-mntd-fs.m4: Likewise.
31495         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
31496         * m4/jm-winsz1.m4: Likewise.
31497
31498         * m4/const.m4: Remove file, since the fix made it into the experimental
31499         version of autoconf.
31500         * m4/mktime.m4: Likewise.
31501
31502         * m4/check-type.m4: Remove file, now that the latest version of
31503         AC_CHECK_TYPE takes a third arg to specify additional #includes.
31504
31505         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
31506         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
31507         AC_CHECK_TYPE.
31508
31509 1999-10-04  Jim Meyering  <meyering@ascend.com>
31510
31511         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
31512
31513 1999-09-22  Paul Eggert  <eggert@twinsun.com>
31514
31515         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
31516         2.95.1 bug with HP-UX 10.20.
31517
31518 1999-09-17  Jim Meyering  <meyering@ascend.com>
31519
31520         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
31521         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
31522         due to missing strdup (against sh-utils-2.0).
31523
31524 1999-08-29  Jim Meyering  <meyering@ascend.com>
31525
31526         * m4/jm-macros.m4: Require jm_BISON.
31527         * m4/bison.m4: New file.
31528
31529 1999-08-17  Paul Eggert  <eggert@twinsun.com>
31530
31531         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
31532         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
31533
31534 1999-08-05  Jim Meyering  <meyering@ascend.com>
31535
31536         * m4/getline.m4: Rename test file from conftestdata to conftest.data
31537         to avoid conflicts with `conftest' on 8+3 filesystems.
31538         Suggestion from Eli Zaretskii.
31539
31540 1999-08-04  Jim Meyering  <meyering@ascend.com>
31541
31542         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
31543         fileutils and sh-utils (textutils's getline test was inadequate).
31544         (AM_FUNC_GETLINE): Run this test.
31545         (AC_CHECK_FUNCS): Check for getdelim.
31546         Reported by Bob Proulx.
31547
31548 1999-08-02  Jim Meyering  <meyering@ascend.com>
31549
31550         * m4/jm-macros.m4: Add a comment.
31551
31552 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31553
31554         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
31555         <inttypes.h> defines strtoumax as a macro (and not as a
31556         function).
31557
31558 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31559
31560         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
31561         that we can shift, multiply and divide unsigned long long
31562         values; Ultrix cc can't do it.
31563
31564 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31565
31566         * m4/mktime.m4: New file, which is a preview of what should appear
31567         in the next public autoconf release.
31568
31569 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31570
31571         * m4/lfs.m4: Remove this file.
31572         * m4/largefile.m4: New file.  It contains the old contents of
31573         lfs.m4, except that all names with prefix AC_LFS have been
31574         changed to use the prefix AC_SYS_LARGEFILE instead, to be
31575         compatible with future autoconf versions.  Also, some minor m4
31576         quoting problems have been fixed.
31577
31578 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31579
31580         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
31581         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
31582         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
31583         and simplify the shell code.
31584
31585 1999-08-01  Jim Meyering  <meyering@ascend.com>
31586
31587         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
31588         m4.
31589
31590 1999-07-20  Jim Meyering  <meyering@ascend.com>
31591
31592         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
31593
31594 1999-07-15  Jim Meyering  <meyering@ascend.com>
31595
31596         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
31597
31598 1999-05-22  Jim Meyering  <meyering@ascend.com>
31599
31600         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
31601
31602 1999-05-20  Jim Meyering  <meyering@ascend.com>
31603
31604         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
31605         Add a colon after each `then' in case $4 is empty.
31606
31607 1999-05-16  Jim Meyering  <meyering@ascend.com>
31608
31609         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
31610
31611 1999-05-10  Jim Meyering  <meyering@ascend.com>
31612
31613         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
31614
31615         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
31616         AC_FUNC_MKTIME.
31617
31618 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
31619
31620         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
31621
31622 1999-05-04  Paul Eggert  <eggert@twinsun.com>
31623
31624         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
31625         not CPPFLAGS, so that linking works correctly in IRIX.
31626
31627 1999-04-30  Paul Eggert  <eggert@twinsun.com>
31628
31629         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
31630
31631 1999-04-20  Paul Eggert  <eggert@twinsun.com>
31632
31633         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
31634         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
31635         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
31636         jm_AC_TYPE_UNSIGNED_LONG_LONG.
31637         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
31638
31639         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
31640
31641 1999-04-20  Jim Meyering  <meyering@ascend.com>
31642
31643         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
31644         AC_REPLACE xstroull if necessary.  From Paul Eggert.
31645         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
31646
31647 1999-04-18  Jim Meyering  <meyering@ascend.com>
31648
31649         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
31650         * m4/jm-macros.m4: Use it.
31651
31652 1999-04-06  Jim Meyering  <meyering@ascend.com>
31653
31654         * m4/strftime.m4: Remove test for %f.
31655
31656 1999-03-29  Jim Meyering  <meyering@ascend.com>
31657
31658         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
31659         superset of the AC_TYPE_* checks in the textutils, fileutils,
31660         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
31661         AC_TYPE_PID_T.
31662
31663 1999-03-28  Jim Meyering  <meyering@ascend.com>
31664
31665         * m4/jm-macros.m4: Define GNU_PACKAGE here.
31666         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
31667         replaced e.g., in the *.sh files of the sh-utils.
31668
31669 1999-03-20  Jim Meyering  <meyering@ascend.com>
31670
31671         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
31672         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
31673         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
31674
31675 1999-03-19  Jim Meyering  <meyering@ascend.com>
31676
31677         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
31678
31679 1999-03-12  Jim Meyering  <meyering@ascend.com>
31680
31681         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
31682
31683 1999-03-07  Jim Meyering  <meyering@ascend.com>
31684
31685         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
31686         declared.
31687
31688 1999-02-17  Jim Meyering  <meyering@ascend.com>
31689
31690         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
31691         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
31692
31693 1999-02-07  Jim Meyering  <meyering@ascend.com>
31694
31695         * m4/group-member.m4: New file -- extracted from sh-utils'
31696         configure.in.
31697
31698         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
31699         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
31700
31701 1999-02-06  Jim Meyering  <meyering@ascend.com>
31702
31703         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
31704         * m4/fnmatch.m4: Likewise.
31705         * m4/getgroups.m4: Likewise.
31706         * m4/lstat.m4: Likewise.
31707         * m4/malloc.m4: Likewise.
31708         * m4/putenv.m4: Likewise.
31709         * m4/realloc.m4: Likewise.
31710         * m4/regex.m4: Likewise.
31711         * m4/stat.m4: Likewise.
31712         * m4/strftime.m4: Likewise.
31713         Suggestion from Alain Magloire.
31714
31715         * m4/chown.m4: Use `.$ac_objext', not `.o'.
31716         * m4/fnmatch.m4: Likewise.
31717         * m4/getgroups.m4: Likewise.
31718         * m4/getline.m4: Likewise.
31719         * m4/lstat.m4: Likewise.
31720         * m4/malloc.m4: Likewise.
31721         * m4/memcmp.m4: Likewise.
31722         * m4/putenv.m4: Likewise.
31723         * m4/realloc.m4: Likewise.
31724         * m4/regex.m4: Likewise.
31725         * m4/stat.m4: Likewise.
31726         * m4/strftime.m4: Likewise.
31727         Suggestion from Alain Magloire.
31728
31729         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
31730         an argument.
31731
31732         * m4/regex.m4: Add a run-time Test for proper operation of
31733         re_compile_pattern.
31734
31735 1999-01-31  Jim Meyering  <meyering@ascend.com>
31736
31737         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
31738
31739 1999-01-30  Jim Meyering  <meyering@ascend.com>
31740
31741         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
31742
31743         * m4/jm-mktime.m4: Make this a wrapper around the official
31744         AM_FUNC_MKTIME rather than my private copy, now that the official one
31745         is up to date.
31746         * m4/mktime.m4: Remove file.
31747
31748         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
31749         * m4/uptime.m4: Likewise.
31750         * m4/uintmax_t.m4: Likewise.
31751
31752 1999-01-28  Jim Meyering  <meyering@ascend.com>
31753
31754         * m4/jm-macros.m4: Use jm_AFS.
31755         * m4/afs.m4: New file (from fileutils' configure.in).
31756
31757         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
31758         * m4/chown.m4: Likewise.
31759         * m4/d-ino.m4: Likewise.
31760         * m4/d-type.m4: Likewise.
31761         * m4/fnmatch.m4: Likewise.
31762         * m4/getgroups.m4: Likewise.
31763         * m4/gettext.m4: Likewise.
31764         * m4/jm-mktime.m4: Likewise.
31765         * m4/jm-winsz2.m4: Likewise.
31766         * m4/lcmessage.m4: Likewise.
31767         * m4/ls-mntd-fs.m4: Likewise.
31768         * m4/malloc.m4: Likewise.
31769         * m4/memcmp.m4: Likewise.
31770         * m4/putenv.m4: Likewise.
31771         * m4/realloc.m4: Likewise.
31772         * m4/st_mtim.m4: Likewise.
31773         * m4/strftime.m4: Likewise.
31774
31775 1999-01-16  Jim Meyering  <meyering@ascend.com>
31776
31777         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
31778         (ARGMATCH_DIE_DECL): Define.
31779
31780 1999-01-12  Jim Meyering  <meyering@ascend.com>
31781
31782         * m4/Makefile.am.in: Rewrite to avoid using fmt.
31783         Reported by Lars Hecking.
31784
31785 1999-01-10  Jim Meyering  <meyering@ascend.com>
31786
31787         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
31788         gross kludge.
31789         * m4/inttypes_h.m4: Likewise.
31790         * m4/lstat.m4: Likewise.
31791         * m4/malloc.m4: Likewise.
31792         * m4/readdir.m4: Likewise.
31793         * m4/realloc.m4: Likewise.
31794         * m4/st_dm_mode.m4: Likewise.
31795         * m4/stat.m4: Likewise.
31796         * m4/utimbuf.m4: Likewise.
31797         * m4/utimes.m4: Likewise.
31798
31799         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
31800         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
31801         comments in config.h.in are meaningful.
31802
31803         * m4/jm-macros.m4: Require autoconf-2.13 here.
31804
31805         * m4/regex.m4: By default, don't use the included regex.c on systems
31806         with glibc 2.  Suggestion from Uli Drepper.
31807
31808 1999-01-02  Jim Meyering  <meyering@ascend.com>
31809
31810         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
31811
31812 1998-12-18  Jim Meyering  <meyering@ascend.com>
31813
31814         * m4/Makefile.am.in (Makefile.am): Simplify rule.
31815         Based on a suggestion from Lars Hecking.
31816
31817 1998-11-16  Paul Eggert  <eggert@twinsun.com>
31818
31819         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
31820
31821 1998-11-16  Jim Meyering  <meyering@ascend.com>
31822
31823         * m4/lfs.m4: Double-quote the `uname...` expression.
31824
31825 1998-11-14  Jim Meyering  <meyering@ascend.com>
31826
31827         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
31828         * m4/stat.m4: Likewise.
31829
31830 1998-11-03  Jim Meyering  <meyering@ascend.com>
31831
31832         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
31833         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
31834
31835 1998-10-18  Jim Meyering  <meyering@ascend.com>
31836
31837         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
31838
31839 1998-10-17  Jim Meyering  <meyering@ascend.com>
31840
31841         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
31842         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
31843         calls for those previously hard-coded headers.  Instead, take a new
31844         parameter.
31845         (jm_CHECK_DECLARATIONS): Reflect interface change.
31846         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
31847         (jm_CHECK_DECL_LOCALTIME_R): New macro.
31848
31849         * m4/mktime.m4: Test for spring-forward gap before long-running test.
31850
31851 1998-10-14  Jim Meyering  <meyering@ascend.com>
31852
31853         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
31854         instead of "TZ=America/Vancouver".  From Paul Eggert.
31855
31856 1998-10-11  Jim Meyering  <meyering@ascend.com>
31857
31858         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
31859         This adds a test for a recently added compatibility fix for mktime.c.
31860         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
31861
31862 1998-09-27  Jim Meyering  <meyering@ascend.com>
31863
31864         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
31865
31866         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
31867         ../configure.in, including a change from Gordon Matzigkeit to allow
31868         cross-compiling for the Hurd.
31869
31870         * m4/glibc.m4: New file/macro to test for the GNU C Library
31871         versions 1 and 2.  From Gordon Matzigkeit.
31872         Indent.
31873
31874 1998-09-21  Jim Meyering  <meyering@ascend.com>
31875
31876         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
31877
31878 1998-08-18  Paul Eggert  <eggert@twinsun.com>
31879
31880         Port nanosecond-resolution times to UnixWare 2.1.2 and
31881         pedantic Solaris 2.6.
31882
31883         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
31884         AC_STRUCT_ST_MTIM.
31885         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
31886         Generate name of ns member, instead of just 1 or undef.
31887         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
31888
31889 1998-08-15  Jim Meyering  <meyering@ascend.com>
31890
31891         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
31892         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
31893         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
31894         instead of jm_TYPE_SSIZE_T.
31895
31896 1998-08-12  Jim Meyering  <meyering@ascend.com>
31897
31898         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
31899
31900 1998-08-02  Jim Meyering  <meyering@ascend.com>
31901
31902         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
31903         in acconfig.h manually.
31904
31905 1998-07-31  Paul Eggert  <eggert@twinsun.com>
31906
31907         * m4/st_mtim.m4: New file.
31908
31909 1998-07-28  Jim Meyering  <meyering@ascend.com>
31910
31911         * m4/utimes.m4: Undef stat.
31912
31913 1998-07-25  Jim Meyering  <meyering@ascend.com>
31914
31915         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
31916         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
31917
31918 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
31919
31920         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
31921         uid and gid actually remain unchanged.
31922
31923 1998-07-07  Jim Meyering  <meyering@ascend.com>
31924
31925         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
31926
31927 1998-07-04  Jim Meyering  <meyering@ascend.com>
31928
31929         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
31930         to prove that this macro can be used in packages without regex.c.
31931
31932 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
31933
31934         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
31935         is to be used.
31936
31937 1998-07-03  Jim Meyering  <meyering@ascend.com>
31938
31939         * m4/gettext.m4: Add -lintl if it's found to be necessary.
31940
31941         * m4/gettext.m4: New file -- from gettext-0.10.35.
31942         * m4/lcmessage.m4: Likewise.
31943         * m4/progtest.m4: Likewise.
31944
31945         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
31946         * m4/jm-macros.m4: Require the new macro.
31947
31948 1998-06-29  Jim Meyering  <meyering@ascend.com>
31949
31950         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
31951         for the definition of NGROUPS (used in a system header included
31952         by sys/mount.h).
31953
31954 1998-06-28  Jim Meyering  <meyering@ascend.com>
31955
31956         * m4/ls-mntd-fs.m4: New file.
31957         * m4/fstypename.m4: New file.
31958
31959         * m4/jm-macros.m4: Require the new macro.
31960         * m4/jm-glibc-io.m4: New file.
31961
31962 1998-05-19  Jim Meyering  <meyering@ascend.com>
31963
31964         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
31965         * m4/lchown.m4: New file.
31966
31967         * m4/Makefile.am.in: New file.
31968         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
31969
31970 1998-05-14  Jim Meyering  <meyering@ascend.com>
31971
31972         * m4/Makefile.am (EXTRA_DIST): Add them.
31973         * m4/jm-macros.m4: New file.
31974         * m4/utimbuf.m4: New file.
31975
31976 1998-05-12  Jim Meyering  <meyering@ascend.com>
31977
31978         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
31979
31980 1998-05-11  Jim Meyering  <meyering@ascend.com>
31981
31982         * m4/isc-posix.m4: New file.
31983
31984 1998-05-10  Jim Meyering  <meyering@ascend.com>