Typo.
[pspp] / ChangeLog
1 2007-07-16  Bruno Haible  <bruno@clisp.org>
2
3         * modules/lseek (License): Use the synonymous term "LGPLv2+".
4         * modules/getdelim (License): Likewise.
5
6 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7
8         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
9         * modules/d-type (License): Likewise.
10         * modules/extensions (License): Likewise.
11         * modules/fnmatch (License): Likewise.
12         * modules/fseeko (License): Likewise.
13         * modules/getaddrinfo (License): Likewise.
14         * modules/getline (License): Likewise.
15         * modules/getlogin_r (License): Likewise.
16         * modules/getpass (License): Likewise.
17         * modules/gettimeofday (License): Likewise.
18         * modules/glob (License): Likewise.
19         * modules/inet_ntop (License): Likewise.
20         * modules/malloc (License): Likewise.
21         * modules/malloca (License): Likewise.
22         * modules/memmem (License): Likewise.
23         * modules/mempcpy (License): Likewise.
24         * modules/memset (License): Likewise.
25         * modules/minmax (License): Likewise.
26         * modules/mktime (License): Likewise.
27         * modules/netinet_in (License): Likewise.
28         * modules/pathmax (License): Likewise.
29         * modules/poll (License): Likewise.
30         * modules/regex (License): Likewise.
31         * modules/snprintf (License): Likewise.
32         * modules/stdbool (License): Likewise.
33         * modules/stdint (License): Likewise.
34         * modules/stdio (License): Likewise.
35         * modules/strcase (License): Likewise.
36         * modules/strcasestr (License): Likewise.
37         * modules/strdup (License): Likewise.
38         * modules/string (License): Likewise.
39         * modules/strndup (License): Likewise.
40         * modules/strnlen (License): Likewise.
41         * modules/strpbrk (License): Likewise.
42         * modules/strptime (License): Likewise.
43         * modules/strsep (License): Likewise.
44         * modules/sys_select (License): Likewise.
45         * modules/sys_socket (License): Likewise.
46         * modules/sys_stat (License): Likewise.
47         * modules/sys_time (License): Likewise.
48         * modules/time (License): Likewise.
49         * modules/time_r (License): Likewise.
50         * modules/timegm (License): Likewise.
51         * modules/unistd (License): Likewise.
52         * modules/vsnprintf (License): Likewise.
53         * modules/wctype (License): Likewise.
54
55 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
56
57         * modules/argz (License): LGPLv2+.
58
59 2007-07-15  Karl Berry  <karl@gnu.org>
60
61         * doc/gnulib.texi: revise node structure per new fdl.texi.
62
63 2007-07-14  Bruno Haible  <bruno@clisp.org>
64
65         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
66         the output file.
67         * lib/uniname/uninames.h: Regenerated.
68
69 2007-07-14  Karl Berry  <karl@gnu.org>
70
71         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
72         omitting sectioning and index commands.
73
74 2007-07-13  Bruno Haible  <bruno@clisp.org>
75
76         New gnulib-tool option --more-symlinks.
77         * gnulib-tool (func_usage): Document --more-symlinks.
78         (do_copyrights): New variable.
79         Recognize option --more-symlinks.
80         (func_import): Don't add a copyright notice transform to
81         sed_transform_lib_file if do_copyrights is empty.
82
83 2007-07-13  Bruno Haible  <bruno@clisp.org>
84
85         * lib/vasnprintf.c (decimal_point_char): Define also if
86         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
87         && !NEED_PRINTF_DIRECTIVE_A.
88         Reported by Clemens Koller <clemens.koller@anagramm.de> via
89         Gary V. Vaughan <gary@gnu.org>.
90
91 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
92
93         * lib/inttypes_.h: Undo previous change, since it was fixed
94         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
95
96 2007-07-13  Bruno Haible  <bruno@clisp.org>
97
98         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
99         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
100
101 2007-07-13  Jim Meyering  <jim@meyering.net>
102
103         df: Don't fail for Tru64's "file-on-file mount".
104         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
105         so we fall through and use statfs instead.  Details here:
106         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
107         Reported by Albert Chin.
108
109 2007-07-13  Bruno Haible  <bruno@clisp.org>
110
111         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
112         * modules/configmake (License): Likewise.
113         * modules/gettext (License): Likewise.
114         * modules/gettext-h (License): Likewise.
115         * modules/include_next (License): Likewise.
116         * modules/link-warning (License): Likewise.
117         * modules/localcharset (License): Likewise.
118         * modules/localename (License): Likewise.
119         * modules/lock (License): Likewise.
120         * modules/relocatable-lib-lgpl (License): Likewise.
121         * modules/size_max (License): Likewise.
122         * modules/vasnprintf (License): Likewise.
123         * modules/wchar (License): Likewise.
124         * modules/xsize (License): Likewise.
125
126 2007-07-13  Bruno Haible  <bruno@clisp.org>
127
128         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
129         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
130
131 2007-07-12  Bruno Haible  <bruno@clisp.org>
132
133         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
134         in the modules files.
135
136 2007-07-11  Karl Berry  <karl@gnu.org>
137
138         * MODULES.html.sh (func_module): use
139          sed -e '\|^'"${includefile}"'$|d'
140          instead of /.../d, to avoid errors on $includefile's containing /.
141
142 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
143
144         * gnulib-tool (func_import): Avoid duplication of --avoid
145         statements
146         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
147         names to `_' in variable names.
148
149 2007-07-10  Eric Blake  <ebb9@byu.net>
150
151         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
152         * NEWS: Document this change.
153
154 2007-07-08  Bruno Haible  <bruno@clisp.org>
155
156         Update to Unicode 5.0.
157         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
158         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
159         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
160         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
161         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
162         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
163         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
164         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
165         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
166         U+10A3F, U+1D242..U+1D244.
167         (nonspacing_table_ind): Update.
168         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
169         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
170
171 2007-07-08  Bruno Haible  <bruno@clisp.org>
172
173         Update to Unicode 5.0.
174         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
175         code transform. Extend the name index field of unicode_name_to_code and
176         unicode_code_to_name from 16 to 24 bits.
177         * lib/uniname/uniname.c (unicode_character_name,
178         unicode_name_character): Add the range 0x12xxx to the code transform.
179         * lib/uniname/uninames.h: Regenerated.
180         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
181
182 2007-07-07  Bruno Haible  <bruno@clisp.org>
183
184         * modules/wcwidth-tests: New file.
185         * tests/test-wcwidth.c: New file.
186
187         Work around MacOS X wcwidth() bug.
188         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
189         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
190         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
191         original wcwidth in non-UTF-8 locales.
192         * modules/wcwidth (Depends-on): Add localcharset, streq,
193         uniwidth/width.
194         * doc/functions/wcwidth.texi: Update.
195
196 2007-07-07  Bruno Haible  <bruno@clisp.org>
197
198         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
199         (wcwidth): New declaration.
200         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
201         macros.
202         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
203         here. Prepare for creating <wchar.h> unconditionally.
204         * modules/wchar (Depends-on): Add link-warning.
205         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
206         REPLACE_WCWIDTH, and GL_LINK_WARNING.
207         * lib/wcwidth.h: Remove file.
208         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
209         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
210         * modules/wcwidth (Files): Remove lib/wcwidth.h.
211         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
212         (Include): Replace wcwidth.h with <wchar.h>.
213         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
214         * lib/mbchar.h: Don't include wcwidth.h.
215         * lib/mbswidth.c: Likewise.
216         * NEWS: Mention the change.
217
218 2007-07-07  Bruno Haible  <bruno@clisp.org>
219
220         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
221         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
222         definition with an external declaration.
223         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
224         defined as a function. Remove AC_C_INLINE requirement.
225         * modules/wcwidth (Files): Add lib/wcwidth.c.
226         (Makefile.am): Remove redundant statement.
227
228 2007-07-07  Bruno Haible  <bruno@clisp.org>
229
230         * MODULES.html.sh (Unicode string functions): Add the new modules.
231
232         * tests/uniwidth/test-u32-strwidth.c: New file.
233         * modules/uniwidth/u32-strwidth-tests: New file.
234
235         * lib/uniwidth/u32-strwidth.c: New file.
236         * modules/uniwidth/u32-strwidth: New file.
237
238         * tests/uniwidth/test-u16-strwidth.c: New file.
239         * modules/uniwidth/u16-strwidth-tests: New file.
240
241         * lib/uniwidth/u16-strwidth.c: New file.
242         * modules/uniwidth/u16-strwidth: New file.
243
244         * tests/uniwidth/test-u8-strwidth.c: New file.
245         * modules/uniwidth/u8-strwidth-tests: New file.
246
247         * lib/uniwidth/u8-strwidth.c: New file.
248         * modules/uniwidth/u8-strwidth: New file.
249
250         * tests/uniwidth/test-u32-width.c: New file.
251         * modules/uniwidth/u32-width-tests: New file.
252
253         * lib/uniwidth/u32-width.c: New file.
254         * modules/uniwidth/u32-width: New file.
255
256         * tests/uniwidth/test-u16-width.c: New file.
257         * modules/uniwidth/u16-width-tests: New file.
258
259         * lib/uniwidth/u16-width.c: New file.
260         * modules/uniwidth/u16-width: New file.
261
262         * tests/uniwidth/test-u8-width.c: New file.
263         * modules/uniwidth/u8-width-tests: New file.
264
265         * lib/uniwidth/u8-width.c: New file.
266         * modules/uniwidth/u8-width: New file.
267
268         * tests/uniwidth/test-uc_width.c: New file.
269         * modules/uniwidth/width-tests: New file.
270
271         * lib/uniwidth/width.c: New file, from GNU libiconv.
272         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
273         * modules/uniwidth/width: New file.
274
275         * lib/uniwidth.h: New file, from GNU libiconv.
276         * modules/uniwidth/base: New file.
277
278 2007-07-07  Bruno Haible  <bruno@clisp.org>
279
280         * lib/uniname.h: New file, from GNU gettext.
281         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
282         * lib/uniname/uninames.h: New file, from GNU gettext.
283         * lib/uniname/uniname.c: New file, from GNU gettext.
284         * tests/uniname/test-uninames.sh: New file.
285         * tests/uniname/test-uninames.c: New file, from GNU gettext.
286         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
287         * modules/uniname/base: New file.
288         * modules/uniname/uniname: New file.
289         * modules/uniname/uniname-tests: New file.
290         * MODULES.html.sh (Unicode string functions): Add the new modules.
291
292 2007-07-06  Bruno Haible  <bruno@clisp.org>
293
294         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
295
296 2007-07-06  Bruno Haible  <bruno@clisp.org>
297
298         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
299         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
300         includes <cygwin/sys_time.h> which includes <sys/select.h> which
301         include <sys/time.h>.
302         Reported by Eric Blake.
303
304 2007-07-06  Eric Blake  <ebb9@byu.net>
305
306         Fix testing canonicalize on cygwin.
307         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
308         Revert patch from 2007-06-19.
309         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
310         canonicalize module is also in use.
311         * tests/test-canonicalize.c: New file.
312         * tests/test-canonicalize.sh: Likewise.
313         * modules/canonicalize-tests: Likewise.
314
315 2007-07-06  Jim Meyering  <jim@meyering.net>
316
317         * lib/getugroups.c (getugroups): Detect getgrent failure.
318         Adjust comment to reflect reality: this function may return -1.
319
320 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
321
322         * build-aux/bootstrap (TP_URL,get_translations): Update to use
323         the new TP address.
324         (usage): Fix typo
325         (gnulib_mk): New variable.
326
327 2007-07-05  Jim Meyering  <jim@meyering.net>
328
329         Don't let endgrent clobber errno, no matter how improbable.
330         * lib/getugroups.c (getugroups): Save and restore errno around
331         endgrent call.
332
333         Close the group DB even when failing with 2^31 or more members.
334         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
335
336 2007-07-04  Jim Meyering  <jim@meyering.net>
337
338         * lib/getugroups.h: New file.
339         * lib/getugroups.c: Include "getugroups.h".
340         Remove uses of "register" keyword.
341         Move local variable, "cp", down into scope where used.
342         Give "username" parameter the "const" attribute.
343         * modules/getugroups (Files): Add lib/getugroups.h
344
345 2007-07-04  Karl Berry  <karl@gnu.org>
346
347         * MODULES.html.sh (func_all_modules): Complete rename of
348         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
349
350 2007-07-02  Bruno Haible  <bruno@clisp.org>
351
352         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
353         mode, when inttypes.h comes from gnulib.
354         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
355
356 2007-07-02  Simon Josefsson  <simon@josefsson.org>
357
358         * NEWS: Mention lgpl module name change.
359
360         * modules/lgpl-2.1: Renamed from lgpl.
361
362         * NEWS: Mention gpl module name change.
363
364         * modules/gpl-3.0: New file, based on gpl-2.0.
365
366         * modules/gpl-2.0: Renamed from gpl.
367
368         * modules/gpl: Fix filename, doc/gpl.texi is now found at
369         doc/gpl-2.0.texi.
370
371 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
372
373         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
374         #define __STDC_LIMIT_MACROS temporarily while including
375         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
376         Problem reported by Joel E. Denny in
377         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
378
379 2007-07-01  Bruno Haible  <bruno@clisp.org>
380
381         * lib/unistdio.h: New file.
382         * lib/unistdio/u-asnprintf.h: New file.
383         * lib/unistdio/u-asprintf.h: New file.
384         * lib/unistdio/u-printf-args.c: New file.
385         * lib/unistdio/u-printf-args.h: New file.
386         * lib/unistdio/u-printf-parse.h: New file.
387         * lib/unistdio/u-snprintf.h: New file.
388         * lib/unistdio/u-sprintf.h: New file.
389         * lib/unistdio/u-vasprintf.h: New file.
390         * lib/unistdio/u-vsnprintf.h: New file.
391         * lib/unistdio/u-vsprintf.h: New file.
392         * lib/unistdio/ulc-asnprintf.c: New file.
393         * lib/unistdio/ulc-asprintf.c: New file.
394         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
395         * lib/unistdio/ulc-printf-parse.c: New file.
396         * lib/unistdio/ulc-snprintf.c: New file.
397         * lib/unistdio/ulc-sprintf.c: New file.
398         * lib/unistdio/ulc-vasnprintf.c: New file.
399         * lib/unistdio/ulc-vasprintf.c: New file.
400         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
401         * lib/unistdio/ulc-vsnprintf.c: New file.
402         * lib/unistdio/ulc-vsprintf.c: New file.
403         * lib/unistdio/u8-asnprintf.c: New file.
404         * lib/unistdio/u8-asprintf.c: New file.
405         * lib/unistdio/u8-printf-parse.c: New file.
406         * lib/unistdio/u8-snprintf.c: New file.
407         * lib/unistdio/u8-sprintf.c: New file.
408         * lib/unistdio/u8-vasnprintf.c: New file.
409         * lib/unistdio/u8-vasprintf.c: New file.
410         * lib/unistdio/u8-vsnprintf.c: New file.
411         * lib/unistdio/u8-vsprintf.c: New file.
412         * lib/unistdio/u8-u8-asnprintf.c: New file.
413         * lib/unistdio/u8-u8-asprintf.c: New file.
414         * lib/unistdio/u8-u8-snprintf.c: New file.
415         * lib/unistdio/u8-u8-sprintf.c: New file.
416         * lib/unistdio/u8-u8-vasnprintf.c: New file.
417         * lib/unistdio/u8-u8-vasprintf.c: New file.
418         * lib/unistdio/u8-u8-vsnprintf.c: New file.
419         * lib/unistdio/u8-u8-vsprintf.c: New file.
420         * lib/unistdio/u16-asnprintf.c: New file.
421         * lib/unistdio/u16-asprintf.c: New file.
422         * lib/unistdio/u16-printf-parse.c: New file.
423         * lib/unistdio/u16-snprintf.c: New file.
424         * lib/unistdio/u16-sprintf.c: New file.
425         * lib/unistdio/u16-vasnprintf.c: New file.
426         * lib/unistdio/u16-vasprintf.c: New file.
427         * lib/unistdio/u16-vsnprintf.c: New file.
428         * lib/unistdio/u16-vsprintf.c: New file.
429         * lib/unistdio/u16-u16-asnprintf.c: New file.
430         * lib/unistdio/u16-u16-asprintf.c: New file.
431         * lib/unistdio/u16-u16-snprintf.c: New file.
432         * lib/unistdio/u16-u16-sprintf.c: New file.
433         * lib/unistdio/u16-u16-vasnprintf.c: New file.
434         * lib/unistdio/u16-u16-vasprintf.c: New file.
435         * lib/unistdio/u16-u16-vsnprintf.c: New file.
436         * lib/unistdio/u16-u16-vsprintf.c: New file.
437         * lib/unistdio/u32-asnprintf.c: New file.
438         * lib/unistdio/u32-asprintf.c: New file.
439         * lib/unistdio/u32-printf-parse.c: New file.
440         * lib/unistdio/u32-snprintf.c: New file.
441         * lib/unistdio/u32-sprintf.c: New file.
442         * lib/unistdio/u32-vasnprintf.c: New file.
443         * lib/unistdio/u32-vasprintf.c: New file.
444         * lib/unistdio/u32-vsnprintf.c: New file.
445         * lib/unistdio/u32-vsprintf.c: New file.
446         * lib/unistdio/u32-u32-asnprintf.c: New file.
447         * lib/unistdio/u32-u32-asprintf.c: New file.
448         * lib/unistdio/u32-u32-snprintf.c: New file.
449         * lib/unistdio/u32-u32-sprintf.c: New file.
450         * lib/unistdio/u32-u32-vasnprintf.c: New file.
451         * lib/unistdio/u32-u32-vasprintf.c: New file.
452         * lib/unistdio/u32-u32-vsnprintf.c: New file.
453         * lib/unistdio/u32-u32-vsprintf.c: New file.
454         * tests/unistdio/test-ulc-asnprintf1.c: New file.
455         * tests/unistdio/test-ulc-asnprintf1.h: New file.
456         * tests/unistdio/test-ulc-printf1.h: New file.
457         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
458         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
459         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
460         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
461         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
462         * tests/unistdio/test-ulc-vasprintf1.c: New file.
463         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
464         * tests/unistdio/test-ulc-vsprintf1.c: New file.
465         * tests/unistdio/test-u8-asnprintf1.c: New file.
466         * tests/unistdio/test-u8-asnprintf1.h: New file.
467         * tests/unistdio/test-u8-printf1.h: New file.
468         * tests/unistdio/test-u8-vasnprintf1.c: New file.
469         * tests/unistdio/test-u8-vasnprintf2.c: New file.
470         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
471         * tests/unistdio/test-u8-vasnprintf3.c: New file.
472         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
473         * tests/unistdio/test-u8-vasprintf1.c: New file.
474         * tests/unistdio/test-u8-vsnprintf1.c: New file.
475         * tests/unistdio/test-u8-vsprintf1.c: New file.
476         * tests/unistdio/test-u16-asnprintf1.c: New file.
477         * tests/unistdio/test-u16-asnprintf1.h: New file.
478         * tests/unistdio/test-u16-printf1.h: New file.
479         * tests/unistdio/test-u16-vasnprintf1.c: New file.
480         * tests/unistdio/test-u16-vasnprintf2.c: New file.
481         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
482         * tests/unistdio/test-u16-vasnprintf3.c: New file.
483         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
484         * tests/unistdio/test-u16-vasprintf1.c: New file.
485         * tests/unistdio/test-u16-vsnprintf1.c: New file.
486         * tests/unistdio/test-u16-vsprintf1.c: New file.
487         * tests/unistdio/test-u32-asnprintf1.c: New file.
488         * tests/unistdio/test-u32-asnprintf1.h: New file.
489         * tests/unistdio/test-u32-printf1.h: New file.
490         * tests/unistdio/test-u32-vasnprintf1.c: New file.
491         * tests/unistdio/test-u32-vasnprintf2.c: New file.
492         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
493         * tests/unistdio/test-u32-vasnprintf3.c: New file.
494         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
495         * tests/unistdio/test-u32-vasprintf1.c: New file.
496         * tests/unistdio/test-u32-vsnprintf1.c: New file.
497         * tests/unistdio/test-u32-vsprintf1.c: New file.
498         * modules/unistdio/base: New file.
499         * modules/unistdio/u-printf-args: New file.
500         * modules/unistdio/ulc-asnprintf: New file.
501         * modules/unistdio/ulc-asprintf: New file.
502         * modules/unistdio/ulc-fprintf: New file.
503         * modules/unistdio/ulc-printf-parse: New file.
504         * modules/unistdio/ulc-snprintf: New file.
505         * modules/unistdio/ulc-sprintf: New file.
506         * modules/unistdio/ulc-vasnprintf: New file.
507         * modules/unistdio/ulc-vasprintf: New file.
508         * modules/unistdio/ulc-vfprintf: New file.
509         * modules/unistdio/ulc-vsnprintf: New file.
510         * modules/unistdio/ulc-vsprintf: New file.
511         * modules/unistdio/u8-asnprintf: New file.
512         * modules/unistdio/u8-asprintf: New file.
513         * modules/unistdio/u8-printf-parse: New file.
514         * modules/unistdio/u8-snprintf: New file.
515         * modules/unistdio/u8-sprintf: New file.
516         * modules/unistdio/u8-vasnprintf: New file.
517         * modules/unistdio/u8-vasprintf: New file.
518         * modules/unistdio/u8-vsnprintf: New file.
519         * modules/unistdio/u8-vsprintf: New file.
520         * modules/unistdio/u8-u8-asnprintf: New file.
521         * modules/unistdio/u8-u8-asprintf: New file.
522         * modules/unistdio/u8-u8-snprintf: New file.
523         * modules/unistdio/u8-u8-sprintf: New file.
524         * modules/unistdio/u8-u8-vasnprintf: New file.
525         * modules/unistdio/u8-u8-vasprintf: New file.
526         * modules/unistdio/u8-u8-vsnprintf: New file.
527         * modules/unistdio/u8-u8-vsprintf: New file.
528         * modules/unistdio/u16-asnprintf: New file.
529         * modules/unistdio/u16-asprintf: New file.
530         * modules/unistdio/u16-printf-parse: New file.
531         * modules/unistdio/u16-snprintf: New file.
532         * modules/unistdio/u16-sprintf: New file.
533         * modules/unistdio/u16-vasnprintf: New file.
534         * modules/unistdio/u16-vasprintf: New file.
535         * modules/unistdio/u16-vsnprintf: New file.
536         * modules/unistdio/u16-vsprintf: New file.
537         * modules/unistdio/u16-u16-asnprintf: New file.
538         * modules/unistdio/u16-u16-asprintf: New file.
539         * modules/unistdio/u16-u16-snprintf: New file.
540         * modules/unistdio/u16-u16-sprintf: New file.
541         * modules/unistdio/u16-u16-vasnprintf: New file.
542         * modules/unistdio/u16-u16-vasprintf: New file.
543         * modules/unistdio/u16-u16-vsnprintf: New file.
544         * modules/unistdio/u16-u16-vsprintf: New file.
545         * modules/unistdio/u32-asnprintf: New file.
546         * modules/unistdio/u32-asprintf: New file.
547         * modules/unistdio/u32-printf-parse: New file.
548         * modules/unistdio/u32-snprintf: New file.
549         * modules/unistdio/u32-sprintf: New file.
550         * modules/unistdio/u32-vasnprintf: New file.
551         * modules/unistdio/u32-vasprintf: New file.
552         * modules/unistdio/u32-vsnprintf: New file.
553         * modules/unistdio/u32-vsprintf: New file.
554         * modules/unistdio/u32-u32-asnprintf: New file.
555         * modules/unistdio/u32-u32-asprintf: New file.
556         * modules/unistdio/u32-u32-snprintf: New file.
557         * modules/unistdio/u32-u32-sprintf: New file.
558         * modules/unistdio/u32-u32-vasnprintf: New file.
559         * modules/unistdio/u32-u32-vasprintf: New file.
560         * modules/unistdio/u32-u32-vsnprintf: New file.
561         * modules/unistdio/u32-u32-vsprintf: New file.
562         * modules/unistdio/ulc-asnprintf-tests: New file.
563         * modules/unistdio/ulc-vasnprintf-tests: New file.
564         * modules/unistdio/ulc-vasprintf-tests: New file.
565         * modules/unistdio/ulc-vsnprintf-tests: New file.
566         * modules/unistdio/ulc-vsprintf-tests: New file.
567         * modules/unistdio/u8-asnprintf-tests: New file.
568         * modules/unistdio/u8-vasnprintf-tests: New file.
569         * modules/unistdio/u8-vasprintf-tests: New file.
570         * modules/unistdio/u8-vsnprintf-tests: New file.
571         * modules/unistdio/u8-vsprintf-tests: New file.
572         * modules/unistdio/u16-asnprintf-tests: New file.
573         * modules/unistdio/u16-vasnprintf-tests: New file.
574         * modules/unistdio/u16-vasprintf-tests: New file.
575         * modules/unistdio/u16-vsnprintf-tests: New file.
576         * modules/unistdio/u16-vsprintf-tests: New file.
577         * modules/unistdio/u32-asnprintf-tests: New file.
578         * modules/unistdio/u32-vasnprintf-tests: New file.
579         * modules/unistdio/u32-vasprintf-tests: New file.
580         * modules/unistdio/u32-vsnprintf-tests: New file.
581         * modules/unistdio/u32-vsprintf-tests: New file.
582         * MODULES.html.sh (Unicode string functions): Add the new modules.
583
584 2007-07-01  Bruno Haible  <bruno@clisp.org>
585
586         * lib/sprintf.c (sprintf): Limit the available length estimation,
587         to avoid address wraparound.
588         * lib/vsprintf.c (vsprintf): Likewise.
589         * modules/sprintf-posix (Dependencies): Add stdint.
590         * modules/vsprintf-posix (Dependencies): Likewise.
591
592 2007-07-01  Bruno Haible <bruno@clisp.org>
593
594         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
595         Windows PATH as well. Conservative double-quoting. Comments.
596
597 2007-07-01  Bruno Haible <bruno@clisp.org>
598             Eric Blake  <ebb9@byu.net>
599             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
600
601         * gnulib-tool (self_abspathname): Fix algorithm to cope with
602         empty components in $PATH, denoting '.'.
603
604 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
605
606         * gnulib-tool: Fix indentation.
607         (func_create_megatestdir): Likewise.
608         Report by Bruno Haible.
609
610 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
611
612         Sync from Automake.
613         * build-aux/gnupload: Fix shell portability issues with for loops.
614         Report by Karl Berry.
615
616 2007-06-29  Simon Josefsson  <simon@josefsson.org>
617
618         * build-aux/maint.mk (POURL): Use translationproject.org.
619
620 2007-06-27  Simon Josefsson  <simon@josefsson.org>
621             Bruno Haible  <bruno@clisp.org>
622
623         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
624         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
625         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
626         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
627         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
628
629 2007-06-27  Bruno Haible  <bruno@clisp.org>
630
631         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
632         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
633
634 2007-06-26  Karl Berry  <karl@gnu.org>
635
636         * MODULES.html.sh: remove xreadlink-with-size.
637
638 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
639
640         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
641         method that I hope also handles the double-include problem noted
642         by Bruno Haible in
643         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
644
645 2007-06-23  Bruno Haible  <bruno@clisp.org>
646
647         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
648         Don't let the 'mostlyclean' target fail if the last subdirectory could
649         not be removed.
650         Reported by Karl Berry.
651
652 2007-06-23  Bruno Haible  <bruno@clisp.org>
653
654         * gnulib-tool (echo): Add a speedier workaround for ksh.
655         * tests/test-echo.sh: Likewise.
656
657 2007-06-23  Bruno Haible  <bruno@clisp.org>
658
659         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
660         * tests/test-echo.sh: Likewise.
661
662 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
663
664         * gnulib-tool (IFS): Initialize early, so we don't set it to
665         empty later.
666         (self_abspathname): Rewrite algorithm to set it, reindent.
667         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
668         (func_create_megatestdir): Merge some sed scripts.
669
670 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
671
672         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
673         exposed by Sun Studio 11 cc on Solaris 8.
674
675 2007-06-22  Bruno Haible  <bruno@clisp.org>
676
677         * gnulib-tool (echo): Ensure the echo primitive does not interpret
678         backslashes.
679         * tests/test-echo.sh: New file.
680
681 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
682
683         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
684         simplify `sed_replace_build_aux' scripts, they are portable but
685         echoing them with `echo' is not.
686         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
687
688 2007-06-21  Karl Berry  <karl@gnu.org>
689
690         * config/srclist.txt: guess we can't handle the licenses via
691         srclist at the moment.
692
693 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
694
695         * MODULES.html.sh: Add include_next.
696         * modules/include_next: New file.
697
698 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
699
700         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
701         INCLUDE_NEXT.
702         (gl_CHECK_NEXT_HEADERS): New macro.
703         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
704         the obsolescent gl_ABSOLUTE_HEADER.
705         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
706         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
707         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
708         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
709         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
710         * m4/math_h.m4 (gl_MATH_H): Likewise.
711         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
712         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
713         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
714         * m4/stdint.m4 (gl_STDINT_H): Likewise.
715         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
716         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
717         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
718         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
719         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
720         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
721         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
722         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
723         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
724         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
725         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
726         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
727         * m4/inttypes.m4 (gl_INTTYPES_H): Define
728         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
729         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
730         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
731         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
732         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
733         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
734         * lib/float_.h: Likewise.
735         * lib/inttypes_.h: Likewise.
736         * lib/math_.h: Likewise.
737         * lib/search_.h: Likewise.
738         * lib/signal_.h: Likewise.
739         * lib/stdint_.h: Likewise.
740         * lib/stdio_.h: Likewise.
741         * lib/stdlib_.h: Likewise.
742         * lib/string_.h: Likewise.
743         * lib/sys_stat_.h: Likewise.
744         * lib/sys_time_.h: Likewise.
745         * lib/time_.h: Likewise.
746         * lib/unistd_.h: Likewise.
747         * lib/wchar_.h: Likewise.
748         * lib/wctype_.h: Likewise.
749         * lib/dirent_.h: Likewise.
750         * lib/iconv_.h: Likewise.
751         * lib/locale_.h: Likewise.
752         * lib/netinet_in_.h: Likewise.
753         * lib/sys_select_.h: Likewise.
754         * lib/sys_socket_.h: Likewise.
755         * lib/sysexits_.h: Likewise.
756         * modules/fcntl (Depends-on): Depend on include_next, not
757         absolute_header.
758         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
759         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
760         * modules/fchdir: Likewise.
761         * modules/float: Likewise.
762         * modules/iconv_open: Likewise.
763         * modules/inttypes: Likewise.
764         * modules/locale: Likewise.
765         * modules/math: Likewise.
766         * modules/netinet_in: Likewise.
767         * modules/search: Likewise.
768         * modules/signal: Likewise.
769         * modules/stdint: Likewise.
770         * modules/stdio: Likewise.
771         * modules/stdlib: Likewise.
772         * modules/string: Likewise.
773         * modules/sys_select: Likewise.
774         * modules/sys_socket: Likewise.
775         * modules/sys_stat: Likewise.
776         * modules/sys_time: Likewise.
777         * modules/sysexits: Likewise.
778         * modules/time: Likewise.
779         * modules/unistd: Likewise.
780         * modules/wchar: Likewise.
781         * modules/wctype: Likewise.
782         * modules/sys_stat: Change maintainer to "all".
783         * modules/unistd: Likewise.
784
785 2007-06-20  Karl Berry  <karl@gnu.org>
786
787         * config/srclist.txt: track www changes in license files.
788
789 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
790
791         * build-aux/bootstrap: Remove stray dot.
792         Make sure build_aux settings are honored when linking
793         gnulib_extra_files.
794
795 2007-06-19  Eric Blake  <ebb9@byu.net>
796
797         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
798         Allow compilation on cygwin.
799
800 2007-06-19  Jim Meyering  <jim@meyering.net>
801
802         xreadlink-with-size: Remove module.  No longer used.
803         Ex-callers now use xreadlink or mreadlink-with-size.
804         * modules/xreadlink-with-size: Remove module.
805         * lib/xreadlink-with-size.c: Remove file.
806         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
807         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
808         just before the function definition *is* accurate.
809
810         Eliminate one way canonicalize_filename_mode could exit.
811         * lib/canonicalize.c (canonicalize_filename_mode):
812         Use mreadlink_with_size, not xreadlink_with_size.
813
814 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
815
816         Detect porting problems to FreeBSD/arm, which has time_t wider than
817         long int.  Original problem reported for GNU diff by Xin Li in
818         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
819         * modules/getdate (Depends-on): Add intprops, verify.
820         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
821         is an integer type no wider than long int.
822
823 2007-06-18  Jim Meyering  <jim@meyering.net>
824
825         New module: mreadlink-with-size.
826         * MODULES.html.sh: Add mreadlink-with-size.
827         * modules/mreadlink-with-size: New module
828         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
829         not xreadlink-with-size.
830         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
831
832 2007-06-16  Bruno Haible  <bruno@clisp.org>
833
834         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
835         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
836         Reported by Gary V. Vaughan <gary@gnu.org>.
837
838 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
839
840         Revamp lchown so that it lives in unistd.h where it belongs.
841         * lib/lchown.h: Remove.
842         * lib/dirchownmod.c: Don't include lib/lchown.h.
843         * lib/fchownat.c: Likewise.
844         * lib/openat.c: Likewise.
845         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
846         does not follow symlinks.
847         (EOPNOTSUPP): Define if not defined.
848         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
849         is defined to 0.
850         (lchown): New decl.
851         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
852         Do not check for lchown decl.
853         Set REPLACE_LCHOWN.
854         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
855         REPLACE_LCHOWN.
856         * modules/chown: Make it clear it follows symlinks.
857         * modules/lchown: Make it clear it doesn't follow symlinks.
858         (Files): Remove lib/lchown.h
859         (Depends-on): Add unistd.
860         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
861         (Include): Include <unistd.h>, not "lchown.h".
862         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
863         REPLACE_LCHOWN.
864
865 2007-06-15  Jim Meyering  <jim@meyering.net>
866
867         Change license (GPL to LGPL) of fsusage and dependents.
868         * modules/fsusage (License): Change to LGPL.
869         * modules/full-read (License): Likewise.
870         * modules/full-write (License): Likewise.
871         * modules/safe-read (License): Likewise.
872         * modules/safe-write (License): Likewise.
873
874 2007-06-14  Ben Pfaff  <blp@gnu.org>
875
876         Missing part of allocsa -> malloca transition.
877         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
878         gl_MALLOCA.
879
880 2007-06-12  Bruno Haible  <bruno@clisp.org>
881
882         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
883         to ia64, x86_64, i386.
884         Reported by Eric Blake.
885
886 2007-06-12  Bruno Haible  <bruno@clisp.org>
887
888         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
889         cross-compiling to x86_64.
890
891 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
892
893         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
894         glitch reported by Ralf Wildenhues in
895         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
896
897         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
898         Vin Shelton.
899
900 2007-06-11  Bruno Haible  <bruno@clisp.org>
901
902         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
903         replacement string.
904         Reported by Eric Blake.
905
906 2007-06-10  Bruno Haible  <bruno@clisp.org>
907
908         Prepare vasnprintf code for use with Unicode strings.
909         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
910         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
911         TYPE_U32_STRING.
912         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
913         a_u32_string variants.
914         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
915         * lib/printf-args.c: Don't include config.h and the specification
916         header if PRINTF_FETCHARGS is already defined.
917         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
918         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
919         TYPE_U16_STRING, TYPE_U32_STRING.
920         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
921         u16_directive, u16_directives, u32_directive, u32_directives): New
922         types.
923         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
924         New declarations.
925         * lib/printf-parse.c: Don't include config.h and the specification
926         header if PRINTF_PARSE is already defined. Eliminate the set of
927         parameters for WIDE_CHAR_VERSION; the user of this file must provide
928         them now. Include c-ctype.h.
929         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
930         directive and CHAR_T_ONLY_ASCII.
931         * lib/vasnprintf.c: Don't include config.h and the specification header
932         if VASNPRINTF is already defined.
933         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
934         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
935         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
936         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
937         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
938         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
939         code accordingly.
940         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
941         pad_ourselves also in this case, with the 'c' and 's' directives, and
942         with a different notion of "width".
943         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
944
945 2007-06-10  Bruno Haible  <bruno@clisp.org>
946
947         * modules/unistr/u32-mbsnlen: New file.
948         * lib/unistr/u32-mbsnlen.c: New file.
949
950         * modules/unistr/u16-mbsnlen: New file.
951         * lib/unistr/u16-mbsnlen.c: New file.
952
953         * modules/unistr/u8-mbsnlen: New file.
954         * lib/unistr/u8-mbsnlen.c: New file.
955
956         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
957         declarations.
958
959 2007-06-10  Bruno Haible  <bruno@clisp.org>
960
961         * lib/string_.h (mbsnlen): New declaration.
962         * lib/mbsnlen.c: New file.
963         * m4/mbsnlen.m4: New file.
964         * modules/mbsnlen: New file.
965         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
966         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
967         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
968
969 2007-06-10  Bruno Haible  <bruno@clisp.org>
970
971         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
972
973 2007-06-10  Bruno Haible  <bruno@clisp.org>
974
975         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
976         * lib/mbuiter.h: Likewise.
977
978 2007-06-10  Bruno Haible  <bruno@clisp.org>
979
980         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
981         declaration.
982
983 2007-06-10  Karl Berry  <karl@gnu.org>
984
985         * config/srclist.txt: remove gettext entries, Bruno prefers
986         to update individually.
987
988 2007-06-10  Bruno Haible  <bruno@clisp.org>
989
990         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
991         'maxlen'. Ensure only length + width bytes are allocated, not
992         length + 1 + width.
993
994 2007-06-09  Bruno Haible  <bruno@clisp.org>
995
996         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
997         (CHAR_T): Remove macro.
998         (VASNPRINTF): Update.
999
1000 2007-06-09  Bruno Haible  <bruno@clisp.org>
1001
1002         * MODULES.html.sh (Unicode string functions): Add the new modules.
1003
1004         * modules/uniconv/u32-conv-to-enc: New file.
1005         * lib/uniconv/u32-conv-to-enc.c: New file.
1006         * modules/uniconv/u32-conv-to-enc-tests: New file.
1007         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1008
1009         * modules/uniconv/u16-conv-to-enc: New file.
1010         * lib/uniconv/u16-conv-to-enc.c: New file.
1011         * lib/uniconv/u-conv-to-enc.h: New file.
1012         * modules/uniconv/u16-conv-to-enc-tests: New file.
1013         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1014
1015         * modules/uniconv/u8-conv-to-enc: New file.
1016         * lib/uniconv/u8-conv-to-enc.c: New file.
1017         * modules/uniconv/u8-conv-to-enc-tests: New file.
1018         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1019
1020         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1021         u32_conv_to_encoding): New declarations.
1022
1023 2007-06-09  Bruno Haible  <bruno@clisp.org>
1024
1025         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1026
1027 2007-06-09  Bruno Haible  <bruno@clisp.org>
1028
1029         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1030         * modules/malloca: Renamed from modules/allocsa, updated.
1031         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1032         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1033         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1034         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1035         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1036         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1037         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1038         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1039         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1040         * modules/c-strcasestr (Depends-on): Update.
1041         * lib/c-strcasestr.c: Update.
1042         * modules/c-strstr (Depends-on): Update.
1043         * lib/c-strstr.c: Update.
1044         * modules/canonicalize-lgpl (Depends-on): Update.
1045         * lib/canonicalize-lgpl.c: Update.
1046         * modules/clean-temp (Depends-on): Update.
1047         * lib/clean-temp.c: Update.
1048         * modules/csharpcomp (Depends-on): Update.
1049         * lib/csharpcomp.c: Update.
1050         * modules/csharpexec (Depends-on): Update.
1051         * lib/csharpexec.c: Update.
1052         * modules/javacomp (Depends-on): Update.
1053         * lib/javacomp.c: Update.
1054         * modules/javaexec (Depends-on): Update.
1055         * lib/javaexec.c: Update.
1056         * modules/mbscasestr (Depends-on): Update.
1057         * lib/mbscasestr.c: Update.
1058         * modules/mbsstr (Depends-on): Update.
1059         * lib/mbsstr.c: Update.
1060         * modules/setenv (Depends-on): Update.
1061         * lib/setenv.c: Update.
1062         * modules/strcasestr (Depends-on): Update.
1063         * lib/strcasestr.c: Update.
1064         * modules/striconveha (Depends-on): Update.
1065         * lib/striconveha.c: Update.
1066         * modules/relocatable-prog-wrapper (Files): Update.
1067         * lib/relocwrapper.c: Update.
1068         * build-aux/install-reloc: Update.
1069         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
1070
1071 2007-06-08  Bruno Haible  <bruno@clisp.org>
1072
1073         Port to uClibc.
1074         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
1075         * lib/fpurge.c (fpurge): Likewise.
1076         * lib/freading.c (freading): Likewise.
1077         * lib/fseeko.c (rpl_fseeko): Likewise.
1078         * lib/fseterr.c (fseterr): Likewise.
1079         * lib/fwriting.c (fwriting): Likewise.
1080         * tests/test-fflush.c (main): Avoid a failure on uClibc.
1081
1082 2007-06-08  Bruno Haible  <bruno@clisp.org>
1083
1084         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
1085         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
1086         * modules/gettext (Files): Add m4/intlmacosx.m4.
1087
1088 2007-06-07  Bruno Haible  <bruno@clisp.org>
1089
1090         * modules/localename-tests: New file.
1091         * tests/test-localename.c: New file.
1092
1093         New module 'localename'.
1094         * lib/localename.h: New file.
1095         * lib/localename.c: New file, from GNU gettext.
1096         * m4/localename.m4: New file.
1097         * modules/localename: New file.
1098
1099 2007-06-07  Bruno Haible  <bruno@clisp.org>
1100
1101         Work around the lack of <wchar.h> on some builds of uClibc.
1102         * doc/headers/wchar.texi: Update.
1103         * lib/wchar_.h: Include <wchar.h> only if it exists.
1104         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
1105         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
1106         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
1107         doesn't exist.
1108         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
1109         * modules/mbfile (Depends-on): Add wchar.
1110         * modules/mbiter (Depends-on): Likewise.
1111         * modules/mbuiter (Depends-on): Likewise.
1112         Reported by Simon Josefsson.
1113
1114 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
1115
1116         Work around problem reported by Steven M. Schweda in
1117         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
1118         Tru64 5.1B with the Compaq compiler environment installed declares
1119         an 'isblank' function but does not define it in the C library.
1120         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
1121         * lib/regex_internal.h (isblank): Likewise.
1122         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
1123         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1124
1125 2007-06-05  Bruno Haible  <bruno@clisp.org>
1126
1127         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
1128         ia64.
1129         * modules/printf-safe: New file.
1130         * modules/fprintf-posix (Depends-on): Add printf-safe.
1131         * modules/printf-posix (Depends-on): Likewise.
1132         * modules/snprintf-posix (Depends-on): Likewise.
1133         * modules/sprintf-posix (Depends-on): Likewise.
1134         * modules/vasnprintf-posix (Depends-on): Likewise.
1135         * modules/vasprintf-posix (Depends-on): Likewise.
1136         * modules/vfprintf-posix (Depends-on): Likewise.
1137         * modules/vprintf-posix (Depends-on): Likewise.
1138         * modules/vsnprintf-posix (Depends-on): Likewise.
1139         * modules/vsprintf-posix (Depends-on): Likewise.
1140         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
1141         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
1142         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
1143         "no" on i386, x86_64, ia64.
1144         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
1145         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1146         on i386, x86_64, ia64.
1147         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
1148         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1149         on i386, x86_64, ia64.
1150         * tests/test-vasnprintf-posix.c: Include float.h.
1151         (LDBL80_WORDS): New macro.
1152         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1153         on i386, x86_64, ia64.
1154         * tests/test-vasprintf-posix.c: Include float.h.
1155         (LDBL80_WORDS): New macro.
1156         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1157         on i386, x86_64, ia64.
1158         * tests/test-snprintf-posix.c: Include float.h.
1159         * tests/test-sprintf-posix.c: Likewise.
1160         * tests/test-vsnprintf-posix.c: Likewise.
1161         * tests/test-vsprintf-posix.c: Likewise.
1162
1163 2007-06-05  Bruno Haible  <bruno@clisp.org>
1164
1165         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
1166         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
1167         non-IEEE numbers on i386, x86_64, ia64.
1168         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
1169         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
1170         * tests/test-isnanl.h: Include float.h.
1171         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
1172
1173 2007-06-05  Bruno Haible  <bruno@clisp.org>
1174
1175         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
1176         also the %a / %A. Handle the %a / %A code before this extra handling.
1177
1178 2007-06-05  Bruno Haible  <bruno@clisp.org>
1179
1180         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
1181         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
1182
1183 2007-06-05  Bruno Haible  <bruno@clisp.org>
1184
1185         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
1186         typo in variable name.
1187
1188 2007-06-05  Eric Blake  <ebb9@byu.net>
1189
1190         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
1191         Reported by Simon Josefsson.
1192
1193 2007-06-04  Bruno Haible  <bruno@clisp.org>
1194
1195         Avoid test failures on some PowerPC platforms.
1196         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
1197         Define differently for PowerPC.
1198         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
1199         Reported by Gary V. Vaughan <gary@gnu.org>.
1200
1201 2007-06-02  Bruno Haible  <bruno@clisp.org>
1202
1203         Fix test-stdint failure on FreeBSD/ia64.
1204         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
1205         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
1206         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
1207         * doc/headers/stdint.texi: Update.
1208
1209 2007-06-01  Bruno Haible  <bruno@clisp.org>
1210
1211         * tests/test-binary-io.c (main): Pass a third argument to open().
1212         Reported by Gary V. Vaughan <gary@gnu.org>.
1213
1214 2007-06-01  Bruno Haible  <bruno@clisp.org>
1215
1216         * doc/functions/frexpl.texi: Update for mingw.
1217
1218 2007-06-01  Bruno Haible  <bruno@clisp.org>
1219
1220         * tests/test-lseek.c (main): Disable test of errno for invalid third
1221         argument.
1222         * doc/functions/lseek.texi: Update.
1223         Reported by Gary V. Vaughan <gary@gnu.org>.
1224
1225 2007-05-28  Bruno Haible  <bruno@clisp.org>
1226
1227         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
1228
1229 2007-05-31  Eric Blake  <ebb9@byu.net>
1230
1231         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
1232         cross compiling.
1233
1234 2007-05-30  Eric Blake  <ebb9@byu.net>
1235         and Bruno Haible  <bruno@clisp.org>
1236
1237         Work around mingw test failures exposed by m4-1.4.9b.
1238         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
1239         * tests/test-unistd.c: Disable uid_t and git_t tests for the
1240         moment.
1241
1242 2007-05-30  Bruno Haible  <bruno@clisp.org>
1243
1244         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
1245         assuming that they are closed. Needed on HP-UX 11.
1246
1247 2007-05-29  Bruno Haible  <bruno@clisp.org>
1248
1249         Fix a problem with #include_next.
1250         * lib/dirent_.h: Split the double-inclusion guard.
1251         * lib/fcntl_.h: Likewise.
1252         * lib/float_.h: Likewise.
1253         * lib/iconv_.h: Likewise.
1254         * lib/inttypes_.h: Likewise.
1255         * lib/locale_.h: Likewise.
1256         * lib/math_.h: Likewise.
1257         * lib/netinet_in_.h: Likewise.
1258         * lib/search_.h: Likewise.
1259         * lib/signal_.h: Likewise.
1260         * lib/stdint_.h: Likewise.
1261         * lib/stdio_.h: Likewise.
1262         * lib/stdlib_.h: Likewise.
1263         * lib/string_.h: Likewise.
1264         * lib/sys_select_.h: Likewise.
1265         * lib/sys_socket_.h: Likewise.
1266         * lib/sys_stat_.h: Likewise.
1267         * lib/sys_time_.h: Likewise.
1268         * lib/sysexits_.h: Likewise.
1269         * lib/time_.h: Likewise.
1270         * lib/unistd_.h: Likewise.
1271         * lib/wchar_.h: Likewise.
1272         * lib/wctype_.h: Likewise.
1273
1274 2007-05-29  Bruno Haible  <bruno@clisp.org>
1275
1276         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1277         for the moment.
1278
1279 2007-05-29  Bruno Haible  <bruno@clisp.org>
1280
1281         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1282         invocation.
1283         Reported by Eric Blake.
1284
1285 2007-05-29  Bruno Haible  <bruno@clisp.org>
1286
1287         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1288         compiling case.
1289
1290 2007-05-29  Eric Blake  <ebb9@byu.net>
1291             Bruno Haible  <bruno@clisp.org>
1292
1293         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1294         cross compiles.
1295
1296 2007-05-28  Eric Blake  <ebb9@byu.net>
1297
1298         * modules/closein-tests (test_closein_LDADD): Support test on
1299         cygwin with libtool.
1300
1301 2007-05-28  Bruno Haible  <bruno@clisp.org>
1302
1303         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1304         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1305         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1306         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1307         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1308         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1309         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1310         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1311         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1312
1313 2007-05-28  Eric Blake  <ebb9@byu.net>
1314
1315         Unconditionally include <config.h> in unit tests.
1316         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1317         * tests/test-allocsa.c, tests/test-arcfour.c,
1318         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1319         tests/test-array_list.c, tests/test-array_oset.c,
1320         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1321         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1322         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1323         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1324         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1325         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1326         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1327         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1328         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1329         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1330         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1331         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1332         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1333         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1334         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1335         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1336         test-md5.c, test-memmem.c, test-printf-posix.c,
1337         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1338         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1339         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1340         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1341         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1342         test-vasnprintf-posix2.c, test-vasnprintf.c,
1343         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1344         test-vfprintf-posix.c, test-vprintf-posix.c,
1345         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1346         test-xvasprintf.c: Likewise.
1347
1348 2007-05-28  Bruno Haible  <bruno@clisp.org>
1349
1350         * gnulib-tool (func_import): Remember the --with-tests command-line
1351         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1352         Reported by Eric Blake.
1353
1354 2007-05-28  Bruno Haible  <bruno@clisp.org>
1355
1356         * modules/ftell-tests: New file.
1357         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1358         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1359
1360         * lib/ftell.c: New file.
1361         * modules/ftell: New file.
1362         * m4/ftell.m4: New file.
1363         * doc/functions/ftell.texi: Update.
1364         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1365         REPLACE_FTELL.
1366         * lib/stdio_.h (rpl_ftell): New declaration.
1367         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1368         REPLACE_FTELL.
1369
1370 2007-05-28  Eric Blake  <ebb9@byu.net>
1371
1372         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1373
1374 2007-05-28  Bruno Haible  <bruno@clisp.org>
1375
1376         * modules/fseek-tests: New file.
1377         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1378         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1379
1380         * lib/fseek.c: New file.
1381         * modules/fseek: New file.
1382         * m4/fseek.m4: New file.
1383         * doc/functions/fseek.texi: Update.
1384         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1385         REPLACE_FSEEK.
1386         * lib/stdio_.h (rpl_fseek): New declaration.
1387         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1388         REPLACE_FSEEK.
1389
1390 2007-05-28  Bruno Haible  <bruno@clisp.org>
1391
1392         * lib/stdio_.h (fflush): More comments.
1393
1394 2007-05-28  Bruno Haible  <bruno@clisp.org>
1395
1396         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1397         runtime test.
1398
1399 2007-05-28  Eric Blake  <ebb9@byu.net>
1400
1401         Improve lseek module.
1402         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1403         * lib/unistd_.h (lseek): Scale back link warning message.
1404         * tests/test-lseek.c: Beef up test.
1405         * tests/test-lseek.sh: Exercise more facets of lseek.
1406         Reported by Bruno Haible.
1407
1408 2007-05-28  Bruno Haible  <bruno@clisp.org>
1409
1410         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1411         to define.
1412
1413 2007-05-27  Bruno Haible  <bruno@clisp.org>
1414
1415         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1416
1417 2007-05-27  Bruno Haible  <bruno@clisp.org>
1418
1419         * modules/openmp: New file.
1420         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1421         Noah Misch.
1422
1423 2007-05-26  Bruno Haible  <bruno@clisp.org>
1424
1425         * modules/chdir-long (Depends-on): Add fchdir.
1426         * modules/chdir-safer (Depends-on): Likewise.
1427         * modules/fts (Depends-on): Likewise.
1428         * modules/fts-lgpl (Depends-on): Likewise.
1429         * modules/openat (Depends-on): Likewise.
1430         * modules/savewd (Depends-on): Likewise.
1431
1432 2007-05-24  Eric Blake  <ebb9@byu.net>
1433
1434         Fix lseek on mingw.
1435         * modules/lseek: New module.
1436         * m4/lseek.m4: New file.
1437         * lib/lseek.c: New file.
1438         * modules/lseek-tests: New file.
1439         * tests/test-lseek.c: New file.
1440         * tests/test-lseek.sh: New file.
1441         * MODULES.html.sh: Document lseek module.
1442         * modules/fflush (Depends-on): Add lseek, fseeko.
1443         * modules/fseeko (Depends-on): Likewise.
1444         * modules/ftello (Depends-on): Likewise.
1445         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1446         broken.
1447         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1448         broken.
1449         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1450         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1451         * lib/ftello.c (rpl_ftello): Likewise.
1452         * tests/test-fseeko.c (main): Test this.
1453         * tests/test-fseeko.sh: Likewise.
1454         * tests/test-ftello.c (main): Likewise.
1455         * tests/test-ftello.sh: Likewise.
1456         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1457         implies replacing fseek.
1458         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1459         HAVE_FTELLO.
1460         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1461         * modules/unistd (Makefile.am): Likewise.
1462         * lib/unistd_.h (lseek): Declare a replacement.
1463         * doc/functions/lseek.texi (lseek): Document this fix.
1464         * doc/functions/fseek.texi (fseek): Likewise.
1465         * doc/functions/ftell.texi (ftell): Likewise.
1466
1467 2007-05-24  Bruno Haible  <bruno@clisp.org>
1468
1469         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1470         in the printed representation of a NaN.
1471         * tests/test-vasprintf-posix.c (test_function): Likewise.
1472         * tests/test-snprintf-posix.h (test_function): Likewise.
1473         * tests/test-sprintf-posix.h (test_function): Likewise.
1474         Reported by Eric Blake.
1475
1476 2007-05-23  Eric Blake  <ebb9@byu.net>
1477
1478         Fix fseeko/ftello on cygwin 1.5.24.
1479         * doc/functions/fseeko.texi (fseeko): Document the fix.
1480         * doc/functions/ftello.texi (ftello): Document the fix.
1481         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1482         * doc/functions/stdout.text (stdout): New file.
1483         * doc/functions/stderr.text (stderr): New file.
1484         * doc/gnulib.texi (Function Substitutes): Use new files.
1485         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1486         prior to 1.7.0.
1487         * tests/test-ftello.c (main): Likewise for ftello.
1488         * tests/test-fseeko.sh: New file.
1489         * tests/test-ftello.sh: New file.
1490         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1491         with seekable stdin.
1492         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1493         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1494         (gl_REPLACE_FSEEKO): New macro.
1495         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1496         * modules/fseeko (Files): Distribute fseeko.c.
1497         * modules/ftello (Files): Distribute ftello.c.
1498         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1499         mode.
1500         * lib/ftello.c (rpl_ftello): New file.
1501         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1502         fseeko, ftello.
1503         (gl_STDIN_LARGE_OFFSET): New macro.
1504         * modules/stdio (Makefile.am): Perform the replacement.
1505         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1506
1507 2007-05-23  Bruno Haible  <bruno@clisp.org>
1508
1509         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1510         GNULIB_POSIXCHECK is defined.
1511
1512 2007-05-21  Bruno Haible  <bruno@clisp.org>
1513
1514         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1515         Check also the output for NaN arguments. When cross-compiling, guess
1516         no on IRIX.
1517         * lib/vasnprintf.c: Update comments.
1518         * tests/test-vasnprintf-posix.c (strisnan): New function.
1519         (test_function): Use it.
1520         * tests/test-vasprintf-posix.c (strisnan): New function.
1521         (test_function): Use it.
1522         * tests/test-snprintf-posix.h (strisnan): New function.
1523         (test_function): Use it.
1524         * tests/test-sprintf-posix.h (strisnan): New function.
1525         (test_function): Use it.
1526         Reported by Eric Blake.
1527
1528 2007-05-20  Bruno Haible  <bruno@clisp.org>
1529
1530         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1531         numbers that fails on BeOS.
1532         * doc/functions/frexpl.texi: Update.
1533
1534 2007-05-20  Jim Meyering  <jim@meyering.net>
1535
1536         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
1537         forced upon us by glibc-2.6.
1538
1539 2007-05-20  Bruno Haible  <bruno@clisp.org>
1540
1541         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
1542         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
1543         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
1544         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
1545         NEED_PRINTF_INFINITE.
1546         (is_infinitel): New function.
1547         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
1548         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
1549         gl_PREREQ_VASNPRINTF_INFINITE.
1550         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
1551         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1552         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
1553         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
1554         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
1555         gl_PREREQ_VASNPRINTF_INFINITE.
1556         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1557         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1558         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1559         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1560         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1561         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1562         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1563         * doc/functions/fprintf.texi: Update.
1564         * doc/functions/printf.texi: Update.
1565         * doc/functions/snprintf.texi: Update.
1566         * doc/functions/sprintf.texi: Update.
1567         * doc/functions/vfprintf.texi: Update.
1568         * doc/functions/vprintf.texi: Update.
1569         * doc/functions/vsnprintf.texi: Update.
1570         * doc/functions/vsprintf.texi: Update.
1571
1572 2007-05-20  Bruno Haible  <bruno@clisp.org>
1573
1574         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
1575         was not found in libc.
1576         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
1577
1578 2007-05-20  Bruno Haible  <bruno@clisp.org>
1579
1580         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1581         printed as "-nan" instead of "nan".
1582         * tests/test-vasprintf-posix.c (test_function): Likewise.
1583         * tests/test-snprintf-posix.h (test_function): Likewise.
1584         * tests/test-sprintf-posix.h (test_function): Likewise.
1585         Needed for HP-UX 11.
1586
1587 2007-05-20  Jim Meyering  <jim@meyering.net>
1588
1589         Fix buggy test for the fchownat-deref bug.
1590         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
1591         symlink required for the run-test.  Without it, this test would
1592         always declare that fchownat doesn't work, and client code would
1593         unnecessarily use the replacement function with fixed libc.
1594         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
1595         Reported by Greg Schafer.
1596
1597 2007-05-19  Bruno Haible  <bruno@clisp.org>
1598
1599         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
1600         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
1601         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
1602         Needed for IRIX 6.5 and Solaris 2.5.1.
1603
1604 2007-05-19  Bruno Haible  <bruno@clisp.org>
1605
1606         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
1607         (test_function): Skip tests involving -0.0 on platforms where
1608         -0.0 = 0.0.
1609         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
1610         (test_function): Skip tests involving -0.0 on platforms where
1611         -0.0 = 0.0.
1612         * tests/test-snprintf-posix.h (have_minus_zero): New function.
1613         (test_function): Skip tests involving -0.0 on platforms where
1614         -0.0 = 0.0.
1615         * tests/test-sprintf-posix.h (have_minus_zero): New function.
1616         (test_function): Skip tests involving -0.0 on platforms where
1617         -0.0 = 0.0.
1618         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
1619         tests.
1620         * tests/test-printf-posix.h (test_function): Likewise.
1621         * tests/test-printf-posix.output: Remove all -0.0 related results.
1622         Needed for IRIX 6.5.
1623
1624 2007-05-19  Bruno Haible  <bruno@clisp.org>
1625
1626         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1627         printed as "nan0x7fffffff" instead of "nan".
1628         * tests/test-vasprintf-posix.c (test_function): Likewise.
1629         * tests/test-snprintf-posix.h (test_function): Likewise.
1630         * tests/test-sprintf-posix.h (test_function): Likewise.
1631         * tests/test-fprintf-posix.h (NaN): Remove macro.
1632         (test_function): Remove all NaN related tests.
1633         * tests/test-printf-posix.h (NaN): Remove macro.
1634         (test_function): Remove all NaN related tests.
1635         * tests/test-printf-posix.output: Remove all NaN related results.
1636         Needed for IRIX 6.5.
1637
1638 2007-05-19  Bruno Haible  <bruno@clisp.org>
1639
1640         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
1641         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
1642
1643 2007-05-19  Bruno Haible  <bruno@clisp.org>
1644
1645         * lib/float_.h: New file.
1646         * m4/float_h.m4: New file.
1647         * modules/float: New file.
1648         * modules/isnanl (Dependencies): Add float.
1649         * modules/isnanl-nolibm (Dependencies): Likewise.
1650         * modules/mathl (Dependencies): Likewise.
1651         * modules/printf-frexpl (Dependencies): Likewise.
1652         * modules/signbit (Dependencies): Likewise.
1653         * modules/vasnprintf (Dependencies): Likewise.
1654         * doc/headers/float.texi: Update.
1655
1656 2007-05-19  Jim Meyering  <jim@meyering.net>
1657
1658         * lib/utimens.c (gl_futimens): Rename from futimens,
1659         now that glibc-2.6 declares futimens.
1660         * lib/utimens.h: Likewise.
1661
1662 2007-05-19  Bruno Haible  <bruno@clisp.org>
1663
1664         Avoid test failures on mingw.
1665         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
1666         * tests/test-printf-posix.sh: Likewise.
1667         * tests/test-vfprintf-posix.sh: Likewise.
1668         * tests/test-vprintf-posix.sh: Likewise.
1669
1670 2007-05-19  Bruno Haible  <bruno@clisp.org>
1671
1672         Fix *printf result for NaN, Inf, -0.0 on mingw.
1673         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
1674         * lib/vasnprintf.c: Include math.h and isnan.h.
1675         (is_infinite_or_zero): New function.
1676         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
1677         values in the %f, %F, %e, %E, %g, %G directives.
1678         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
1679         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1680         gl_PRINTF_INFINITE and test its result. Invoke
1681         gl_PREREQ_VASNPRINTF_INFINITE.
1682         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1683         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1684         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1685         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1686         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1687         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1688         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): 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-19  Bruno Haible  <bruno@clisp.org>
1699
1700         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
1701         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
1702         Instead of multiplying with 10^k, set extra_zeroes to k.
1703         (scale10_round_long_double): Remove function.
1704
1705 2007-05-18  Bruno Haible  <bruno@clisp.org>
1706
1707         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
1708         introduced on 2007-05-06.
1709
1710 2007-05-18  Bruno Haible  <bruno@clisp.org>
1711
1712         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
1713         %g directives.
1714         * tests/test-vasprintf-posix.c (test_function): Likewise.
1715         * tests/test-snprintf-posix.h (test_function): Likewise.
1716         * tests/test-sprintf-posix.h (test_function): Likewise.
1717
1718 2007-05-18  Bruno Haible  <bruno@clisp.org>
1719
1720         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
1721         (strmatch): New function.
1722         (test_function): Test the %f directive on numbers of various exponents.
1723         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
1724         (strmatch): New function.
1725         (test_function): Test the %f directive on numbers of various exponents.
1726         * tests/test-snprintf-posix.h (strmatch): New function.
1727         (test_function): Test the %f directive on numbers of various exponents.
1728         * tests/test-sprintf-posix.h (strmatch): New function.
1729         (test_function): Test the %f directive on numbers of various exponents.
1730         * tests/test-snprintf-posix.c (SIZEOF): New macro.
1731         * tests/test-sprintf-posix.c (SIZEOF): New macro.
1732         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
1733         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
1734
1735 2007-05-18  Bruno Haible  <bruno@clisp.org>
1736
1737         Add support for 'long double' number output.
1738         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
1739         * lib/vasnprintf.c: Include math.h and float+.h.
1740         (mp_limb_t): New type.
1741         (GMP_LIMB_BITS): New macro.
1742         (mp_twolimb_t): New type.
1743         (GMP_TWOLIMB_BITS): New macro.
1744         (mpn_t): New type.
1745         (multiply, divide, convert_to_decimal, decode_long_double,
1746         scale10_round_long_double, scale10_round_decimal_long_double,
1747         floorlog10l): New functions.
1748         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
1749         for the %f, %F, %e, %E, %g, %G directives.
1750         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
1751         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1752         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
1753         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
1754         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1755         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1756         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1757         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1758         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1759         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1760         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1761         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
1762         * modules/snprintf-posix (Depends-on): Likewise.
1763         * modules/sprintf-posix (Depends-on): Likewise.
1764         * modules/vasnprintf-posix (Depends-on): Likewise.
1765         * modules/vasprintf-posix (Depends-on): Likewise.
1766         * modules/vfprintf-posix (Depends-on): Likewise.
1767         * modules/vsnprintf-posix (Depends-on): Likewise.
1768         * modules/vsprintf-posix (Depends-on): Likewise.
1769         * modules/vasnprintf (Files): Add lib/float+.h.
1770         * doc/functions/fprintf.texi: Update.
1771         * doc/functions/printf.texi: Update.
1772         * doc/functions/snprintf.texi: Update.
1773         * doc/functions/sprintf.texi: Update.
1774         * doc/functions/vfprintf.texi: Update.
1775         * doc/functions/vprintf.texi: Update.
1776         * doc/functions/vsnprintf.texi: Update.
1777         * doc/functions/vsprintf.texi: Update.
1778
1779 2007-05-18  Bruno Haible  <bruno@clisp.org>
1780
1781         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
1782
1783 2007-05-18  Bruno Haible  <bruno@clisp.org>
1784
1785         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
1786         for printing 64-bit integers. Needed for mingw.
1787
1788 2007-05-18  Bruno Haible  <bruno@clisp.org>
1789
1790         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1791         gl_FUNC_FREXPL_WORKS.
1792         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
1793
1794 2007-05-18  Bruno Haible  <bruno@clisp.org>
1795
1796         * modules/frexpl-nolibm-tests: New file.
1797
1798         * modules/frexpl-nolibm: New file.
1799         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
1800
1801 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
1802
1803         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
1804         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1805         GCC 4.2, which otherwise issues a lot of warnings.
1806         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
1807         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
1808         Likewise.
1809         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
1810         * modules/iconv_open (iconv.h): Likewise.
1811         * modules/locale (locale.h): Likewise.
1812         * modules/netinet_in (netinet/in.h): Likewise.
1813         * modules/sys_select (sys_select.h): Likewise.
1814         * modules/sys_socket (sys/socket.h): Likewise.
1815         * modules/sys_stat (sys/stat.h): Likewise.
1816         * modules/sysexits (sysexits.h): Likewise.
1817         * modules/unistd (unistd.h): Likewise.
1818
1819 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1820
1821         * modules/closein-tests (Makefile.am): Distribute
1822         `test-closein.sh'.
1823
1824 2007-05-17  Bruno Haible  <bruno@clisp.org>
1825
1826         * tests/test-printf-posix.output: Renamed from
1827         tests/test-fprintf-posix.out.
1828         * modules/fprintf-posix-tests: Update.
1829         * modules/printf-posix-tests: Update.
1830         * modules/vfprintf-posix-tests: Update.
1831         * modules/vprintf-posix-tests: Update.
1832         * tests/test-fprintf-posix.sh: Update.
1833         * tests/test-printf-posix.sh: Update.
1834         * tests/test-vfprintf-posix.sh: Update.
1835         * tests/test-vprintf-posix.sh: Update.
1836         Reported by Ralf Wildenhues.
1837
1838 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
1839
1840         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
1841         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1842         GCC 4.2, which otherwise issues a lot of warnings.
1843         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
1844         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
1845         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
1846         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
1847         it should no longer be needed.
1848         * lib/string_.h: Likewise.
1849         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
1850         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
1851         * modules/inttypes (inttypes.h): Likewise.
1852         * modules/math (math.h): Likewise.
1853         * modules/search (search.h): Likewise.
1854         * modules/signal (signal.h): Likewise.
1855         * modules/stdint (stdint.h): Likewise.
1856         * modules/stdio (stdio.h): Likewise.
1857         * modules/stdlib (stdlib.h): Likewise.
1858         * modules/string (string.h): Likewise.
1859         * modules/sys_time (sys/time.h): Likewise.
1860         * modules/time (time.h): Likewise.
1861         * modules/wchar (wchar.h): Likewise.
1862         * modules/wctype (wtype.h): Likewise.
1863
1864 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
1865
1866         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
1867
1868 2007-05-13  Bruno Haible  <bruno@clisp.org>
1869
1870         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
1871         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1872         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
1873         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1874         (gl_PREREQ_STRTOK_R): Don't require it here.
1875
1876 2007-05-13  Bruno Haible  <bruno@clisp.org>
1877
1878         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
1879         when used in C++ mode.
1880
1881 2007-05-12  Bruno Haible  <bruno@clisp.org>
1882
1883         * lib/linebuffer.h: Tweak doc.
1884         * lib/linebuffer.c: Likewise.
1885
1886 2007-05-12  James Youngman  <jay@gnu.org>
1887
1888         * lib/linebuffer.c (readlinebuffer_delim): New function,
1889         like readlinebuffer, but use a caller-specified delimiter.
1890         (readlinebuffer): Just call readlinebuffer_delim with '\n'
1891         as the delimiter.
1892         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
1893
1894 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1895
1896         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
1897         * modules/openat (Files): Remove openat-die.c.
1898         (Depends-on): Add openat-die.
1899         * modules/openat-die: New module.
1900
1901 2007-05-06  Bruno Haible  <bruno@clisp.org>
1902
1903         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
1904         Update with info about Cygwin.
1905         * doc/functions/fprintf.texi: Update.
1906         * doc/functions/printf.texi: Update.
1907         * doc/functions/snprintf.texi: Update.
1908         * doc/functions/sprintf.texi: Update.
1909         * doc/functions/vfprintf.texi: Update.
1910         * doc/functions/vprintf.texi: Update.
1911         * doc/functions/vsnprintf.texi: Update.
1912         * doc/functions/vsprintf.texi: Update.
1913         Reported by Eric Blake.
1914
1915 2007-05-06  Bruno Haible  <bruno@clisp.org>
1916
1917         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
1918         padding ourselves for the floating-point directives.
1919         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
1920         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
1921         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1922         gl_PRINTF_FLAG_ZERO and test its result. Invoke
1923         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
1924         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1925         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1926         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1927         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1928         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1929         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1930         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1931         * tests/test-snprintf-posix.h (test_function): Also check the width
1932         and some flags in the %f directive.
1933         * tests/test-sprintf-posix.h (test_function): Likewise.
1934         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1935         * tests/test-vasprintf-posix.c (test_function): Likewise.
1936         * doc/functions/fprintf.texi: Update.
1937         * doc/functions/printf.texi: Update.
1938         * doc/functions/snprintf.texi: Update.
1939         * doc/functions/sprintf.texi: Update.
1940         * doc/functions/vfprintf.texi: Update.
1941         * doc/functions/vprintf.texi: Update.
1942         * doc/functions/vsnprintf.texi: Update.
1943         * doc/functions/vsprintf.texi: Update.
1944
1945 2007-05-06  Bruno Haible  <bruno@clisp.org>
1946
1947         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
1948         pass the ' flag character to sprintf or snprintf.
1949         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
1950         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
1951         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1952         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
1953         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
1954         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1955         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1956         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1957         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1958         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1959         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1960         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1961         * tests/test-snprintf-posix.h (test_function): Also check the grouping
1962         flag.
1963         * tests/test-sprintf-posix.h (test_function): Likewise.
1964         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1965         * tests/test-vasprintf-posix.c (test_function): Likewise.
1966         * doc/functions/fprintf.texi: Update.
1967         * doc/functions/printf.texi: Update.
1968         * doc/functions/snprintf.texi: Update.
1969         * doc/functions/sprintf.texi: Update.
1970         * doc/functions/vfprintf.texi: Update.
1971         * doc/functions/vprintf.texi: Update.
1972         * doc/functions/vsnprintf.texi: Update.
1973         * doc/functions/vsprintf.texi: Update.
1974
1975 2007-05-01  Bruno Haible  <bruno@clisp.org>
1976
1977         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
1978
1979 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
1980
1981         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
1982         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
1983
1984 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
1985
1986         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
1987         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
1988         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
1989
1990 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
1991
1992         * lib/argp-help.c (struct hol_entry): New member `ord'.
1993         (HOL_ENTRY_PTRCMP): Use ord for comparison
1994         (hol_sort): Initialize ord.
1995
1996 2007-05-01  Bruno Haible  <bruno@clisp.org>
1997
1998         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
1999         Reported by Eric Blake.
2000         * doc/gnulib.texi (Function Substitutes): Update.
2001
2002 2007-05-01  Bruno Haible  <bruno@clisp.org>
2003
2004         * doc/functions.texi: Remove file, now redundant through
2005         doc/functions/*.texi.
2006
2007 2007-05-01  Bruno Haible  <bruno@clisp.org>
2008
2009         * modules/argp (Depends-on): Add sleep.
2010
2011 2007-05-01  Bruno Haible  <bruno@clisp.org>
2012
2013         * modules/sleep-tests: New file.
2014         * tests/test-sleep.c: New file.
2015
2016         * modules/sleep: New file.
2017         * lib/sleep.c: New file.
2018         * m4/sleep.m4: New file.
2019         * lib/unistd_.h (sleep): New declaration.
2020         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2021         HAVE_SLEEP.
2022         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2023         * doc/functions/sleep.texi: Document the sleep module.
2024
2025 2007-05-01  Bruno Haible  <bruno@clisp.org>
2026
2027         * lib/sigprocmask.h: Remove file.
2028         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2029         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2030         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2031         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2032         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2033         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2034         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2035         HAVE_SIGSET_T as a shell variable.
2036         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2037         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2038         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2039         (Depends-on): Add signal. Remove verify.
2040         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2041         (Include): Mention <signal.h> instead of sigprocmask.h.
2042         * NEWS: Mention the change.
2043         * lib/fatal-signal.c: Don't include sigprocmask.h.
2044
2045 2007-05-01  Bruno Haible  <bruno@clisp.org>
2046
2047         * modules/signal: New file.
2048         * lib/signal_.h: New file.
2049         * m4/signal_h.m4: New file.
2050
2051 2007-05-01  Bruno Haible  <bruno@clisp.org>
2052
2053         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2054         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2055         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2056         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2057
2058 2007-05-01  Bruno Haible  <bruno@clisp.org>
2059
2060         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2061         configure time.
2062         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2063         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2064         * modules/sys_stat (Makefile.am): Substitute their values into
2065         sys/stat.h.
2066
2067 2007-05-01  Bruno Haible  <bruno@clisp.org>
2068
2069         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
2070         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
2071         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
2072
2073 2007-05-01  Bruno Haible  <bruno@clisp.org>
2074
2075         * doc/header/assert.texi: Undo last change: don't mention the gnulib
2076         'assert' module here.
2077
2078 2007-05-01  Bruno Haible  <bruno@clisp.org>
2079
2080         * doc/functions/*.texi: New files.
2081         * doc/functions/google-ranking.txt: New file.
2082         * doc/gnulib.texi (Function Substitutes): New chapter.
2083         (ctime, inet_ntoa): Remove sections.
2084         * doc/ctime.texi: Remove file.
2085         * doc/inet_ntoa.texi: Remove file.
2086         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
2087         dependencies.
2088         (%.info): New rule, specifying a --reference-limit.
2089
2090 2007-05-01  Bruno Haible  <bruno@clisp.org>
2091
2092         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
2093
2094 2007-05-01  Bruno Haible  <bruno@clisp.org>
2095
2096         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
2097         the portability of 'mkdir' to mingw systems.
2098
2099 2007-05-01  Bruno Haible  <bruno@clisp.org>
2100
2101         * doc/headers/google-ranking.txt: New file.
2102
2103 2007-04-30  Eric Blake  <ebb9@byu.net>
2104
2105         Prefer fseeko to fseek.
2106         * modules/getpass (Depends-on): Add fseeko.
2107         * lib/getpass.c (getpass): Use fseeko, not fseek.
2108
2109 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2110
2111         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
2112         assumes the sorting is stable, while most qsort implementations
2113         are not.  Use argument addresses to ensure they never compare as
2114         equal.
2115
2116         * tests/test-argp-2.sh (usage-indent test): Fix output
2117         (func_compare): Restore diff options
2118         * tests/test-argp.c: Restore #include "progname.h"
2119
2120 2007-04-29  Bruno Haible  <bruno@clisp.org>
2121
2122         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
2123         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2124         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
2125         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2126         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
2127         (configure.ac): Define CHECK_SNPRINTF_POSIX.
2128         (TESTS, check_PROGRAMS): Add test-snprintf.
2129         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
2130         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
2131         (TESTS, check_PROGRAMS): Add test-vsnprintf.
2132         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
2133         assertions that fail on HP-UX, OSF/1, or IRIX.
2134         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
2135
2136 2007-04-29  Bruno Haible  <bruno@clisp.org>
2137
2138         * MODULES.html.sh (posix_functions): Remove 'contents'.
2139
2140 2007-04-29  Karl Berry  <karl@gnu.org>
2141
2142         * config/srclist.txt (gendocs_template_min): new entry.
2143
2144 2007-04-29  Bruno Haible  <bruno@clisp.org>
2145
2146         Work around fpurge bug on BSD systems.
2147         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
2148         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
2149         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
2150         fpurge to rpl_fpurge if the system already has this function.
2151         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
2152         the case where the system already has this function. Correct invariants
2153         on BSD systems.
2154         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
2155         BSD systems.
2156
2157 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
2158
2159         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
2160         proposed by Sven Verdoolaege.
2161
2162         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
2163         options.
2164         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
2165         (usage and help tests): Update
2166
2167 2007-04-29  Bruno Haible  <bruno@clisp.org>
2168
2169         * tests/test-fflush.c (main): Use a file of size 17, not 10.
2170         Print more information in case of failure. Disable a test on BeOS.
2171
2172 2007-04-29  Bruno Haible  <bruno@clisp.org>
2173
2174         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
2175         This helps debugging on systems on which no gdb is available.
2176
2177 2007-04-29  Bruno Haible  <bruno@clisp.org>
2178
2179         * lib/freading.h: Improve comments.
2180         * lib/fwriting.h: Likewise.
2181         * tests/test-freading.c (main): Don't check freading immediately after
2182         repositioning. Needed for glibc.
2183
2184 2007-04-29  Bruno Haible  <bruno@clisp.org>
2185
2186         * lib/freading.c (freading): Trivial simplification.
2187
2188 2007-04-28  Bruno Haible  <bruno@clisp.org>
2189
2190         * tests/test-fwriting.c (main): Also test the interaction between
2191         fflush and fwriting.
2192         * modules/fwriting-tests (Depends-on): Add fflush.
2193
2194         * tests/test-freading.c (main): Also test the interaction between
2195         fflush and freading.
2196         * modules/freading-tests (Depends-on): Add fflush.
2197
2198 2007-04-28  Bruno Haible  <bruno@clisp.org>
2199
2200         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
2201         fseeko and ftello.
2202         Suggested by Eric Blake.
2203
2204 2007-04-28  Jim Meyering  <jim@meyering.net>
2205
2206         Avoid false-negative in gl_STDINT_H's C99 conformance test.
2207         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
2208         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
2209
2210 2007-04-27  Eric Blake  <ebb9@byu.net>
2211
2212         * doc/headers/assert.texi (assert.h): Document assert module use.
2213
2214 2007-04-27  Bruno Haible  <bruno@clisp.org>
2215
2216         * doc/headers/*.texi: New files.
2217         * doc/gnulib.texi (Header File Substitutes): New chapter.
2218         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
2219         dependencies.
2220         (standards.info ,standards.html, standards.dvi): Update dependencies.
2221         (mostlyclean, clean): New targets.
2222
2223 2007-04-27  Bruno Haible  <bruno@clisp.org>
2224
2225         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
2226         * modules/sysexits (Files, Makefile.am): Update.
2227
2228         * lib/sys_socket_.h: Renamed from lib/socket_.h.
2229         * modules/sys_socket (Files, Makefile.am): Update.
2230
2231         * lib/sys_stat_.h: Renamed from lib/stat_.h.
2232         * modules/sys_stat (Files, Makefile.am): Update.
2233
2234 2007-04-27  Eric Blake  <ebb9@byu.net>
2235
2236         * lib/freading.h: Improve comments.
2237         * lib/fwriting.h: Likewise.
2238         * lib/fflush.c: Likewise.
2239
2240         Fix closein for mingw.
2241         * modules/closein-tests: Add tests for closein.
2242         * tests/test-closein.c: New file.
2243         * tests/test-closein.sh: Likewise.
2244         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
2245         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
2246
2247 2007-04-27  Bruno Haible  <bruno@clisp.org>
2248
2249         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2250         version is < 6.
2251         * lib/math_.h [__DECC]: Likewise.
2252         * lib/stdio_.h [__DECC]: Likewise.
2253         * lib/stdlib_.h [__DECC]: Likewise.
2254         * lib/string_.h [__DECC]: Likewise.
2255         * lib/time_.h [__DECC]: Likewise.
2256         * lib/wchar_.h [__DECC]: Likewise.
2257         * lib/wctype_.h [__DECC]: Likewise.
2258
2259 2007-04-27  Bruno Haible  <bruno@clisp.org>
2260
2261         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2262
2263 2007-04-27  Bruno Haible  <bruno@clisp.org>
2264
2265         * lib/fflush.c: Add comments.
2266         * modules/fpurge-tests (Depends-on): Add fflush.
2267         * modules/freadable-tests (Depends-on): Likewise.
2268         * modules/fwritable-tests (Depends-on): Likewise.
2269
2270 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2271
2272         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2273         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2274         Report by Bruno Haible <bruno@clisp.org>.
2275
2276 2007-04-26  Eric Blake  <ebb9@byu.net>
2277
2278         Fix fflush on mingw.
2279         * modules/fflush (Depends-on): Add freading.
2280         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2281         but unread data.
2282
2283 2007-04-26  Eric Blake  <ebb9@byu.net>
2284         and Bruno Haible  <bruno@clisp.org>
2285
2286         Implement freading and fwriting.
2287         * lib/freading.c: New file.
2288         * lib/freading.h: Likewise.
2289         * m4/freading.m4: Likewise.
2290         * modules/freading: Likewise.
2291         * modules/freading-tests: Likewise.
2292         * tests/test-freading.c: Likewise.
2293         * lib/fwriting.c: New file.
2294         * lib/fwriting.h: Likewise.
2295         * m4/fwriting.m4: Likewise.
2296         * modules/fwriting: Likewise.
2297         * modules/fwriting-tests: Likewise.
2298         * tests/test-fwriting.c: Likewise.
2299         * MODULES.html.sh (File stream based Input/Output): Mention them.
2300
2301 2007-04-26  Bruno Haible  <bruno@clisp.org>
2302
2303         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2304         'long' when we assume it.
2305         Suggested by Eric Blake.
2306
2307 2007-04-26  Bruno Haible  <bruno@clisp.org>
2308
2309         Ensure fseeko, ftello are declared on glibc systems.
2310         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2311         * modules/fseeko (configure.ac-early): Likewise.
2312         * modules/ftello (configure.ac-early): Likewise.
2313         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2314         AC_FUNC_FSEEKO for this.
2315         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2316         (gl_CHECK_FSEEKO): Remove macro.
2317
2318 2007-04-26  Bruno Haible  <bruno@clisp.org>
2319
2320         * tests/test-fflush.c (main): Also check the ftell result after
2321         fflush and fseek/fseeko.
2322         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2323         file descriptor position cache in the stream.
2324         * lib/fseeko.c (rpl_fseeko): Likewise.
2325
2326 2007-04-26  Bruno Haible  <bruno@clisp.org>
2327
2328         * modules/fflush-tests (Depends-on): Add fseeko.
2329
2330 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2331             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2332
2333         * lib/argz_.h: ensure error_t definition is obtained in same
2334         mechanism system argz.h would have.
2335         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2336         argz facilities are known bad.  Err on the side of caution if
2337         cross-compiling.
2338
2339 2007-04-25  Eric Blake  <ebb9@byu.net>
2340
2341         * lib/fpurge.c (includes): Use stdlib.h for free.
2342         * tests/test-fflush.c (main): Also test fflush-fseeko.
2343
2344 2007-04-25  Bruno Haible  <bruno@clisp.org>
2345
2346         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2347         * lib/fseeko.c: New file.
2348         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2349         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2350         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2351         gl_FUNC_FSEEKO.
2352         (gl_FUNC_FSEEKO): Invoke it.
2353         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2354         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2355         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2356
2357 2007-04-25  Bruno Haible  <bruno@clisp.org>
2358
2359         * modules/fflush (Depends-on): Add ftello.
2360
2361 2007-04-25  Bruno Haible  <bruno@clisp.org>
2362
2363         * modules/ftello-tests: New file.
2364         * tests/test-ftello.c: New file.
2365
2366         * modules/ftello: New file.
2367         * m4/ftello.m4: New file.
2368         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2369         HAVE_FTELLO.
2370         * lib/stdio_.h (ftello): New declaration.
2371         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2372         HAVE_FTELLO.
2373
2374 2007-04-25  Bruno Haible  <bruno@clisp.org>
2375
2376         * modules/fseeko-tests: New file.
2377         * tests/test-fseeko.c: New file.
2378
2379         * modules/fseeko: New file.
2380         * m4/fseeko.m4: New file.
2381         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2382         HAVE_FSEEKO.
2383         * lib/stdio_.h (fseeko): New declaration.
2384         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2385         HAVE_FSEEKO.
2386
2387 2007-04-25  Bruno Haible  <bruno@clisp.org>
2388
2389         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2390
2391 2007-04-25  Bruno Haible  <bruno@clisp.org>
2392
2393         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2394         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2395         * tests/test-unistd.c: Likewise.
2396         * tests/test-fcntl.c: Likewise.
2397
2398 2007-04-23  Eric Blake  <ebb9@byu.net>
2399
2400         * lib/fflush.c: Fix missing include.
2401         Reported by Bruno Haible.
2402
2403 2007-04-23  Bruno Haible  <bruno@clisp.org>
2404
2405         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2406         Reported by Eric Blake.
2407
2408 2007-04-23  Bruno Haible  <bruno@clisp.org>
2409
2410         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2411
2412 2007-04-23  Bruno Haible  <bruno@clisp.org>
2413
2414         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2415
2416 2007-04-23  Bruno Haible  <bruno@clisp.org>
2417
2418         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2419         Needed on HP-UX 11.
2420
2421 2007-04-16  Eric Blake  <ebb9@byu.net>
2422
2423         Make fflush rely on fpurge.
2424         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2425         open coding all variants.
2426         * modules/fflush (Depends-on): Add fpurge and unistd.
2427         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2428         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2429
2430         Fix --with-tests compilation on cygwin.
2431         * modules/argmatch-tests (Makefile.am): List gnulib library first
2432         in LDADD.
2433         * modules/argp-tests (Makefile.am): Likewise.
2434         * modules/array-list-tests (Makefile.am): Likewise.
2435         * modules/array-oset-tests (Makefile.am): Likewise.
2436         * modules/avltree-list-tests (Makefile.am): Likewise.
2437         * modules/avltree-oset-tests (Makefile.am): Likewise.
2438         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2439         * modules/carray-list-tests (Makefile.am): Likewise.
2440         * modules/dirname-tests (Makefile.am): Likewise.
2441         * modules/frexp-tests (Makefile.am): Likewise.
2442         * modules/isnanl-tests (Makefile.am): Likewise.
2443         * modules/linked-list-tests (Makefile.am): Likewise.
2444         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2445         * modules/lock-tests (Makefile.am): Likewise.
2446         * modules/rbtree-list-tests (Makefile.am): Likewise.
2447         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2448         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2449         * modules/tls-tests (Makefile.am): Likewise.
2450         * modules/tsearch-tests (Makefile.am): Likewise.
2451         * modules/xvasprintf-tests (Makefile.am): Likewise.
2452
2453         Fix fpurge for cygwin.
2454         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2455         value.
2456         * modules/fpurge-tests (Depends-on): Clean up trash.
2457
2458 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2459
2460         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2461
2462         * m4/autobuild.m4: Re-indent.
2463
2464 2007-04-13  Bruno Haible  <bruno@clisp.org>
2465
2466         * modules/fpurge-tests: New file.
2467         * tests/test-fpurge.c: New file.
2468
2469         * modules/fpurge: New file.
2470         * lib/fpurge.h: New file.
2471         * lib/fpurge.c: New file.
2472         * m4/fpurge.m4: New file.
2473
2474 2007-04-13  Bruno Haible  <bruno@clisp.org>
2475
2476         * modules/fbufmode-tests: New file.
2477         * tests/test-fbufmode.c: New file.
2478
2479         * modules/fbufmode: New file.
2480         * lib/fbufmode.h: New file.
2481         * lib/fbufmode.c: New file.
2482         * m4/fbufmode.m4: New file.
2483
2484 2007-04-13  Bruno Haible  <bruno@clisp.org>
2485
2486         * modules/fwritable-tests: New file.
2487         * tests/test-fwritable.c: New file.
2488
2489         * modules/fwritable: New file.
2490         * lib/fwritable.h: New file.
2491         * lib/fwritable.c: New file.
2492         * m4/fwritable.m4: New file.
2493
2494 2007-04-13  Bruno Haible  <bruno@clisp.org>
2495
2496         * modules/freadable-tests: New file.
2497         * tests/test-freadable.c: New file.
2498
2499         * modules/freadable: New file.
2500         * lib/freadable.h: New file.
2501         * lib/freadable.c: New file.
2502         * m4/freadable.m4: New file.
2503
2504 2007-04-13  Bruno Haible  <bruno@clisp.org>
2505
2506         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2507         MOSTLYCLEANFILES.
2508
2509 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2510
2511         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2512         gzip bootstrap.conf to avoid dragging in i18n machinery.
2513         (gnulib_tool_option): Use it.
2514
2515 2007-04-13  Bruno Haible  <bruno@clisp.org>
2516
2517         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2518         %F directives.
2519         * tests/test-vasprintf-posix.c (test_function): Likewise.
2520         * tests/test-snprintf-posix.h (test_function): Likewise.
2521         * tests/test-sprintf-posix.h (test_function): Likewise.
2522         * tests/test-fprintf-posix.h (test_function): Likewise.
2523         * tests/test-printf-posix.h (test_function): Likewise.
2524         * tests/test-fprintf-posix.out: Likewise.
2525
2526 2007-04-13  Bruno Haible  <bruno@clisp.org>
2527
2528         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2529         * modules/tls-tests (configure.ac): Likewise.
2530         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2531
2532 2007-04-13  Bruno Haible  <bruno@clisp.org>
2533
2534         * lib/tls.c (glthread_tls_get): Fix return type.
2535         Patch by Arto C. Nirkko <anirkko@insel.ch>.
2536
2537 2007-04-12  Eric Blake  <ebb9@byu.net>
2538
2539         * modules/gettime (Depends-on): Remove gettime.
2540         Reported by Dmitry V. Levin.
2541
2542 2007-04-12  Bruno Haible  <bruno@clisp.org>
2543
2544         * modules/fflush (Include): Mention <stdio.h>.
2545         * modules/strtoimax (Include): Mention <inttypes.h>.
2546         * modules/strtoumax (Include): Likewise.
2547
2548 2007-04-12  Eric Blake  <ebb9@byu.net>
2549
2550         * .cvsignore: New file.
2551         * .gitignore: Likewise.
2552
2553 2007-04-12  Bruno Haible  <bruno@clisp.org>
2554
2555         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
2556         not before, since $(LDADD) often contains libgnu.a.
2557         * modules/striconv-tests (test_striconv_LDADD): Likewise.
2558         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
2559         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
2560         Needed on Cygwin.
2561
2562 2007-04-12  Eric Blake  <ebb9@byu.net>
2563
2564         Work around glibc's failure to flush stdin on fclose.
2565         * lib/closein.c (close_stdin): Flush stdin before closing.
2566
2567         Work around glibc's failure to reset seekable stdin on exit.
2568         * modules/closein: New module.
2569         * lib/closein.c: New file.
2570         * lib/closein.h: Likewise.
2571         * m4/closein.m4: Likewise.
2572         * MODULES.html.sh (File stream based Input/Output): Document it.
2573
2574 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2575
2576         * gnulib-tool: Rename generated 'autobuild' script to
2577         'do-autobuild' in --create-megatestdir output.
2578
2579         * doc/gnulib.texi (Build robot for gnulib): Fix.
2580
2581 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2582
2583         * modules/sysexits (Depends-on): Add absolute-header.
2584
2585 2007-04-12  Eric Blake  <ebb9@byu.net>
2586
2587         No need to preserve errno on success.
2588         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
2589         Reported by Bruno Haible.
2590
2591 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2592
2593         * MODULES.html.sh (Support for maintaining and releasing
2594         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
2595
2596 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2597
2598         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
2599
2600 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2601
2602         * modules/autobuild: New module.
2603
2604         * m4/autobuild.m4: New file.
2605
2606 2007-04-11  Bruno Haible  <bruno@clisp.org>
2607
2608         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
2609         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
2610         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
2611         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
2612         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2613         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2614         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2615         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2616         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2617         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2618         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
2619         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2620         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2621         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
2622         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2623         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2624         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
2625         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2626         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2627         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
2628         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2629         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2630         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
2631         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2632         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2633         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
2634         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2635         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2636         Reported by Eric Blake.
2637
2638 2007-04-11  Bruno Haible  <bruno@clisp.org>
2639
2640         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
2641
2642 2007-04-10  Bruno Haible  <bruno@clisp.org>
2643
2644         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
2645         for NaN and Infinity. Needed on FreeBSD 6.1.
2646         * tests/test-vasnprintf-posix.c (test_function): Undo last change
2647         regarding results for "%010a" of Infinity and NaN.
2648         * tests/test-vasprintf-posix.c (test_function): Likewise.
2649         * tests/test-snprintf-posix.h (test_function): Likewise.
2650         * tests/test-sprintf-posix.h (test_function): Likewise.
2651         * tests/test-fprintf-posix.h (test_function): Likewise.
2652         * tests/test-printf-posix.h (test_function): Likewise.
2653         * tests/test-fprintf-posix.out: Likewise.
2654
2655 2007-04-10  Bruno Haible  <bruno@clisp.org>
2656
2657         * modules/locale-tests: New file.
2658         * tests/test-locale.c: New file.
2659
2660         * modules/locale: New file.
2661         * lib/locale_.h: New file.
2662         * m4/locale_h.m4: New file.
2663
2664 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2665             Bruno Haible  <bruno@clisp.org>
2666
2667         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
2668         be determined, test for availability of the copysignf, copysign,
2669         copysignl functions.
2670         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
2671         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
2672         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
2673
2674 2007-04-09  Eric Blake  <ebb9@byu.net>
2675
2676         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
2677         * modules/stdio (Makefile.am): Support fflush.
2678         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
2679         * modules/fflush: New file.
2680         * lib/fflush.c: Likewise.
2681         * m4/fflush.m4: Likewise.
2682         * modules/fflush-tests: New test.
2683         * tests/test-fflush.c: Likewise.
2684         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
2685
2686 2007-04-06  Bruno Haible  <bruno@clisp.org>
2687
2688         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
2689         (VASNPRINTF): Use signbit for faster determination whether to print a
2690         minus sign.
2691         * modules/vasnprintf (Files): Remove lib/float+.h.
2692         * modules/fprintf-posix (Depends-on): Add signbit.
2693         * modules/snprintf-posix (Depends-on): Likewise.
2694         * modules/sprintf-posix (Depends-on): Likewise.
2695         * modules/vasnprintf-posix (Depends-on): Likewise.
2696         * modules/vasprintf-posix (Depends-on): Likewise.
2697         * modules/vfprintf-posix (Depends-on): Likewise.
2698         * modules/vsnprintf-posix (Depends-on): Likewise.
2699         * modules/vsprintf-posix (Depends-on): Likewise.
2700
2701 2007-04-06  Bruno Haible  <bruno@clisp.org>
2702
2703         * tests/test-frexp.c (main): Test also the sign bit of zero results.
2704         * tests/test-frexpl.c (main): Likewise.
2705         * tests/test-ldexpl.c (main): Likewise.
2706         * modules/frexp-tests (Depends-on): Add signbit.
2707         * modules/frexpl-tests (Depdends-on): Likewise.
2708         * modules/ldexpl-tests (Depdends-on): Likewise.
2709
2710 2007-04-06  Bruno Haible  <bruno@clisp.org>
2711
2712         * modules/signbit-tests: New file.
2713         * tests/test-signbit.c: New file.
2714
2715         * modules/signbit: New file.
2716         * lib/signbitf.c: New file.
2717         * lib/signbitd.c: New file.
2718         * lib/signbitl.c: New file.
2719         * m4/signbit.m4: New file.
2720         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
2721         (signbit): New macro.
2722         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
2723         REPLACE_SIGNBIT.
2724         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
2725         REPLACE_FREXPL into math.h.
2726
2727 2007-04-06  Bruno Haible  <bruno@clisp.org>
2728
2729         * modules/isnanf-nolibm-tests: New file.
2730         * tests/test-isnanf.c: New file.
2731
2732         * modules/isnanf-nolibm: New file.
2733         * lib/isnanf.h: New file.
2734         * lib/isnanf.c: New file.
2735         * lib/isnan.c: Consider the USE_FLOAT macro.
2736         * m4/isnanf.m4: New file.
2737
2738 2007-04-06  Bruno Haible  <bruno@clisp.org>
2739
2740         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
2741         (Link): New section.
2742
2743         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
2744
2745 2007-04-06  Bruno Haible  <bruno@clisp.org>
2746
2747         Assume the 'long double' type.
2748         * m4/longdouble.m4: Remove file.
2749         * config/srclist.txt: Don't mention longdouble.m4.
2750         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
2751         * lib/float+.h: Likewise.
2752         * lib/frexp.c: Likewise.
2753         * lib/printf-args.h: Likewise.
2754         * lib/printf-args.c: Likewise.
2755         * lib/printf-frexp.c: Likewise.
2756         * lib/printf-parse.c: Likewise.
2757         * lib/vasnprintf.c: Likewise.
2758         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
2759         * m4/intl.m4: Likewise.
2760         * m4/isnanl.m4: Likewise.
2761         * m4/printf.m4: Likewise.
2762         * m4/printf-frexpl.m4: Likewise.
2763         * m4/vasnprintf.m4: Likewise.
2764         * modules/allocsa (Files): Remove m4/longdouble.m4.
2765         * modules/gettext (Files): Likewise.
2766         * modules/relocatable-prog-wrapper (Files): Likewise.
2767         * modules/vasnprintf (Files): Likewise.
2768         * modules/isnanl (Files): Likewise.
2769         (Include): Simplify.
2770         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
2771         (Include): Simplify.
2772         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
2773         (Include): Simplify.
2774         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
2775         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2776         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
2777         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2778         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2779         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2780         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
2781         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2782         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2783         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2784         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
2785         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2786         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
2787         * tests/test-isnanl.c: Likewise.
2788         * tests/test-snprintf-posix.h: Likewise.
2789         * tests/test-sprintf-posix.h: Likewise.
2790         * tests/test-vasnprintf-posix.c: Likewise.
2791         * tests/test-vasnprintf-posix2.c: Likewise.
2792         * tests/test-vasprintf-posix.c: Likewise.
2793
2794 2007-04-06  Bruno Haible  <bruno@clisp.org>
2795
2796         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
2797         * lib/math_.h [__DECC]: Include the overridden include file through
2798         #include_next, outside the double-inclusion guard.
2799         * lib/stdio_.h [__DECC]: Likewise.
2800         * lib/stdlib_.h [__DECC]: Likewise.
2801         * lib/string_.h [__DECC]: Likewise.
2802         * lib/time_.h [__DECC]: Likewise.
2803         * lib/wchar_.h [__DECC]: Likewise.
2804         * lib/wctype_.h [__DECC]: Likewise.
2805         * lib/inttypes_.h [__DECC]: Likewise.
2806         Reported by Albert Chin <china@thewrittenword.com> in
2807         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
2808
2809 2007-04-04  Eric Blake  <ebb9@byu.net>
2810
2811         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
2812         1.5.x.
2813
2814 2007-04-04  Bruno Haible  <bruno@clisp.org>
2815
2816         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
2817         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
2818
2819 2007-04-04  Bruno Haible  <bruno@clisp.org>
2820
2821         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
2822         results for "%010a" of Infinity and NaN.
2823         * tests/test-vasprintf-posix.c (test_function): Likewise.
2824         * tests/test-snprintf-posix.h (test_function): Likewise.
2825         * tests/test-sprintf-posix.h (test_function): Likewise.
2826         * tests/test-fprintf-posix.h (test_function): Remove these tests.
2827         * tests/test-printf-posix.h (test_function): Likewise.
2828         * tests/test-fprintf-posix.out: Update.
2829         Needed for FreeBSD 6.1.
2830
2831 2007-04-04  Bruno Haible  <bruno@clisp.org>
2832
2833         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
2834         directly used by the gnulib modules nor by gnulib-tool.
2835
2836 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
2837
2838         * DEPENDENCIES: Give overall description of version dependency
2839         desirability.  Use more-typical names for apps.
2840         Add shell, coreutils, diffutils, grep, tar, gzip.
2841
2842 2007-04-04  Simon Josefsson  <simon@josefsson.org>
2843
2844         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
2845
2846 2007-04-04  Karl Berry  <karl@gnu.org>
2847
2848         * MODULES.html.sh (func_module): missing '.
2849
2850 2007-04-03  Bruno Haible  <bruno@clisp.org>
2851
2852         * modules/argmatch-tests (Makefile.am): New variable
2853         test_argmatch_LDADD.
2854         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
2855         * modules/array-list-tests (Makefile.am): New variable
2856         test_array_list_LDADD.
2857         * modules/array-oset-tests (Makefile.am): New variable
2858         test_array_oset_LDADD.
2859         * modules/avltree-list-tests (Makefile.am): New variable
2860         test_avltree_list_LDADD.
2861         * modules/avltree-oset-tests (Makefile.am): New variable
2862         test_avltree_oset_LDADD.
2863         * modules/avltreehash-list-tests (Makefile.am): New variable
2864         test_avltreehash_list_LDADD.
2865         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
2866         test_canonicalize_lgpl_LDADD.
2867         * modules/carray-list-tests (Makefile.am): New variable
2868         test_carray_list_LDADD.
2869         * modules/dirname-tests (Makefile.am): New variable
2870         test_dirname_LDADD.
2871         * modules/linked-list-tests (Makefile.am): New variable
2872         test_linked_list_LDADD.
2873         * modules/linkedhash-list-tests (Makefile.am): New variable
2874         test_linkedhash_list_LDADD.
2875         * modules/rbtree-list-tests (Makefile.am): New variable
2876         test_rbtree_list_LDADD.
2877         * modules/rbtree-oset-tests (Makefile.am): New variable
2878         test_rbtree_oset_LDADD.
2879         * modules/rbtreehash-list-tests (Makefile.am): New variable
2880         test_rbtreehash_list_LDADD.
2881         * modules/xvasprintf-tests (Makefile.am): New variable
2882         test_xvasprintf_LDADD.
2883         Reported by Eric Blake.
2884
2885 2007-04-03  Eric Blake  <ebb9@byu.net>
2886
2887         * DEPENDENCIES: Weaken m4 requirements.
2888
2889 2007-04-03  Bruno Haible  <bruno@clisp.org>
2890
2891         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
2892         * modules/isnanl-tests (configure.ac): Likewise.
2893
2894 2007-04-03  Ben Pfaff  <blp@gnu.org>
2895
2896         * modules/iconv_open: Add $(srcdir)/ to source directory
2897         references in Makefile fragments that call gperf, to fix VPATH
2898         builds.
2899
2900 2007-04-03  Bruno Haible  <bruno@clisp.org>
2901
2902         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
2903         * lib/ldexpl.c: Undo last change.
2904
2905 2007-04-03  Bruno Haible  <bruno@clisp.org>
2906
2907         * modules/printf-frexpl (Depends-on): Undo last change.
2908         (Files): Add m4/ldexpl.m4.
2909
2910 2007-04-03  Bruno Haible  <bruno@clisp.org>
2911
2912         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
2913         * modules/isnanl (Link): New section.
2914
2915         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
2916         * modules/frexp (Link): New section.
2917
2918         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
2919         * modules/frexpl (Link): New section.
2920
2921         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
2922         * modules/ldexpl (Link): New section.
2923
2924 2007-04-03  Bruno Haible  <bruno@clisp.org>
2925
2926         * modules/TEMPLATE-EXTENDED: New file.
2927         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
2928
2929 2007-04-03  Bruno Haible  <bruno@clisp.org>
2930
2931         * DEPENDENCIES: New file.
2932         Suggested by Simon Josefsson.
2933
2934 2007-04-03  Bruno Haible  <bruno@clisp.org>
2935
2936         * doc/gnulib.texi: Escape @.
2937
2938 2007-04-03  James Youngman  <jay@gnu.org>
2939         and Paul Eggert  <eggert@cs.ucla.edu>
2940
2941         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
2942         birthtime on all systems that have birthtime, not just those which
2943         use st_birthtimensec rather than st_birthtim.  Putting zero in
2944         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
2945         that the birth time is not available for files on an NFS mount.
2946
2947 2007-04-03  Simon Josefsson  <simon@josefsson.org>
2948
2949         * modules/memxor: Move back from crypto/, suggested by Bruno.
2950         * modules/crypto/hmac-sha1: Fix memxor dependency.
2951
2952         * modules/crypto/gc: Moved from ../.
2953
2954 2007-04-02  Eric Blake  <ebb9@byu.net>
2955
2956         * lib/ldexpl.c (includes): Avoid libm.
2957
2958         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
2959
2960 2007-04-02  Bruno Haible  <bruno@clisp.org>
2961
2962         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
2963         on IRIX.
2964
2965 2007-04-02  Bruno Haible  <bruno@clisp.org>
2966
2967         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
2968         x86 or x86_64 platforms running MacOS X.
2969         Reported by Ryan Schmidt <@ryandesign.com>.
2970
2971 2007-04-02  Bruno Haible  <bruno@clisp.org>
2972
2973         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
2974         i386.
2975
2976 2007-04-01  Simon Josefsson  <simon@josefsson.org>
2977
2978         * modules/crypto/arcfour: Moved from ../.
2979         * modules/crypto/arcfour-tests: Moved from ../.
2980         * modules/crypto/arctwo: Moved from ../.
2981         * modules/crypto/arctwo-tests: Moved from ../.
2982         * modules/crypto/des: Moved from ../.
2983         * modules/crypto/des-tests: Moved from ../.
2984         * modules/crypto/gc-arcfour: Moved from ../.
2985         * modules/crypto/gc-arcfour-tests: Moved from ../.
2986         * modules/crypto/gc-arctwo: Moved from ../.
2987         * modules/crypto/gc-arctwo-tests: Moved from ../.
2988         * modules/crypto/gc-des: Moved from ../.
2989         * modules/crypto/gc-des-tests: Moved from ../.
2990         * modules/crypto/gc-hmac-md5: Moved from ../.
2991         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
2992         * modules/crypto/gc-hmac-sha1: Moved from ../.
2993         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
2994         * modules/crypto/gc-md2: Moved from ../.
2995         * modules/crypto/gc-md2-tests: Moved from ../.
2996         * modules/crypto/gc-md4: Moved from ../.
2997         * modules/crypto/gc-md4-tests: Moved from ../.
2998         * modules/crypto/gc-md5: Moved from ../.
2999         * modules/crypto/gc-md5-tests: Moved from ../.
3000         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3001         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3002         * modules/crypto/gc-random: Moved from ../.
3003         * modules/crypto/gc-rijndael: Moved from ../.
3004         * modules/crypto/gc-rijndael-tests: Moved from ../.
3005         * modules/crypto/gc-sha1: Moved from ../.
3006         * modules/crypto/gc-sha1-tests: Moved from ../.
3007         * modules/crypto/gc-tests: Moved from ../.
3008         * modules/crypto/hmac-md5: Moved from ../.
3009         * modules/crypto/hmac-md5-tests: Moved from ../.
3010         * modules/crypto/hmac-sha1: Moved from ../.
3011         * modules/crypto/hmac-sha1-tests: Moved from ../.
3012         * modules/crypto/md2: Moved from ../.
3013         * modules/crypto/md2-tests: Moved from ../.
3014         * modules/crypto/md4: Moved from ../.
3015         * modules/crypto/md4-tests: Moved from ../.
3016         * modules/crypto/md5: Moved from ../.
3017         * modules/crypto/md5-tests: Moved from ../.
3018         * modules/crypto/memxor: Moved from ../.
3019         * modules/crypto/rijndael: Moved from ../.
3020         * modules/crypto/rijndael-tests: Moved from ../.
3021         * modules/crypto/sha1: Moved from ../.
3022
3023 2007-03-30  James Youngman  <jay@gnu.org>
3024
3025         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3026         rename() to change the ctime of a file (because ctime is unaffected
3027         by rename on jfs2 on AIX 5.1).
3028         (main): Start by doing cleanup, in case a previous run failed leaving
3029         test files behind.
3030
3031 2007-03-31  Bruno Haible  <bruno@clisp.org>
3032
3033         Support old proprietary implementations of iconv.
3034         * modules/iconv_open: New file.
3035         * lib/iconv_.h: New file.
3036         * m4/iconv_h.m4: New file.
3037         * lib/iconv_open.c: New file.
3038         * lib/iconv_open-aix.gperf: New file.
3039         * lib/iconv_open-hpux.gperf: New file.
3040         * lib/iconv_open-irix.gperf: New file.
3041         * lib/iconv_open-osf.gperf: New file.
3042         * m4/iconv_open.m4: New file.
3043         * modules/linebreak (Depends-on): Add iconv_open.
3044         * modules/striconv (Depends-on): Likewise.
3045         * modules/striconveh (Depends-on): Likewise.
3046         * modules/unicodeio (Depends-on): Likewise.
3047         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3048         (iconv_t)(-1).
3049         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3050         conversion if cd is (iconv_t)(-1).
3051         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3052         is not possible.
3053
3054 2007-03-31  Bruno Haible  <bruno@clisp.org>
3055
3056         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3057         work on Solaris either. Protect also second use of "autodetect_jp".
3058
3059 2007-03-31  Bruno Haible  <bruno@clisp.org>
3060
3061         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3062         the function is not present.
3063
3064 2007-03-31  Bruno Haible  <bruno@clisp.org>
3065
3066         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3067         the function is not present.
3068
3069 2007-03-31  Bruno Haible  <bruno@clisp.org>
3070
3071         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
3072         a bug in HP-UX iconv_open().
3073
3074 2007-03-31  Bruno Haible  <bruno@clisp.org>
3075
3076         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
3077         (Mathematics <math.h>): New section, add fpieee.
3078         (Input/output <stdio.h>): Add fseterr.
3079         (Mathematics <math.h>): New section, add printf-frexp.
3080         (Container data structures): Add sublist.
3081         (Core language properties): Add fpucw, inline.
3082         (Functions for greatest-width integer types <inttypes.h>): Add
3083         imaxabs, imaxdiv, inttypes.
3084         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
3085         isnanl-nolibm, ldexp.
3086         (Mathematics <math.h>): New section, add printf-frexpl.
3087         (Support for systems lacking POSIX:2001): Add fprintf-posix,
3088         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
3089         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
3090         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
3091         (Unicode string functions): Add unistr/u*-mbtoucr.
3092         (Java): Add javacomp-script, javaexec-script.
3093         (C#): Add csharpcomp-script, csharpexec-script.
3094         (Support for building libraries and executables): Add havelib,
3095         relocatable-*.
3096         (Support for maintaining and releasing projects): Renamed from
3097         'Support for maintaining and release projects'. Add announce-gen.
3098
3099 2007-03-31  Bruno Haible  <bruno@clisp.org>
3100
3101         * README: Talk primarily about git.
3102         (git and CVS): Renamed from CVS.
3103         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
3104         gnulib is available through git.
3105         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
3106
3107 2007-03-30  Bruno Haible  <bruno@clisp.org>
3108
3109         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
3110         * lib/poll_.h: Likewise.
3111         * lib/stat_.h: Likewise.
3112         * lib/sys_time_.h: Likewise.
3113         * lib/sysexit_.h: Likewise.
3114         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
3115         * lib/stdbool_.h: Likewise.
3116         * lib/byteswap_.h: Add double-inclusion guard.
3117
3118 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
3119
3120         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
3121
3122 2007-03-30  Karl Berry  <karl@gnu.org>
3123
3124         * config/srclist-update: double space after USA in the license
3125         substitution, since that's how it's usually (?) written.
3126
3127 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
3128
3129         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
3130         reported by Bruno Haible.
3131
3132 2007-03-29  Bruno Haible  <bruno@clisp.org>
3133
3134         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
3135         a bug in AIX iconv().
3136
3137 2007-03-29  Bruno Haible  <bruno@clisp.org>
3138
3139         * modules/ldexpl-tests: New file.
3140         * tests/test-ldexpl.c: New file.
3141
3142 2007-03-29  Bruno Haible  <bruno@clisp.org>
3143
3144         * lib/ldexpl.c: Include fpucw.h.
3145         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
3146         multiplication.
3147         * modules/ldexpl (Depends-on): Add fpucw.
3148
3149 2007-03-29  Bruno Haible  <bruno@clisp.org>
3150
3151         * modules/ldexpl: New file.
3152         * m4/ldexpl.m4: New file.
3153         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
3154         set.
3155         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
3156         REPLACE_LDEXPL.
3157         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
3158         REPLACE_LDEXPL.
3159         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
3160         gl_FUNC_LDEXPL_WORKS.
3161         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
3162         * modules/mathl (Files): Remove lib/ldexpl.c.
3163         (Depends-on): Add ldexpl.
3164
3165 2007-03-29  Bruno Haible  <bruno@clisp.org>
3166
3167         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
3168
3169 2007-03-29  Bruno Haible  <bruno@clisp.org>
3170
3171         * tests/test-striconveh.c (main): Don't assume that a direct conversion
3172         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
3173         and possibly also HP-UX.
3174         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3175         work on AIX, IRIX, HP-UX, OSF/1.
3176         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
3177         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
3178         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
3179         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
3180         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
3181         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
3182
3183 2007-03-29  Bruno Haible  <bruno@clisp.org>
3184
3185         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
3186
3187 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3188
3189         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
3190         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
3191
3192 2007-03-29  Eric Blake  <ebb9@byu.net>
3193
3194         * lib/acl-internal.h: Remove redundant include.
3195         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
3196         Cygwin when a file is locked.
3197
3198 2007-03-29  Bruno Haible  <bruno@clisp.org>
3199
3200         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
3201         file.
3202         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
3203
3204 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3205
3206         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
3207         try to remove a parent directory if the child couldn't be removed
3208         (except for the first rmdir, which could fail because the child
3209         doesn't exist).  Problem reported by Jeff Blaine in
3210         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
3211
3212 2007-03-28  Bruno Haible  <bruno@clisp.org>
3213
3214         * lib/striconveh.c (utf8conv_carefully): New function.
3215         (mem_cd_iconveh_internal): Invoke it.
3216
3217 2007-03-28  Bruno Haible  <bruno@clisp.org>
3218
3219         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
3220         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
3221         input.
3222         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
3223         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
3224         unistr/u8-uctomb.
3225
3226 2007-03-28  Bruno Haible  <bruno@clisp.org>
3227
3228         * modules/unistr/u8-mbtoucr: New file.
3229         * lib/unistr/u8-mbtoucr.c: New file.
3230         * modules/unistr/u16-mbtoucr: New file.
3231         * lib/unistr/u16-mbtoucr.c: New file.
3232         * modules/unistr/u16-mbtoucr: New file.
3233         * lib/unistr/u16-mbtoucr.c: New file.
3234         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
3235
3236 2007-03-27  Simon Josefsson  <simon@josefsson.org>
3237             Bruno Haible  <bruno@clisp.org>
3238
3239         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
3240         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
3241         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
3242
3243         * m4/stdio_h.m4: Add stubs for vasprintf too.
3244
3245         * modules/stdio: Support vasprintf in sed command.
3246
3247         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3248         vasprintf.h.  Add stdio module indicator.
3249
3250         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3251         vasprintf.h.
3252
3253         * lib/vasprintf.h: File removed.
3254
3255         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3256         * lib/vasprintf.c: Ditto.
3257         * lib/xvasprintf.c: Ditto.
3258         * tests/test-vasprintf-posix.c: Ditto.
3259         * tests/test-vasprintf.c: Ditto.
3260
3261 2007-03-27  Bruno Haible  <bruno@clisp.org>
3262
3263         Make vasnprintf multithread-safe.
3264         * lib/vasnprintf.c (decimal_point_char): New function.
3265         (VASNPRINTF): Use it.
3266         Suggested by Simon Josefsson.
3267
3268 2007-03-27  Eric Blake  <ebb9@byu.net>
3269
3270         Support sub-second birthtime on cygwin.
3271         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3272         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3273         (get_stat_birthtime): Also work with st_birthtim.
3274
3275 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3276
3277         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3278         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3279         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3280         (get_stat_birthtime_ns): Simplify compile-time tests.
3281         (get_stat_birthtime): Change the API to look like
3282         get_stat_mtime etc., except return a negative tv_nsec on error.
3283         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3284         Don't check for "spare" fields.
3285         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3286         or for struct stat.st_birthtime, as these tests aren't used.
3287         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3288
3289 2007-03-27  Bruno Haible  <bruno@clisp.org>
3290
3291         * lib/stat-time.h: Include <sys/stat.h>.
3292
3293 2007-03-27  James Youngman  <jay@gnu.org>
3294
3295         * lib/stat-time.h (get_stat_birthtime): New function for
3296           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3297         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3298           and its variants.
3299         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3300         * modules/stat-time-test: New file.
3301         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3302
3303 2007-03-26  Bruno Haible  <bruno@clisp.org>
3304
3305         Better support of signalling NaNs.
3306         * lib/atanl.c: Include isnanl.h.
3307         (atanl): Perform test for NaN at the beginning of the function and
3308         through a call to isnanl.
3309         * lib/cosl.c: Include isnanl.h.
3310         (cosl): Perform test for NaN at the beginning of the function and
3311         through a call to isnanl.
3312         * lib/ldexpl.c: Include isnanl.h.
3313         (ldexpl): Perform test for NaN through a call to isnanl.
3314         * lib/logl.c: Include isnanl.h.
3315         (logl): Perform test for NaN at the beginning of the function and
3316         through a call to isnanl.
3317         * lib/sinl.c: Include isnanl.h.
3318         (sinl): Perform test for NaN at the beginning of the function and
3319         through a call to isnanl.
3320         * lib/sqrtl.c: Include isnanl.h.
3321         (sqrtl): Perform test for NaN at the beginning of the function and
3322         through a call to isnanl.
3323         * lib/tanl.c: Include isnanl.h.
3324         (tanl): Perform test for NaN at the beginning of the function and
3325         through a call to isnanl.
3326         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3327         * modules/mathl (Depends-on): Add isnanl.
3328
3329 2007-03-26  Eric Blake  <ebb9@byu.net>
3330
3331         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3332         regression in logic sense of previous patch.
3333
3334 2007-03-26  Bruno Haible  <bruno@clisp.org>
3335
3336         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3337         unportable shell command "if ! ...".
3338         Reported by Ralf Wildenhues.
3339
3340 2007-03-25  Bruno Haible  <bruno@clisp.org>
3341
3342         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3343         <sysexits.h> file, and only add EX_CONFIG.
3344         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3345         absolute file name and whether it is sufficient. Substitute also
3346         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3347         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3348         ABSOLUTE_SYSEXITS_H into sysexits.h.
3349
3350 2007-03-25  Bruno Haible  <bruno@clisp.org>
3351
3352         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3353         hints is NULL.
3354
3355 2007-03-25  Bruno Haible  <bruno@clisp.org>
3356
3357         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3358         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3359
3360 2007-03-25  Bruno Haible  <bruno@clisp.org>
3361
3362         * lib/vasnprintf.c: Include langinfo.h.
3363         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3364         multithread-safe.
3365         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3366         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3367         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3368         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3369         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3370         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3371         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3372         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3373         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3374         Reported by Simon Josefsson.
3375
3376 2007-03-25  Bruno Haible  <bruno@clisp.org>
3377
3378         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3379         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3380         * modules/vasnprintf (Depends-on): Add stdint.
3381
3382 2007-03-25  Bruno Haible  <bruno@clisp.org>
3383
3384         * modules/fpieee: New file.
3385         * m4/fpieee.m4: New file.
3386         * modules/isnan-nolibm (Depends-on): Add fpieee.
3387         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3388         * modules/isnanl (Depends-on): Add fpieee.
3389
3390 2007-03-25  Bruno Haible  <bruno@clisp.org>
3391
3392         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3393
3394 2007-03-25  Bruno Haible  <bruno@clisp.org>
3395
3396         Avoid test failures on IRIX 6.5.
3397         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3398         (main): Use it.
3399         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3400         macros.
3401         (main): Use them.
3402
3403 2007-03-25  Bruno Haible  <bruno@clisp.org>
3404
3405         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3406         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3407         exists but doesn't work.
3408         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3409         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3410         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3411         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3412
3413 2007-03-25  Bruno Haible  <bruno@clisp.org>
3414
3415         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3416         returns inf. Needed on IRIX 6.5.
3417
3418 2007-03-25  Bruno Haible  <bruno@clisp.org>
3419
3420         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3421         (main): Use isnanl instead of x != x idiom.
3422         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3423
3424         * tests/test-frexp.c: Include isnan.h.
3425         (main): Use isnan instead of x != x idiom.
3426         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3427
3428 2007-03-25  Bruno Haible  <bruno@clisp.org>
3429
3430         * tests/test-frexp.c (NaN): New function/macro.
3431         (main): Use it instead of 0.0 / 0.0.
3432         * tests/test-isnan.c (NaN): New function/macro.
3433         (main): Use it instead of 0.0 / 0.0.
3434         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3435         (test_function): Use it instead of 0.0 / 0.0.
3436         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3437         (test_function): Use it instead of 0.0 / 0.0.
3438         * tests/test-snprintf-posix.h (NaN): New function/macro.
3439         (test_function): Use it instead of 0.0 / 0.0.
3440         * tests/test-sprintf-posix.h (NaN): New function/macro.
3441         (test_function): Use it instead of 0.0 / 0.0.
3442         * tests/test-fprintf-posix.h (NaN): New function/macro.
3443         (test_function): Use it instead of 0.0 / 0.0.
3444         * tests/test-printf-posix.h (NaN): New function/macro.
3445         (test_function): Use it instead of 0.0 / 0.0.
3446
3447         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3448
3449 2007-03-25  Bruno Haible  <bruno@clisp.org>
3450
3451         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3452
3453 2007-03-25  Bruno Haible  <bruno@clisp.org>
3454
3455         * lib/regexec.c (merge_state_with_log): Make static.
3456
3457 2007-03-25  Bruno Haible  <bruno@clisp.org>
3458
3459         * lib/trigl.c (kernel_rem_pio2): Make static.
3460
3461 2007-03-25  Bruno Haible  <bruno@clisp.org>
3462
3463         * lib/sincosl.c (sincosl_table): Make static.
3464
3465 2007-03-25  Bruno Haible  <bruno@clisp.org>
3466
3467         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3468         if the compiler does not support C99.
3469
3470 2007-03-25  Bruno Haible  <bruno@clisp.org>
3471
3472         * modules/time (Makefile.am): Ensure all rule action lines start with a
3473         tab.
3474
3475 2007-03-24  Bruno Haible  <bruno@clisp.org>
3476
3477         * modules/tsearch-tests: New file.
3478         * tests/test-tsearch.sh: New file.
3479         * tests/test-tsearch.c: New file, mostly copied from glibc.
3480
3481         * modules/search-tests: New file.
3482         * tests/test-search.c: New file.
3483
3484         * modules/search: New file.
3485         * lib/search_.h: New file, incorporating lib/tsearch.h.
3486         * m4/search_h.m4: New file.
3487         * lib/tsearch.h: Remove file.
3488         * lib/tsearch.c: Include search.h instead of tsearch.h.
3489         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3490         HAVE_TSEARCH.
3491         * modules/tsearch (Files): Remove lib/tsearch.h.
3492         (Depends-on): Add search.
3493         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3494         (Include): Change tsearch.h into search.h.
3495
3496 2007-03-24  Bruno Haible  <bruno@clisp.org>
3497
3498         * modules/fpucw: New file.
3499         * lib/fpucw.h: New file.
3500         * lib/frexp.c: Include fpucw.h.
3501         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3502         (FUNC): Use them.
3503         * lib/printf-frexp.c: Include fpucw.h.
3504         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3505         (FUNC): Use them.
3506         * lib/vasnprintf.c: Include fpucw.h.
3507         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3508         'long double' calculations.
3509         * tests/test-frexpl.c: Include fpucw.h.
3510         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3511         * tests/test-printf-frexpl.c: Include fpucw.h.
3512         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3513         * modules/frexpl (Depends-on): Add fpucw.
3514         * modules/printf-frexpl (Depends-on): Likewise.
3515         * modules/fprintf-posix (Depends-on): Likewise.
3516         * modules/snprintf-posix (Depends-on): Likewise.
3517         * modules/sprintf-posix (Depends-on): Likewise.
3518         * modules/vasnprintf-posix (Depends-on): Likewise.
3519         * modules/vasprintf-posix (Depends-on): Likewise.
3520         * modules/vfprintf-posix (Depends-on): Likewise.
3521         * modules/vsnprintf-posix (Depends-on): Likewise.
3522         * modules/vsprintf-posix (Depends-on): Likewise.
3523         * modules/frexpl-tests (Depends-on): Likewise.
3524         * modules/printf-frexpl-tests (Depends-on): Likewise.
3525
3526 2007-03-24  Bruno Haible  <bruno@clisp.org>
3527
3528         * lib/float+.h: New file.
3529         * lib/isnan.c: Include float+.h.
3530         (SIZE): New macro.
3531         (FUNC): Compare only SIZE bytes of the value.
3532         * lib/vasnprintf.c: Include float+.h.
3533         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
3534         SIZEOF_LDBL or SIZEOF_DBL bytes.
3535         * modules/isnan-nolibm (Files): Add lib/float+.h.
3536         * modules/isnanl-nolibm (Files): Add lib/float+.h.
3537         * modules/isnanl (Files): Add lib/float+.h.
3538         * modules/vasnprintf (Files): Add lib/float+.h.
3539
3540 2007-03-24  Bruno Haible  <bruno@clisp.org>
3541
3542         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
3543         include isnanl-nolibm.h.
3544
3545 2007-03-24  Bruno Haible  <bruno@clisp.org>
3546
3547         * tests/test-read-file.c (main): Don't produce spurious output for
3548         expected situations. Make the test fail if it encountered unexpected
3549         results.
3550
3551 2007-03-24  Bruno Haible  <bruno@clisp.org>
3552
3553         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
3554         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
3555
3556 2007-03-24  Bruno Haible  <bruno@clisp.org>
3557
3558         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
3559
3560 2007-03-24  Bruno Haible  <bruno@clisp.org>
3561
3562         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
3563         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
3564
3565         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
3566         * modules/utf8-ucs4: Turn into a symbolic link to module
3567         unistr/u8-mbtouc.
3568
3569         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
3570         utf8-ucs4-unsafe.
3571         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
3572         unistr/u8-mbtouc-unsafe.
3573
3574         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
3575         * modules/utf16-ucs4: Turn into a symbolic link to module
3576         unistr/u16-mbtouc.
3577
3578         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
3579         utf16-ucs4-unsafe.
3580         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
3581         unistr/u16-mbtouc-unsafe.
3582
3583         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
3584         * modules/ucs4-utf8: Turn into a symbolic link to module
3585         unistr/u8-ubtomb.
3586
3587         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
3588         * modules/ucs4-utf16: Turn into a symbolic link to module
3589         unistr/u16-ubtomb.
3590
3591 2007-03-24  Bruno Haible  <bruno@clisp.org>
3592
3593         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
3594         Enable the function only if HAVE_INLINE.
3595         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
3596         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3597         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
3598         Enable the function only if HAVE_INLINE.
3599         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
3600         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3601         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
3602         Enable the function only if HAVE_INLINE.
3603         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
3604         Enable the function only if HAVE_INLINE.
3605         * modules/utf8-ucs4: Update.
3606         * modules/utf8-ucs4-unsafe: Update.
3607         * modules/utf16-ucs4: Update.
3608         * modules/utf16-ucs4-unsafe: Update.
3609         * modules/ucs4-utf8: Update.
3610         * modules/ucs4-utf16: Update.
3611
3612 2007-03-24  Bruno Haible  <bruno@clisp.org>
3613
3614         * lib/utf8-ucs4.h: Remove file.
3615         * lib/utf8-ucs4-unsafe.h: Remove file.
3616         * lib/utf16-ucs4.h: Remove file.
3617         * lib/utf16-ucs4-unsafe.h: Remove file.
3618         * lib/ucs4-utf8.h: Remove file.
3619         * lib/ucs4-utf16.h: Remove file.
3620         * lib/unistr.h: Include their previous contents.
3621         * m4/utf-ucs4.m4: Remove file.
3622         * m4/ucs4-utf.m4: Remove file.
3623         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
3624         (Depends-on): Add unistr/base.
3625         (configure.ac): Remove gl_UTF_UCS4.
3626         (Makefile.am): Update.
3627         (Include): Change to unistr.h.
3628         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
3629         (Depends-on): Add unistr/base.
3630         (configure.ac): Remove gl_UTF_UCS4.
3631         (Makefile.am): Update.
3632         (Include): Change to unistr.h.
3633         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
3634         (Depends-on): Add unistr/base.
3635         (configure.ac): Remove gl_UTF_UCS4.
3636         (Makefile.am): Update.
3637         (Include): Change to unistr.h.
3638         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
3639         (Depends-on): Add unistr/base.
3640         (configure.ac): Remove gl_UTF_UCS4.
3641         (Makefile.am): Update.
3642         (Include): Change to unistr.h.
3643         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
3644         (Depends-on): Add unistr/base.
3645         (configure.ac): Remove gl_UCS4_UTF.
3646         (Makefile.am): Update.
3647         (Include): Change to unistr.h.
3648         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
3649         (Depends-on): Add unistr/base.
3650         (configure.ac): Remove gl_UCS4_UTF.
3651         (Makefile.am): Update.
3652         (Include): Change to unistr.h.
3653         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
3654         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
3655         utf8-ucs4-unsafe.h.
3656         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
3657         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
3658         utf16-ucs4-unsafe.h.
3659         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
3660         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
3661         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
3662         * lib/unistr/u8-strchr.c: Likewise.
3663         * lib/unistr/u8-strrchr.c: Likewise.
3664         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
3665         * lib/unistr/u16-strchr.c: Likewise.
3666         * lib/unistr/u16-strrchr.c: Likewise.
3667         * lib/striconveh.c: Update.
3668         * lib/linebreak.c: Update.
3669
3670 2007-03-24  Bruno Haible  <bruno@clisp.org>
3671
3672         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
3673         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
3674
3675 2007-03-22  Bruno Haible  <bruno@clisp.org>
3676
3677         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
3678
3679 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
3680
3681         * MODULES.html.sh (File system functions): New module write-any-file.
3682         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
3683         * m4/write-any-file.m4: New files.
3684
3685 2007-03-23  Eric Blake  <ebb9@byu.net>
3686
3687         * gnulib-tool: Rearrange space-tab sequences, since some editors
3688         like to eat them.
3689
3690 2007-03-23  Eric Blake  <ebb9@byu.net>
3691
3692         * lib/version-etc.c (version_etc_va): Update license wording to
3693         be more concise.  Recommended by Richard Stallman.
3694
3695 2007-03-22  Bruno Haible  <bruno@clisp.org>
3696
3697         * lib/poll.c (MSG_PEEK): New fallback definition.
3698
3699 2007-03-22  Bruno Haible  <bruno@clisp.org>
3700
3701         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
3702         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
3703         (main): Update.
3704         Fixes a compilation error on BeOS.
3705
3706 2007-03-22  Bruno Haible  <bruno@clisp.org>
3707
3708         * modules/frexpl-tests: New file.
3709         * tests/test-frexpl.c: New file.
3710
3711         * modules/frexpl: New file.
3712         * m4/frexpl.m4: New file.
3713         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
3714         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
3715         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
3716         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
3717         (Depends-on): Add frexpl. Remove isnanl-nolibm.
3718         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
3719
3720 2007-03-22  Bruno Haible  <bruno@clisp.org>
3721
3722         * lib/frexpl.c: Share code with lib/frexp.c.
3723         * modules/mathl (Files): Add lib/frexp.c.
3724         (Depends-on): Add isnanl-nolibm.
3725
3726 2007-03-22  Bruno Haible  <bruno@clisp.org>
3727
3728         * modules/printf-frexp (Files): Add m4/frexp.m4.
3729         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
3730         only if the found frexp function actually works.
3731
3732 2007-03-22  Bruno Haible  <bruno@clisp.org>
3733
3734         * lib/frexp.c: Remove older implementation that uses divisions.
3735
3736 2007-03-21  Bruno Haible  <bruno@clisp.org>
3737
3738         * modules/frexp-tests: New file.
3739         * tests/test-frexp.c: New file.
3740
3741         * modules/frexp: New file.
3742         * lib/frexp.c: New file.
3743         * m4/frexp.m4: New file.
3744         * lib/math_.h (frexp): New declaration.
3745         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
3746         REPLACE_FREXP.
3747         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
3748
3749 2007-03-21  Bruno Haible  <bruno@clisp.org>
3750
3751         * modules/isnanl-tests: New file.
3752         * tests/test-isnanl.c: New file.
3753
3754         * modules/isnanl: New file.
3755         * lib/isnanl.h: New file.
3756         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
3757         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
3758         gl_FUNC_ISNANL_WORKS.
3759         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
3760         New macros.
3761
3762 2007-03-21  Bruno Haible  <bruno@clisp.org>
3763
3764         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
3765         lib/isnanl.h.
3766         (Include): Update.
3767         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
3768         * lib/vasnprintf.c: Update.
3769         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
3770         tests/test-isnanl.h, remove tests/test-isnanl.c.
3771         (Makefile.am): Update.
3772         * tests/test-isnanl-nolibm.c: New file.
3773         * tests/test-isnanl.h: New file.
3774         * tests/test-isnanl.c: Remove file.
3775
3776 2007-03-21  Jim Meyering  <jim@meyering.net>
3777
3778         When trying to open ".", treat ESTALE like EACCES.
3779         * lib/savewd.c (savewd_save): Resort to forking not just upon
3780         failure with EACCES, but also when errno is ESTALE.
3781
3782 2007-03-20  Bruno Haible  <bruno@clisp.org>
3783
3784         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
3785         Needed on AIX 5.1. Reported by Matthew Woehlke.
3786
3787 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3788
3789         Suggestions by Bruno Haible:
3790         * lib/acl-internal.h: Include "gettext.h" rather than rolling
3791         our own.
3792         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
3793         * modules/acl (Depends-on): Add gettext.
3794
3795 2007-03-19  Bruno Haible  <bruno@clisp.org>
3796
3797         * modules/iconvme: Remove file.
3798         * lib/iconvme.h: Remove file.
3799         * lib/iconvme.c: Remove file.
3800         * m4/iconvme.m4: Remove file.
3801
3802 2007-03-19  Bruno Haible  <bruno@clisp.org>
3803
3804         * doc/relocatable-maint.texi: Break long shell script line.
3805         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3806
3807 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3808
3809         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
3810         handle file_has_acl.
3811         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
3812         * lib/acl.c: Move header inclusions and related macro defns into
3813         lib/acl-internal.h.
3814         (S_ISLNK): Remove defn, since that's now done for us.
3815         (file_has_acl): Move to lib/file-has-acl.c.
3816         Call acl_trivial if available.  This is the crucial part of the fix.
3817         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
3818         shared within the library.  Rewrite a bit, partly to make it compatible
3819         with the GNU coding style.
3820         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
3821         Remove unnecessary double-quotes.
3822         Don't test for acl_to_text; the build will catch that.
3823         Replace acl_entries if it doesn't exist and it is needed.
3824         Check for -lsec and acl_trivial (as used on Solaris 10).
3825         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
3826         lib/file-has-acl.c.
3827         (Depends-on): Add sys_stat, for S_ISLNK.
3828
3829 2007-03-19  Ben Pfaff  <blp@gnu.org>
3830
3831         * doc/gnulib.texi: Fix typos.
3832         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3833
3834 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3835
3836         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
3837         If size is zero here, buf must be zero.
3838
3839 2007-03-19  Simon Josefsson  <simon@josefsson.org>
3840
3841         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
3842         <bruno@clisp.org>.
3843
3844 2007-03-18  Bruno Haible  <bruno@clisp.org>
3845
3846         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
3847         Suggested by Eric Blake.
3848
3849 2007-03-18  Ben Pfaff  <blp@gnu.org>
3850
3851         * doc/relocatable.texi: Recommend using as prefix a directory
3852         that does not exist and will never be created.  Based on
3853         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
3854         and others.
3855
3856 2007-03-17  Bruno Haible  <bruno@clisp.org>
3857
3858         * lib/fchownat.c: Include lchown.h.
3859
3860 2007-03-17  Bruno Haible  <bruno@clisp.org>
3861
3862         Fix endless loop when the given allocated size was > INT_MAX.
3863         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
3864         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
3865         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
3866         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
3867         * lib/sprintf.c (sprintf): Likewise.
3868
3869 2007-03-17  Bruno Haible  <bruno@clisp.org>
3870
3871         * tests/test-argp-2.sh (func_compare): Output a context diff.
3872
3873 2007-03-17  Bruno Haible  <bruno@clisp.org>
3874
3875         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
3876         locale's decimal-point character.
3877
3878 2007-03-17  Bruno Haible  <bruno@clisp.org>
3879
3880         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
3881         before comparing it. Needed because on some platforms (e.g. x86) a
3882         'long double' occupies less bytes than sizeof (long double).
3883
3884 2007-03-17  Bruno Haible  <bruno@clisp.org>
3885
3886         * tests/test-crc.c (main): Make printf statements 64-bit clean.
3887         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
3888         * tests/test-getaddrinfo.c (simple): Likewise.
3889         * tests/test-read-file.c (main): Likewise.
3890
3891 2007-03-17  Bruno Haible  <bruno@clisp.org>
3892
3893         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
3894
3895 2007-03-17  Bruno Haible  <bruno@clisp.org>
3896
3897         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
3898         unused variable.
3899
3900 2007-03-17  Bruno Haible  <bruno@clisp.org>
3901
3902         * tests/test-c-strcasecmp.c: Include c-strcase.h.
3903         * tests/test-c-strncasecmp.c: Likewise.
3904
3905 2007-03-17  Bruno Haible  <bruno@clisp.org>
3906
3907         * modules/stdlib (Depends-on): Add unistd.
3908         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
3909         Needed for MacOS X 10.3.
3910
3911 2007-03-17  Bruno Haible  <bruno@clisp.org>
3912
3913         * lib/unistr/u-strdup.h: Include <stdlib.h>.
3914
3915 2007-03-17  Bruno Haible  <bruno@clisp.org>
3916
3917         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
3918
3919 2007-03-17  Bruno Haible  <bruno@clisp.org>
3920
3921         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
3922         to reflect files copied from gnulib (with or without modifications).
3923         Suggested by Jim Meyering.
3924
3925 2007-03-17  Eric Blake  <ebb9@byu.net>
3926
3927         * NEWS: Document stdlib change from 2007-02-18.
3928
3929 2007-03-17  Jim Meyering  <jim@meyering.net>
3930
3931         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
3932         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
3933         someone uses a name containing shell meta-characters.
3934         Reported by Alfred M. Szmidt.
3935
3936         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
3937
3938 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3939
3940         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
3941         and copy gettext configuration files only if configure.ac contains
3942         a use of AM_GNU_GETTEXT_VERSION.
3943
3944 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3945
3946         * build-aux/bootstrap (gnulib_name): New variable.
3947         (gnulib_tool_options): Use it.
3948
3949 2007-03-13  Simon Josefsson  <simon@josefsson.org>
3950
3951         * tests/test-des.c: Use new namespace.
3952
3953 2007-03-15  Bruno Haible  <bruno@clisp.org>
3954
3955         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
3956         Reported by James Youngman <jay@gnu.org>.
3957
3958 2007-03-15  Bruno Haible  <bruno@clisp.org>
3959
3960         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
3961         declared prototype. Needed with cc on OSF/1 5.1.
3962
3963 2007-03-15  Bruno Haible  <bruno@clisp.org>
3964
3965         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
3966         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
3967         (struct gl_list_implementation): Add dispose_fn argument to the
3968         'create_empty', 'create' methods.
3969         (struct gl_list_impl_base): Add field 'dispose_fn'.
3970         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
3971         argument.
3972         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
3973         dispose_fn argument.
3974         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
3975         dispose_fn on the dropped values.
3976         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
3977         dispose_fn argument.
3978         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
3979         dropped values.
3980         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
3981         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3982         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
3983         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3984         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
3985         argument.
3986         (gl_tree_list_free): Call dispose_fn on the dropped values.
3987         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
3988         the dropped values.
3989         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3990         Add dispose_fn argument.
3991         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
3992         Call dispose_fn on the dropped values.
3993         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
3994         Add dispose_fn argument.
3995         (gl_sublist_create): Initialize the 'dispose_fn' field.
3996         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
3997         * tests/test-array_list.c (main): Update.
3998         * tests/test-carray_list.c (main): Update.
3999         * tests/test-avltree_list.c (main): Update.
4000         * tests/test-rbtree_list.c (main): Update.
4001         * tests/test-avltreehash_list.c (main): Update.
4002         * tests/test-rbtreehash_list.c (main): Update.
4003         * tests/test-linked_list.c (main): Update.
4004         * tests/test-linkedhash_list.c (main): Update.
4005         * tests/test-array_oset.c (main): Update.
4006
4007 2007-03-15  Bruno Haible  <bruno@clisp.org>
4008
4009         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4010         (gl_oset_create_empty): Add dispose_fn argument.
4011         (struct gl_oset_implementation): Add dispose_fn argument to
4012         'create_empty' method.
4013         (struct gl_oset_impl_base): Add dispose_fn field.
4014         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4015         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4016         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4017         values.
4018         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4019         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4020         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4021         dropped value.
4022         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4023         dropped value.
4024         * tests/test-array_oset.c (main): Update.
4025         * tests/test-avltree_oset.c (main): Update.
4026         * tests/test-rbtree_oset.c (main): Update.
4027         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4028
4029 2007-03-13  Bruno Haible  <bruno@clisp.org>
4030
4031         * tests/test-stdbool.c (i): Update after last patch.
4032
4033 2007-03-12  Bruno Haible  <bruno@clisp.org>
4034
4035         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4036         the iswprint macro. Needed on Solaris 2.5.1.
4037
4038 2007-03-12  Bruno Haible  <bruno@clisp.org>
4039
4040         * tests/test-printf-frexp.c (main): Declare x as volatile.
4041
4042 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4043
4044         * doc/gnulib.texi (Build robot for gnulib): New section.
4045
4046 2007-03-12  Jim Meyering  <jim@meyering.net>
4047
4048         * build-aux/bootstrap: New file.
4049         * build-aux/bootstrap.conf: New file, from coreutils.
4050
4051 2007-03-11  Bruno Haible  <bruno@clisp.org>
4052
4053         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4054
4055 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4056
4057         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4058         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4059         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4060
4061 2007-03-11  Bruno Haible  <bruno@clisp.org>
4062
4063         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4064         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4065
4066 2007-03-11  Bruno Haible  <bruno@clisp.org>
4067
4068         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4069         formula. Needed for SunPRO C 5.0.
4070
4071 2007-03-11  Bruno Haible  <bruno@clisp.org>
4072
4073         * modules/long-options (Depends-on): Add getopt.
4074
4075 2007-03-11  Bruno Haible  <bruno@clisp.org>
4076
4077         * modules/modechange (Depends-on): Add stdbool.
4078
4079 2007-03-11  Bruno Haible  <bruno@clisp.org>
4080
4081         * modules/i-ring (Depends-on): Add stdbool.
4082
4083 2007-03-11  Bruno Haible  <bruno@clisp.org>
4084
4085         * modules/gc-des (Depends-on): Add stdbool.
4086
4087 2007-03-11  Bruno Haible  <bruno@clisp.org>
4088
4089         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
4090
4091 2007-03-11  Bruno Haible  <bruno@clisp.org>
4092
4093         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
4094
4095 2007-03-11  Bruno Haible  <bruno@clisp.org>
4096
4097         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
4098
4099 2007-03-11  Bruno Haible  <bruno@clisp.org>
4100
4101         * lib/vasnprintf.c (sprintf): Undefine.
4102
4103 2007-03-11  Bruno Haible  <bruno@clisp.org>
4104
4105         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
4106         initializers in SunPRO C and Compaq C compilers.
4107
4108 2007-03-11  Bruno Haible  <bruno@clisp.org>
4109
4110         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
4111         decrementing code ANSI C compliant.
4112
4113 2007-03-11  Bruno Haible  <bruno@clisp.org>
4114
4115         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
4116         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
4117
4118 2007-03-11  Bruno Haible  <bruno@clisp.org>
4119
4120         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
4121         <stdbool.h> substitute doesn't pass.
4122
4123 2007-03-11  Bruno Haible  <bruno@clisp.org>
4124
4125         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
4126
4127 2007-03-11  Bruno Haible  <bruno@clisp.org>
4128
4129         * gnulib-tool (func_create_megatestdir): Create also an autobuild
4130         script, for submission to autobuild.josefsson.org.
4131
4132 2007-03-10  Bruno Haible  <bruno@clisp.org>
4133
4134         * modules/canonicalize-lgpl-tests: New file.
4135         * tests/test-canonicalize-lgpl.sh: New file.
4136         * tests/test-canonicalize-lgpl.c: New file.
4137
4138         * modules/c-strcase-tests: New file.
4139         * tests/test-c-strcase.sh: New file.
4140         * tests/test-c-strcasecmp.c: New file.
4141         * tests/test-c-strncasecmp.c: New file.
4142
4143         * modules/atexit-tests: New file.
4144         * tests/test-atexit.sh: New file.
4145         * tests/test-atexit.c: New file.
4146
4147 2007-03-10  Bruno Haible  <bruno@clisp.org>
4148
4149         * tests/test-binary-io.sh: Use temporary filenames that are not so
4150         likely to clash with those of other tests (in a parallel make).
4151         * tests/test-binary-io.c: Likewise.
4152
4153 2007-03-10  Bruno Haible  <bruno@clisp.org>
4154
4155         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
4156         fallback; use #error instead.
4157         Suggested by Simon Josefsson.
4158
4159 2007-03-10  Bruno Haible  <bruno@clisp.org>
4160
4161         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
4162         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
4163         first and the last.
4164
4165 2007-03-10  Bruno Haible  <bruno@clisp.org>
4166
4167         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
4168
4169 2007-03-10  Bruno Haible  <bruno@clisp.org>
4170
4171         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
4172         "make distcheck".
4173         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
4174         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
4175         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
4176
4177 2007-03-10  Bruno Haible  <bruno@clisp.org>
4178
4179         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
4180         variable.
4181         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
4182         variable.
4183
4184 2007-03-09  Eric Blake  <ebb9@byu.net>
4185         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
4186
4187         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
4188         types are not being provided by gnulib.
4189         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
4190         types are supported.
4191
4192 2007-03-10  Bruno Haible  <bruno@clisp.org>
4193
4194         * lib/stdio_.h (__attribute__): New macro.
4195         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
4196         vsprintf): Specify __attribute__ __format__ for GCC.
4197         Suggested by Eric Blake.
4198
4199 2007-03-09  Bruno Haible  <bruno@clisp.org>
4200
4201         * modules/printf-posix-tests: New file.
4202         * tests/test-printf-posix.sh: New file.
4203         * tests/test-printf-posix.c: New file.
4204
4205         * modules/printf-posix: New file.
4206         * lib/printf.c: New file.
4207         * m4/printf-posix-rpl.m4: New file.
4208         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
4209         REPLACE_PRINTF.
4210         * lib/stdio_.h (printf): New declaration.
4211         (format, __format__, ____printf____, ____scanf____, ____strftime____,
4212         ____strfmon____): New macros.
4213         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
4214         REPLACE_PRINTF.
4215
4216 2007-03-09  Bruno Haible  <bruno@clisp.org>
4217
4218         * tests/test-vasnprintf-posix2.sh: New file.
4219         * tests/test-vasnprintf-posix2.c: New file.
4220         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
4221         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
4222         (Makefile.am): Activate test-vasnprintf-posix2.sh.
4223
4224         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
4225         a locale dependent decimal point, rather than always '.'.
4226
4227 2007-03-09  Eric Blake  <ebb9@byu.net>
4228
4229         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4230         spite of platforms like Tandem/NSK that define it to -1.
4231
4232 2007-03-08  Bruno Haible  <bruno@clisp.org>
4233
4234         * modules/vprintf-posix-tests: New file.
4235         * tests/test-vprintf-posix.sh: New file.
4236         * tests/test-vprintf-posix.c: New file.
4237         * tests/test-printf-posix.h: New file.
4238
4239         * modules/vprintf-posix: New file.
4240         * lib/vprintf.c: New file.
4241         * m4/vprintf-posix.m4: New file.
4242         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
4243         REPLACE_VPRINTF.
4244         * lib/stdio_.h (vprintf): New declaration.
4245         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
4246         REPLACE_VPRINTF.
4247
4248 2007-03-08  Bruno Haible  <bruno@clisp.org>
4249
4250         * modules/fprintf-posix-tests: New file.
4251         * tests/test-fprintf-posix.sh: New file.
4252         * tests/test-fprintf-posix.c: New file.
4253
4254         * modules/fprintf-posix: New file.
4255         * lib/fprintf.c: New file.
4256         * m4/fprintf-posix.m4: New file.
4257         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4258         REPLACE_FPRINTF.
4259         * lib/stdio_.h (fprintf): New declaration.
4260         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4261         REPLACE_FPRINTF.
4262
4263 2007-03-08  Bruno Haible  <bruno@clisp.org>
4264
4265         * modules/vfprintf-posix-tests: New file.
4266         * tests/test-vfprintf-posix.sh: New file.
4267         * tests/test-vfprintf-posix.c: New file.
4268         * tests/test-fprintf-posix.h: New file.
4269         * tests/test-fprintf-posix.out: New file.
4270
4271         * modules/vfprintf-posix: New file.
4272         * lib/vfprintf.c: New file.
4273         * m4/vfprintf-posix.m4: New file.
4274         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4275         REPLACE_VFPRINTF.
4276         * lib/stdio_.h (vfprintf): New declaration.
4277         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4278         REPLACE_VFPRINTF.
4279
4280 2007-03-08  Bruno Haible  <bruno@clisp.org>
4281
4282         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4283
4284 2007-03-08  Bruno Haible  <bruno@clisp.org>
4285
4286         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4287         instead of 'expr' invocations.
4288         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4289         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4290         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4291         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4292         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4293         Suggested by Paul Eggert.
4294
4295 2007-03-08  Bruno Haible  <bruno@clisp.org>
4296
4297         * modules/fseterr-tests: New file.
4298         * tests/test-fseterr.c: New file.
4299
4300         * modules/fseterr: New file.
4301         * lib/fseterr.h: New file.
4302         * lib/fseterr.c: New file.
4303
4304 2007-03-08  Bruno Haible  <bruno@clisp.org>
4305
4306         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4307         * lib/getopt_.h: Likewise.
4308         * lib/mbswidth.h: Likewise.
4309         * lib/setenv.h: Likewise.
4310         * lib/vasnprintf.h: Likewise.
4311         * lib/vasprintf.h: Likewise.
4312         * lib/verror.h: Likewise.
4313         * lib/xsetenv.h: Likewise.
4314         * lib/xvasprintf.h: Likewise.
4315
4316 2007-03-08  Jim Meyering  <jim@meyering.net>
4317
4318         * users.txt: Add parted.
4319
4320         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4321
4322 2007-03-07  Bruno Haible  <bruno@clisp.org>
4323
4324         * m4/printf.m4: Make the shell script snippets copy&pastable.
4325
4326 2007-03-02  Bruno Haible  <bruno@clisp.org>
4327
4328         * lib/netinet_in_.h: New file.
4329         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4330         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4331         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4332         (Depends-on): Add absolute-header.
4333         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4334         into netinet/in.h.
4335
4336 2007-03-03  Bruno Haible  <bruno@clisp.org>
4337
4338         * lib/sys_select_.h: New file.
4339         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4340         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4341         * modules/sys_select (Files): Add lib/sys_select_.h.
4342         (Depends-on): Add absolute-header.
4343         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4344         into sys/select.h.
4345
4346 2007-03-02  Bruno Haible  <bruno@clisp.org>
4347
4348         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4349         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4350         values.
4351         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4352         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4353         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4354         * modules/sys_socket (Depends-on): Add absolute-header.
4355         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4356         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4357         (Include): Remove requirement of inclusion of <sys/types.h>.
4358
4359 2007-03-02  Bruno Haible  <bruno@clisp.org>
4360
4361         * lib/byteswap_.h (bswap_32): Fix formula.
4362
4363 2007-03-06  Bruno Haible  <bruno@clisp.org>
4364
4365         * modules/sprintf-posix-tests: New file.
4366         * tests/test-sprintf-posix.c: New file.
4367
4368         * modules/sprintf-posix: New file.
4369         * lib/sprintf.c: New file.
4370         * m4/sprintf-posix.m4: New file.
4371         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4372         REPLACE_SPRINTF.
4373         * lib/stdio_.h (sprintf): New declaration.
4374         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4375         REPLACE_SPRINTF.
4376
4377 2007-03-06  Bruno Haible  <bruno@clisp.org>
4378
4379         * modules/vsprintf-posix-tests: New file.
4380         * tests/test-vsprintf-posix.c: New file.
4381         * tests/test-sprintf-posix.h: New file.
4382
4383         * modules/vsprintf-posix: New file.
4384         * lib/vsprintf.c: New file.
4385         * m4/vsprintf-posix.m4: New file.
4386         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4387         REPLACE_VSPRINTF.
4388         * lib/stdio_.h (vsprintf): New declaration.
4389         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4390         REPLACE_VSPRINTF.
4391
4392 2007-03-06  Bruno Haible  <bruno@clisp.org>
4393
4394         * modules/vsnprintf (Depend-on): Remove minmax.
4395
4396 2007-03-06  Bruno Haible  <bruno@clisp.org>
4397
4398         * modules/snprintf-posix-tests: New file.
4399         * tests/test-snprintf-posix.c: New file.
4400
4401         * modules/snprintf-posix: New file.
4402         * m4/snprintf-posix.m4: New file.
4403         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4404         gl_FUNC_SNPRINTF.
4405         (gl_FUNC_SNPRINTF): Invoke it.
4406         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4407         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4408         is set.
4409         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4410
4411 2007-03-06  Bruno Haible  <bruno@clisp.org>
4412
4413         * modules/vsnprintf-posix-tests: New file.
4414         * tests/test-vsnprintf-posix.c: New file.
4415         * tests/test-snprintf-posix.h: New file.
4416
4417         * modules/vsnprintf-posix: New file.
4418         * m4/vsnprintf-posix.m4: New file.
4419         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4420         gl_FUNC_VSNPRINTF.
4421         (gl_FUNC_VSNPRINTF): Invoke it.
4422         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4423         * lib/stdio_.h (vsnprintf): Define as a replacement if
4424         REPLACE_VSNPRINTF is set.
4425         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4426
4427 2007-03-06  Bruno Haible  <bruno@clisp.org>
4428
4429         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4430         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4431
4432 2007-03-06  Bruno Haible  <bruno@clisp.org>
4433
4434         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4435         (asinl): Declare also if HAVE_DECL_ASINL is set.
4436         (atanl): Declare also if HAVE_DECL_ATANL is set.
4437         (ceill): Declare also if HAVE_DECL_CEILL is set.
4438         (cosl): Declare also if HAVE_DECL_COSL is set.
4439         (expl): Declare also if HAVE_DECL_EXPL is set.
4440         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4441         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4442         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4443         (logl): Declare also if HAVE_DECL_LOGL is set.
4444         (sinl): Declare also if HAVE_DECL_SINL is set.
4445         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4446         (tanl): Declare also if HAVE_DECL_TANL is set.
4447         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4448         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4449         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4450         declaration of frexpl, ldexpl.
4451         * modules/printf-frexpl (Depends-on): Add math.
4452         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4453
4454 2007-03-05  Bruno Haible  <bruno@clisp.org>
4455
4456         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4457         frexpl and ldexpl are declared.
4458         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4459
4460 2007-03-05  Bruno Haible  <bruno@clisp.org>
4461
4462         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4463         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4464
4465 2007-03-05  Bruno Haible  <bruno@clisp.org>
4466
4467         * lib/stdio_.h: Include <stddef.h>.
4468
4469 2007-03-05  Bruno Haible  <bruno@clisp.org>
4470
4471         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4472
4473 2007-03-05  Bruno Haible  <bruno@clisp.org>
4474
4475         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4476         NetBSD 4, from Ralf Wildenhues.
4477
4478 2007-03-04  Bruno Haible  <bruno@clisp.org>
4479
4480         * lib/vasprintf.h: Update #if logic for the case when the functions
4481         exist but are overridden.
4482
4483 2007-03-04  Bruno Haible  <bruno@clisp.org>
4484
4485         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4486         implementations: glibc-2.4 and MacOS X 10.3.
4487         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4488         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4489         * tests/test-vasprintf-posix.c (test_function): Likewise.
4490
4491 2007-03-04  Bruno Haible  <bruno@clisp.org>
4492
4493         * modules/vasprintf-posix-tests: New file.
4494         * tests/test-vasprintf-posix.c: New file.
4495
4496         * modules/vasprintf-posix: New file.
4497         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4498         defined.
4499         * m4/vasprintf-posix.m4: New file.
4500         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4501         gl_FUNC_VASPRINTF.
4502         (gl_FUNC_VASPRINTF): Invoke it.
4503         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4504         here.
4505         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4506
4507 2007-03-04  Bruno Haible  <bruno@clisp.org>
4508
4509         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4510         REPLACE_GETTIMEOFDAY.
4511         * modules/sys_time (Makefile.am): Likewise.
4512         * m4/sys_time_h.m4: Likewise.
4513         * m4/gettimeofday.m4: Likewise.
4514
4515 2007-03-04  Bruno Haible  <bruno@clisp.org>
4516
4517         * modules/vasnprintf-posix-tests: New file.
4518         * tests/test-vasnprintf-posix.c: New file.
4519
4520         * modules/vasnprintf-posix: New file.
4521         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4522         printf-frexpl.h.
4523         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4524         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4525         REPLACE_VASNPRINTF is defined.
4526         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4527         gl_FUNC_VASNPRINTF.
4528         (gl_FUNC_VASNPRINTF): Invoke it.
4529         * m4/vasnprintf-posix.m4: New file.
4530         * m4/printf.m4: New file.
4531
4532 2007-03-04  Bruno Haible  <bruno@clisp.org>
4533
4534         Compile progreloc.c only if --enable-relocatable is specified.
4535         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
4536         if --enable-relocatable was specified.
4537         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
4538         lib_SOURCES.
4539
4540 2007-03-04  Jim Meyering  <jim@meyering.net>
4541
4542         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
4543         Use it consistently, rather than enumerating errno constants.
4544
4545 2007-03-04  Bruno Haible  <bruno@clisp.org>
4546
4547         * modules/xvasprintf-tests: New file.
4548         * tests/test-xvasprintf.c: New file.
4549
4550         * modules/vasprintf-tests: New file.
4551         * tests/test-vasprintf.c: New file.
4552
4553         * modules/vasnprintf-tests: New file.
4554         * tests/test-vasnprintf.c: New file.
4555
4556         * modules/vsnprintf-tests: New file.
4557         * tests/test-vsnprintf.c: New file.
4558
4559         * modules/snprintf-tests: New file.
4560         * tests/test-snprintf.c: New file.
4561
4562 2007-03-04  Bruno Haible  <bruno@clisp.org>
4563
4564         Compile relocatable.c only if --enable-relocatable is specified.
4565         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
4566         gl_RELOCATABLE_LIBRARY.
4567         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
4568         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
4569         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
4570         gl_RELOCATABLE_LIBRARY.
4571         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
4572         (Makefile.am): Remove lib_SOURCES.
4573         * modules/relocatable-lib-lgpl (configure.ac): Invoke
4574         gl_RELOCATABLE_LIBRARY.
4575         (Makefile.am): Remove lib_SOURCES.
4576         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
4577         always.
4578         * modules/relocatable-prog-wrapper (configure.ac): Invoke
4579         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
4580
4581 2007-03-04  Bruno Haible  <bruno@clisp.org>
4582
4583         * modules/argmatch-tests: New file.
4584         * tests/test-argmatch.c: New file.
4585
4586         * tests/test-allocsa.c (main): Halve the number of loop runs.
4587
4588         * modules/alloca-opt-tests: New file.
4589         * tests/test-alloca-opt.c: New file.
4590
4591 2007-03-04  Jim Meyering  <jim@meyering.net>
4592
4593         Work around difference between Linux ACLs and Solaris 10 ZFS.
4594         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
4595         for EINVAL.
4596
4597 2007-03-03  Bruno Haible  <bruno@clisp.org>
4598
4599         * modules/relocatable-prog (Depends-on): Add back progreloc's
4600         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
4601
4602 2007-03-03  Bruno Haible  <bruno@clisp.org>
4603
4604         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
4605         * modules/relocatable-lib: New file.
4606
4607 2007-03-03  Bruno Haible  <bruno@clisp.org>
4608
4609         * modules/relocatable-prog: Renamed from modules/relocatable.
4610         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
4611
4612 2007-03-03  Bruno Haible  <bruno@clisp.org>
4613
4614         * modules/relocatable-script (Files): Add doc/relocatable.texi,
4615         m4/relocatable-lib.m4.
4616         (Depends-on): Remove 'relocatable'.
4617         (configure.ac): Add gl_RELOCATABLE_NOP.
4618
4619 2007-03-03  Bruno Haible  <bruno@clisp.org>
4620
4621         * modules/relocatable-prog-wrapper: New file.
4622         * modules/relocatable (Depends-on): Add it. Remove all other
4623         dependencies except progname.
4624         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
4625
4626         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
4627         (gl_FUNC_STRERROR): Nop.
4628         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
4629
4630         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
4631         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
4632
4633         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
4634         (gl_FUNC_READLINK): Update.
4635
4636         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
4637
4638 2007-03-03  Bruno Haible  <bruno@clisp.org>
4639
4640         * lib/xreadlink.c: Include <unistd.h> unconditionally.
4641         * modules/xreadlink (Depends-on): Add unistd.
4642         * modules/xreadlink-with-size (Depends-on): Likewise.
4643
4644 2007-03-03  Bruno Haible  <bruno@clisp.org>
4645
4646         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
4647         extracted from gt_FUNC_SETENV.
4648         (gt_FUNC_SETENV): Remove macro.
4649         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
4650         remove gt_FUNC_SETENV.
4651
4652 2007-03-03  Bruno Haible  <bruno@clisp.org>
4653
4654         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4655         ENABLE_RELOCATABLE here.
4656         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
4657
4658 2007-03-03  Bruno Haible  <bruno@clisp.org>
4659
4660         * modules/rbtreehash-list-tests (Depends-on): Add progname.
4661         * tests/test-rbtreehash_list.c: Include progname.h.
4662         (main): Call set_program_name.
4663
4664         * modules/rbtree-oset-tests (Depends-on): Add progname.
4665         * tests/test-rbtree_oset.c: Include progname.h.
4666         (main): Call set_program_name.
4667
4668         * modules/rbtree-list-tests (Depends-on): Add progname.
4669         * tests/test-rbtree_list.c: Include progname.h.
4670         (main): Call set_program_name.
4671
4672         * modules/linked-list-tests (Depends-on): Add progname.
4673         * tests/test-linked_list.c: Include progname.h.
4674         (main): Call set_program_name.
4675
4676 2007-03-03  Bruno Haible  <bruno@clisp.org>
4677
4678         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
4679         All uses of __restrict changed to _Restrict_.
4680         * lib/glob_.h (__restrict): Remove macro.
4681
4682 2007-03-02  Bruno Haible  <bruno@clisp.org>
4683
4684         * modules/gettext (configure.ac): Require gettext infrastructure
4685         from version 0.16.1.
4686
4687 2007-03-02  Bruno Haible  <bruno@clisp.org>
4688
4689         * modules/linkedhash-list-tests (Depends-on): Add progname.
4690         * tests/test-linkedhash_list.c: Include progname.h.
4691         (main): Call set_program_name.
4692
4693         * modules/carray-list-tests (Depends-on): Add progname.
4694         * tests/test-carray_list.c: Include progname.h.
4695         (main): Call set_program_name.
4696
4697         * modules/avltreehash-list-tests (Depends-on): Add progname.
4698         * tests/test-avltreehash_list.c: Include progname.h.
4699         (main): Call set_program_name.
4700
4701         * modules/avltree-oset-tests (Depends-on): Add progname.
4702         * tests/test-avltree_oset.c: Include progname.h.
4703         (main): Call set_program_name.
4704
4705         * modules/avltree-list-tests (Depends-on): Add progname.
4706         * tests/test-avltree_list.c: Include progname.h.
4707         (main): Call set_program_name.
4708
4709         * modules/array-oset-tests (Depends-on): Add progname.
4710         * tests/test-array_oset.c: Include progname.h.
4711         (main): Call set_program_name.
4712
4713         * modules/array-list-tests (Depends-on): Add progname.
4714         * tests/test-array_list.c: Include progname.h.
4715         (main): Call set_program_name.
4716
4717         * modules/argp-tests (Depends-on): Add progname.
4718         * tests/test-argp.c: Include argp.h first. Include progname.h.
4719         (main): Call set_program_name.
4720
4721 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
4722
4723         * doc/gnulib-tool.texi (Initial import): Reword description of
4724         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
4725         limited effect even if defined after the first system include.
4726
4727 2007-03-01  Bruno Haible  <bruno@clisp.org>
4728
4729         * build-aux/config.libpath: Update to libtool-1.5.22.
4730         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
4731
4732 2007-03-01  Bruno Haible  <bruno@clisp.org>
4733
4734         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
4735         foo_CFLAGS.
4736         Reported by Ralf Wildenhues.
4737
4738 2007-03-01  Bruno Haible  <bruno@clisp.org>
4739
4740         * build-aux/install-reloc: Remove object files left over by some
4741         compilers.
4742         Reported by Ralf Wildenhues.
4743
4744 2007-03-01  Bruno Haible  <bruno@clisp.org>
4745
4746         * build-aux/install-reloc: Break long lines.
4747
4748 2007-03-01  Bruno Haible  <bruno@clisp.org>
4749
4750         * doc/relocatable.texi: Document that it may not work on OpenBSD.
4751         Reported by Ralf Wildenhues.
4752
4753 2007-03-01  Bruno Haible  <bruno@clisp.org>
4754
4755         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
4756         include ordering constraints.
4757
4758 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
4759
4760         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
4761         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
4762         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
4763         as another example.
4764         * lib/time_.h: Fix misspelling.
4765         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4766         Require gl_HEADER_TIME_H_DEFAULTS.
4767         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
4768         * m4/time_r.m4 (gl_TIME_R): Likewise.
4769         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
4770
4771 2007-03-01  Bruno Haible  <bruno@clisp.org>
4772
4773         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
4774         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4775
4776 2007-03-01  Jim Meyering  <jim@meyering.net>
4777
4778         * modules/xreadlink (Maintainer): Add my name.
4779         * modules/xreadlink-with-size (Depends-on): Alphabetize.
4780
4781 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
4782             Bruno Haible  <bruno@clisp.org>
4783
4784         * build-aux/install-reloc: Compile also c-ctype.c.
4785         * build-aux/relocatable.sh.in: New file.
4786         * doc/relocatable.texi: New file.
4787         * doc/relocatable-maint.texi: New file.
4788         * doc/gnulib.texi: Include relocatable-maint.texi.
4789         * lib/progreloc.c: Include unistd.h unconditionally.
4790         * lib/relocwrapper.c: Include unistd.h unconditionally.
4791         Include c-ctype.h.
4792         (add_dotbin): Use c_tolower.
4793         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
4794         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
4795         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
4796         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
4797         to m4/relocatable-lib.m4.
4798         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
4799         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
4800         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
4801         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
4802         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
4803         * modules/relocatable: New file.
4804         * modules/relocatable-lib: New file.
4805         * modules/relocatable-script: New file.
4806
4807 2007-02-28  Bruno Haible  <bruno@clisp.org>
4808
4809         Import --enable-relocatable infrastructure.
4810         * build-aux/config.libpath: New file, from GNU gettext.
4811         * build-aux/install-reloc: New file, from GNU gettext.
4812         * build-aux/reloc-ldflags: New file, from GNU gettext.
4813         * lib/relocatable.h: New file, from GNU gettext.
4814         * lib/relocatable.c: New file, from GNU gettext.
4815         * lib/relocwrapper.c: New file, from GNU gettext.
4816         * m4/relocatable.m4: New file, from GNU gettext.
4817
4818 2007-02-28  Bruno Haible  <bruno@clisp.org>
4819
4820         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
4821
4822         * modules/xreadlink: New file, from GNU gettext with modifications.
4823         * lib/xreadlink.c: New file, from GNU gettext.
4824         * lib/xreadlink.h: Add comments.
4825         (xreadlink): New declaration.
4826
4827         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
4828         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
4829         lib/xreadlink-with-size.c.
4830         (configure.ac): Remove gl_XREADLINK invocation.
4831         (Makefile.am): Augment lib_SOURCES.
4832         * m4/xreadlink.m4: Remove file.
4833         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
4834         (xreadlink_with_size): Renamed from xreadink.
4835         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
4836         * modules/canonicalize (Depends-on): Replace xreadlink with
4837         xreadlink-with-size.
4838         * lib/canonicalize.c (canonicalize_filename_mode): Update.
4839
4840 2007-02-25  Jim Meyering  <jim@meyering.net>
4841
4842         * build-aux/announce-gen: When complaining about excess arguments,
4843         list them.
4844
4845 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
4846
4847         * README: Document signed integer overflow situation more
4848         accurately.
4849
4850 2007-02-25  Bruno Haible  <bruno@clisp.org>
4851
4852         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
4853         'a' or 'A' conversion.
4854
4855 2007-02-25  Bruno Haible  <bruno@clisp.org>
4856
4857         * modules/filename: Renamed from modules/pathname.
4858         (Files): Replace lib/pathname.h with lib/filename.h. Replace
4859         lib/concatpath.c with lib/concat-filename.c.
4860         (Makefile.am): Update.
4861         (Include): Replace pathname.h with filename.h.
4862         * lib/filename.h: Renamed from lib/pathname.h.
4863         (concatenated_filename): Renamed from concatenated_pathname.
4864         * lib/concat-filename.c: Renamed from lib/concatpath.c.
4865         (concatenated_filename): Renamed from concatenated_pathname.
4866         * lib/findprog.c: Include filename.h instead of pathname.h.
4867         (find_in_path): Update.
4868         * lib/javacomp.c: Include filename.h instead of pathname.h.
4869         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
4870         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
4871         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
4872         is_oldgcj_14_13_usable, is_javac_usable): Update.
4873         * lib/javaexec.c: Include filename.h instead of pathname.h.
4874         (execute_java_class): Update.
4875         * modules/findprog: Update.
4876         * modules/javacomp: Update.
4877         * modules/javaexec: Update.
4878         * MODULES.html.sh (File system functions): Add 'filename', remove
4879         'pathname'.
4880
4881 2007-02-25  Bruno Haible  <bruno@clisp.org>
4882
4883         * modules/printf-frexpl-tests: New file.
4884         * tests/test-printf-frexpl.c: New file.
4885
4886         * modules/printf-frexpl: New file.
4887         * lib/printf-frexpl.h: New file.
4888         * lib/printf-frexpl.c: New file.
4889         * m4/printf-frexpl.m4: New file.
4890
4891 2007-02-25  Bruno Haible  <bruno@clisp.org>
4892
4893         * modules/printf-frexp-tests: New file.
4894         * tests/test-printf-frexp.c: New file.
4895
4896         * modules/printf-frexp: New file.
4897         * lib/printf-frexp.h: New file.
4898         * lib/printf-frexp.c: New file.
4899         * m4/printf-frexp.m4: New file.
4900
4901 2007-02-25  Bruno Haible  <bruno@clisp.org>
4902
4903         Assume automake >= 1.10 for the tests.
4904         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
4905         * modules/arctwo-tests: Likewise.
4906         * modules/argp-tests: Likewise.
4907         * modules/avltree-list-tests: Likewise.
4908         * modules/avltree-oset-tests: Likewise.
4909         * modules/avltreehash-list-tests: Likewise.
4910         * modules/carray-list-tests: Likewise.
4911         * modules/crc-tests: Likewise.
4912         * modules/des-tests: Likewise.
4913         * modules/gc-arcfour-tests: Likewise.
4914         * modules/gc-arctwo-tests: Likewise.
4915         * modules/gc-des-tests: Likewise.
4916         * modules/gc-hmac-md5-tests: Likewise.
4917         * modules/gc-hmac-sha1-tests: Likewise.
4918         * modules/gc-md2-tests: Likewise.
4919         * modules/gc-md4-tests: Likewise.
4920         * modules/gc-md5-tests: Likewise.
4921         * modules/gc-pbkdf2-sha1-tests: Likewise.
4922         * modules/gc-rijndael-tests: Likewise.
4923         * modules/gc-sha1-tests: Likewise.
4924         * modules/gc-tests: Likewise.
4925         * modules/getaddrinfo-tests: Likewise.
4926         * modules/hmac-md5-tests: Likewise.
4927         * modules/hmac-sha1-tests: Likewise.
4928         * modules/linked-list-tests: Likewise.
4929         * modules/linkedhash-list-tests: Likewise.
4930         * modules/lock-tests: Likewise.
4931         * modules/md2-tests: Likewise.
4932         * modules/md4-tests: Likewise.
4933         * modules/md5-tests: Likewise.
4934         * modules/rbtree-list-tests: Likewise.
4935         * modules/rbtree-oset-tests: Likewise.
4936         * modules/rbtreehash-list-tests: Likewise.
4937         * modules/read-file-tests: Likewise.
4938         * modules/rijndael-tests: Likewise.
4939         * modules/stdint-tests: Likewise.
4940         * modules/tls-tests: Likewise.
4941
4942 2007-02-24  Bruno Haible  <bruno@clisp.org>
4943
4944         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
4945         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
4946         function; instead check whether isnan with a double argument links.
4947         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
4948         function; instead check whether isnan with a 'long double' argument
4949         links.
4950         Reported by Eric Blake <ebb9@byu.net>.
4951
4952 2007-02-24  Bruno Haible  <bruno@clisp.org>
4953
4954         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
4955         defined.
4956         * lib/isnanl.c: Remove all code. Just include isnan.c.
4957         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
4958
4959 2007-02-25  Jim Meyering  <jim@meyering.net>
4960
4961         Avoid conflicting types for 'unsetenv' on FreeBSD.
4962         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
4963         conflicting with FreeBSD's (5.0 and 6.1) function declaration
4964         in stdlib.h.
4965
4966 2007-02-24  Bruno Haible  <bruno@clisp.org>
4967
4968         * modules/isnanl-nolibm-tests: New file.
4969         * tests/test-isnanl.c: New file.
4970
4971         * modules/isnanl-nolibm: New file.
4972         * lib/isnanl.h: New file.
4973         * lib/isnanl.c: New file.
4974         * m4/isnanl.m4: New file.
4975
4976 2007-02-24  Bruno Haible  <bruno@clisp.org>
4977
4978         * modules/isnan-nolibm-tests: New file.
4979         * tests/test-isnan.c: New file.
4980
4981         * modules/isnan-nolibm: New file.
4982         * lib/isnan.h: New file.
4983         * lib/isnan.c: New file.
4984         * m4/isnan.m4: New file.
4985
4986 2007-02-24  Bruno Haible  <bruno@clisp.org>
4987
4988         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
4989         assume that an exponent fits in 20 bits.
4990
4991 2007-02-24  Jim Meyering  <jim@meyering.net>
4992
4993         * m4/regex.m4: Update the description of the configure-time option,
4994         --without-included-regex, to state accurately what the defaults are,
4995         and perhaps to give people an idea why using this option is risky.
4996
4997 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
4998
4999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5000         loops on small arguments.  This attempts to avoid the problem
5001         Bruno Haible reported for AIX 4.3.2 in
5002         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5003
5004 2007-02-23  Bruno Haible  <bruno@clisp.org>
5005
5006         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5007         Needed for help2man.
5008
5009 2007-02-23  Karl Berry  <karl@gnu.org>
5010
5011         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5012         exists, foo.h should be cvs-ignored, not committed.
5013
5014 2007-02-23  Eric Blake  <ebb9@byu.net>
5015
5016         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5017         * lib/stat-time.h (includes): Likewise.
5018         * lib/utimecmp.c (includes): Likewise.
5019         * lib/utimens.h (includes): Likewise.
5020         * lib/getdate.y (includes): Also include "timespec.h" for use
5021         internal to the module.
5022         * modules/utimens (Depends-on): Revert yesterday's patch.
5023         * modules/nanosleep (Depends-on): Add missing dependency.
5024
5025 2007-02-22  Bruno Haible  <bruno@clisp.org>
5026
5027         * lib/glob.c: Don't include getlogin_r.h.
5028
5029 2007-02-22  Jim Meyering  <jim@meyering.net>
5030
5031         * modules/utimens (Depends-on): Add timespec, required for
5032         utimens.h's inclusion of timespec.h.
5033
5034 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5035
5036         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5037         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5038         Schwab in
5039         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5040         I'll try to think of a better way to fix the Solaris problem.
5041
5042         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5043         like glibc; on Solaris 10, it fails with errno == EINVAL.
5044         POSIX says the behavior is unspecified if the first argument is NULL,
5045         so play it safe and never pass NULL to the system getcwd.
5046
5047 2007-02-21  Jim Meyering  <jim@meyering.net>
5048
5049         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5050         of gettimeofday.  It would conflict with the one now always
5051         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5052         an IRIX 6.5 build failure.
5053
5054 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5055
5056         Minor fixups to port to Solaris 10 with Sun C 5.8.
5057         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5058         * modules/getcwd (Depends-on): Add dirfd.
5059         * lib/putenv.c (putenv): #undef it.
5060         (rpl_putenv): New decl.
5061         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5062
5063 2007-02-20  Bruno Haible  <bruno@clisp.org>
5064
5065         * modules/stdio-tests: New file.
5066         * tests/test-stdio.c: New file.
5067
5068         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5069         (Depends-on): Add stdio.
5070         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5071         (Include): Use <stdio.h> instead of vsnprintf.h.
5072         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5073         HAVE_DECL_VSNPRINTF.
5074         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
5075
5076         * modules/snprintf (Files): Remove lib/snprintf.h.
5077         (Depends-on): Add stdio.
5078         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5079         (Include): Use <stdio.h> instead of snprintf.h.
5080         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5081         HAVE_DECL_SNPRINTF.
5082         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
5083         * lib/getaddrinfo.c: Likewise.
5084
5085         * modules/stdio: New file.
5086         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
5087         * lib/snprintf.h: Remove file.
5088         * lib/vsnprintf.h: Remove file.
5089         * lib/.cppi-disable: Remove snprintf.h.
5090         * m4/stdio_h.m4: New file.
5091         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
5092
5093 2007-02-20  Jim Meyering  <jim@meyering.net>
5094
5095         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
5096         used by e.g., mingw.  From Bruno Haible.
5097
5098 2007-02-19  Bruno Haible  <bruno@clisp.org>
5099
5100         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
5101         warnings.
5102         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5103
5104 2007-02-19  Bruno Haible  <bruno@clisp.org>
5105
5106         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
5107         from mingw users.
5108
5109 2007-02-19  Bruno Haible  <bruno@clisp.org>
5110
5111         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
5112         warnings.
5113         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
5114
5115 2007-02-19  Jim Meyering  <jim@meyering.net>
5116
5117         Don't use FD after a successful "fdopendir (fd)".
5118         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
5119         Reset it by calling dirfd on the just-obtained DIR*.
5120
5121         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
5122         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
5123
5124 2007-02-18  Bruno Haible  <bruno@clisp.org>
5125
5126         * lib/readlink.c: Include <unistd.h>.
5127         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
5128         HAVE_READLINK.
5129         * modules/readlink (Depends-on): Add unistd.
5130         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5131         (Include): Add <unistd.h>.
5132
5133         * lib/getlogin_r.h: Remove file.
5134         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
5135         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
5136         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
5137         HAVE_DECL_GETLOGIN_R.
5138         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
5139         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5140         (Include): Use <unistd.h> instead of getlogin_r.h.
5141
5142         * lib/getcwd.h: Remove file.
5143         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
5144         * lib/xgetcwd.c: Likewise.
5145         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
5146         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
5147         * modules/getcwd (Files): Remove lib/getcwd.h.
5148         (Depends-on): Add unistd.
5149         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5150         (Include): Use <unistd.h> instad of getcwd.h.
5151
5152         * lib/ftruncate.c: Include <unistd.h> first.
5153         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
5154         Set HAVE_FTRUNCATE.
5155         * modules/ftruncate (Depends-on): Add unistd.
5156         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5157
5158         * lib/fchdir.c: Include <unistd.h> first.
5159         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
5160         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
5161         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
5162         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5163         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
5164
5165         * lib/dup2.c: Include <unistd.h> first.
5166         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
5167         HAVE_DUP2.
5168         * modules/dup2 (Depends-on): Add unistd.
5169         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5170
5171         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
5172         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
5173         REPLACE_CHOWN. Don't define chown as a macro here.
5174         * modules/chown (Depends-on): Add unistd.
5175         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5176
5177         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
5178         Add definition for GL_LINK_WARNING.
5179         (chown, dup2): New declarations.
5180         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
5181         link warning.
5182         (ftruncate): New declaration.
5183         (getcwd): New declaration, taken from old getcwd.h.
5184         (getlogin_r): New declaration, taken from old getlogin_r.h.
5185         (readlink): New declaration.
5186         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
5187         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
5188         (gl_PREREQ_UNISTD): Remove macro.
5189         (gl_UNISTD_MODULE_INDICATOR): New macro.
5190         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
5191         many new variables. Don't set UNISTD_H.
5192         * modules/unistd (Description): Change.
5193         (Depends-on): Add link-warning.
5194         (configure.ac): Update.
5195         (Makefile.am): Create unistd.h always. Substitute many new variables
5196         into it.
5197
5198 2007-02-18  Bruno Haible  <bruno@clisp.org>
5199
5200         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
5201         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5202         HAVE_GETSUBOPT.
5203         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
5204         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
5205         * lib/getsubopt.h: Remove file.
5206         * modules/getsubopt (Files): Remove lib/getsubopt.h.
5207         (Depends-on): Add stdlib.
5208         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5209         (Includes): Use <stdlib.h> instead of getsubopt.h.
5210         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
5211         Set HAVE_GETSUBOPT.
5212         * lib/getsubopt.c: Don't include getsubopt.h.
5213
5214 2007-02-18  Bruno Haible  <bruno@clisp.org>
5215
5216         * modules/fchdir (Depends-on): Add dup2.
5217
5218 2007-02-18  Bruno Haible  <bruno@clisp.org>
5219
5220         * lib/stdlib_.h: Handle glibc's special invocation convention
5221         specially.
5222
5223 2007-02-18  Bruno Haible  <bruno@clisp.org>
5224
5225         * modules/stdlib-tests: New file.
5226         * tests/test-stdlib.c: New file.
5227
5228         * modules/mkstemp (Files): Remove lib/mkstemp.h.
5229         (Depends-on): Add stdlib.
5230         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5231         (Includes): Use <stdlib.h> instead of mkstemp.h.
5232         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5233         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
5234         * lib/mkstemp.c: Don't include mkstemp.h.
5235         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
5236         * lib/stdlib--.h: Don't include mkstemp.h.
5237
5238         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
5239         (Depends-on): Add stdlib.
5240         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5241         (Includes): Use <stdlib.h> instead of mkdtemp.h.
5242         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5243         HAVE_MKDTEMP.
5244         * lib/mkdtemp.c: Don't include mkdtemp.h.
5245         * lib/clean-temp.c: Don't include mkdtemp.h.
5246
5247         * modules/exit (Files): Remove lib/exit.h.
5248         (Depends-on): Add stdlib.
5249         (Makefile.am): Remove lib_SOURCES.
5250         (Include): Use <stdlib.h> instead of exit.h.
5251         * lib/argmatch.c: Don't include exit.h.
5252         * lib/execute.c: Likewise.
5253         * lib/pagealign_alloc.c: Likewise.
5254         * lib/pipe.c: Likewise.
5255         * lib/wait-process.c: Likewise.
5256         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5257         * lib/exitfail.c: Likewise.
5258         * lib/savewd.c: Likewise.
5259         * lib/xsetenv.c: Likewise.
5260
5261         * modules/stdlib: New file.
5262         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5263         and extra comments about mkstemp().
5264         * lib/exit.h: Remove file.
5265         * lib/mkdtemp.h: Remove file.
5266         * lib/mkstemp.h: Remove file.
5267         * m4/stdlib_h.m4: New file.
5268         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5269
5270 2007-02-18  Bruno Haible  <bruno@clisp.org>
5271
5272         * modules/math-tests: New file.
5273         * tests/test-math.c: New file.
5274
5275         * modules/math: New file.
5276         * modules/mathl (Files): Remove lib/mathl.h.
5277         (Depends-on): Add math.
5278         (Makefile.am): Don't mention mathl.h.
5279         (Include): Use <math.h> instead of mathl.h.
5280         * lib/math_.h: New file.
5281         * lib/mathl.h: Remove file.
5282         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5283         mathl.h.
5284         * lib/asinl.c: Likewise.
5285         * lib/atanl.c: Likewise.
5286         * lib/ceill.c: Likewise.
5287         * lib/cosl.c: Likewise.
5288         * lib/expl.c: Likewise.
5289         * lib/floorl.c: Likewise.
5290         * lib/frexpl.c: Likewise.
5291         * lib/ldexpl.c: Likewise.
5292         * lib/logl.c: Likewise.
5293         * lib/sincosl.c: Likewise.
5294         * lib/sinl.c: Likewise.
5295         * lib/sqrtl.c: Likewise.
5296         * lib/tanl.c: Likewise.
5297         * lib/trigl.c: Likewise.
5298         * m4/math_h.m4: New file.
5299         * MODULES.html.sh (Mathematics): Add math.
5300
5301 2007-02-17  Bruno Haible  <bruno@clisp.org>
5302
5303         * modules/wctype-tests: New file.
5304         * tests/test-wctype.c: New file.
5305
5306         * modules/wchar-tests: New file.
5307         * tests/test-wchar.c: New file.
5308
5309         * modules/unistd-tests: New file.
5310         * tests/test-unistd.c: New file.
5311
5312         * modules/time-tests: New file.
5313         * tests/test-time.c: New file.
5314
5315         * modules/sysexits-tests: New file.
5316         * tests/test-sysexits.c: New file.
5317
5318         * modules/sys_time-tests: New file.
5319         * tests/test-sys_time.c: New file.
5320
5321         * modules/sys_stat-tests: New file.
5322         * tests/test-sys_stat.c: New file.
5323
5324         * modules/sys_socket-tests: New file.
5325         * tests/test-sys_socket.c: New file.
5326
5327         * modules/sys_select-tests: New file.
5328         * tests/test-sys_select.c: New file.
5329
5330         * modules/string-tests: New file.
5331         * tests/test-string.c: New file.
5332
5333         * modules/stdbool-tests: New file.
5334         * tests/test-stdbool.c: New file.
5335
5336         * modules/netinet_in-tests: New file.
5337         * tests/test-netinet_in.c: New file.
5338
5339         * modules/inttypes-tests: New file.
5340         * tests/test-inttypes.c: New file.
5341
5342         * modules/fcntl-tests: New file.
5343         * tests/test-fcntl.c: New file.
5344
5345         * modules/byteswap-tests: New file.
5346         * tests/test-byteswap.c: New file.
5347
5348         * modules/arpa_inet-tests: New file.
5349         * tests/test-arpa_inet.c: New file.
5350
5351 2007-02-17  Bruno Haible  <bruno@clisp.org>
5352
5353         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5354         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5355         if the corresponding module is not enabled. Emit link warnings if
5356         the function is used nevertheless.
5357         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5358         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5359         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5360         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5361         * modules/inttypes (Depends-on): Add link-warning.
5362         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5363         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5364         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5365         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5366         * modules/imaxdiv (configure.ac): Likewise.
5367         * modules/strtoimax (configure.ac): Likewise.
5368         * modules/strtoumax (configure.ac): Likewise.
5369
5370 2007-02-17  Bruno Haible  <bruno@clisp.org>
5371
5372         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5373         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5374         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5375         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5376
5377 2007-02-17  Bruno Haible  <bruno@clisp.org>
5378
5379         * modules/link-warning: New file.
5380         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5381         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5382         * modules/string (Depends-on): Add link-warning.
5383         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5384         string.h.
5385         * MODULES.html.sh (Support for building libraries and executables): Add
5386         link-warning.
5387
5388 2007-02-17  Bruno Haible  <bruno@clisp.org>
5389
5390         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5391         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5392         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5393         long lines.
5394
5395 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5396             Bruno Haible  <bruno@clisp.org>
5397
5398         * modules/tmpfile: New file.
5399         * lib/tmpfile.c: New file.
5400         * m4/tmpfile.m4: New file.
5401         * MODULES.html.sh (func_all_modules): New section "Input/output".
5402
5403 2007-02-15  Bruno Haible  <bruno@clisp.org>
5404
5405         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5406         (supports_delete_on_close): New function.
5407         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5408
5409 2007-02-14  Bruno Haible  <bruno@clisp.org>
5410
5411         * modules/mbspcasecmp-tests: New file.
5412         * tests/test-mbspcasecmp.sh: New file.
5413         * tests/test-mbspcasecmp.c: New file.
5414
5415         New module mbspcasecmp.
5416         * modules/mbspcasecmp: New file.
5417         * lib/mbspcasecmp.c: New file.
5418         * lib/string_.h (strncasecmp): Change warning message.
5419         (mbspcasecmp): New declaration.
5420         * m4/mbspcasecmp.m4: New file.
5421         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5422         GNULIB_MBSPCASECMP.
5423         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5424         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5425
5426 2007-02-14  Bruno Haible  <bruno@clisp.org>
5427
5428         * modules/mbsncasecmp-tests: New file.
5429         * tests/test-mbsncasecmp.sh: New file.
5430         * tests/test-mbsncasecmp.c: New file.
5431
5432         New module mbsncasecmp.
5433         * modules/mbsncasecmp: New file.
5434         * lib/mbsncasecmp.c: New file.
5435         * lib/string_.h (mbsncasecmp): New declaration.
5436         * m4/mbsncasecmp.m4: New file.
5437         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5438         GNULIB_MBSNCASECMP.
5439         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5440         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5441
5442 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5443
5444         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5445         Verify that it doesn't overlap with our flags.
5446         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5447         do not have the desired effect in multibyte locales; instead, use
5448         mbscasecmp.
5449         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5450         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5451         we don't require GNU fnmatch ourselves (if our users require it, they
5452         should do so explicitly).
5453
5454         Fix regex code so it doesn't rely on strcasecmp.
5455         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5456         Otherwise, include gnulib's langinfo.h.
5457         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5458         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5459         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5460         * modules/regex (FILES): Remove m4/codeset.m4.
5461         (Depends-on): Add localcharset.  Remove strcase.
5462
5463 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5464
5465         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5466         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5467
5468 2007-02-13  Bruno Haible  <bruno@clisp.org>
5469
5470         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5471         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5472
5473 2007-02-12  Bruno Haible  <bruno@clisp.org>
5474
5475         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5476         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5477         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5478         time warning rather than a link error.
5479
5480 2007-02-12  Bruno Haible  <bruno@clisp.org>
5481
5482         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5483         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5484         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5485
5486 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5487
5488         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5489         args, not 2.
5490
5491 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5492
5493         New module 'time', so that apps can include <time.h> as per
5494         POSIX and GNU instead of separate include files like time_r.h
5495         and timegm.h.  This implementation tries out a simpler approach
5496         for replacing decls in standard include files (as compared to
5497         the string module), somewhat as an experiment.
5498
5499         * config/srclist.txt: Comment out mktime.c for now.
5500         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5501         since it doesn't apply any more.  Use generic wording instead.
5502         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5503         'time'.
5504         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5505         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5506         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5507         Don't include <sys/types.h>; no longer needed since we assume C89.
5508         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5509         * lib/strftime.c: Likewise.
5510         * lib/time_r.c: Likewise.
5511         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5512         * lib/nanosleep.c: Include <time.h> first, to check interface.
5513         * lib/strptime.c: Likewise.
5514         * lib/time_r.c: Likewise.
5515         * lib/timegm.c: Likewise.
5516         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5517         needed.
5518         * lib/timegm.c: Don't include timegm.h; no longer needed.
5519         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5520         time.h now handles any problems in that area.
5521         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5522         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5523         that time.h defines struct timespec.
5524         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5525         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5526         handles that.
5527         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5528         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5529         needed.  Set REPLACE_LOCALTIME.
5530         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5531         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
5532         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
5533         nanosleep; time_h.m4 now does that.  Don't require
5534         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
5535         module handles this now.
5536         * modules/getdate (Depends-on): Remove timespec.  Add time.
5537         * modules/nanosleep (Depends-on): Likewise.
5538         * modules/stat-time (Depends-on): Likewise.
5539         * modules/nanosleep (Include): Include time.h, not timespec.h.
5540         * modules/strptime (Files): Remove lib/strptime.h.
5541         (Depends-on): Add extensions, time.
5542         (Include): Include time.h, not strptime.h.
5543         * modules/time_r (Files): Remove lib/time_r.h.
5544         (Depends-on): Add time.
5545         (Include): Include time.h, not time_r.h.
5546         * modules/timegm: Likewise.
5547         * modules/timespec (Description): Now does timespec-related decls
5548         of our own, instead of struct timespec itself.
5549         (Depends-on): Add time; remove extensions.
5550         (Maintainer): Add self.
5551         * modules/utimecmp (Depends-on): Add time; remove timespec.
5552         * modules/utimens (Depends-on): Likewise.
5553         * modules/xnanosleep (Depends-on): Likewise.
5554
5555 2007-02-11  Bruno Haible  <bruno@clisp.org>
5556
5557         * lib/c-strstr.c: Include allocsa.h.
5558         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5559         * lib/c-strcasestr.c: Include allocsa.h.
5560         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5561         * lib/strcasestr.c: Include allocsa.h.
5562         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5563         * lib/mbsstr.c: Include allocsa.h.
5564         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5565         allocsa/freesa instead of malloc/free.
5566         * lib/mbscasestr.c: Include allocsa.h.
5567         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5568         allocsa/freesa instead of malloc/free.
5569         * modules/c-strstr (Depends-on): Add allocsa.
5570         * modules/c-strcasestr (Depends-on): Likewise.
5571         * modules/strcasestr (Depends-on): Likewise.
5572         * modules/mbsstr (Depends-on): Likewise.
5573         * modules/mbscasestr (Depends-on): Likewise.
5574
5575 2007-02-11  Bruno Haible  <bruno@clisp.org>
5576
5577         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
5578
5579         * modules/mbsspn-tests: New file.
5580         * tests/test-mbsspn.sh: New file.
5581         * tests/test-mbsspn.c: New file.
5582
5583 2007-02-11  Bruno Haible  <bruno@clisp.org>
5584
5585         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
5586
5587         * modules/mbspbrk-tests: New file.
5588         * tests/test-mbspbrk.sh: New file.
5589         * tests/test-mbspbrk.c: New file.
5590
5591 2007-02-11  Bruno Haible  <bruno@clisp.org>
5592
5593         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
5594         unneeded cast.
5595
5596         * modules/mbscspn-tests: New file.
5597         * tests/test-mbscspn.sh: New file.
5598         * tests/test-mbscspn.c: New file.
5599
5600 2007-02-11  Bruno Haible  <bruno@clisp.org>
5601
5602         * modules/mbscasecmp-tests: New file.
5603         * tests/test-mbscasecmp.sh: New file.
5604         * tests/test-mbscasecmp.c: New file.
5605
5606 2007-02-11  Bruno Haible  <bruno@clisp.org>
5607
5608         Ensure O(n) worst-case complexity of mbscasestr.
5609         * lib/mbscasestr.c: Include stdbool.h.
5610         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5611         functions.
5612         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
5613         the bookkeeping indicates that it's worth it.
5614         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
5615
5616         * modules/mbscasestr-tests: New file.
5617         * tests/test-mbscasestr1.c: New file.
5618         * tests/test-mbscasestr2.sh: New file.
5619         * tests/test-mbscasestr2.c: New file.
5620         * tests/test-mbscasestr3.sh: New file.
5621         * tests/test-mbscasestr3.c: New file.
5622         * tests/test-mbscasestr4.sh: New file.
5623         * tests/test-mbscasestr4.c: New file.
5624         * m4/locale-tr.m4: New file.
5625
5626 2007-02-11  Bruno Haible  <bruno@clisp.org>
5627
5628         Ensure O(n) worst-case complexity of mbsstr.
5629         * lib/mbsstr.c: Include stdbool.h.
5630         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5631         functions.
5632         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
5633         bookkeeping indicates that it's worth it.
5634         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
5635
5636         * modules/mbsstr-tests: New file.
5637         * tests/test-mbsstr1.c: New file.
5638         * tests/test-mbsstr2.sh: New file.
5639         * tests/test-mbsstr2.c: New file.
5640         * tests/test-mbsstr3.sh: New file.
5641         * tests/test-mbsstr3.c: New file.
5642         * m4/locale-fr.m4: New file.
5643
5644 2007-02-11  Bruno Haible  <bruno@clisp.org>
5645
5646         * lib/mbsrchr.c (mbsrchr): Fix bug.
5647
5648         * modules/mbsrchr-tests: New file.
5649         * tests/test-mbsrchr.sh: New file.
5650         * tests/test-mbsrchr.c: New file.
5651
5652 2007-02-11  Bruno Haible  <bruno@clisp.org>
5653
5654         * lib/mbschr.c (mbschr): Fix bug.
5655
5656         * modules/mbschr-tests: New file.
5657         * tests/test-mbschr.sh: New file.
5658         * tests/test-mbschr.c: New file.
5659         * m4/locale-zh.m4: New file.
5660
5661 2007-02-11  Bruno Haible  <bruno@clisp.org>
5662
5663         Support for copying multibyte string iterators.
5664         * lib/mbiter.h: Include <string.h>.
5665         (mbiter_multi_copy): New function.
5666         (mbi_copy): New macro.
5667         * lib/mbuiter.h: Include <string.h>.
5668         (mbuiter_multi_copy): New function.
5669         (mbui_copy): New macro.
5670
5671 2007-02-11  Bruno Haible  <bruno@clisp.org>
5672
5673         New module mbslen.
5674         * modules/mbslen: New file.
5675         * lib/mbslen.c: New file.
5676         * lib/string_.h (mbslen): New declaration.
5677         * m4/mbslen.m4: New file.
5678         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5679         GNULIB_MBSLEN.
5680         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
5681         * MODULES.html.sh (Internationalization functions): Add mbslen.
5682
5683 2007-02-11  Bruno Haible  <bruno@clisp.org>
5684
5685         Ensure O(n) worst-case complexity of strcasestr substitute.
5686         * lib/strcasestr.c: Include stdbool.h.
5687         (knuth_morris_pratt): New function.
5688         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5689         bookkeeping indicates that it's worth it.
5690         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
5691
5692         * modules/strcasestr-tests: New file.
5693         * tests/test-strcasestr.c: New file.
5694
5695 2007-02-11  Bruno Haible  <bruno@clisp.org>
5696
5697         Ensure O(n) worst-case complexity of c_strcasestr.
5698         * lib/c-strcasestr.c: Include stdbool.h, string.h.
5699         (knuth_morris_pratt): New function.
5700         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
5701         the bookkeeping indicates that it's worth it.
5702         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
5703
5704         * modules/c-strcasestr-tests: New file.
5705         * tests/test-c-strcasestr.c: New file.
5706
5707 2007-02-11  Bruno Haible  <bruno@clisp.org>
5708
5709         Ensure O(n) worst-case complexity of c_strstr.
5710         * lib/c-strstr.c: Include stdbool.h, string.h.
5711         (knuth_morris_pratt): New function.
5712         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5713         bookkeeping indicates that it's worth it.
5714         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
5715
5716         * lib/c-strstr.c: Complete rewrite for maintainability.
5717
5718         * modules/c-strstr-tests: New file.
5719         * tests/test-c-strstr.c: New file.
5720
5721 2007-02-11  Bruno Haible  <bruno@clisp.org>
5722
5723         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
5724         5.2.1 and earlier, whereby \055 was treated just like the range
5725         delimiter '-'.
5726         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
5727
5728 2007-02-08  Bruno Haible  <bruno@clisp.org>
5729
5730         * modules/regex (Depends-on): Add stdbool.
5731         Reported by Dalibor Topic <robilad@kaffe.org>.
5732
5733 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5734
5735         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
5736         Prefer returning from main to exiting from it.
5737         Remove unnecessary parens after sizeof.
5738
5739 2007-02-05  Bruno Haible  <bruno@clisp.org>
5740
5741         New module mbssep.
5742         * modules/mbssep: New file.
5743         * lib/mbssep.c: New file.
5744         * lib/string_.h (strsep): Add a conditional link warning.
5745         (mbssep): New declaration.
5746         * m4/mbssep.m4: New file.
5747         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5748         GNULIB_MBSSEP.
5749         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
5750         * MODULES.html.sh (Internationalization functions): Add mbssep.
5751
5752 2007-02-05  Bruno Haible  <bruno@clisp.org>
5753
5754         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
5755         Optimize search in case of 1 delimiter.
5756
5757 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5758
5759         * lib/acl.h: Include sys/types.h before sys/acl.h.
5760
5761 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5762
5763         Merge upstream fix for glibc bugzilla #3957:
5764
5765         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
5766
5767         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
5768         bit for RE_HAT_LISTS_NOT_NEWLINE.
5769         (build_charclass_op): Remove bogus comment.
5770
5771 2007-02-05  Simon Josefsson  <simon@josefsson.org>
5772
5773         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
5774
5775 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5776
5777         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
5778         * lib/memmem.c [!defined _LIBC]: Include config.h.
5779
5780 2007-02-04  Bruno Haible  <bruno@clisp.org>
5781
5782         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
5783         warning message.
5784
5785 2007-02-04  Bruno Haible  <bruno@clisp.org>
5786
5787         New module mbstok_r.
5788         * modules/mbstok_r: New file.
5789         * lib/mbstok_r.c: New file.
5790         * lib/string_.h (strtok_r): Change argument names to match the
5791         comments. Add a conditional link warning.
5792         (mbstok_r): New declaration.
5793         * m4/mbstok_r.m4: New file.
5794         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5795         GNULIB_MBSTOK_R.
5796         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
5797         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
5798
5799 2007-02-04  Bruno Haible  <bruno@clisp.org>
5800
5801         New module mbsspn.
5802         * modules/mbsspn: New file.
5803         * lib/mbsspn.c: New file.
5804         * lib/string_.h (strspn): Add a conditional link warning.
5805         (mbsspn): New declaration.
5806         * m4/mbsspn.m4: New file.
5807         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5808         GNULIB_MBSSPN.
5809         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
5810         * MODULES.html.sh (Internationalization functions): Add mbsspn.
5811
5812 2007-02-04  Bruno Haible  <bruno@clisp.org>
5813
5814         New module mbspbrk.
5815         * modules/mbspbrk: New file.
5816         * lib/mbspbrk.c: New file.
5817         * lib/string_.h (strpbrk): Add a conditional link warning.
5818         (mbspbrk): New declaration.
5819         * m4/mbspbrk.m4: New file.
5820         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5821         GNULIB_MBSPBRK.
5822         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
5823         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
5824
5825 2007-02-04  Bruno Haible  <bruno@clisp.org>
5826
5827         New module mbscspn.
5828         * modules/mbscspn: New file.
5829         * lib/mbscspn.c: New file.
5830         * lib/string_.h (strcspn): Add a conditional link warning.
5831         (mbscspn): New declaration.
5832         * m4/mbscspn.m4: New file.
5833         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5834         GNULIB_MBSCSPN.
5835         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
5836         * MODULES.html.sh (Internationalization functions): Add mbscspn.
5837
5838 2007-02-04  Bruno Haible  <bruno@clisp.org>
5839
5840         New module mbscasestr, reduced goal of strcasestr.
5841         * modules/mbscasestr: New file.
5842         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
5843         (mbscasestr): Renamed from strcasestr.
5844         * lib/strcasestr.c: Don't include mbuiter.h.
5845         (strcasestr): Remove support for multibyte locales.
5846         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
5847         Change the conditional link warning.
5848         (mbscasestr): New declaration.
5849         * m4/mbscasestr.m4: New file.
5850         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
5851         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
5852         REPLACE_STRCASESTR.
5853         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
5854         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5855         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5856         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
5857         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
5858         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5859         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
5860         (Depends-on): Remove mbuiter.
5861         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
5862
5863 2007-02-04  Bruno Haible  <bruno@clisp.org>
5864
5865         Simplify handling of strncasecmp.
5866         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
5867         the conditional link warning.
5868         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5869         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
5870         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
5871         * modules/strcase (configure.ac): Don't invoke
5872         gl_STRING_MODULE_INDICATOR.
5873         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
5874
5875 2007-02-04  Bruno Haible  <bruno@clisp.org>
5876
5877         New module mbscasecmp, reduced goal of strcasecmp.
5878         * modules/mbscasecmp: New file.
5879         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
5880         (mbscasecmp): Renamed from strcasecmp.
5881         * lib/strcasecmp.c: Don't include mbuiter.h.
5882         (strcasecmp): Remove support for multibyte locales.
5883         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
5884         Change the conditional link warning.
5885         (mbscasecmp): New declaration.
5886         * m4/mbscasecmp.m4: New file.
5887         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
5888         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
5889         REPLACE_STRCASECMP.
5890         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
5891         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5892         GNULIB_MBSCASECMP.
5893         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
5894         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
5895         * modules/strcase (Files): Remove m4/mbrtowc.m4.
5896         (Depends-on): Remove mbuiter.
5897         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
5898
5899 2007-02-04  Bruno Haible  <bruno@clisp.org>
5900
5901         New module mbsstr. Remove module strstr.
5902         * modules/mbsstr: New file.
5903         * modules/strstr: Remove file.
5904         * lib/mbsstr.c: Renamed from lib/strstr.c.
5905         (mbsstr): Renamed from strstr.
5906         * lib/string_.h (strstr): Remove declaration. Change the conditional
5907         link warning.
5908         (mbsstr): New declaration.
5909         * m4/mbsstr.m4: New file.
5910         * m4/strstr.m4: Remove file.
5911         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
5912         REPLACE_STRSTR.
5913         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
5914         Don't initialize GNULIB_STRSTR.
5915         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
5916         substitute GNULIB_STRSTR and REPLACE_STRSTR.
5917         * MODULES.html.sh (Internationalization functions): Add mbsstr.
5918         (Support for systems lacking ANSI C 89): Remove strstr.
5919
5920 2007-02-04  Bruno Haible  <bruno@clisp.org>
5921
5922         New module mbsrchr.
5923         * modules/mbsrchr: New file.
5924         * lib/mbsrchr.c: New file.
5925         * lib/string_.h (strrchr): Add a conditional link warning.
5926         (mbsrchr): New declaration.
5927         * m4/mbsrchr.m4: New file.
5928         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5929         GNULIB_MBSRCHR.
5930         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
5931         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
5932
5933 2007-02-04  Bruno Haible  <bruno@clisp.org>
5934
5935         New module mbschr.
5936         * modules/mbschr: New file.
5937         * lib/mbschr.c: New file.
5938         * lib/string_.h (strchr): Add a conditional link warning.
5939         (mbschr): New declaration.
5940         * m4/mbschr.m4: New file.
5941         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5942         GNULIB_MBSCHR.
5943         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
5944         * MODULES.html.sh (Internationalization functions): Add mbschr.
5945
5946 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5947
5948         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
5949
5950         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
5951
5952 2007-02-04  Bruno Haible  <bruno@clisp.org>
5953
5954         New module description section 'configure.ac-early'.
5955         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
5956         (func_get_autoconf_early_snippet): New function.
5957         (func_import, func_create_testdir): Use it. Remove special cases for
5958         modules 'extensions' and 'lock'.
5959         * modules/extensions (configure.ac-early): Require
5960         gl_USE_SYSTEM_EXTENSIONS.
5961         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
5962
5963 2007-02-04  Bruno Haible  <bruno@clisp.org>
5964
5965         Make use of gcj-4.3's -fsource and -ftarget option.
5966         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
5967         and if so try the options -fsource and -ftarget.
5968         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
5969         source_version, ftarget_option, target_version arguments.
5970         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
5971         (is_envjavac_oldgcj_14_14_usable): Renamed from
5972         is_envjavac_gcj_14_14_usable.
5973         (is_envjavac_oldgcj_14_13_usable): Renamed from
5974         is_envjavac_gcj_14_13_usable.
5975         (is_gcj_present): Update.
5976         (is_gcj_43, is_gcj43_usable): New functions.
5977         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
5978         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
5979         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
5980         try the options -fsource and -ftarget.
5981
5982 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
5983
5984         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
5985         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
5986         larger value.
5987
5988 2007-02-03  Jim Meyering  <jim@meyering.net>
5989
5990         Give tools a better chance to allocate space for very large buffers.
5991         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
5992
5993         Make pwd and readlink work also when run with an unreadable parent dir
5994         on systems with openat support.
5995         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
5996         provided getcwd function, even when we have openat support.
5997         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
5998
5999 2007-02-02  Bruno Haible  <bruno@clisp.org>
6000
6001         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6002         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6003         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6004         portability problems if one of these functions is only used on specific
6005         platforms.
6006         Reported by Paul Eggert.
6007
6008 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6009
6010         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6011         is causing more trouble than it's curing.
6012         * lib/regex_internal.h (__mempcpy): Remove.
6013         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6014         (and make the code a tad smaller to boot).
6015         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6016
6017 2007-02-02  Jim Meyering  <jim@meyering.net>
6018
6019         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6020         section, not in the Makefile.am: one.
6021
6022 2007-02-02  Eric Blake  <ebb9@byu.net>
6023
6024         * lib/strchrnul.c: Always include config.h first.
6025
6026         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6027         gnulib strstr is not necessary here.
6028
6029 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6030
6031         * m4/socklen.m4: Fix typo.
6032
6033 2007-02-02  Eric Blake  <ebb9@byu.net>
6034
6035         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6036         * modules/netinet_in (Makefile.am): Likewise.
6037
6038 2007-02-01  Bruno Haible  <bruno@clisp.org>
6039
6040         * lib/string_.h (GL_LINK_WARNING): New macro.
6041         (strcasecmp, strstr, strcasestr): If provided by the system,
6042         conditionally define as a macro that leads to a warning instead of to
6043         an error.
6044         (strncasecmp): Conditionally define as a macro that leads to a warning.
6045
6046 2007-02-01  Karl Berry  <karl@gnu.org>
6047
6048         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6049
6050 2007-02-01  Bruno Haible  <bruno@clisp.org>
6051
6052         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6053         renamings.
6054
6055 2007-02-01  Eric Blake  <ebb9@byu.net>
6056
6057         * modules/regex (Depends-on): Revert dependence on mempcpy.
6058         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6059         module's definition of mempcpy.
6060         Reported by Paul Eggert.
6061
6062 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6063
6064         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6065         the symbol XYZ before redefining it.  This fixes a problem with
6066         programs that don't use XYZ, when compiled on systems that define
6067         XYZ to something else.
6068
6069 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
6070
6071         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
6072         occurs when "mkdir -m foo" creates a setgid directory that is (1)
6073         writeable to group or other and (2) is intended to have a special
6074         mode bit that is set or cleared.  In such a case, the directory
6075         should be neither group- nor other-writeable until the special
6076         mode bits are right.
6077
6078 2007-01-31  Eric Blake  <ebb9@byu.net>
6079
6080         * modules/mountlist (Depends-on): Add strstr.
6081
6082         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
6083         bug.
6084         * modules/string (Makefile.am): Remove redundant replacement.
6085         * modules/regex (Depends-on): Add mempcpy.
6086
6087 2007-01-31  Bruno Haible  <bruno@clisp.org>
6088
6089         New module description field 'Link'.
6090         * gnulib-tool (func_usage): Document --extract-link-directive.
6091         (sed_extract_prog): Recognize 'Link' directive.
6092         (func_get_link_directive): New function.
6093         (func_import): Show summary of link directives.
6094         Handle --extract-link-directive option.
6095         * modules/acl (Link): New section.
6096         * modules/clock-time (Link): New section.
6097         * modules/euidaccess (Link): New section.
6098         * modules/gettext (Link): New section.
6099         * modules/iconv (Link): New section.
6100         * modules/lock (Link): New section.
6101         * modules/nanosleep (Link): New section.
6102         * modules/readline (Link): New section.
6103
6104 2007-01-27  Bruno Haible  <bruno@clisp.org>
6105
6106         Enforce the use of gnulib modules for unportable <string.h> functions.
6107         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
6108         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
6109         (gl_HEADER_STRING_H_BODY): Require it.
6110         * lib/string_.h: If the gnulib module XYZ is not present, redefine
6111         the symbol XYZ to one that gives a link error.
6112         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
6113         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
6114         * modules/mempcpy (configure.ac): Likewise.
6115         * modules/memrchr (configure.ac): Likewise.
6116         * modules/stpcpy (configure.ac): Likewise.
6117         * modules/stpncpy (configure.ac): Likewise.
6118         * modules/strcase (configure.ac): Likewise.
6119         * modules/strcasestr (configure.ac): Likewise.
6120         * modules/strchrnul (configure.ac): Likewise.
6121         * modules/strdup (configure.ac): Likewise.
6122         * modules/strndup (configure.ac): Likewise.
6123         * modules/strnlen (configure.ac): Likewise.
6124         * modules/strpbrk (configure.ac): Likewise.
6125         * modules/strsep (configure.ac): Likewise.
6126         * modules/strstr (configure.ac): Likewise.
6127         * modules/strtok_r (configure.ac): Likewise.
6128
6129 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
6130
6131         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
6132
6133 2007-01-30  Jim Meyering  <jim@meyering.net>
6134
6135         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
6136
6137 2007-01-29  Bruno Haible  <bruno@clisp.org>
6138
6139         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
6140         * lib/execute.c: Likewise.
6141         * lib/pipe.c: Likewise.
6142         * lib/printf-args.h: Likewise.
6143         * lib/printf-args.c: Likewise.
6144         * lib/printf-parse.c: Likewise.
6145         * lib/vasnprintf.c: Likewise.
6146
6147 2007-01-29  Eric Blake  <ebb9@byu.net>
6148
6149         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
6150         declaration.
6151
6152 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
6153
6154         * lib/strptime.h (strptime): Use 'restrict' for args where
6155         POSIX requires this.
6156         * lib/strptime.c (strptime): Likewise.
6157         Change license notice from LGPL to GPL, since gnulib-tool will
6158         change this as needed.
6159         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
6160         defined.
6161         Include "strptime.h" first, to check interface.
6162         Do not #undef _LIBC and _NL_CURRENT.
6163         Do not include <stdlib.h>; no longer needed.
6164         Include "time_r.h" and declare ptime_locale_status
6165         only if _LIBC is not defined.
6166         (__P): Remove unused macro.
6167         (match_string): Bring back glibc version, but use it only if _LIBC
6168         is defined.
6169         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
6170         Remove unnecessary assertion and abort() call.
6171         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
6172         * m4/strptime.m4: Fix serial number comment.
6173         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
6174         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
6175         (Depends-on): Add time_r.
6176
6177 2007-01-29  Bruno Haible  <bruno@clisp.org>
6178
6179         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6180         strptime.
6181         * modules/strptime (Depends-on): Add stdbool.
6182         * lib/strptime.h: Include <time.h> always. Add comments.
6183
6184 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
6185
6186         * modules/strptime: New file.
6187         * lib/strptime.h: New file.
6188         * lib/strptime.c: New file.
6189         * m4/strptime.m4: New file.
6190
6191 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
6192
6193         * MODULES.html.sh: New module mpsort.
6194         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
6195
6196         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
6197         a circularity problem with HP-UX ia64 reported by Bob Proulx in
6198         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
6199         All uses changed.
6200         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
6201         All uses changed.
6202         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
6203         to _Restrict_.
6204         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
6205         the parameter matches the prototype.
6206
6207 2007-01-28  Jim Meyering  <jim@meyering.net>
6208
6209         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
6210         sys/time.h here, reverting that part of the previous patch:
6211         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
6212
6213 2007-01-28  Bruno Haible  <bruno@clisp.org>
6214
6215         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
6216         value of $(SYS_TIME_H).
6217         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6218         remove it conditionally, too. [added by Jim Meyering]
6219         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
6220         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6221         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
6222         GETTIMEOFDAY_REPLACEMENT to 1.
6223
6224 2007-01-28  Bruno Haible  <bruno@clisp.org>
6225
6226         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
6227         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
6228         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
6229         Set UNISTD_H instead of UNISTD_H2.
6230         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
6231
6232 2007-01-28  Bruno Haible  <bruno@clisp.org>
6233
6234         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
6235         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
6236
6237 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6238
6239         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
6240         (func_create_testdir): Ensure C locale for `grep' and `tr'
6241         character ranges.
6242         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
6243         ACLOCAL_AMFLAGS parsing state machine.
6244
6245 2007-01-27  Bruno Haible  <bruno@clisp.org>
6246
6247         * modules/unistr/base: Update.
6248
6249 2007-01-27  Bruno Haible  <bruno@clisp.org>
6250
6251         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6252         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6253         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6254         modules/unistr/u32-mbtouc.
6255         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6256         * lib/unistr.h: Update.
6257         * lib/linebreak.c: Update.
6258         * modules/unistr/u32-mbtouc: Renamed from
6259         modules/unistr/u32-mbtouc-safe.
6260         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6261         * lib/unistr.h: Update.
6262         * lib/unistr/u32-to-u8.c: Update.
6263         * lib/unistr/u32-to-u16.c: Update.
6264
6265 2007-01-27  Bruno Haible  <bruno@clisp.org>
6266
6267         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6268         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6269         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6270         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6271         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6272         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6273         modules/unistr/u16-mbtouc.
6274         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6275         * lib/unistr.h: Update.
6276         * lib/linebreak.c: Update.
6277         * modules/linebreak: Update.
6278         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6279         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6280         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6281         * modules/unistr/u16-mbtouc: Renamed from
6282         modules/unistr/u16-mbtouc-safe.
6283         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6284         * lib/unistr.h: Update.
6285         * lib/unistr/u16-to-u8.c: Update.
6286         * modules/unistr/u16-to-u8: Update.
6287         * lib/unistr/u16-to-u32.c: Update.
6288         * modules/unistr/u16-to-u32: Update.
6289
6290 2007-01-27  Bruno Haible  <bruno@clisp.org>
6291
6292         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6293         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6294         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6295         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6296         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6297         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6298         modules/unistr/u8-mbtouc.
6299         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6300         * lib/unistr.h: Update.
6301         * lib/striconveh.c: Update.
6302         * modules/striconveh: Update.
6303         * lib/linebreak.c: Update.
6304         * modules/linebreak: Update.
6305         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6306         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6307         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6308         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6309         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6310         * lib/unistr.h: Update.
6311         * lib/striconveh.c: Update.
6312         * modules/striconveh: Update.
6313         * lib/unistr/u8-to-u16.c: Update.
6314         * modules/unistr/u8-to-u16: Update.
6315         * lib/unistr/u8-to-u32.c: Update.
6316         * modules/unistr/u8-to-u32: Update.
6317
6318 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6319
6320         Sync from Libtool.
6321         * lib/argz.c: Do not include strings.h nor memory.h, include
6322         string.h unconditionally.  Patch by Simon Josefsson.
6323
6324 2007-01-27  Bruno Haible  <bruno@clisp.org>
6325
6326         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6327         from gl_HEADER_STRING_H_BODY.
6328         (gl_HEADER_STRING_H_BODY): Require it.
6329         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6330         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6331         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6332         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6333         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6334         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6335         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6336         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6337         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6338         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6339         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6340         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6341         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6342         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6343         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6344
6345 2007-01-27  Bruno Haible  <bruno@clisp.org>
6346
6347         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6348         check_PROGRAMS into noinst_PROGRAMS.
6349         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6350         check_PROGRAMS in this case.
6351         (func_import): Set for_test to false.
6352         (func_create_testdir): Set for_test to true.
6353
6354 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6355             Bruno Haible  <bruno@clisp.org>
6356
6357         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6358         (Depends-on): Add string.
6359         (Includes): Use <string.h> instead of strcasestr.h.
6360         * modules/string (Makefile.am): Also substitute the value of
6361         REPLACE_STRCASESTR.
6362         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6363         assume strcasestr is declared in <string.h> not <strings.h>. Also
6364         set REPLACE_STRCASESTR.
6365         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6366         REPLACE_STRCASESTR.
6367         * lib/strcasestr.h: Remove file.
6368         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6369         * lib/string_.h (strcasestr): New declaration.
6370
6371 2007-01-27  Bruno Haible  <bruno@clisp.org>
6372
6373         * lib/string_.h: Use 'extern'.
6374
6375 2007-01-27  Jim Meyering  <jim@meyering.net>
6376
6377         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6378         of set-but-not-used local, "q".
6379
6380         * lib/mempcpy.c: Include <config.h> before <string.h>.
6381         This fixes a compilation error on HP-UX, due to the system's
6382         "restrict"-using mempcpy prototype.
6383
6384 2007-01-26  Bruno Haible  <bruno@clisp.org>
6385
6386         Small optimization.
6387         * lib/javacomp.c: Include c-strstr.h.
6388          (is_envjavac_gcj): Use c_strstr instead of strstr.
6389         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6390
6391 2007-01-26  Bruno Haible  <bruno@clisp.org>
6392
6393         * MODULES.html.sh (Unicode string functions): Add the new modules.
6394
6395         * modules/uniconv/u32-strconv-to-locale: New file.
6396         * lib/uniconv/u32-strconv-to-locale.c: New file.
6397
6398         * modules/uniconv/u16-strconv-to-locale: New file.
6399         * lib/uniconv/u16-strconv-to-locale.c: New file.
6400
6401         * modules/uniconv/u8-strconv-to-locale: New file.
6402         * lib/uniconv/u8-strconv-to-locale.c: New file.
6403
6404         * modules/uniconv/u32-strconv-from-locale: New file.
6405         * lib/uniconv/u32-strconv-from-locale.c: New file.
6406
6407         * modules/uniconv/u16-strconv-from-locale: New file.
6408         * lib/uniconv/u16-strconv-from-locale.c: New file.
6409
6410         * modules/uniconv/u8-strconv-from-locale: New file.
6411         * lib/uniconv/u8-strconv-from-locale.c: New file.
6412
6413         * modules/uniconv/u32-strconv-to-enc: New file.
6414         * lib/uniconv/u32-strconv-to-enc.c: New file.
6415         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6416         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6417
6418         * modules/uniconv/u16-strconv-to-enc: New file.
6419         * lib/uniconv/u16-strconv-to-enc.c: New file.
6420         * lib/uniconv/u-strconv-to-enc.h: New file.
6421         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6422         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6423
6424         * modules/uniconv/u8-strconv-to-enc: New file.
6425         * lib/uniconv/u8-strconv-to-enc.c: New file.
6426         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6427         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6428
6429         * modules/uniconv/u32-strconv-from-enc: New file.
6430         * lib/uniconv/u32-strconv-from-enc.c: New file.
6431         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6432         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6433
6434         * modules/uniconv/u16-strconv-from-enc: New file.
6435         * lib/uniconv/u16-strconv-from-enc.c: New file.
6436         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6437         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6438
6439         * modules/uniconv/u8-strconv-from-enc: New file.
6440         * lib/uniconv/u8-strconv-from-enc.c: New file.
6441         * lib/uniconv/u-strconv-from-enc.h: New file.
6442         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6443         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6444
6445         * modules/uniconv/u32-conv-from-enc: New file.
6446         * lib/uniconv/u32-conv-from-enc.c: New file.
6447         * modules/uniconv/u32-conv-from-enc-tests: New file.
6448         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6449
6450         * modules/uniconv/u16-conv-from-enc: New file.
6451         * lib/uniconv/u16-conv-from-enc.c: New file.
6452         * lib/uniconv/u-conv-from-enc.h: New file.
6453         * modules/uniconv/u16-conv-from-enc-tests: New file.
6454         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6455
6456         * modules/uniconv/u8-conv-from-enc: New file.
6457         * lib/uniconv/u8-conv-from-enc.c: New file.
6458         * modules/uniconv/u8-conv-from-enc-tests: New file.
6459         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6460
6461         * modules/uniconv/base: New file.
6462         * lib/uniconv.h: New file.
6463
6464 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6465
6466         * doc/gnulib-tool.texi (Initial import): Update to match current
6467         behavior with strdup module.
6468         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6469         * lib/memmem.h: Remove; all uses removed.  This is now done
6470         by <string.h>.
6471         * lib/mempcpy.h: Likewise.
6472         * lib/memrchr.h: Likewise.
6473         * lib/stpcpy.h: Likewise.
6474         * lib/stpncpy.h: Likewise.
6475         * lib/strcase.h: Likewise.
6476         * lib/strchrnul.h: Likewise.
6477         * lib/strdup.h: Likewise.
6478         * lib/strndup.h: Likewise.
6479         * lib/strnlen.h: Likewise.
6480         * lib/strpbrk.h: Likewise.
6481         * lib/strsep.h: Likewise.
6482         * lib/strstr.h: Likewise.
6483         * lib/strtok_r.h: Likewise.
6484         * lib/string_.h: New file.
6485         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6486         Rely on <string.h> instead.
6487         * lib/canon-host.c: Likewise.
6488         * lib/chdir-long.c: Likewise.
6489         * lib/concatpath.c: Likewise.
6490         * lib/exclude.c: Likewise.
6491         * lib/fchdir.c: Likewise.
6492         * lib/getaddrinfo.c: Likewise.
6493         * lib/getcwd.c: Likewise.
6494         * lib/getsubopt.c: Likewise.
6495         * lib/glob.c: Likewise.
6496         * lib/hard-locale.c: Likewise.
6497         * lib/iconvme.c: Likewise.
6498         * lib/javacomp.c: Likewise.
6499         * lib/mempcpy.c: Likewise.
6500         * lib/memrchr.c: Likewise.
6501         * lib/regex_internal.h: Likewise.
6502         * lib/stpncpy.c: Likewise.
6503         * lib/strcasecmp.c: Likewise.
6504         * lib/strchrnul.c: Likewise.
6505         * lib/strdup.c: Likewise.
6506         * lib/striconv.c: Likewise.
6507         * lib/striconveh.c: Likewise.
6508         * lib/striconveha.c: Likewise.
6509         * lib/strncasecmp.c: Likewise.
6510         * lib/strndup.c: Likewise.
6511         * lib/strnlen.c: Likewise.
6512         * lib/strsep.c: Likewise.
6513         * lib/strstr.c: Likewise.
6514         * lib/strtok_r.c: Likewise.
6515         * lib/userspec.c: Likewise.
6516         * lib/w32spawn.h: Likewise.
6517         * lib/xstrndup.c: Likewise.
6518         * lib/mountlist.c (strstr): Remove decl.
6519         * m4/string_h.m4: New file.
6520         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6521         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6522         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6523         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6524         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6525         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6526         Set REPLACE_STRCASECMP if necessary.
6527         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6528         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6529         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6530         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6531         HAVE_DECL_STRDUP if necessary.
6532         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
6533         since gl_FUNC_STRNDUP does that now.
6534         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
6535         Check for decl here...
6536         (gl_PREREQ_STRNLEN): ... not here.
6537         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
6538         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
6539         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
6540         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
6541         necessary.
6542         * modules/string: New file.
6543         * modules/memmem (Files): Remove special-purpose include file.
6544         (Depends-on): Add string.
6545         (Include): Include <string.h>, not the removed file.
6546         * modules/mempcpy: Likewise.
6547         * modules/memrchr: Likewise.
6548         * modules/stpcpy: Likewise.
6549         * modules/stpncpy: Likewise.
6550         * modules/strcase: Likewise.
6551         * modules/strchrnul: Likewise.
6552         * modules/strdup: Likewise.
6553         * modules/strndup: Likewise.
6554         * modules/strnlen: Likewise.
6555         * modules/strpbrk: Likewise.
6556         * modules/strsep: Likewise.
6557         * modules/strstr: Likewise.
6558         * modules/strtok_r: Likewise.
6559         * tests/test-dirname.c: Don't include "strdup.h", since
6560         <string.h> now suffices.
6561         * tests/test-memmem.c: Don't include "memmem.h", since
6562         <string.h> now suffices.
6563
6564 2007-01-25  Bruno Haible  <bruno@clisp.org>
6565
6566         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
6567         *resultp is 0.
6568
6569         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
6570         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
6571         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
6572         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
6573
6574         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
6575         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
6576         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
6577         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
6578         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
6579         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
6580
6581 2007-01-24  Bruno Haible  <bruno@clisp.org>
6582
6583         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
6584         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
6585         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
6586         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
6587         gl_FUNC_FTS_CORE.
6588         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
6589         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
6590         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
6591         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
6592         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
6593         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
6594         gl_FUNC_FCHOWNAT.
6595         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
6596         gl_FUNC_STRFTIME.
6597         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
6598         Reported by Ralf Wildenhues.
6599
6600 2007-01-24  Bruno Haible  <bruno@clisp.org>
6601
6602         Drop AC_REQUIRE calls that are redundant with the module dependencies.
6603         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
6604         gl_GETADDRINFO.
6605         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
6606         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
6607         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
6608
6609 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6610
6611         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
6612         Don't use 'exit'; just return from 'main'.
6613         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
6614
6615         * lib/fnmatch_.h: Readjust white space and comments to match
6616         glibc, to avoid spurious diffs.
6617
6618 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6619
6620         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
6621         2004-12-01 change by Jakub Jelinek, since this code won't compile
6622         if !LIBC.  Problem reported by Bob Proulx.
6623
6624 2007-01-23  Bruno Haible  <bruno@clisp.org>
6625
6626         * lib/striconveh.c: Include c-strcaseeq.h.
6627         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
6628         * modules/striconveh (Depends-on): Add c-strcaseeq.
6629
6630 2007-01-23  Bruno Haible  <bruno@clisp.org>
6631
6632         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
6633
6634         * modules/c-strcaseeq: New file.
6635         * lib/c-strcaseeq.h: New file.
6636
6637         * modules/streq: New file.
6638         * lib/streq.h: New file.
6639
6640 2007-01-23  Bruno Haible  <bruno@clisp.org>
6641
6642         * modules/striconveha-tests: New file.
6643         * tests/test-striconveha.c: New file.
6644
6645         * lib/striconveha.h: Include <stdbool.h>.
6646         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
6647         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
6648         (mem_iconveha_notranslit): Renamed from mem_iconveha.
6649         (mem_iconveha): New function.
6650         (str_iconveha_notranslit): Renamed from str_iconveha.
6651         (str_iconveha): New function.
6652         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
6653         c-strcase.
6654
6655 2007-01-23  Bruno Haible  <bruno@clisp.org>
6656
6657         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
6658         encodings without forgiving before trying any encoding with handler.
6659         (str_iconveha): Try all encodings without forgiving before trying any
6660         encoding with handler.
6661
6662 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6663
6664         Import the following changes from libc.
6665
6666         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6667
6668         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
6669
6670         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6671
6672         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
6673         normal_bracket label.
6674
6675         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
6676
6677         [BZ #361]
6678         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
6679         to normal_bracket after fetching the next character.
6680
6681 2007-01-22  Bruno Haible  <bruno@clisp.org>
6682
6683         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
6684         argument.
6685         * lib/striconveh.c (iconv_carefully_1): New function.
6686         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
6687         argument.
6688         (str_cd_iconveh): Update.
6689         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
6690         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
6691         * tests/test-striconveh.c (MAGIC): New macro.
6692         (new_offsets): New function.
6693         (main): Test call with and without offsets.
6694
6695 2007-01-22  Bruno Haible  <bruno@clisp.org>
6696
6697         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
6698         * modules/sys_select (Makefile.am): Likewise.
6699         * modules/sys_socket (Makefile.am): Likewise.
6700         * modules/sys_time (Makefile.am): Likewise.
6701
6702 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6703
6704         * modules/gettimeofday (License): Change from GPL to LGPL, since
6705         gettimeofday is a library function.
6706
6707 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6708
6709         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
6710
6711 2007-01-21  Bruno Haible  <bruno@clisp.org>
6712
6713         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
6714
6715 2007-01-21  Bruno Haible  <bruno@clisp.org>
6716
6717         * modules/striconveha: New file.
6718         * lib/striconveha.h: New file.
6719         * lib/striconveha.c: New file.
6720         * MODULES.html.sh (Internationalization functions): Add striconveha.
6721         * lib/striconv.c (str_iconv): Optimize the case of an empty input
6722         string.
6723         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
6724
6725 2007-01-21  Bruno Haible  <bruno@clisp.org>
6726
6727         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
6728         * lib/striconveh.c (str_iconveh): Likewise.
6729
6730 2007-01-21  Bruno Haible  <bruno@clisp.org>
6731
6732         * lib/striconveh.h (mem_iconveh): New declaration.
6733         * lib/striconveh.c (mem_iconveh): New function.
6734         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
6735
6736 2007-01-21  Bruno Haible  <bruno@clisp.org>
6737
6738         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
6739
6740         * lib/striconveh.h (mem_cd_iconveh): Change specification.
6741         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
6742         original result buffer.
6743         (str_cd_iconveh): Update.
6744         * tests/test-striconveh.c (main): Update.
6745
6746         * lib/striconv.h (mem_cd_iconv): Change specification.
6747         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
6748         result buffer.
6749         (str_cd_iconv): Update.
6750         * tests/test-striconv.c (main): Update.
6751
6752 2007-01-21  Bruno Haible  <bruno@clisp.org>
6753
6754         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
6755
6756 2007-01-20  Jim Meyering  <jim@meyering.net>
6757
6758         * lib/userspec.c (parse_with_separator): If a user or group string
6759         starts with "+", skip the corresponding name-to-ID look-up, since
6760         such a look-up must fail: user and group names may not include "+".
6761
6762 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
6763
6764         * lib/poll.c: Include sys/time.h and time.h unconditionally,
6765         since we now assume the sys_time module.
6766         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
6767         check for sys/time.h; no longer needed.
6768         * modules/poll (Depends-on): Depend on sys_time.
6769
6770 2007-01-18  Bruno Haible  <bruno@clisp.org>
6771
6772         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
6773         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6774
6775         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
6776         gettimeofday.
6777
6778         * tests/test-gettimeofday.c: Include <time.h>.
6779         (dummy): Remove variable.
6780
6781         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
6782         gl_HEADER_SYS_TIME_H.
6783         (gl_HEADER_SYS_TIME_H): New macro.
6784
6785         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
6786         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6787         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
6788         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
6789         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6790         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
6791         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
6792         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6793         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
6794         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
6795         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6796
6797         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
6798         last change; it caused a compilation error when cross-compiling to
6799         Cygwin.
6800
6801 2007-01-18  Jim Meyering  <jim@meyering.net>
6802
6803         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
6804         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
6805         than the race-prone "test -d sys || mkdir sys".
6806         (configure.ac): Use AC_PROG_MKDIR_P.
6807         * modules/sys_select: Likewise.
6808         * modules/sys_socket: Likewise.
6809         * modules/sys_time: Likewise.
6810
6811 2007-01-18  Eric Blake  <ebb9@byu.net>
6812
6813         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
6814         replace gettimeofday.
6815         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6816         name, to avoid infinite recursion.
6817
6818 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
6819
6820         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
6821         module sys_time.
6822         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
6823         assume timespec.h defines struct timeval.
6824         * lib/settime.c: Likewise.
6825         * lib/utimens.c: Likewise.
6826         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
6827         since we now assume the gettimeofday module.
6828         * lib/tempname.c (__gen_tempname): Likewise.
6829         * lib/gettimeofday.h: Remove.
6830         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
6831         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
6832         Include <time.h>, for 'time()'.
6833         (localtime_buffer_addr): Also use this workaround if
6834         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
6835         to simplify the uses.  All uses changed.
6836         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
6837         that #undef is inside {}, and 'const' follows type name consistently.
6838         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
6839         (gettimeofday): Do not use the maximum possible value for
6840         tv->tv_usec, since that might break usages other than ls.c.
6841         Instead, we'll leave ls.c alone.  This undoes today's patch
6842         by Bruno.  Add a compile-time warning for 1s-clock resolution;
6843         we've never observed the problem but might as well keep the
6844         canary.
6845         * lib/nanosleep.c: Include timespec.h first, for interface check.
6846         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
6847         now assume the sys_time module.
6848         * lib/tempname.c: Likewise.
6849         * lib/timespec.h: Likewise.
6850         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
6851         needed.
6852         * lib/strftime.c: Likewise.
6853         * lib/timespec.h: Likewise.
6854         * lib/posixtm.c: Include posixtm.h first, for interface check.
6855         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
6856         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
6857         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
6858         * lib/sys_time_.h: New file.
6859         * lib/timespec.h (struct timespec): Use long int, not long.
6860         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6861         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
6862         Remove obsolescent call to AC_HEADER_TIME.
6863         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
6864         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6865         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6866         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
6867         Likewise.
6868         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
6869         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
6870         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
6871         into the sys_time module.  Check for gettimeofday just once.
6872         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
6873         for gettimeofday signature to just check the signature.  Merely
6874         compile it, since linking doesn't test signature.  Improve test for
6875         whether gettimeofday.o is actually needed.
6876         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
6877         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
6878         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
6879         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6880         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
6881         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
6882         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
6883         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
6884         than worrying about sys/time.h.
6885         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6886         Don't bother worrying about TIME_WITH_SYS_TIME.
6887         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
6888         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
6889         * m4/sys_time_h.m4: New file.
6890         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
6891         Don't include sys/time.h.  Return from main rather than exiting.
6892         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
6893         all uses changed.
6894         * modules/gethrxtime (Depends-on): Add sys_time.
6895         * modules/gettime (Depends-on): Likewise.
6896         * modules/gettimeofday (Depends-on): Likewise.
6897         * modules/nanosleep (Depends-on): Likewise.
6898         * modules/settime (Depends-on): Likewise.
6899         * modules/tempname (Depends-on): Likewise.
6900         * modules/utimens (Depends-on): Likewise.
6901         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
6902         (Include:) Change back to <sys/time.h>.
6903         (Maintainer:) Add self.
6904         * modules/sys_time: New file.
6905         * modules/tempname (Depends-on): Add gettimeofday.
6906         * tests/test-gettimeofday.c: Include <sys/time.h>
6907         rather than gettimeofday.h.
6908
6909 2007-01-17  Bruno Haible  <bruno@clisp.org>
6910
6911         * gnulib-tool (func_get_license): Revert last patch. Instead, let
6912         the license default to GPL.
6913         (func_create_testdir): Don't complain if a module is LGPL and its
6914         tests module depends on GPLed modules.
6915
6916 2007-01-17  Bruno Haible  <bruno@clisp.org>
6917
6918         * lib/gettimeofday.c (gettimeofday): Add code for the case
6919         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
6920         maximum possible value for tv->tv_usec, rather than the minimum one.
6921
6922 2005-10-08  Martin Lambers  <marlam@marlam.de>
6923 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6924 2007-01-16  Bruno Haible  <bruno@clisp.org>
6925
6926         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
6927         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
6928         gl_FUNC_GETTIMEOFDAY.
6929         (Include): Add gettimeofday.h.
6930         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
6931         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
6932         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
6933         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
6934         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
6935         * lib/gettimeofday.h: New file.
6936         * lib/gettimeofday.c: Include <sys/timeb.h>.
6937         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
6938         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6939         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
6940         fall back on time().
6941
6942         * tests/test-gettimeofday.c: New file.
6943         * modules/gettimeofday-tests: New file.
6944
6945 2007-01-16  Eric Blake  <ebb9@byu.net>
6946
6947         * modules/fnmatch (Depends-on): Depend on wchar.
6948         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
6949         * m4/fnmatch.m4: Likewise.
6950         * modules/mbchar (Makefile.am): Assume <wchar.h>.
6951         * m4/mbchar.m4: Likewise.
6952         * modules/mbswidth (Depends-on): Depend on wchar.
6953         * lib/mbswidth.c: Assume <wchar.h>.
6954         * m4/mbswidth.m4: Likewise.
6955         * modules/quotearg (Depends-on): Depend on wchar.
6956         * lib/quotearg.c: Assume <wchar.h>.
6957         * m4/quotearg.m4: Likewise.
6958         * modules/regex (Depends-on): Depend on wchar.
6959         * lib/regex_internal.h: Assume <wchar.h>.
6960         * m4/regex.m4: Likewise.
6961         * modules/stdint (Depends-on): Depend on wchar.
6962         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
6963         * m4/stdint.m4: Likewise.
6964         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
6965         * modules/strftime (Depends-on): Depend on wchar.
6966         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
6967         * modules/strtol (Depends-on): Depend on wchar.
6968         * lib/strtol.c: Assume <wchar.h>.
6969         * modules/wcwidth (Depends-on): Depend on wchar.
6970         * lib/wcwidth.h: Assume <wchar.h>.
6971         * m4/wcwidth.m4: Likewise.
6972
6973 2007-01-16  Bruno Haible  <bruno@clisp.org>
6974
6975         * modules/csharpexec-script: New, created from...
6976         * modules/csharpexec: ... this.
6977
6978 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
6979
6980         * modules/javaexec-script: New, created from...
6981         * modules/javaexec: ... this.
6982
6983 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6984
6985         * modules/poll (Dependencies): Add sys_select.
6986
6987 2007-01-15  Jim Meyering  <jim@meyering.net>
6988
6989         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
6990         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
6991         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
6992         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
6993
6994 2007-01-15  Bruno Haible  <bruno@clisp.org>
6995
6996         * modules/striconveh: New file.
6997         * lib/striconveh.h: New file.
6998         * lib/striconveh.c: New file.
6999         * MODULES.html.sh (Internationalization functions): Add striconveh.
7000
7001         * modules/striconveh-tests: New file.
7002         * tests/test-striconveh.c: New file.
7003
7004 2007-01-15  Bruno Haible  <bruno@clisp.org>
7005
7006         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7007         not from GNU libiconv or GNU libc.
7008
7009 2007-01-15  Bruno Haible  <bruno@clisp.org>
7010
7011         * doc/gnulib-intro.texi (Copyright): Explain the different license
7012         terms for module descriptions, autoconf macros, tests, documentation.
7013
7014 2007-01-14  Bruno Haible  <bruno@clisp.org>
7015
7016         * modules/striconv-tests: New file.
7017         * tests/test-striconv.c: New file.
7018
7019 2007-01-14  Bruno Haible  <bruno@clisp.org>
7020
7021         * modules/iconv-tests: New file.
7022         * tests/test-iconv.c: New file.
7023
7024 2007-01-14  Bruno Haible  <bruno@clisp.org>
7025
7026         * gnulib-tool (func_get_license): For test modules, use the license of
7027         the main module.
7028
7029 2007-01-14  Bruno Haible  <bruno@clisp.org>
7030
7031         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7032         if iconv is found to exist.
7033
7034 2007-01-14  Bruno Haible  <bruno@clisp.org>
7035
7036         * modules/c-ctype-tests: New file.
7037         * tests/test-c-ctype.c: New file.
7038
7039 2007-01-14  Bruno Haible  <bruno@clisp.org>
7040
7041         * modules/binary-io-tests: New file.
7042         * tests/test-binary-io.sh: New file.
7043         * tests/test-binary-io.c: New file.
7044
7045 2007-01-14  Bruno Haible  <bruno@clisp.org>
7046
7047         * modules/array-oset-tests: New file.
7048         * tests/test-array_oset.c: New file.
7049
7050 2007-01-14  Bruno Haible  <bruno@clisp.org>
7051
7052         * modules/array-list-tests: New file.
7053         * tests/test-array_list.c: New file.
7054
7055 2007-01-14  Bruno Haible  <bruno@clisp.org>
7056
7057         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7058         and make.
7059         Reported by Simon Josefsson in
7060         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7061
7062 2007-01-14  Bruno Haible  <bruno@clisp.org>
7063
7064         * modules/allocsa-tests: New file.
7065         * tests/test-allocsa.c: New file.
7066
7067 2007-01-14  Bruno Haible  <bruno@clisp.org>
7068
7069         * modules/fchdir (Depends-on): Add absolute-header.
7070         * modules/unistd (Depends-on): Likewise.
7071
7072 2006-12-30  Bruno Haible  <bruno@clisp.org>
7073
7074         * modules/fchdir: New file.
7075         * modules/unistd (Files): Add lib/unistd_.h.
7076         (Makefile.am): Generate unistd.h from unistd_.h.
7077         * lib/fchdir.c: New file.
7078         * lib/dirent_.h: New file.
7079         * lib/unistd_.h: New file.
7080         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
7081         * m4/fchdir.m4: New file.
7082         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
7083         (gl_HEADER_UNISTD): Invoke it.
7084         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
7085         function.
7086         * lib/backupfile.c (opendir, closedir): Undefine.
7087         * lib/chown.c (open, close): Undefine.
7088         * lib/clean-temp.c (open, close): Undefine.
7089         * lib/copy-file.c (open, close): Undefine.
7090         * lib/execute.c (open, close): Undefine.
7091         * lib/fsusage.c (open, close): Undefine.
7092         * lib/gc-gnulib.c (open, close): Undefine.
7093         * lib/getcwd.c (opendir, closedir): Undefine.
7094         * lib/glob.c (opendir, closedir): Undefine.
7095         * lib/javacomp.c (open, close): Undefine.
7096         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
7097         * lib/openat-proc.c (open, close): Undefine.
7098         * lib/pagealign_alloc.c (open, close): Undefine.
7099         * lib/pipe.c (open, close): Undefine.
7100         * lib/progreloc.c (open, close): Undefine.
7101         * lib/savedir.c (opendir, closedir): Undefine.
7102         * lib/utime.c (open, close): Undefine.
7103         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
7104
7105 2007-01-10  Bruno Haible  <bruno@clisp.org>
7106
7107         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
7108
7109 2007-01-12  Eric Blake  <ebb9@byu.net>
7110
7111         Provide a robust <wchar.h>.  Further simplifications are now
7112         possible in other modules, but not included here.
7113         * modules/wchar: New module.
7114         * m4/wchar.m4: New file.
7115         * lib/wchar_.h: Likewise.
7116         * modules/mbchar (Depends-on): Depend on wchar, as the first use
7117         of the new module.
7118         * MODULES.html.sh (Extended multibyte and wide character utilities):
7119         New section.
7120
7121 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
7122
7123         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
7124         to a reasonable default for memory allocation.
7125         (xreadlink): Don't allocate a huge buffer, to work around a buggy
7126         file system that reports garbage st_size values for symlinks.
7127         Problem reported by Liyang Hu.
7128
7129 2007-01-11  Simon Josefsson  <simon@josefsson.org>
7130
7131         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
7132         Emacs .#* auto-save files).
7133
7134 2007-01-11  Bruno Haible  <bruno@clisp.org>
7135
7136         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
7137         directory.
7138
7139 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7140
7141         Use @...@ consistently in lib/wctype_.h.
7142         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
7143         on it being set to 1 or 0.
7144         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
7145         go back to AC_SUBSTing it.
7146         * modules/wctype (Makefile.am): Undo previous change.
7147
7148 2007-01-10  Eric Blake  <ebb9@byu.net>
7149
7150         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
7151         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
7152         * modules/wctype (Makefile.am): Likewise.
7153         Reported by Chris McGuire.
7154
7155 2007-01-10  Jim Meyering  <jim@meyering.net>
7156
7157         fts.c: a small readability/maintainability improvement
7158         * lib/fts.c (fts_read): Make this code slightly more readable and
7159         maintainable by hoisting the "sp->fts_cur = p" assignments to
7160         immediately follow the statements that set P.  Derived from
7161         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
7162
7163 2007-01-10  Eric Blake  <ebb9@byu.net>
7164
7165         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
7166         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
7167         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7168         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
7169         Reported by Chris McGuire.
7170
7171 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7172
7173         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
7174         in sed script.
7175
7176 2007-01-09  Bruno Haible  <bruno@clisp.org>
7177
7178         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
7179         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
7180         variables.
7181         (func_module): Use them.
7182
7183 2007-01-09  Bruno Haible  <bruno@clisp.org>
7184
7185         * modules/unistr/base: New file.
7186         * lib/unistr.h: New file.
7187
7188         * modules/unistr/u8-to-u16: New file.
7189         * lib/unistr/u8-to-u16.c: New file.
7190
7191         * modules/unistr/u8-to-u32: New file.
7192         * lib/unistr/u8-to-u32.c: New file.
7193
7194         * modules/unistr/u16-to-u8: New file.
7195         * lib/unistr/u16-to-u8.c: New file.
7196
7197         * modules/unistr/u16-to-u32: New file.
7198         * lib/unistr/u16-to-u32.c: New file.
7199
7200         * modules/unistr/u32-to-u8: New file.
7201         * lib/unistr/u32-to-u8.c: New file.
7202
7203         * modules/unistr/u32-to-u16: New file.
7204         * lib/unistr/u32-to-u16.c: New file.
7205
7206         * modules/unistr/u8-check: New file.
7207         * modules/unistr/u16-check: New file.
7208         * modules/unistr/u32-check: New file.
7209         * lib/unistr/u8-check.c: New file.
7210         * lib/unistr/u16-check.c: New file.
7211         * lib/unistr/u32-check.c: New file.
7212
7213         * modules/unistr/u8-chr: New file.
7214         * modules/unistr/u16-chr: New file.
7215         * modules/unistr/u32-chr: New file.
7216         * lib/unistr/u8-chr.c: New file.
7217         * lib/unistr/u16-chr.c: New file.
7218         * lib/unistr/u32-chr.c: New file.
7219
7220         * modules/unistr/u8-cmp: New file.
7221         * modules/unistr/u16-cmp: New file.
7222         * modules/unistr/u32-cmp: New file.
7223         * lib/unistr/u8-cmp.c: New file.
7224         * lib/unistr/u16-cmp.c: New file.
7225         * lib/unistr/u32-cmp.c: New file.
7226
7227         * modules/unistr/u8-cpy: New file.
7228         * modules/unistr/u16-cpy: New file.
7229         * modules/unistr/u32-cpy: New file.
7230         * lib/unistr/u8-cpy.c: New file.
7231         * lib/unistr/u16-cpy.c: New file.
7232         * lib/unistr/u32-cpy.c: New file.
7233         * lib/unistr/u-cpy.h: New file.
7234
7235         * modules/unistr/u8-cpy-alloc: New file.
7236         * modules/unistr/u16-cpy-alloc: New file.
7237         * modules/unistr/u32-cpy-alloc: New file.
7238         * lib/unistr/u8-cpy-alloc.c: New file.
7239         * lib/unistr/u16-cpy-alloc.c: New file.
7240         * lib/unistr/u32-cpy-alloc.c: New file.
7241         * lib/unistr/u-cpy-alloc.h: New file.
7242
7243         * modules/unistr/u8-endswith: New file.
7244         * modules/unistr/u16-endswith: New file.
7245         * modules/unistr/u32-endswith: New file.
7246         * lib/unistr/u8-endswith.c: New file.
7247         * lib/unistr/u16-endswith.c: New file.
7248         * lib/unistr/u32-endswith.c: New file.
7249         * lib/unistr/u-endswith.h: New file.
7250
7251         * modules/unistr/u8-mblen: New file.
7252         * modules/unistr/u16-mblen: New file.
7253         * modules/unistr/u32-mblen: New file.
7254         * lib/unistr/u8-mblen.c: New file.
7255         * lib/unistr/u16-mblen.c: New file.
7256         * lib/unistr/u32-mblen.c: New file.
7257
7258         * modules/unistr/u8-mbtouc: New file.
7259         * modules/unistr/u16-mbtouc: New file.
7260         * modules/unistr/u32-mbtouc: New file.
7261         * lib/unistr/u8-mbtouc.c: New file.
7262         * lib/unistr/u16-mbtouc.c: New file.
7263         * lib/unistr/u32-mbtouc.c: New file.
7264
7265         * modules/unistr/u8-mbtouc-safe: New file.
7266         * modules/unistr/u16-mbtouc-safe: New file.
7267         * modules/unistr/u32-mbtouc-safe: New file.
7268         * lib/unistr/u8-mbtouc-safe.c: New file.
7269         * lib/unistr/u16-mbtouc-safe.c: New file.
7270         * lib/unistr/u32-mbtouc-safe.c: New file.
7271
7272         * modules/unistr/u8-move: New file.
7273         * modules/unistr/u16-move: New file.
7274         * modules/unistr/u32-move: New file.
7275         * lib/unistr/u8-move.c: New file.
7276         * lib/unistr/u16-move.c: New file.
7277         * lib/unistr/u32-move.c: New file.
7278         * lib/unistr/u-move.h: New file.
7279
7280         * modules/unistr/u8-next: New file.
7281         * modules/unistr/u16-next: New file.
7282         * modules/unistr/u32-next: New file.
7283         * lib/unistr/u8-next.c: New file.
7284         * lib/unistr/u16-next.c: New file.
7285         * lib/unistr/u32-next.c: New file.
7286
7287         * modules/unistr/u8-prev: New file.
7288         * modules/unistr/u16-prev: New file.
7289         * modules/unistr/u32-prev: New file.
7290         * lib/unistr/u8-prev.c: New file.
7291         * lib/unistr/u16-prev.c: New file.
7292         * lib/unistr/u32-prev.c: New file.
7293
7294         * modules/unistr/u8-set: New file.
7295         * modules/unistr/u16-set: New file.
7296         * modules/unistr/u32-set: New file.
7297         * lib/unistr/u8-set.c: New file.
7298         * lib/unistr/u16-set.c: New file.
7299         * lib/unistr/u32-set.c: New file.
7300         * lib/unistr/u-set.h: New file.
7301
7302         * modules/unistr/u8-startswith: New file.
7303         * modules/unistr/u16-startswith: New file.
7304         * modules/unistr/u32-startswith: New file.
7305         * lib/unistr/u8-startswith.c: New file.
7306         * lib/unistr/u16-startswith.c: New file.
7307         * lib/unistr/u32-startswith.c: New file.
7308         * lib/unistr/u-startswith.h: New file.
7309
7310         * modules/unistr/u8-stpcpy: New file.
7311         * modules/unistr/u16-stpcpy: New file.
7312         * modules/unistr/u32-stpcpy: New file.
7313         * lib/unistr/u8-stpcpy.c: New file.
7314         * lib/unistr/u16-stpcpy.c: New file.
7315         * lib/unistr/u32-stpcpy.c: New file.
7316         * lib/unistr/u-stpcpy.h: New file.
7317
7318         * modules/unistr/u8-stpncpy: New file.
7319         * modules/unistr/u16-stpncpy: New file.
7320         * modules/unistr/u32-stpncpy: New file.
7321         * lib/unistr/u8-stpncpy.c: New file.
7322         * lib/unistr/u16-stpncpy.c: New file.
7323         * lib/unistr/u32-stpncpy.c: New file.
7324         * lib/unistr/u-stpncpy.h: New file.
7325
7326         * modules/unistr/u8-strcat: New file.
7327         * modules/unistr/u16-strcat: New file.
7328         * modules/unistr/u32-strcat: New file.
7329         * lib/unistr/u8-strcat.c: New file.
7330         * lib/unistr/u16-strcat.c: New file.
7331         * lib/unistr/u32-strcat.c: New file.
7332         * lib/unistr/u-strcat.h: New file.
7333
7334         * modules/unistr/u8-strchr: New file.
7335         * modules/unistr/u16-strchr: New file.
7336         * modules/unistr/u32-strchr: New file.
7337         * lib/unistr/u8-strchr.c: New file.
7338         * lib/unistr/u16-strchr.c: New file.
7339         * lib/unistr/u32-strchr.c: New file.
7340
7341         * modules/unistr/u8-strcmp: New file.
7342         * modules/unistr/u16-strcmp: New file.
7343         * modules/unistr/u32-strcmp: New file.
7344         * lib/unistr/u8-strcmp.c: New file.
7345         * lib/unistr/u16-strcmp.c: New file.
7346         * lib/unistr/u32-strcmp.c: New file.
7347
7348         * modules/unistr/u8-strcpy: New file.
7349         * modules/unistr/u16-strcpy: New file.
7350         * modules/unistr/u32-strcpy: New file.
7351         * lib/unistr/u8-strcpy.c: New file.
7352         * lib/unistr/u16-strcpy.c: New file.
7353         * lib/unistr/u32-strcpy.c: New file.
7354         * lib/unistr/u-strcpy.h: New file.
7355
7356         * modules/unistr/u8-strcspn: New file.
7357         * modules/unistr/u16-strcspn: New file.
7358         * modules/unistr/u32-strcspn: New file.
7359         * lib/unistr/u8-strcspn.c: New file.
7360         * lib/unistr/u16-strcspn.c: New file.
7361         * lib/unistr/u32-strcspn.c: New file.
7362         * lib/unistr/u-strcspn.h: New file.
7363
7364         * modules/unistr/u8-strdup: New file.
7365         * modules/unistr/u16-strdup: New file.
7366         * modules/unistr/u32-strdup: New file.
7367         * lib/unistr/u8-strdup.c: New file.
7368         * lib/unistr/u16-strdup.c: New file.
7369         * lib/unistr/u32-strdup.c: New file.
7370         * lib/unistr/u-strdup.h: New file.
7371
7372         * modules/unistr/u8-strlen: New file.
7373         * modules/unistr/u16-strlen: New file.
7374         * modules/unistr/u32-strlen: New file.
7375         * lib/unistr/u8-strlen.c: New file.
7376         * lib/unistr/u16-strlen.c: New file.
7377         * lib/unistr/u32-strlen.c: New file.
7378         * lib/unistr/u-strlen.h: New file.
7379
7380         * modules/unistr/u8-strmblen: New file.
7381         * modules/unistr/u16-strmblen: New file.
7382         * modules/unistr/u32-strmblen: New file.
7383         * lib/unistr/u8-strmblen.c: New file.
7384         * lib/unistr/u16-strmblen.c: New file.
7385         * lib/unistr/u32-strmblen.c: New file.
7386
7387         * modules/unistr/u8-strmbtouc: New file.
7388         * modules/unistr/u16-strmbtouc: New file.
7389         * modules/unistr/u32-strmbtouc: New file.
7390         * lib/unistr/u8-strmbtouc.c: New file.
7391         * lib/unistr/u16-strmbtouc.c: New file.
7392         * lib/unistr/u32-strmbtouc.c: New file.
7393
7394         * modules/unistr/u8-strncat: New file.
7395         * modules/unistr/u16-strncat: New file.
7396         * modules/unistr/u32-strncat: New file.
7397         * lib/unistr/u8-strncat.c: New file.
7398         * lib/unistr/u16-strncat.c: New file.
7399         * lib/unistr/u32-strncat.c: New file.
7400         * lib/unistr/u-strncat.h: New file.
7401
7402         * modules/unistr/u8-strncmp: New file.
7403         * modules/unistr/u16-strncmp: New file.
7404         * modules/unistr/u32-strncmp: New file.
7405         * lib/unistr/u8-strncmp.c: New file.
7406         * lib/unistr/u16-strncmp.c: New file.
7407         * lib/unistr/u32-strncmp.c: New file.
7408
7409         * modules/unistr/u8-strncpy: New file.
7410         * modules/unistr/u16-strncpy: New file.
7411         * modules/unistr/u32-strncpy: New file.
7412         * lib/unistr/u8-strncpy.c: New file.
7413         * lib/unistr/u16-strncpy.c: New file.
7414         * lib/unistr/u32-strncpy.c: New file.
7415         * lib/unistr/u-strncpy.h: New file.
7416
7417         * modules/unistr/u8-strnlen: New file.
7418         * modules/unistr/u16-strnlen: New file.
7419         * modules/unistr/u32-strnlen: New file.
7420         * lib/unistr/u8-strnlen.c: New file.
7421         * lib/unistr/u16-strnlen.c: New file.
7422         * lib/unistr/u32-strnlen.c: New file.
7423         * lib/unistr/u-strnlen.h: New file.
7424
7425         * modules/unistr/u8-strpbrk: New file.
7426         * modules/unistr/u16-strpbrk: New file.
7427         * modules/unistr/u32-strpbrk: New file.
7428         * lib/unistr/u8-strpbrk.c: New file.
7429         * lib/unistr/u16-strpbrk.c: New file.
7430         * lib/unistr/u32-strpbrk.c: New file.
7431         * lib/unistr/u-strpbrk.h: New file.
7432
7433         * modules/unistr/u8-strrchr: New file.
7434         * modules/unistr/u16-strrchr: New file.
7435         * modules/unistr/u32-strrchr: New file.
7436         * lib/unistr/u8-strrchr.c: New file.
7437         * lib/unistr/u16-strrchr.c: New file.
7438         * lib/unistr/u32-strrchr.c: New file.
7439
7440         * modules/unistr/u8-strspn: New file.
7441         * modules/unistr/u16-strspn: New file.
7442         * modules/unistr/u32-strspn: New file.
7443         * lib/unistr/u8-strspn.c: New file.
7444         * lib/unistr/u16-strspn.c: New file.
7445         * lib/unistr/u32-strspn.c: New file.
7446         * lib/unistr/u-strspn.h: New file.
7447
7448         * modules/unistr/u8-strstr: New file.
7449         * modules/unistr/u16-strstr: New file.
7450         * modules/unistr/u32-strstr: New file.
7451         * lib/unistr/u8-strstr.c: New file.
7452         * lib/unistr/u16-strstr.c: New file.
7453         * lib/unistr/u32-strstr.c: New file.
7454         * lib/unistr/u-strstr.h: New file.
7455
7456         * modules/unistr/u8-strtok: New file.
7457         * modules/unistr/u16-strtok: New file.
7458         * modules/unistr/u32-strtok: New file.
7459         * lib/unistr/u8-strtok.c: New file.
7460         * lib/unistr/u16-strtok.c: New file.
7461         * lib/unistr/u32-strtok.c: New file.
7462         * lib/unistr/u-strtok.h: New file.
7463
7464         * modules/unistr/u8-uctomb: New file.
7465         * modules/unistr/u16-uctomb: New file.
7466         * modules/unistr/u32-uctomb: New file.
7467         * lib/unistr/u8-uctomb.c: New file.
7468         * lib/unistr/u16-uctomb.c: New file.
7469         * lib/unistr/u32-uctomb.c: New file.
7470
7471         * MODULES.html.sh (Unicode string functions): Add the new modules.
7472
7473 2007-01-08  Bruno Haible  <bruno@clisp.org>
7474
7475         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7476         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7477         subdirectories.
7478
7479 2007-01-08  Karl Berry  <karl@gnu.org>
7480
7481         * doc/error.texi: mention that main() fns must set program_name
7482         when progname is used.
7483
7484 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7485
7486         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7487         WCTYPE_H is empty, for the benefit of builds from non-distclean
7488         directories.  Problem reported by Eric Blake in
7489         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7490
7491 2007-01-08  Bruno Haible  <bruno@clisp.org>
7492
7493         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7494         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7495         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7496         PROVIDE_CANONICALIZE_FILENAME_MODE.
7497         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7498
7499 2007-01-08  Bruno Haible  <bruno@clisp.org>
7500
7501         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7502         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7503         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7504         * lib/fts.c: Likewise.
7505         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7506
7507 2006-12-25  Bruno Haible  <bruno@clisp.org>
7508
7509         * modules/utf8-ucs4-safe: New file.
7510         * lib/utf8-ucs4-safe.h: New file.
7511         * lib/unistr/utf8-ucs4-safe.c: New file.
7512
7513         * modules/utf16-ucs4-safe: New file.
7514         * lib/utf16-ucs4-safe.h: New file.
7515         * lib/unistr/utf16-ucs4-safe.c: New file.
7516
7517         * MODULES.html.sh (Unicode string functions): Add the new modules.
7518
7519 2007-01-08  Bruno Haible  <bruno@clisp.org>
7520
7521         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7522         (Depends-on): Add unitypes.
7523         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7524         (u8_mbtouc_aux): Move out to separate file.
7525         (u8_mbtouc): Use ucs4_t, uint8_t types.
7526         * lib/unistr/utf8-ucs4.c: New file.
7527
7528         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7529         (Depends-on): Add unitypes.
7530         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7531         (u16_mbtouc_aux): Move out to separate file.
7532         (u16_mbtouc): Use ucs4_t, uint16_t types.
7533         * lib/unistr/utf16-ucs4.c: New file.
7534
7535         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
7536         (Depends-on): Add unitypes.
7537         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
7538         (u8_uctomb_aux): Move out to separate file.
7539         (u8_uctomb): Use ucs4_t, uint8_t types.
7540         * lib/unistr/ucs4-utf8.c: New file.
7541
7542         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
7543         (Depends-on): Add unitypes.
7544         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
7545         (u16_uctomb_aux): Move out to separate file.
7546         (u16_uctomb): Use ucs4_t, uint16_t types.
7547         * lib/unistr/ucs4-utf16.c: New file.
7548
7549 2006-12-25  Bruno Haible  <bruno@clisp.org>
7550
7551         * modules/unitypes: New file.
7552         * lib/unitypes.h: New file.
7553         * MODULES.html.sh (func_all_modules): New section "Unicode string
7554         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
7555         this section. Add unitypes.
7556
7557 2007-01-08  Bruno Haible  <bruno@clisp.org>
7558
7559         Avoid variable names that conflict with those from libtool.
7560         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
7561         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
7562         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
7563         library_names_spec to acl_library_names_spec, hardcode_* to
7564         acl_hardcode_*.
7565         Reported by Ralf Wildenhues.
7566
7567 2007-01-08  Bruno Haible  <bruno@clisp.org>
7568
7569         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
7570         definition.
7571         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
7572         definition.
7573         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
7574         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
7575         definition.
7576         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
7577         definition.
7578         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
7579         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
7580         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
7581         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
7582         definition.
7583         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
7584         definition.
7585         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
7586         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
7587         GC_USE_<algorithm>.
7588         * lib/gc-libgcrypt.c: Likewise.
7589         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
7590         * modules/gc-arctwo (configure.ac): Likewise.
7591         * modules/gc-des (configure.ac): Likewise.
7592         * modules/gc-hmac-md5 (configure.ac): Likewise.
7593         * modules/gc-hmac-sha1 (configure.ac): Likewise.
7594         * modules/gc-md2 (configure.ac): Likewise.
7595         * modules/gc-md4 (configure.ac): Likewise.
7596         * modules/gc-md5 (configure.ac): Likewise.
7597         * modules/gc-random (configure.ac): Likewise.
7598         * modules/gc-rijndael (configure.ac): Likewise.
7599         * modules/gc-sha1 (configure.ac): Likewise.
7600
7601 2007-01-08  Bruno Haible  <bruno@clisp.org>
7602
7603         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
7604         macro definition.
7605         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
7606         definition.
7607         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
7608         definition.
7609         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
7610         * modules/fcntl-safer (configure.ac): Likewise.
7611         * modules/fopen-safer (configure.ac): Likewise.
7612         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
7613         GNULIB_FWRITEERROR macro definition.
7614
7615 2007-01-08  Bruno Haible  <bruno@clisp.org>
7616
7617         * m4/gnulib-common.m4: New file.
7618         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
7619         (func_get_filelist): Add m4/gnulib-common.m4.
7620
7621 2007-01-08  Bruno Haible  <bruno@clisp.org>
7622
7623         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
7624         command.
7625
7626 2007-01-08  Jim Meyering  <jim@meyering.net>
7627
7628         Use a more robust test for a "can't happen" condition.
7629         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
7630         narrowed the st_size value.  Presuming the "can't happen" condition
7631         is true, that narrowing could conceivably convert an invalid st_size
7632         value into a valid one.  Instead, use a change based on Matthew
7633         Woehlke's original patch.
7634
7635         Slight readability improvement: use an assert-like macro
7636         in place of literal "abort ()" uses.
7637         * lib/fts.c (fts_assert): Define.
7638         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
7639         Use this macro instead of a bare 'abort'.
7640
7641 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
7642
7643         Don't worry about using IRIX 5.3's wctype.h broken definitions;
7644         simply work around them.
7645         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
7646         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
7647         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
7648         declaring.
7649         Don't bother to define as macros, since the standard doesn't require it.
7650         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
7651         longer worry about IRIX 5.3.
7652         (HAVE_WCTYPE_CTMP_BUG): Remove.
7653
7654 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7655
7656         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
7657         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
7658         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
7659         Problems reported by Georg Schwarz for IRIX 5.3.
7660
7661         * gnulib-tool (autoconf_minversion): Take the maximum version number
7662         found, not the minimum.  Problem reported by James Youngman.
7663
7664 2007-01-03  Karl Berry  <karl@gnu.org>
7665
7666         * doc/error.texi: new file, explaining interaction with progname.
7667         * doc/gnulib.texi: include it.  Update copyright.
7668
7669 2007-01-03  Simon Josefsson  <simon@josefsson.org>
7670
7671         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
7672         AC_CANONICAL_HOST, to improve autobuild outputs.
7673
7674 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
7675             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7676
7677         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
7678         sockets, server sockets, and other file descriptors.  Count errors
7679         to compute the return value.  Reorder the code a bit to be easier
7680         to follow.  Don't set event bits that were not requested (except
7681         POLLERR and POLLHUP).
7682
7683 2007-01-01  Bruno Haible  <bruno@clisp.org>
7684
7685         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
7686
7687 2007-01-03  Jim Meyering  <jim@meyering.net>
7688
7689         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
7690
7691 2007-01-02  Bruno Haible  <bruno@clisp.org>
7692
7693         * modules/settime (Include): Require timespec.h.
7694         * modules/nanosleep (Include): Likewise.
7695
7696 2007-01-01  Bruno Haible  <bruno@clisp.org>
7697
7698         * gnulib-tool (func_emit_copyright_notice): Bump year.
7699         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
7700
7701 2007-01-01  Bruno Haible  <bruno@clisp.org>
7702
7703         Improve support for OpenBSD.
7704         * build-aux/config.rpath (libname_spec): Export.
7705         (library_names_spec): New variable. Export.
7706         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7707         library_names_spec from the config.rpath output. Locate shared library
7708         through the name pattern in library_names_spec.
7709
7710 2007-01-01  Eric Blake  <ebb9@byu.net>
7711
7712         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
7713
7714 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
7715
7716         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
7717         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
7718         assume the C locale, and avoid an "eval" that could cause trouble.
7719         Problem with SORT reported by Bob Proulx.
7720
7721         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
7722         Define.  Trivial patch from Henning Nielsen Lund, originally
7723         sent to bug-grep@gnu.org today.
7724
7725 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
7726
7727         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
7728         struct stat.  Problem reported by Henning Nielsen Lund.
7729         * lib/acl.c: Include acl.h first, to check interface.  Don't
7730         bother to include sys/types.h and sys/stat.h again.
7731
7732 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
7733
7734         Import the following change from libc; problem reported by
7735         Sven Verdoolaege.
7736
7737         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7738
7739         [BZ #1373]
7740         * lib/argp.h: Remove __NTH for __argp_usage inline function.
7741
7742 2006-12-28  Jim Meyering  <jim@meyering.net>
7743
7744         * build-aux/announce-gen: Do not assume that the package
7745         builds any of tar.gz, tar.bz2, and .xdelta files.
7746         Suggestion from Simon Josefsson.
7747
7748 2006-12-28  Simon Josefsson  <simon@josefsson.org>
7749
7750         * modules/announce-gen: New file.
7751
7752 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
7753
7754         * lib/mbchar.h: Just include <wctype.h>; the wctype module
7755         handles its gotchas now.
7756         * lib/mbswidth.c: Likewise.
7757         * lib/wcwidth.h: Likewise.
7758         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
7759         and iswcntrl; the wctype module does this stuff now.
7760         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7761         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7762         * modules/mbchar (Depends-on): Add wctype.
7763         * modules/mbswidth (Depends-on): Likewise.
7764         * modules/wcwidth (Depends-on): Likewise.
7765
7766 2006-12-27  Eric Blake  <ebb9@byu.net>
7767
7768         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
7769         module uses more than what <wctype.h> is required to provide.
7770
7771 2006-12-26  Eric Blake  <ebb9@byu.net>
7772
7773         * gnulib-tool (sed_extract_prog): Avoid space-tab.
7774
7775 2006-12-26  Eric Blake  <ebb9@byu.net>
7776
7777         * modules/absolute-header: New module.
7778         * modules/fcntl (Depends-on): Depend on it.
7779         * modules/inttypes (Depends-on): Likewise.
7780         * modules/stdint (Depends-on): Likewise.
7781         * modules/sys_stat (Depends-on): Likewise.
7782         * modules/wctype (Depends-on): Likewise.
7783         * MODULES.html.sh (Support for building libraries and
7784         executables): Document it.
7785
7786 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
7787
7788         * gnulib-tool (SED): Remove, undoing previous change.
7789         The problem was that it broke coreutils on Solaris, because
7790         "sed --posix" leaked into a makefile.
7791         (sed): New alias, if 'alias' and GNU sed.
7792
7793 2006-12-24  Jim Meyering  <jim@meyering.net>
7794
7795         Work around an fchownat bug in glibc-2.4:
7796         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
7797         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
7798         in spite of the -P option.
7799         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
7800         New macros.
7801         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
7802         * modules/openat (Files): Add lib/fchownat.c.
7803         * lib/openat.c (fchownat): Don't define here.  Move to...
7804         * lib/fchownat.c: ...this new file.
7805
7806 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
7807
7808         Fix bug reported by Bruno Haible in
7809         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
7810         where quotearg.c didn't compile on Mac OS X 10.2 because it
7811         lacks <wchar.h> and wint_t.
7812         * lib/wctype_.h (__wctype_wint_t): New type.
7813         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
7814         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
7815         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
7816         Arg is now of type __wctype_wint_t, not wint_t.
7817         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
7818         substitute HAVE_WINT_T.
7819         * modules/wctype (Files): Add m4/wint_t.m4.
7820         (wctype.h): Substitute HAVE_WINT_T.
7821
7822 2006-12-23  Bruno Haible  <bruno@clisp.org>
7823
7824         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
7825
7826 2006-12-23  Bruno Haible  <bruno@clisp.org>
7827
7828         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
7829         S_ISLNK.
7830         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
7831         mingw.
7832
7833 2006-12-22  Bruno Haible  <bruno@clisp.org>
7834
7835         * lib/copy-file.c: Include acl.h.
7836         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
7837         Close the file descriptors only after being done with copy_acl.
7838         * modules/copy-file (Depends-on): Add acl.
7839
7840 2006-12-22  Bruno Haible  <bruno@clisp.org>
7841
7842         * gnulib-tool (SED): New variable.
7843         Use $SED instead of sed everywhere.
7844
7845 2006-12-22  Bruno Haible  <bruno@clisp.org>
7846
7847         * modules/no-c++: New file.
7848         * m4/no-c++.m4: New file.
7849         * MODULES.html.sh (Support for building libraries and executables):
7850         Add no-c++.
7851
7852 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
7853
7854         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7855         Include <limits.h>, and use its INT_MAX to rewrite the
7856         j loop so that it does not overflow 'int'.  Problem reported by
7857         Ralf Wildenhues in
7858         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
7859         Play it safe by shifting left by 1 rather than multiplying by 2,
7860         as GCC is less likely to optimize this away when the value
7861         is signed (when it assumes overflow leads to undefined behavior).
7862         Also, don't assume time_t uses two's complement.
7863
7864 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
7865
7866         * MODULES.html.sh: New module wctype.
7867         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
7868         * lib/fnmatch.c: Don't bother to include <wchar.h> before
7869         <wctype.h>, since the new wctype module should fix this.
7870         * lib/quotearg.c: Include <wctype.h> unconditionally, since
7871         the wctype module should arrange for it.
7872         * lib/regex_internal.h: Likewise.
7873         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
7874         since the wctype module should handle this now.
7875         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
7876         * modules/fnmatch (Depends-on): Add wctype.
7877         * modules/quotearg (Depends-on): Likewise.
7878         * modules/regex (Depends-on): Likewise.
7879
7880 2006-12-19  Bruno Haible  <bruno@clisp.org>
7881
7882         * lib/strdup.h [C++]: Wrap definitions in extern "C".
7883         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
7884
7885 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7886
7887         * modules/savewd (Depends-on): Fix dependency on fcntl.
7888
7889 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7890
7891         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
7892         conforms to C99, rather than relying on the user's environment
7893         setting of STDINT_H.
7894
7895 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7896         and Eric Blake  <ebb9@byu.net>
7897
7898         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
7899         This is more consistent with the other defines here.
7900         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
7901         Port to z/OS.  Problem reported by Paul Gilmartin.
7902         Change local vars to use gl_ prefix rather than ac_.
7903         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
7904         with other defines.
7905         * modules/double-slash-root: New module.
7906         * modules/dirname (Files): Remove m4/double-slash-root.m4.
7907         (Depends-on): Add double-slash-root.
7908         * MODULES.html.sh (File system functions): Mention new module.
7909
7910 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
7911
7912         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
7913         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
7914         This is for the benefit of gzip, which doesn't do i18n.
7915
7916 2006-12-12  Jim Meyering  <jim@meyering.net>
7917
7918         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
7919         Reported by Andreas Schwab <schwab@suse.de>.
7920
7921 2006-12-12  Bruno Haible  <bruno@clisp.org>
7922
7923         Merge these changes.
7924         2006-09-05  Bruno Haible  <bruno@clisp.org>
7925         * lib/iconvme.c (iconv_string): No need to save and restore errno when
7926         iconv_alloc succeeded.
7927         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
7928         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
7929         test for " && dest " at the end - dest is always != NULL there. Call
7930         iconv with 4xNULL arguments initially, to reset the state. Call iconv
7931         with 2xNULL arguments, also to flush the state storage. Handle the
7932         IRIX iconv behaviour. Realloc the final result, to throw away unused
7933         memory.
7934
7935 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
7936
7937         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
7938         and fchmodat unconditionally, since glibc 2.4 has them.
7939         Problem reported by Arkadiusz Miskiewicz.
7940
7941 2006-12-10  Bruno Haible  <bruno@clisp.org>
7942
7943         * gnulib-tool (func_import): Show the include files only for those
7944         modules that are copied and specified.
7945         Reported by Karl Berry.
7946
7947 2006-12-08  Jim Meyering  <jim@meyering.net>
7948
7949         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
7950         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
7951
7952         * build-aux/announce-gen: Add two new options, both optional:
7953         --bootstrap-tools=TOOL_LIST
7954               a comma-separated list of tools, e.g.,
7955               autoconf,automake,bison,gnulib
7956         --gnulib-snapshot-date=DATE
7957               if gnulib is in the bootstrap tool list,
7958               then report this as the snapshot date.
7959               If not specified, use the current date/time.
7960               If you specify a date here, be sure it's UTC.
7961
7962 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7963
7964         * tests/test-argp-2.sh: Fix test to match actual output.
7965         (func_compare): Fix sed script to be portable.
7966
7967 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
7968
7969         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
7970         workaround for this case.  It is not autoconfigured now; offhand
7971         it's hard to see how to autoconfigure it.
7972
7973 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
7974
7975         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
7976         a directory that is about to be chowned.  Such a directory's
7977         initial file permissions should permit the owner only and this
7978         should not be changed until after the chown, since the group and
7979         other bits would be incorrect if they granted permission before
7980         the chown.
7981
7982         Fix porting problem for iswctype reported by Georg Schwarz in:
7983         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
7984         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
7985         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
7986         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
7987         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
7988
7989 2006-12-03  Jim Meyering  <jim@meyering.net>
7990
7991         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
7992         p->fts_statp may not yet be defined.
7993         (fts_read): Instead, set it in the caller, once p->fts_statp is
7994         sure to be defined, and corresponds to a top-level directory.
7995         This bug made du -x fail.  Here's the coreutils test case:
7996         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
7997         Reported by Mike Frysinger.
7998
7999 2006-12-01  Jim Meyering  <jim@meyering.net>
8000
8001         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8002         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8003         Reported by Simon Josefsson.
8004
8005 2006-11-30  Jim Meyering  <jim@meyering.net>
8006
8007         * m4/warning.m4: Use the all-permissive copyright notice
8008         recommended by RMS (rather than LGPL).
8009         * m4/vararrays.m4: Likewise.
8010         * m4/flexmember.m4: Likewise.
8011
8012 2006-11-29  Bruno Haible  <bruno@clisp.org>
8013
8014         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8015         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8016         using +=.
8017         Reported by Simon Josefsson <simon@josefsson.org>.
8018
8019 2006-11-28  James Youngman <jay@gnu.org>
8020
8021         * README: Advise users that they might find the bug-gnulib@gnu.org
8022         and autotools-announce@gnu.org mailing lists useful.
8023
8024 2006-11-28  Bruno Haible  <bruno@clisp.org>
8025
8026         * m4/ptrdiff_max.m4: Remove file.
8027
8028 2006-11-21  Bruno Haible  <bruno@clisp.org>
8029
8030         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8031         _AC_COMPUTE_INT.
8032         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8033         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8034         _AC_COMPUTE_INT.
8035         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8036         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8037         _AC_COMPUTE_INT.
8038         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8039
8040 2006-11-28  Jim Meyering  <jim@meyering.net>
8041
8042         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8043         warning from "gcc -Wshadow" about shadowing the builtin.
8044
8045 2006-11-27  Bruno Haible  <bruno@clisp.org>
8046
8047         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
8048         _AC_COMPUTE_INT.
8049         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8050
8051 2006-11-27  Bruno Haible  <bruno@clisp.org>
8052             Paul Eggert  <eggert@cs.ucla.edu>
8053
8054         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8055
8056 2006-11-26  Bruno Haible  <bruno@clisp.org>
8057
8058         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8059         noinst_LTLIBRARIES.
8060
8061 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8062             Bruno Haible  <bruno@clisp.org>
8063
8064         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8065         if compiling with "gcc -ansi".
8066
8067 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8068
8069         Fix some incompatibilities with gcc -ansi -pedantic.
8070         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
8071         if compiling pedantically with GCC, unless it's C99 or later.
8072         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
8073         it mishandles gcc -ansi -pedantic as well.
8074         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
8075         if gcc -pedantic.
8076         * lib/regexec.c (check_node_accept_bytes): Don't use auto
8077         initializers for struct if -pedantic, unless it's C99 or later.
8078
8079 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
8080
8081         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
8082         Don't close an fd more than once. Identical atimes indicate
8083         success, not failure.
8084
8085 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
8086
8087         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
8088
8089 2006-11-23  Jim Meyering  <jim@meyering.net>
8090
8091         * build-aux/announce-gen: New file.  From coreutils.
8092
8093 2006-11-22  Jim Meyering  <jim@meyering.net>
8094
8095         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
8096         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
8097         (fts_read): Use a temporary to narrow the overused st_size member
8098         before using it in a switch statement.  Reported by Matthew Woehlke.
8099
8100         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
8101         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
8102
8103 2006-11-20  Bruno Haible  <bruno@clisp.org>
8104
8105         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
8106         changequote instead of pairs of brackets.
8107         Reported by Andreas Schwab <schwab@suse.de>.
8108
8109 2006-11-21  Jim Meyering  <jim@meyering.net>
8110
8111         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
8112         so as to remain compatible with older compilers.
8113         Patch from Michael Deutschmann.
8114
8115 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8116
8117         * MODULES.html.sh (File system functions): Add openat.
8118
8119         * lib/openat.h (rpl_fstatat): New macro, if
8120         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
8121         (fstatat): Define to rpl_fstatat under the same conditions,
8122         unless COMPILING_FSTATAT.
8123         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
8124         seems to have the bug.
8125         * lib/fstatat.c: New file.
8126         * modules/openat (Files): Add it.
8127
8128 2006-11-20  Bruno Haible  <bruno@clisp.org>
8129
8130         * Makefile: New file.
8131
8132 2006-11-20  Jim Meyering  <jim@meyering.net>
8133
8134         The beginnings of syntax-related checks for gnulib.
8135         * lib/Makefile: New file.
8136         * lib/t-idcache: New script.  Ensure that the two halves of
8137         idcache.c stay in sync.
8138
8139         * lib/idcache.c: Adjust comments in user- and group- portions to
8140         be more accurate, and to be consistent with one another.
8141
8142 2006-11-20  Jim Meyering  <jim@meyering.net>
8143
8144         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
8145         continue using the flexible array member (thus, this module performs
8146         half as many malloc calls), with the addition that...
8147         (getgroup, getuser): Consistently record a non-match via an empty
8148         "name" string, and map an empty string match to a NULL return value.
8149         * modules/idcache (Depends-on): Re-add flexmember.
8150
8151         * lib/idcache.c (getuser): Remove all uses of the register keyword.
8152         (getuidbyname, getgroup, getgidbyname): Likewise.
8153
8154         Use cleaner syntax: NULL rather than 0.
8155         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
8156
8157 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8158
8159         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
8160         It mishandled the case where the group was missing.
8161         Problem reported by Greg Schafer.
8162         * modules/idcache: Likewise.
8163
8164 2006-11-18  Jim Meyering  <jim@meyering.net>
8165
8166         * check-module (%exempt_header): Add exception for some
8167         conditionally-included headers.
8168
8169         * modules/i-ring (Depends-on): Add verify.
8170         (License): Change to LGPL.
8171
8172 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
8173
8174         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
8175         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
8176         and inttostr.h.  Use snprintf rather than uinttostr, so that
8177         LGPLed code doesn't depend on GPLed.
8178
8179 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
8180
8181         * modules/inline (License): Change from GPL to LGPL.
8182
8183 2006-11-17  Jim Meyering  <jim@meyering.net>
8184
8185         * modules/d-type (License): Switch to LGPL.
8186
8187 2006-11-15  Bruno Haible  <bruno@clisp.org>
8188
8189         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
8190
8191 2006-11-15  Eric Blake  <ebb9@byu.net>
8192
8193         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
8194         the module dependency.
8195
8196 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8197             Bruno Haible  <bruno@clisp.org>
8198
8199         * gnulib-tool (func_create_testdir): Add license consistency check.
8200
8201 2006-11-15  Eric Blake  <ebb9@byu.net>
8202
8203         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
8204         random "(cached)" in configure output.
8205
8206 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8207
8208         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
8209         test for conforming inttypes.h is both announced and cached.
8210
8211         * MODULES.html.sh (seen_modules, seen_files): New variables.
8212         (func_module): Rewrite to use a few less gnulib-tool and sed
8213         invocations.  Avoid a couple of quadratic algorithms for ...
8214         (missed_modules, missed_files): ... these, with ...
8215         (func_append, func_tmpdir): ... these new functions, from
8216         gnulib-tool.  Analogously, install traps for cleanup.
8217
8218         * tests/test-gc.c (main): Remove unused variables.
8219         * tests/test-read-file.c: Include stdlib.h, for 'free'.
8220
8221 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
8222
8223         * modules/inttostr (License): Change to LGPL.
8224
8225 2006-11-14  Eric Blake  <ebb9@byu.net>
8226
8227         * modules/tempname (License): Change to LGPL.
8228
8229 2006-11-14  Eric Blake  <ebb9@byu.net>
8230
8231         * doc/functions.texi (Function Portability): *printf functions on
8232         Cygwin now understand all POSIX size specifiers.
8233
8234 2006-11-14  Bruno Haible  <bruno@clisp.org>
8235
8236         * modules/c-ctype (License): Change to LGPL.
8237
8238 2006-11-12  Bruno Haible  <bruno@clisp.org>
8239
8240         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
8241         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
8242         for GNOME libraries, for which the include files are installed in
8243         subdirectories of $prefix/include.
8244
8245 2006-11-12  Bruno Haible  <bruno@clisp.org>
8246
8247         * m4/lib-link.m4: Require at least autoconf-2.54.
8248         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8249         name to underscores for the --with option.
8250
8251 2006-11-13  Bruno Haible  <bruno@clisp.org>
8252
8253         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8254         the tests directory.
8255         Reported by Ralf Wildenhues.
8256
8257 2006-11-13  Bruno Haible  <bruno@clisp.org>
8258
8259         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8260         (func_emit_initmacro_end): Undo the override here.
8261         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8262         Works around the famous automake error in coreutils.
8263
8264 2006-11-13  Eric Blake  <ebb9@byu.net>
8265
8266         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8267         element, not its node.
8268
8269 2006-11-12  Bruno Haible  <bruno@clisp.org>
8270
8271         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8272         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8273
8274 2006-11-12  Bruno Haible  <bruno@clisp.org>
8275
8276         * gnulib-tool: New option --local-symlink.
8277         (func_usage): Document it.
8278         (lsymbolic): New variable.
8279         (func_import, func_create_testdir): If --symlink was not specified,
8280         test whether --local-symlink was specified and the file comes from
8281         the local_gnulib_dir.
8282
8283 2006-11-12  Bruno Haible  <bruno@clisp.org>
8284
8285         * gnulib-tool (func_ln): New function.
8286         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8287
8288 2006-11-12  Bruno Haible  <bruno@clisp.org>
8289
8290         Finish support for source files in subdirectories.
8291         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8292         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8293         AUTOMAKE_OPTIONS.
8294         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8295
8296 2006-11-12  Bruno Haible  <bruno@clisp.org>
8297
8298         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8299         EXTRA_lib_SOURCES augmentation.
8300         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8301
8302 2006-11-12  Jim Meyering  <jim@meyering.net>
8303
8304         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8305         file descriptors.  This also averts a failure on systems with
8306         native openat support when a traversed directory lacks "x" access.
8307         * lib/fts_.h: Include "i-ring.h"
8308         (struct FTS) [fts_fd_ring]: New member.
8309         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8310         (FCHDIR): Add parentheses.
8311         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8312         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8313         When descending, rather than simply closing the previous
8314         fts_cwd_fd value, push that file descriptor onto the ring.
8315         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8316         (fts_open): Initialize the new fd_ring member.
8317         (fts_close): Clear the ring.
8318         (fts_safe_changedir): When possible, use our new fd_ring to skip
8319         the diropen and fstat and dev/ino comparison that would normally
8320         accompany a virtual `chdir ("..")'.
8321
8322         * modules/fts (Depends-on): Add i-ring.
8323         * modules/i-ring: New module.
8324         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8325         * m4/i-ring.m4: New file.
8326
8327 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8328
8329         * gnulib-tool (func_create_testdir): Fix replacement of
8330         `build-aux' in configure.ac.  Run autotools in gltests
8331         subdirectory.
8332         (func_create_testdir, func_create_megatestdir, test): There is
8333         no need for '--force' in most autotool invocations in a new
8334         tree.  Actually fail the whole test if any of the tools, or the
8335         configure or make stages fail.
8336
8337         Sync from Automake.
8338         * build-aux/gnupload: Revert last change.  Add pointer to upload
8339         instructions of the GNU Maintenance Instructions.
8340         Suggestion by Karl Berry.
8341
8342 2006-11-10  Jim Meyering  <jim@meyering.net>
8343
8344         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8345
8346 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8347
8348         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8349         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8350         (bind_textdomain_codeset) [! ENABLE_NLS]:
8351         Evaluate all the arguments.  That way, callers get compatible behavior
8352         if the arguments have side effects.  Also, it avoids some GCC
8353         diagnostics in some cases; Joel E. Denny reported problems when Bison
8354         was configured with --enable-gcc-warnigs.
8355
8356 2006-11-10  Jim Meyering  <jim@meyering.net>
8357
8358         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8359         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8360         account.
8361
8362 2006-11-10  Jim Meyering  <jim@meyering.net>
8363
8364         * modules/inline: New file/module.
8365         * modules/xalloc (Files): Remove m4/inline.m4.
8366         (Depends-on): Add inline, instead.
8367         * modules/oset: Likewise.
8368         * modules/list: Likewise.
8369
8370 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8371
8372         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8373         Problem reported by Matthew Woehlke.
8374
8375 2006-11-09  Bruno Haible  <bruno@clisp.org>
8376
8377         * lib/tempname.c (gen_tempname): Remove variant that invokes
8378         __gen_tempname.
8379         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8380         __gen_tempname.
8381
8382 2006-11-08  Bruno Haible  <bruno@clisp.org>
8383
8384         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8385         to 'yes' instead of 'cross-compiling'.
8386
8387 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8388
8389         * lib/quotearg.h (quotearg_free): New decl.
8390         * lib/quotearg.c (quotearg_free): New function.
8391         (slot0, nslots, slotvec0, slotvec):
8392         Now file-scope so that quotearg_free can get at them.
8393
8394 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8395
8396         Sync from Automake.
8397         * build-aux/gnupload: Add missing 'gnu' to example URL.
8398         Report by Karl Berry.
8399
8400 2006-11-08  Bruno Haible  <bruno@clisp.org>
8401
8402         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8403         Suggested by Paul Eggert.
8404
8405 2006-11-08  Jim Meyering  <jim@meyering.net>
8406
8407         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8408         It's already included if !_LIBC.
8409         (fts_safe_changedir): Add a comment.
8410
8411 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8412
8413         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8414         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8415         Matthew Woehlke.
8416
8417         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8418         definitions up, to avoid colliding with change below.
8419         (static_inline) [HAVE_INLINE]: New macro.
8420         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8421         Provide extern decls when !HAVE_INLINE.  Do not define unless
8422         static_inline is defined, either by us or by xmalloc.c.  Use
8423         static_inline rather than static inline.
8424         (XCALLOC): Optimize sizeof(T) = 1 case.
8425         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8426
8427 2006-11-07  Bruno Haible  <bruno@clisp.org>
8428
8429         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8430         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8431         AC_C_INLINE.
8432         * modules/xalloc (Files): Add m4/inline.m4.
8433
8434 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8435
8436         * README: Fix typo.
8437         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8438         (Miscellanous Notes): ...from this.
8439
8440 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8441
8442         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8443         Mention that offsetof should be used instead of sizeof.
8444         From Bruno Haible.
8445
8446 2006-11-07  Bruno Haible  <bruno@clisp.org>
8447
8448         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8449
8450 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8451
8452         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8453         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8454         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8455         (gl_tree_add_before, gl_tree_add_after):
8456         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8457         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8458         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8459         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8460         (gl_linked_add_after, gl_linked_add_at): Likewise.
8461         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8462         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8463         (gl_tree_add_before, gl_tree_add_after): Likewise.
8464         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8465         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8466         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8467
8468 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8469
8470         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8471
8472 2006-11-06  Bruno Haible  <bruno@clisp.org>
8473
8474         * m4/inline.m4: New file.
8475         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8476         * modules/list (Files): Add m4/inline.m4.
8477         * modules/oset (Files): Likewise.
8478
8479 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8480
8481         * lib/idcache.c: Include <stddef.h>, for offsetof.
8482         (struct userid.name): Change from char * to a flexible array member.
8483         All uses changed.
8484         * modules/idcache (Depends-on): Add flexmember.
8485
8486         * MODULES.html.sh (Core language properties): New module flexmember.
8487         * modules/flexmember, m4/flexmember.m4: New files.
8488
8489         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8490         inline functions that are identical with the old xnmalloc_inline,
8491         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8492         that we can avoid some unnecessary integer multiplications and
8493         divisions in the common case where the element size is known at
8494         compile time.
8495         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8496         needed.
8497         (xnboundedmalloc): Remove.
8498         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8499         arguments, for consistency with rest of this header.
8500         (xcharalloc): Rewrite using XNMALLOC.
8501         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8502         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8503         versions have been moved to lib/xalloc.h and renamed to be the
8504         non-*_inline versions.
8505         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8506         and xnrealloc functions, since those functions are now inline and
8507         now call us.
8508         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8509         renaming described above.
8510         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8511         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8512         captures the dependency in AC_C_INLINE.
8513
8514         New module canonicalize-lgpl, proposed by Charles Wilson in
8515         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8516         with a few small changes afterwards.
8517         * MODULES.html.sh (File system functions): New module
8518         canonicalize-lgpl.
8519         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8520         and canonicalize_file_name.
8521         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8522         * modules/canonicalize-lgpl: New files.
8523
8524 2006-11-05  Bruno Haible  <bruno@clisp.org>
8525
8526         * gnulib-tool (func_import, func_create_testdir): Create directories
8527         also for files in subdirectories of lib/.
8528
8529 2006-11-05  Bruno Haible  <bruno@clisp.org>
8530
8531         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
8532         ANSI C compliant.
8533
8534 2006-11-03  Bruno Haible  <bruno@clisp.org>
8535
8536         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8537         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
8538         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
8539         (xnboundedmalloc): New inline function.
8540         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
8541         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
8542         xmalloc.
8543         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
8544         xmalloc.
8545         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
8546         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
8547         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
8548         xmalloc.
8549         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8550         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
8551         xmalloc.
8552         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
8553         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8554         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
8555         xmalloc.
8556         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8557         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
8558         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8559         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
8560         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
8561         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
8562         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
8563
8564 2006-11-03  Bruno Haible  <bruno@clisp.org>
8565
8566         * lib/c-ctype.h [C++]: Define functions without name mangling.
8567         * lib/fwriteerror.h [C++]: Likewise.
8568         * lib/gcd.h [C++]: Likewise.
8569         * lib/linebreak.h [C++]: Likewise.
8570
8571 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
8572
8573         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
8574         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
8575         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
8576         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8577         Check for functions and headers just once.
8578         Check for declaration of canonicalize_file_name.
8579         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
8580
8581 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8582
8583         * gnulib-tool (func_import): Fix typo in actioncmd.
8584
8585 2006-11-02  Bruno Haible  <bruno@clisp.org>
8586
8587         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
8588         newline sequence in the Makefile.am snippet as a space, like "make"
8589         does.
8590         Reported by Roger Persson <perrog@gmail.com>.
8591
8592 2006-11-01  Bruno Haible  <bruno@clisp.org>
8593
8594         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
8595         already declared in <string.h>.
8596         * lib/strcase.h (strncasecmp): Don't declare it if yes.
8597
8598 2006-11-01  Bruno Haible  <bruno@clisp.org>
8599
8600         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
8601         * lib/strcase.h: Include <string.h>.
8602         (strcasecmp): Define to rpl_strcasecmp here.
8603
8604 2006-11-01  Bruno Haible  <bruno@clisp.org>
8605
8606         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
8607
8608 2006-11-01  Eric Blake  <ebb9@byu.net>
8609
8610         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
8611
8612         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
8613
8614 2006-10-29  Bruno Haible  <bruno@clisp.org>
8615
8616         Make it compile in C++ mode.
8617         * lib/full-write.c (full_rw): Add a cast.
8618
8619 2006-11-01  Bruno Haible  <bruno@clisp.org>
8620
8621         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
8622         be POSIX compliant.
8623         Reported by Roger Persson <perrog@gmail.com>.
8624
8625 2006-11-01  Eric Blake  <ebb9@byu.net>
8626
8627         * lib/getopt_.h: Fix comments.
8628
8629 2006-10-31  Eric Blake  <ebb9@byu.net>
8630
8631         * modules/tmpdir (Depends-on): Add sys_stat.
8632         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
8633         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
8634         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
8635         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
8636         tempname.
8637
8638 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
8639
8640         Avoid some C++ diagnostics reported by Bruno Haible.
8641         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
8642         xmalloc.
8643         (quotearg_alloc): Use xcharalloc rather than xmalloc.
8644         (struct slotvec): Move to top level.
8645         (quotearg_n_options): Rewrite to avoid xmalloc.
8646         * lib/xalloc.h (xcharalloc): New function.
8647         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
8648         [defined __cplusplus]: Add function template that provides result
8649         type propagation.  This part of the change is from Bruno Haible.
8650
8651 2006-10-29  Bruno Haible  <bruno@clisp.org>
8652
8653         Make it compile in C++ mode.
8654         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
8655         * lib/strnlen1.c (strnlen1): Cast memchr result.
8656         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
8657         * lib/clean-temp.c (string_equals, string_hash): Add casts.
8658         (create_temp_dir): Rename local variable 'template'.
8659         (compile_csharp_using_sscli): Add cast.
8660         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
8661         * lib/findprog.c (find_in_path): Likewise.
8662         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
8663         * lib/wait-process.c (register_slave_subprocess): Likewise.
8664
8665 2006-10-22  Bruno Haible  <bruno@clisp.org>
8666
8667         * modules/tsearch: New file.
8668         * lib/tsearch.h: New file.
8669         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
8670         * m4/tsearch.m4: New file.
8671         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8672
8673 2006-10-29  Eric Blake  <ebb9@byu.net>
8674
8675         * lib/arcfour.c: Assume config.h.
8676         * lib/arctwo.c: Likewise.
8677         * lib/base64.c: Likewise.
8678         * lib/check-version.c: Likewise.
8679         * lib/crc.c: Likewise.
8680         * lib/des.c: Likewise.
8681         * lib/gc-gnulib.c: Likewise.
8682         * lib/gc-libgcrypt.c: Likewise.
8683         * lib/gc-pbkdf2-sha1.c: Likewise.
8684         * lib/getaddrinfo.c: Likewise.
8685         * lib/getdelim.c: Likewise.
8686         * lib/getline.c: Likewise.
8687         * lib/hmac-md5.c: Likewise.
8688         * lib/hmac-sha1.c: Likewise.
8689         * lib/iconvme.c: Likewise.
8690         * lib/md2.c: Likewise.
8691         * lib/md4.c: Likewise.
8692         * lib/memxor.c: Likewise.
8693         * lib/read-file.c: Likewise.
8694         * lib/readline.c: Likewise.
8695         * lib/rijndael-alg-fst.c: Likewise.
8696         * lib/rijndael-api-fst.c: Likewise.
8697         * lib/xgetdomainname.c: Likewise.
8698
8699 2006-10-28  Eric Blake  <ebb9@byu.net>
8700
8701         * lib/xstrndup.c: Assume config.h.
8702
8703 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8704
8705         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
8706         stat-macros.h is now for our own macros, whereas stat_h is for
8707         macros in the <sys/stat.h> name space.
8708         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
8709         (STAT_MACROS_H): Remove.
8710         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
8711         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
8712         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
8713         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
8714         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
8715         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
8716         Move these macros to ...
8717         * lib/stat_.h: here.  Don't include stat-macros.h.
8718         * lib/canonicalize.c: Don't include stat-macros.h.
8719         * lib/chown.c: Likewise.
8720         * lib/euidaccess.c: Likewise.
8721         * lib/file-type.c: Likewise.
8722         * lib/filemode.c: Likewise.
8723         * lib/glob.c: Likewise.
8724         * lib/isapipe.c: Likewise.
8725         * lib/lchown.c: Likewise.
8726         * lib/lstat.c: Likewise.
8727         * lib/mkdir-p.c: Likewise.
8728         * lib/rmdir.c: Likewise.
8729         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
8730         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
8731         unless mkdir isn't declared, to speed up 'configure'.
8732         Always create sys/stat.h, since it's unlikely any real sys/stat.h
8733         would define all the S_* symbols.
8734         * modules/canonicalize (Depends-on):
8735         Depend on sys_stat, not stat-macros.
8736         * modules/chown: Likewise.
8737         * modules/euidaccess: Likewise.
8738         * modules/filemode: Likewise.
8739         * modules/file-type: Likewise.
8740         * modules/glob: Likewise.
8741         * modules/isapipe: Likewise.
8742         * modules/lchown: Likewise.
8743         * modules/lstat: Likewise.
8744         * modules/mkancesdirs: Likewise.
8745         * modules/rmdir: Likewise.
8746         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
8747         * modules/modechange: Likewise.
8748         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
8749         (configure.ac): Remove gl_STAT_MACROS.
8750         * modules/sys_stat (Depends-on): Remove stat-macros.
8751
8752 2006-10-27  Bruno Haible  <bruno@clisp.org>
8753
8754         * m4/signed.m4: Remove file.
8755         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
8756         invocation.
8757         * modules/vasnprintf (Files): Remove m4/signed.m4.
8758
8759 2006-10-27  Bruno Haible  <bruno@clisp.org>
8760
8761         Update to GNU gettext 0.16.
8762         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
8763         m4/inttypes-h.m4, m4/signed.m4.
8764         * m4/gettext.m4: Update to GNU gettext 0.16.
8765         * m4/intl.m4: New file, from GNU gettext.
8766         * m4/intldir.m4: New file, from GNU gettext.
8767         * config/srclist.txt: Update
8768
8769 2006-10-27  Eric Blake  <ebb9@byu.net>
8770
8771         * MODULES.html.sh: Document tempname.
8772         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
8773         dependencies.
8774         (Files): Move lib/tempname.c...
8775         * modules/tempname: ...to this new module.
8776         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
8777         (gl_PREREQ_TEMPNAME): Move...
8778         * m4/tempname.m4: ...to this new file.
8779         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
8780         * modules/sys_stat (Depends-on): Add stat-macros.
8781         * lib/stat_.h (includes): Pick up stat macros.
8782         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
8783         if stat macros are broken.
8784         * lib/tempname.c (includes): No need to include "stat-macros.h".
8785         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
8786         (direxists, __path_search) [!_LIBC]: Don't compile these in
8787         gnulib; the tmpdir module covers that.
8788         * lib/tempname.h: New file.
8789
8790 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
8791
8792         * COPYING: Explain how gnulib-tool converts licence headers.
8793         Almost all wording by Eric Blake.
8794
8795 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
8796
8797         * lib/mbchar.h (is_basic_table): Make read-only.
8798         * lib/mbchar.c (is_basic_table): Likewise.
8799         Reported by John Darrington.
8800
8801 2006-10-25  Bruno Haible  <bruno@clisp.org>
8802
8803         * lib/progname.h (set_program_name): Undefine before defining.
8804
8805 2006-10-25  Bruno Haible  <bruno@clisp.org>
8806
8807         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
8808         false for non-gcc C++ compilers.
8809         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
8810
8811 2006-10-24  Bruno Haible  <bruno@clisp.org>
8812
8813         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
8814         iconv implementations like Irix iconv.
8815
8816 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8817
8818         * modules/vararrays: New file.
8819         * m4/vararrays.m4: New file, taken from diffutils.
8820         * MODULES.html.sh: New module vararrays.
8821
8822 2006-10-24  Karl Berry  <karl@gnu.org>
8823
8824         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
8825         Don't call GNU Unix.
8826
8827 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8828
8829         * users.txt: Add Libtool.
8830
8831         Sync from Libtool:
8832
8833         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8834
8835         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
8836         to gnulib's policy of including config.h unconditionally.
8837
8838 2006-10-24  Bruno Haible  <bruno@clisp.org>
8839
8840         * modules/wcwidth (Files): Add m4/wint_t.m4.
8841         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
8842         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
8843
8844 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8845
8846         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
8847         to pacify GCC with some -W flags enabled.  Problem reported by
8848         Bruno Haible.
8849
8850 2006-10-24  Jim Meyering  <jim@meyering.net>
8851
8852         * MODULES.html.sh: Remove uinttostr.  It's not a module.
8853         Reported by Karl Berry.
8854
8855 2006-10-23  Bruno Haible  <bruno@clisp.org>
8856
8857         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
8858
8859 2006-10-24  Bruno Haible  <bruno@clisp.org>
8860
8861         * lib/gl_list.h: Use C comment style, not C++ comment style.
8862
8863 2006-10-23  Eric Blake  <ebb9@byu.net>
8864
8865         * lib/getaddrinfo.c (includes): Add missing include.
8866
8867 2006-10-23  Bruno Haible  <bruno@clisp.org>
8868             Paul Eggert  <eggert@cs.ucla.edu>
8869
8870         Ability to rename obstack_free.
8871         * lib/obstack.h (__obstack_free): New macro. Declare instead of
8872         obstack_free.
8873         (obstack_free): Invoke the __obstack_free macro.
8874         * lib/obstack.c (obstack_free): Use __obstack_free macro.
8875
8876 2006-10-23  Bruno Haible  <bruno@clisp.org>
8877             Paul Eggert  <eggert@cs.ucla.edu>
8878
8879         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
8880         __argc, __argv from the declaration. (They are defined as macros on
8881         mingw.)
8882
8883 2006-10-22  Bruno Haible  <bruno@clisp.org>
8884
8885         * doc/gnulib-intro.texi: New file.
8886         * doc/gnulib.texi: Include it.
8887
8888 2006-10-21  Bruno Haible  <bruno@clisp.org>
8889
8890         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
8891         "Introduction", "Miscellanous Notes", "Particular Modules".
8892
8893 2006-10-21  Bruno Haible  <bruno@clisp.org>
8894
8895         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8896         Change mostlyclean-local rule to avoid sh syntax error from bash
8897         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
8898
8899 2006-10-23  Jim Meyering  <jim@meyering.net>
8900
8901         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
8902         in place of snprintf.
8903
8904         * modules/inttostr (Files): Add lib/uinttostr.c.
8905         * lib/uinttostr.c (inttostr): New file/function.
8906         * lib/inttostr.h (uinttostr): Declare.
8907         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
8908         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8909         Add uinttostr.
8910         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
8911
8912 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * lib/canonicalize.c (ELOOP): Define if not already defined.
8915         Problem reported by Bruno Haible in
8916         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
8917
8918 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8919
8920         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
8921         Problem reported by Perry Smith and Ville Laurikari.
8922
8923         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
8924         uses.
8925
8926 2006-10-19  Bruno Haible  <bruno@clisp.org>
8927
8928         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
8929         for mingw.
8930
8931 2006-10-19  Bruno Haible  <bruno@clisp.org>
8932
8933         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
8934         Needed for mingw.
8935
8936 2006-10-19  Bruno Haible  <bruno@clisp.org>
8937
8938         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
8939
8940 2006-10-19  Bruno Haible  <bruno@clisp.org>
8941
8942         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
8943         it.
8944
8945 2006-10-19  Bruno Haible  <bruno@clisp.org>
8946
8947         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
8948         invocation.
8949
8950 2006-10-19  Bruno Haible  <bruno@clisp.org>
8951
8952         * gnulib-tool (func_create_testdir): Don't include ftruncate and
8953         mountlist by default.
8954
8955 2006-10-16  Bruno Haible  <bruno@clisp.org>
8956
8957         * lib/c-strstr.c: Include c-strstr.h.
8958
8959 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8960
8961         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
8962         in a slash.
8963
8964 2006-10-18  Bruno Haible  <bruno@clisp.org>
8965
8966         * lib/lock.h [C++]: Wrap definitions in extern "C".
8967
8968 2006-10-18  Bruno Haible  <bruno@clisp.org>
8969
8970         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
8971         gl_LIBOBJS list.
8972
8973 2006-10-18  Bruno Haible  <bruno@clisp.org>
8974
8975         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
8976
8977 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
8978
8979         * lib/xstrtol.h: Include gettext.h.
8980         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
8981         Problem reported by Eric Blake.
8982         * modules/xstrtol (Depends-on): Add gettext-h.
8983
8984 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
8985
8986         * lib/strftime.c (advance): New macro.
8987         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
8988         incomplete type, so you can't add 0 to it.  Problem and patch
8989         reported by Eelco Dolstra for dietlibc.
8990
8991 2006-10-18  Jim Meyering  <jim@meyering.net>
8992
8993         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
8994         type for a local, and rename it: s/up/user_proc/.
8995
8996 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8997
8998         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
8999         READ_UTMP_USER_PROCESS.
9000         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9001
9002 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9003
9004         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9005         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9006
9007 2006-10-17  Eric Blake  <ebb9@byu.net>
9008
9009         * lib/sigprocmask.c (sigprocmask): Fix typo.
9010
9011         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9012
9013         * modules/clean-temp (Makefile.am): Don't add to make output...
9014         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9015         config.h.
9016
9017 2006-10-17  Bruno Haible  <bruno@clisp.org>
9018
9019         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9020         differently if DEFAULT_TEXT_DOMAIN is set.
9021
9022 2006-10-16  Bruno Haible  <bruno@clisp.org>
9023
9024         * lib/clean-temp.c: Include fwriteerror.h.
9025
9026 2006-10-16  Bruno Haible  <bruno@clisp.org>
9027
9028         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9029
9030 2006-10-16  Bruno Haible  <bruno@clisp.org>
9031
9032         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9033         * lib/sigprocmask.h: Include <sys/types.h>.
9034         (sigset_t): Use the system's definition if present.
9035
9036 2006-10-17  Eric Blake  <ebb9@byu.net>
9037
9038         * lib/xvasprintf.c (includes): Assume config.h.
9039         * lib/xasprintf.c (includes): Likewise.
9040
9041 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9042
9043         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9044         at least as wide as intmax_t.
9045
9046 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9047
9048         (Imported from Automake.)
9049         * build-aux/gnupload: Update to version 1.1 of directive file.
9050
9051 2006-10-16  Eric Blake  <ebb9@byu.net>
9052
9053         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9054         match Automake 1.10a.
9055
9056 2006-10-14  Bruno Haible  <bruno@clisp.org>
9057
9058         * modules/sigprocmask: New file.
9059         * lib/sigprocmask.h: New file.
9060         * lib/sigprocmask.c: New file.
9061         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9062         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9063         request sigprocmask.o.
9064         (gl_PREREQ_SIGPROCMASK): New macro.
9065         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9066         (Depends-on): Add sigprocmask.
9067         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9068         gt_SIGNALBLOCKING. Test for 'raise' only once.
9069         * lib/fatal-signal.c: Include sigprocmask.h.
9070         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
9071         unblock_fatal_signals): Define always.
9072         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9073         sigprocmask.
9074
9075 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9076
9077         Sync from Automake.
9078         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
9079         which incorrectly sets the mode of an existing destination
9080         directory.  In some cases the unpatched install-sh could do the
9081         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
9082         system.  We hope this is rare in practice, but it's clearly worth
9083         fixing.  Problem reported by Alex Unleashed in
9084         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
9085         Also, don't bother to check for -m bugs unless we're using -m;
9086         suggested by Stepan Kasal.
9087
9088 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9089
9090         Sync from Automake.
9091         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
9092         `-c' flag, so they appear at the same position as in %FASTDEP%
9093         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
9094         which ignores unknown options only after the first non-option.
9095         Bug report against M4 by Nelson H. F. Beebe.
9096
9097 2006-10-13  Jim Meyering  <jim@meyering.net>
9098
9099         Fix a bug in yesterday's change.
9100         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
9101         p->fts_statp->st_dev would be used uninitialized.
9102         Ensures that we always call fts_stat on the very first entry.
9103         Miklos Szeredi reported that find -xdev stopped working.
9104
9105 2006-10-12  Bruno Haible  <bruno@clisp.org>
9106
9107         * gnulib-tool (func_get_automake_snippet): Append an automatically
9108         computed EXTRA_DIST augmentation.
9109         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
9110         * modules/alloca-opt (Makefile.am): Likewise.
9111         * modules/allocsa (Makefile.am): Likewise.
9112         * modules/arcfour (Makefile.am): Likewise.
9113         * modules/arctwo (Makefile.am): Likewise.
9114         * modules/argmatch (Makefile.am): Likewise.
9115         * modules/argz (Makefile.am): Likewise.
9116         * modules/atexit (Makefile.am): Likewise.
9117         * modules/backupfile (Makefile.am): Likewise.
9118         * modules/byteswap (Makefile.am): Likewise.
9119         * modules/c-strtod (Makefile.am): Likewise.
9120         * modules/c-strtold (Makefile.am): Likewise.
9121         * modules/calloc (Makefile.am): Likewise.
9122         * modules/canon-host (Makefile.am): Likewise.
9123         * modules/canonicalize (Makefile.am): Likewise.
9124         * modules/chdir-long (Makefile.am): Likewise.
9125         * modules/chdir-safer (Makefile.am): Likewise.
9126         * modules/check-version (Makefile.am): Likewise.
9127         * modules/chown (Makefile.am): Likewise.
9128         * modules/cloexec (Makefile.am): Likewise.
9129         * modules/close-stream (Makefile.am): Likewise.
9130         * modules/closeout (Makefile.am): Likewise.
9131         * modules/crc (Makefile.am): Likewise.
9132         * modules/csharpexec (Makefile.am): Likewise.
9133         * modules/cycle-check (Makefile.am): Likewise.
9134         * modules/des (Makefile.am): Likewise.
9135         * modules/dev-ino (Makefile.am): Likewise.
9136         * modules/dirfd (Makefile.am): Likewise.
9137         * modules/dirname (Makefile.am): Likewise.
9138         * modules/dup2 (Makefile.am): Likewise.
9139         * modules/eealloc (Makefile.am): Likewise.
9140         * modules/error (Makefile.am): Likewise.
9141         * modules/euidaccess (Makefile.am): Likewise.
9142         * modules/exclude (Makefile.am): Likewise.
9143         * modules/exitfail (Makefile.am): Likewise.
9144         * modules/fcntl-safer (Makefile.am): Likewise.
9145         * modules/fcntl (Makefile.am): Likewise.
9146         * modules/file-type (Makefile.am): Likewise.
9147         * modules/fileblocks (Makefile.am): Likewise.
9148         * modules/filemode (Makefile.am): Likewise.
9149         * modules/filenamecat (Makefile.am): Likewise.
9150         * modules/fnmatch (Makefile.am): Likewise.
9151         * modules/fopen-safer (Makefile.am): Likewise.
9152         * modules/fpending (Makefile.am): Likewise.
9153         * modules/fprintftime (Makefile.am): Likewise.
9154         * modules/free (Makefile.am): Likewise.
9155         * modules/fsusage (Makefile.am): Likewise.
9156         * modules/ftruncate (Makefile.am): Likewise.
9157         * modules/fts (Makefile.am): Likewise.
9158         * modules/gc-arcfour (Makefile.am): Likewise.
9159         * modules/gc-des (Makefile.am): Likewise.
9160         * modules/gc-hmac-md5 (Makefile.am): Likewise.
9161         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
9162         * modules/gc-md4 (Makefile.am): Likewise.
9163         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9164         * modules/gc-sha1 (Makefile.am): Likewise.
9165         * modules/gc (Makefile.am): Likewise.
9166         * modules/getaddrinfo (Makefile.am): Likewise.
9167         * modules/getcwd (Makefile.am): Likewise.
9168         * modules/getdelim (Makefile.am): Likewise.
9169         * modules/getdomainname (Makefile.am): Likewise.
9170         * modules/getgroups (Makefile.am): Likewise.
9171         * modules/gethostname (Makefile.am): Likewise.
9172         * modules/gethrxtime (Makefile.am): Likewise.
9173         * modules/getline (Makefile.am): Likewise.
9174         * modules/getloadavg (Makefile.am): Likewise.
9175         * modules/getlogin_r (Makefile.am): Likewise.
9176         * modules/getndelim2 (Makefile.am): Likewise.
9177         * modules/getopt (Makefile.am): Likewise.
9178         * modules/getpagesize (Makefile.am): Likewise.
9179         * modules/getpass-gnu (Makefile.am): Likewise.
9180         * modules/getpass (Makefile.am): Likewise.
9181         * modules/getsubopt (Makefile.am): Likewise.
9182         * modules/gettime (Makefile.am): Likewise.
9183         * modules/gettimeofday (Makefile.am): Likewise.
9184         * modules/getugroups (Makefile.am): Likewise.
9185         * modules/getusershell (Makefile.am): Likewise.
9186         * modules/glob (Makefile.am): Likewise.
9187         * modules/group-member (Makefile.am): Likewise.
9188         * modules/hard-locale (Makefile.am): Likewise.
9189         * modules/hash (Makefile.am): Likewise.
9190         * modules/hmac-md5 (Makefile.am): Likewise.
9191         * modules/hmac-sha1 (Makefile.am): Likewise.
9192         * modules/human (Makefile.am): Likewise.
9193         * modules/idcache (Makefile.am): Likewise.
9194         * modules/imaxabs (Makefile.am): Likewise.
9195         * modules/imaxdiv (Makefile.am): Likewise.
9196         * modules/inet_ntop (Makefile.am): Likewise.
9197         * modules/inet_pton (Makefile.am): Likewise.
9198         * modules/intprops (Makefile.am): Likewise.
9199         * modules/inttostr (Makefile.am): Likewise.
9200         * modules/inttypes (Makefile.am): Likewise.
9201         * modules/isapipe (Makefile.am): Likewise.
9202         * modules/javaversion (Makefile.am): Likewise.
9203         * modules/lchmod (Makefile.am): Likewise.
9204         * modules/lchown (Makefile.am): Likewise.
9205         * modules/localcharset (Makefile.am): Likewise.
9206         * modules/long-options (Makefile.am): Likewise.
9207         * modules/lstat (Makefile.am): Likewise.
9208         * modules/malloc (Makefile.am): Likewise.
9209         * modules/mathl (Makefile.am): Likewise.
9210         * modules/mbchar (Makefile.am): Likewise.
9211         * modules/md2 (Makefile.am): Likewise.
9212         * modules/md4 (Makefile.am): Likewise.
9213         * modules/md5 (Makefile.am): Likewise.
9214         * modules/memcasecmp (Makefile.am): Likewise.
9215         * modules/memchr (Makefile.am): Likewise.
9216         * modules/memcmp (Makefile.am): Likewise.
9217         * modules/memcoll (Makefile.am): Likewise.
9218         * modules/memcpy (Makefile.am): Likewise.
9219         * modules/memmem (Makefile.am): Likewise.
9220         * modules/memmove (Makefile.am): Likewise.
9221         * modules/mempcpy (Makefile.am): Likewise.
9222         * modules/memrchr (Makefile.am): Likewise.
9223         * modules/memset (Makefile.am): Likewise.
9224         * modules/memxor (Makefile.am): Likewise.
9225         * modules/mkancesdirs (Makefile.am): Likewise.
9226         * modules/mkdir-p (Makefile.am): Likewise.
9227         * modules/mkdir (Makefile.am): Likewise.
9228         * modules/mkdtemp (Makefile.am): Likewise.
9229         * modules/mkstemp (Makefile.am): Likewise.
9230         * modules/mktime (Makefile.am): Likewise.
9231         * modules/modechange (Makefile.am): Likewise.
9232         * modules/mountlist (Makefile.am): Likewise.
9233         * modules/nanosleep (Makefile.am): Likewise.
9234         * modules/obstack (Makefile.am): Likewise.
9235         * modules/openat (Makefile.am): Likewise.
9236         * modules/pagealign_alloc (Makefile.am): Likewise.
9237         * modules/pathmax (Makefile.am): Likewise.
9238         * modules/physmem (Makefile.am): Likewise.
9239         * modules/poll (Makefile.am): Likewise.
9240         * modules/posixtm (Makefile.am): Likewise.
9241         * modules/posixver (Makefile.am): Likewise.
9242         * modules/putenv (Makefile.am): Likewise.
9243         * modules/quote (Makefile.am): Likewise.
9244         * modules/quotearg (Makefile.am): Likewise.
9245         * modules/raise (Makefile.am): Likewise.
9246         * modules/read-file (Makefile.am): Likewise.
9247         * modules/readline (Makefile.am): Likewise.
9248         * modules/readlink (Makefile.am): Likewise.
9249         * modules/readtokens (Makefile.am): Likewise.
9250         * modules/readutmp (Makefile.am): Likewise.
9251         * modules/realloc (Makefile.am): Likewise.
9252         * modules/regex (Makefile.am): Likewise.
9253         * modules/rename-dest-slash (Makefile.am): Likewise.
9254         * modules/rename (Makefile.am): Likewise.
9255         * modules/rijndael (Makefile.am): Likewise.
9256         * modules/rmdir (Makefile.am): Likewise.
9257         * modules/rpmatch (Makefile.am): Likewise.
9258         * modules/safe-read (Makefile.am): Likewise.
9259         * modules/safe-write (Makefile.am): Likewise.
9260         * modules/same-inode (Makefile.am): Likewise.
9261         * modules/same (Makefile.am): Likewise.
9262         * modules/save-cwd (Makefile.am): Likewise.
9263         * modules/savedir (Makefile.am): Likewise.
9264         * modules/setenv (Makefile.am): Likewise.
9265         * modules/settime (Makefile.am): Likewise.
9266         * modules/sha1 (Makefile.am): Likewise.
9267         * modules/sig2str (Makefile.am): Likewise.
9268         * modules/snprintf (Makefile.am): Likewise.
9269         * modules/stat-macros (Makefile.am): Likewise.
9270         * modules/stat-time (Makefile.am): Likewise.
9271         * modules/stdbool (Makefile.am): Likewise.
9272         * modules/stdint (Makefile.am): Likewise.
9273         * modules/stdlib-safer (Makefile.am): Likewise.
9274         * modules/stpcpy (Makefile.am): Likewise.
9275         * modules/stpncpy (Makefile.am): Likewise.
9276         * modules/strcase (Makefile.am): Likewise.
9277         * modules/strcasestr (Makefile.am): Likewise.
9278         * modules/strchrnul (Makefile.am): Likewise.
9279         * modules/strcspn (Makefile.am): Likewise.
9280         * modules/strdup (Makefile.am): Likewise.
9281         * modules/strerror (Makefile.am): Likewise.
9282         * modules/strftime (Makefile.am): Likewise.
9283         * modules/strndup (Makefile.am): Likewise.
9284         * modules/strnlen (Makefile.am): Likewise.
9285         * modules/strpbrk (Makefile.am): Likewise.
9286         * modules/strsep (Makefile.am): Likewise.
9287         * modules/strstr (Makefile.am): Likewise.
9288         * modules/strtod (Makefile.am): Likewise.
9289         * modules/strtoimax (Makefile.am): Likewise.
9290         * modules/strtok_r (Makefile.am): Likewise.
9291         * modules/strtol (Makefile.am): Likewise.
9292         * modules/strtoll (Makefile.am): Likewise.
9293         * modules/strtoul (Makefile.am): Likewise.
9294         * modules/strtoull (Makefile.am): Likewise.
9295         * modules/strtoumax (Makefile.am): Likewise.
9296         * modules/strverscmp (Makefile.am): Likewise.
9297         * modules/sys_socket (Makefile.am): Likewise.
9298         * modules/sys_stat (Makefile.am): Likewise.
9299         * modules/sysexits (Makefile.am): Likewise.
9300         * modules/time_r (Makefile.am): Likewise.
9301         * modules/timegm (Makefile.am): Likewise.
9302         * modules/timespec (Makefile.am): Likewise.
9303         * modules/tmpfile-safer (Makefile.am): Likewise.
9304         * modules/trim (Makefile.am): Likewise.
9305         * modules/unistd-safer (Makefile.am): Likewise.
9306         * modules/unlinkdir (Makefile.am): Likewise.
9307         * modules/unlocked-io (Makefile.am): Likewise.
9308         * modules/userspec (Makefile.am): Likewise.
9309         * modules/utime (Makefile.am): Likewise.
9310         * modules/utimecmp (Makefile.am): Likewise.
9311         * modules/utimens (Makefile.am): Likewise.
9312         * modules/vasnprintf (Makefile.am): Likewise.
9313         * modules/vasprintf (Makefile.am): Likewise.
9314         * modules/vsnprintf (Makefile.am): Likewise.
9315         * modules/xalloc (Makefile.am): Likewise.
9316         * modules/xgetcwd (Makefile.am): Likewise.
9317         * modules/xnanosleep (Makefile.am): Likewise.
9318         * modules/xreadlink (Makefile.am): Likewise.
9319         * modules/xstrtod (Makefile.am): Likewise.
9320         * modules/xstrtol (Makefile.am): Likewise.
9321         * modules/xstrtold (Makefile.am): Likewise.
9322         * modules/yesno (Makefile.am): Likewise.
9323         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9324
9325 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9326
9327         * modules/error (Makefile.am): Distribute files through
9328         EXTRA_DIST, not lib_SOURCES.
9329
9330 2006-10-12  Eric Blake  <ebb9@byu.net>
9331
9332         * modules/error (Makefile.am): Distribute files in /lib.
9333         * modules/obstack (Makefile.am): Likewise.
9334
9335 2006-10-12  Bruno Haible  <bruno@clisp.org>
9336
9337         * modules/acl (Makefile.am): Distribute all files in lib/ through
9338         EXTRA_DIST.
9339         * modules/arcfour (Makefile.am): Likewise.
9340         * modules/arctwo (Makefile.am): Likewise.
9341         * modules/argmatch (Makefile.am): Likewise.
9342         * modules/argz (Makefile.am): Likewise.
9343         * modules/atexit (Makefile.am): Likewise.
9344         * modules/backupfile (Makefile.am): Likewise.
9345         * modules/c-strtod (Makefile.am): Likewise.
9346         * modules/c-strtold (Makefile.am): Likewise.
9347         * modules/calloc (Makefile.am): Likewise.
9348         * modules/canon-host (Makefile.am): Likewise.
9349         * modules/canonicalize (Makefile.am): Likewise.
9350         * modules/chdir-long (Makefile.am): Likewise.
9351         * modules/chdir-safer (Makefile.am): Likewise.
9352         * modules/check-version (Makefile.am): Likewise.
9353         * modules/chown (Makefile.am): Likewise.
9354         * modules/cloexec (Makefile.am): Likewise.
9355         * modules/close-stream (Makefile.am): Likewise.
9356         * modules/closeout (Makefile.am): Likewise.
9357         * modules/crc (Makefile.am): Likewise.
9358         * modules/cycle-check (Makefile.am): Likewise.
9359         * modules/des (Makefile.am): Likewise.
9360         * modules/dirfd (Makefile.am): Likewise.
9361         * modules/dirname (Makefile.am): Likewise.
9362         * modules/dup2 (Makefile.am): Likewise.
9363         * modules/euidaccess (Makefile.am): Likewise.
9364         * modules/exclude (Makefile.am): Likewise.
9365         * modules/exitfail (Makefile.am): Likewise.
9366         * modules/fcntl-safer (Makefile.am): Likewise.
9367         * modules/file-type (Makefile.am): Likewise.
9368         * modules/fileblocks (Makefile.am): Likewise.
9369         * modules/filemode (Makefile.am): Likewise.
9370         * modules/filenamecat (Makefile.am): Likewise.
9371         * modules/fnmatch (Makefile.am): Likewise.
9372         * modules/fopen-safer (Makefile.am): Likewise.
9373         * modules/fpending (Makefile.am): Likewise.
9374         * modules/fprintftime (Makefile.am): Likewise.
9375         * modules/free (Makefile.am): Likewise.
9376         * modules/fsusage (Makefile.am): Likewise.
9377         * modules/ftruncate (Makefile.am): Likewise.
9378         * modules/fts (Makefile.am): Likewise.
9379         * modules/gc (Makefile.am): Likewise.
9380         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9381         * modules/getaddrinfo (Makefile.am): Likewise.
9382         * modules/getcwd (Makefile.am): Likewise.
9383         * modules/getdelim (Makefile.am): Likewise.
9384         * modules/getdomainname (Makefile.am): Likewise.
9385         * modules/getgroups (Makefile.am): Likewise.
9386         * modules/gethostname (Makefile.am): Likewise.
9387         * modules/gethrxtime (Makefile.am): Likewise.
9388         * modules/getline (Makefile.am): Likewise.
9389         * modules/getloadavg (Makefile.am): Likewise.
9390         * modules/getlogin_r (Makefile.am): Likewise.
9391         * modules/getopt (Makefile.am): Likewise.
9392         * modules/getpass (Makefile.am): Likewise.
9393         * modules/getpass-gnu (Makefile.am): Likewise.
9394         * modules/getsubopt (Makefile.am): Likewise.
9395         * modules/gettime (Makefile.am): Likewise.
9396         * modules/gettimeofday (Makefile.am): Likewise.
9397         * modules/getugroups (Makefile.am): Likewise.
9398         * modules/getusershell (Makefile.am): Likewise.
9399         * modules/glob (Makefile.am): Likewise.
9400         * modules/group-member (Makefile.am): Likewise.
9401         * modules/hard-locale (Makefile.am): Likewise.
9402         * modules/hash (Makefile.am): Likewise.
9403         * modules/hmac-md5 (Makefile.am): Likewise.
9404         * modules/hmac-sha1 (Makefile.am): Likewise.
9405         * modules/human (Makefile.am): Likewise.
9406         * modules/idcache (Makefile.am): Likewise.
9407         * modules/imaxabs (Makefile.am): Likewise.
9408         * modules/imaxdiv (Makefile.am): Likewise.
9409         * modules/inet_ntop (Makefile.am): Likewise.
9410         * modules/inet_pton (Makefile.am): Likewise.
9411         * modules/inttostr (Makefile.am): Likewise.
9412         * modules/isapipe (Makefile.am): Likewise.
9413         * modules/lchown (Makefile.am): Likewise.
9414         * modules/long-options (Makefile.am): Likewise.
9415         * modules/lstat (Makefile.am): Likewise.
9416         * modules/malloc (Makefile.am): Likewise.
9417         * modules/mathl (Makefile.am): Likewise.
9418         * modules/mbchar (Makefile.am): Likewise.
9419         * modules/md2 (Makefile.am): Likewise.
9420         * modules/md4 (Makefile.am): Likewise.
9421         * modules/md5 (Makefile.am): Likewise.
9422         * modules/memcasecmp (Makefile.am): Likewise.
9423         * modules/memchr (Makefile.am): Likewise.
9424         * modules/memcmp (Makefile.am): Likewise.
9425         * modules/memcoll (Makefile.am): Likewise.
9426         * modules/memcpy (Makefile.am): Likewise.
9427         * modules/memmem (Makefile.am): Likewise.
9428         * modules/memmove (Makefile.am): Likewise.
9429         * modules/mempcpy (Makefile.am): Likewise.
9430         * modules/memrchr (Makefile.am): Likewise.
9431         * modules/memset (Makefile.am): Likewise.
9432         * modules/memxor (Makefile.am): Likewise.
9433         * modules/mkancesdirs (Makefile.am): Likewise.
9434         * modules/mkdir (Makefile.am): Likewise.
9435         * modules/mkdir-p (Makefile.am): Likewise.
9436         * modules/mkdtemp (Makefile.am): Likewise.
9437         * modules/mkstemp (Makefile.am): Likewise.
9438         * modules/mktime (Makefile.am): Likewise.
9439         * modules/modechange (Makefile.am): Likewise.
9440         * modules/mountlist (Makefile.am): Likewise.
9441         * modules/nanosleep (Makefile.am): Likewise.
9442         * modules/openat (Makefile.am): Likewise.
9443         * modules/pagealign_alloc (Makefile.am): Likewise.
9444         * modules/physmem (Makefile.am): Likewise.
9445         * modules/poll (Makefile.am): Likewise.
9446         * modules/posixtm (Makefile.am): Likewise.
9447         * modules/posixver (Makefile.am): Likewise.
9448         * modules/putenv (Makefile.am): Likewise.
9449         * modules/quote (Makefile.am): Likewise.
9450         * modules/quotearg (Makefile.am): Likewise.
9451         * modules/raise (Makefile.am): Likewise.
9452         * modules/read-file (Makefile.am): Likewise.
9453         * modules/readline (Makefile.am): Likewise.
9454         * modules/readlink (Makefile.am): Likewise.
9455         * modules/readtokens (Makefile.am): Likewise.
9456         * modules/readutmp (Makefile.am): Likewise.
9457         * modules/realloc (Makefile.am): Likewise.
9458         * modules/regex (Makefile.am): Likewise.
9459         * modules/rename (Makefile.am): Likewise.
9460         * modules/rename-dest-slash (Makefile.am): Likewise.
9461         * modules/rijndael (Makefile.am): Likewise.
9462         * modules/rmdir (Makefile.am): Likewise.
9463         * modules/rpmatch (Makefile.am): Likewise.
9464         * modules/safe-read (Makefile.am): Likewise.
9465         * modules/safe-write (Makefile.am): Likewise.
9466         * modules/same (Makefile.am): Likewise.
9467         * modules/save-cwd (Makefile.am): Likewise.
9468         * modules/savedir (Makefile.am): Likewise.
9469         * modules/setenv (Makefile.am): Likewise.
9470         * modules/settime (Makefile.am): Likewise.
9471         * modules/sha1 (Makefile.am): Likewise.
9472         * modules/sig2str (Makefile.am): Likewise.
9473         * modules/snprintf (Makefile.am): Likewise.
9474         * modules/stdlib-safer (Makefile.am): Likewise.
9475         * modules/stpcpy (Makefile.am): Likewise.
9476         * modules/stpncpy (Makefile.am): Likewise.
9477         * modules/strcase (Makefile.am): Likewise.
9478         * modules/strcasestr (Makefile.am): Likewise.
9479         * modules/strchrnul (Makefile.am): Likewise.
9480         * modules/strcspn (Makefile.am): Likewise.
9481         * modules/strdup (Makefile.am): Likewise.
9482         * modules/strerror (Makefile.am): Likewise.
9483         * modules/strftime (Makefile.am): Likewise.
9484         * modules/strndup (Makefile.am): Likewise.
9485         * modules/strnlen (Makefile.am): Likewise.
9486         * modules/strpbrk (Makefile.am): Likewise.
9487         * modules/strsep (Makefile.am): Likewise.
9488         * modules/strstr (Makefile.am): Likewise.
9489         * modules/strtod (Makefile.am): Likewise.
9490         * modules/strtoimax (Makefile.am): Likewise.
9491         * modules/strtok_r (Makefile.am): Likewise.
9492         * modules/strtol (Makefile.am): Likewise.
9493         * modules/strtoll (Makefile.am): Likewise.
9494         * modules/strtoul (Makefile.am): Likewise.
9495         * modules/strtoull (Makefile.am): Likewise.
9496         * modules/strtoumax (Makefile.am): Likewise.
9497         * modules/strverscmp (Makefile.am): Likewise.
9498         * modules/time_r (Makefile.am): Likewise.
9499         * modules/timegm (Makefile.am): Likewise.
9500         * modules/tmpfile-safer (Makefile.am): Likewise.
9501         * modules/unistd-safer (Makefile.am): Likewise.
9502         * modules/unlinkdir (Makefile.am): Likewise.
9503         * modules/userspec (Makefile.am): Likewise.
9504         * modules/utime (Makefile.am): Likewise.
9505         * modules/utimecmp (Makefile.am): Likewise.
9506         * modules/utimens (Makefile.am): Likewise.
9507         * modules/vasnprintf (Makefile.am): Likewise.
9508         * modules/vasprintf (Makefile.am): Likewise.
9509         * modules/vsnprintf (Makefile.am): Likewise.
9510         * modules/xalloc (Makefile.am): Likewise.
9511         * modules/xgetcwd (Makefile.am): Likewise.
9512         * modules/xnanosleep (Makefile.am): Likewise.
9513         * modules/xreadlink (Makefile.am): Likewise.
9514         * modules/xstrtod (Makefile.am): Likewise.
9515         * modules/xstrtol (Makefile.am): Likewise.
9516         * modules/xstrtold (Makefile.am): Likewise.
9517         * modules/yesno (Makefile.am): Likewise.
9518
9519 2006-10-12  Jim Meyering  <jim@meyering.net>
9520
9521         * m4/getloadavg.m4: Revert the change below.
9522
9523         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9524         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9525         fail with a symlink, which is what coreutils' ./bootstrap now
9526         creates by default.
9527
9528 2006-10-12  Bruno Haible  <bruno@clisp.org>
9529
9530         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9531         mingw.
9532         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
9533         MSVC and mingw explicitly.
9534
9535 2006-10-11  Simon Josefsson  <jas@extundo.com>
9536             Bruno Haible  <bruno@clisp.org>
9537
9538         Add support for multiple gnulib-tool invocations in the scope of a
9539         single configure.ac file.
9540         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
9541         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
9542         with the same contents as the _LIBADD variable.
9543         (func_emit_initmacro_start, func_emit_initmacro_end,
9544         func_emit_initmacro_done): New functions.
9545         (func_import, func_create_testdir): Invoke them. Allow the identifiers
9546         gl_LIBOBJS and gl_LTLIBOBJS.
9547
9548 2006-10-11  Bruno Haible  <bruno@clisp.org>
9549
9550         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
9551         (func_create_testdir): Don't create po/Makefile.am, don't invoke
9552         autoreconf. Instead, invoke autopoint explicitly but move back the
9553         *.m4 files from gnulib.
9554
9555 2006-10-11  Bruno Haible  <bruno@clisp.org>
9556
9557         * gnulib-tool (func_usage): Make module names after --create-testdir
9558         optional.
9559         (func_create_testdir): If no module was specified, use nearly all
9560         modules.
9561
9562 2006-10-12  Jim Meyering  <jim@meyering.net>
9563
9564         Big performance improvement for fts-based tools that use FTS_NOSTAT.
9565         Avoid spurious inode-mismatch problems on non-POSIX file systems.
9566         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
9567         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
9568         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
9569         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
9570         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
9571         (fts_set_stat_required): New function.
9572         (fts_open): Defer the calls to fts_stat, if possible or requested.
9573         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
9574         into fts_stat itself.
9575         (fts_read): Perform any required (deferred) fts_stat call.
9576         (fts_build): Likewise, for the directory we're about to open and read.
9577         In the readdir loop, carefully decide whether each entry will require
9578         an eventual call to fts_stat, using dirent.d_type info if available.
9579         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
9580         a command line argument into this function.  Update all callers.
9581         Map a return value of FTS_DOT to FTS_D for a command line argument.
9582         * modules/fts (Depends-on): Add d-type.  Alphabetize.
9583         Thanks to Miklos Szeredi for his tenacity and for the initial
9584         bug report about "find" failing on a FUSE-based file system.
9585
9586         * lib/fts.c (fts_open): Use consistent indentation.
9587
9588 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9589
9590         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
9591         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
9592         reported by Jim Meyering.  All uses of cache variables renamed
9593         to match Autoconf's.
9594         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
9595         the other one.
9596
9597         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
9598         Fix misspelling in diagnostic.
9599
9600 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9601
9602         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
9603         defined.  Problem reported by Matthew Woehlke.
9604
9605         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
9606         Add support for Tandem NonStop R series.
9607         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
9608         Use new macro.
9609
9610         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
9611         (has_trailing_slash): Omit size arg; all callers changed.
9612         Omit 'inline', since it doesn't help performance and we'd
9613         need to configure it.
9614         Don't count //, ///, etc. as having a trailing slash.
9615         As a side effect, this removes a C99ism reported by Matthew Woehlke.
9616         (rpl_rename_dest_slash): On failure, use rename's errno rather
9617         than (in some cases) an incorrect or junk errno.
9618         Simplify code by removing need to compute length; this does
9619         cause it to make two passes instead of one over the file name,
9620         but it's worth it.
9621
9622         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
9623         change, since Autoconf's version may no longer be appropriate now
9624         that we are using CVS Autoconf's version.  Add support for Tandem.
9625
9626 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9627             Bruno Haible  <bruno@clisp.org>
9628
9629         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
9630         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
9631         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
9632         gl_AC_TYPE_LONG_LONG.
9633
9634         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
9635         instead of HAVE_LONG_LONG.
9636         * lib/printf-args.c (printf_fetchargs): Likewise.
9637         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
9638         * lib/vasnprintf.c (VASNPRINTF): Likewise.
9639         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
9640         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
9641         gl_AC_TYPE_LONG_LONG.
9642
9643 2006-10-11  Bruno Haible  <bruno@clisp.org>
9644
9645         * m4/longlong.m4: Add comments.
9646         * m4/ulonglong.m4: Likewise.
9647
9648 2006-10-10  Bruno Haible  <bruno@clisp.org>
9649
9650         Make it possible to #define stpcpy, strdup to aliases.
9651         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
9652         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
9653
9654 2006-10-10  Bruno Haible  <bruno@clisp.org>
9655
9656         Make it possible to #define gcd to an alias.
9657         * lib/gcd.c: Include config.h.
9658
9659 2006-10-10  Bruno Haible  <bruno@clisp.org>
9660
9661         Make it possible to #define c_isascii to an alias.
9662         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
9663         defined. Undefine the macros before defining them, to avoid gcc
9664         warnings.
9665         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
9666         define NO_C_CTYPE_MACROS early.
9667
9668 2006-10-10  Bruno Haible  <bruno@clisp.org>
9669
9670         Make it possible to #define set_program_name to an alias.
9671         * lib/progname.c: Don't undefine set_program_name; instead, undefine
9672         ENABLE_RELOCATABLE early.
9673
9674 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9675
9676         Port to Tandem NSK OSS, which has 64-bit signed int but at most
9677         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
9678         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
9679         More generally, don't assume that 64-bit signed int is available
9680         if unsigned int is, and vice versa.
9681         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
9682         unsigned symbols, not on their signed counterparts.
9683         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
9684         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
9685         (UINT64_C, UINTMAX_C):
9686         Likewise.
9687         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
9688         unsigned counterparts.
9689         (Have_long_long, Unsigned): New macros.
9690         (Int): Renamed from INT.
9691         (strtoimax): Use the new macros.
9692         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
9693         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
9694         * modules/inttypes (inttypes.h): Substitute
9695         HAVE_UNSIGNED_LONG_LONG_INT.
9696         * modules/stdint (stdint.h): Likewise.
9697         (Files): Add m4/ulonglong.m4.
9698
9699 2006-10-10  Bruno Haible  <bruno@clisp.org>
9700
9701         Fix a gcc -Wshadow warning.
9702         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
9703         to 'bucket'.
9704         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
9705         gl_linked_indexof_from_to): Likewise.
9706         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
9707         Likewise.
9708         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
9709         Likewise.
9710         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
9711         Reported by Eric Blake.
9712
9713 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
9714
9715         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
9716         for NetBSD.  Problem reported by Bruno Haible.
9717
9718 2006-10-09  Jim Meyering  <jim@meyering.net>
9719
9720         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
9721         Patch from Bruno Haible.
9722
9723 2006-10-09  Jim Meyering  <jim@meyering.net>
9724
9725         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
9726         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
9727         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
9728
9729 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
9730
9731         Don't include <config.h> twice; this doesn't work in some cases,
9732         e.g., when config.h has "#define intmax_t long long int" and
9733         we include <config.h>, <inttypes.h>, <config.h> in that order.
9734         Problem reported by Matthew Woehlke in:
9735         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
9736         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
9737         * lib/fts-cycle.c: Don't include config.h.
9738         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
9739         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
9740         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
9741         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
9742         inttypes.h.
9743         * lib/xstrtoumax.c: Likewise.
9744         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
9745         __strtol and the like, so that this module is more like its siblings.
9746         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
9747         Remove; no longer needed now that we assume gnulib inttypes.h.
9748
9749 2006-10-08  Bruno Haible  <bruno@clisp.org>
9750
9751         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
9752         option.
9753
9754 2006-10-07  Jim Meyering  <jim@meyering.net>
9755
9756         * modules/inttypes (inttypes.h): Revert what seems to have been
9757         an inadvertent part of today's change: use "|", not "/" in the
9758         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
9759
9760 2006-10-07  Bruno Haible  <bruno@clisp.org>
9761
9762         * modules/sublist: New file.
9763
9764 2006-10-07  Bruno Haible  <bruno@clisp.org>
9765
9766         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
9767         * modules/argz (argz.h): Likewise.
9768         * modules/arpa_inet (arpa/inet.h): Likewise.
9769         * modules/byteswap (byteswap.h): Likewise.
9770         * modules/configmake (configmake.h): Likewise.
9771         * modules/fcntl (fcntl.h): Likewise.
9772         * modules/fnmatch (fnmatch.h): Likewise.
9773         * modules/getopt (getopt.h): Likewise.
9774         * modules/glob (glob.h): Likewise.
9775         * modules/inttypes (inttypes.h): Likewise.
9776         * modules/netinet_in (netinet/in.h): Likewise.
9777         * modules/poll (poll.h): Likewise.
9778         * modules/stdbool (stdbool.h): Likewise.
9779         * modules/stdint (stdint.h): Likewise.
9780         * modules/sys_select (sys/select.h): Likewise.
9781         * modules/sys_socket (sys/socket.h): Likewise.
9782         * modules/sys_stat (sys/stat.h): Likewise.
9783         * modules/sysexits (sysexits.h): Likewise.
9784         * modules/unistd (unistd.h): Likewise.
9785         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9786         Add a "DO NOT EDIT" comment to the generated file.
9787         (func_import): Likewise for gnulib-comp.m4.
9788
9789 2006-10-07  Bruno Haible  <bruno@clisp.org>
9790
9791         * lib/gl_sublist.h: New file.
9792         * lib/gl_sublist.c: New file.
9793
9794 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9795
9796         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
9797         name (relative to the original working directory) and the file
9798         name component (relative to the temporary working directory).  All
9799         callers changed.
9800         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
9801         * lib/mkdir-p.c (make_dir_parents): Likewise.
9802         * lib/mkdir-p.h (make_dir_parents): Likewise.
9803
9804 2006-10-06  Eric Blake  <ebb9@byu.net>
9805
9806         Define several macros for use by the clean-temp module.
9807         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
9808         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
9809         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
9810
9811         * lib/clean-temp.h (close_stream_temp): New declaration.
9812         * lib/clean-temp.c (includes): Pull in headers according to what
9813         other modules are in use.
9814         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
9815
9816 2006-10-06  Bruno Haible  <bruno@clisp.org>
9817
9818         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
9819         instead of fopen, fwriteerror.
9820
9821 2006-10-06  Bruno Haible  <bruno@clisp.org>
9822
9823         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
9824         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
9825         int.
9826         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
9827         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
9828         Return an error indicator.
9829         Suggested by Eric Blake.
9830
9831 2006-10-06  Bruno Haible  <bruno@clisp.org>
9832
9833         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
9834         Reported by Eric Blake.
9835
9836 2006-10-06  Bruno Haible  <bruno@clisp.org>
9837
9838         * modules/closeout (Description): Mention stderr too.
9839
9840 2006-10-06  Bruno Haible  <bruno@clisp.org>
9841         and Paul Eggert  <eggert@cs.ucla.edu>
9842
9843         * lib/closeout.c (close_stdout): Also close stderr.
9844         * lib/closeout.h: Update comment.
9845
9846 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9847
9848         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
9849         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
9850         * lib/dirchownmod.c: Include lchown.h.
9851         * lib/lchown.c: Don't include files that lchown.h now includes.
9852         Don't declare chown, since lchown.h now does that.
9853         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
9854         (lchown): Define to rpl_chown if lchown is declared but
9855         does not exist.  Declare using a prototype if lchown is not
9856         declared.  Add a copyright notice.
9857         * lib/mkstemp.h: Include <unistd.h>.
9858         * lib/openat.c: Include lchown.h.
9859
9860         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
9861         we now test for that separately.
9862         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
9863         rather than O_NOFOLLOW, when testing whether it's possible to
9864         avoid a race condition reliably.
9865         * lib/savewd.c (savewd_chdir): Likewise.
9866
9867         Remove macros that are no longer needed now that stdint.h is
9868         reliable.
9869         * lib/fsusage.c (UINTMAX_MAX): Remove.
9870         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
9871         * lib/utimecmp.c (SIZE_MAX): Remove.
9872
9873         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
9874
9875         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
9876         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
9877         O_NOATIME works.
9878
9879 2006-10-05  Bruno Haible  <bruno@clisp.org>
9880
9881         * lib/gl_list.h (gl_sortedlist_search_from_to,
9882         gl_sortedlist_indexof_from_to): New declarations.
9883         (gl_list_implementation): New fields sortedlist_search_from_to,
9884         sortedlist_indexof_from_to.
9885         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
9886         inline functions.
9887         * lib/gl_list.c (gl_sortedlist_search_from_to,
9888         gl_sortedlist_indexof_from_to): New functions.
9889         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
9890         function.
9891         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
9892         (gl_array_sortedlist_search_from_to): New function.
9893         (gl_array_list_implementation): Update.
9894         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
9895         function.
9896         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
9897         (gl_carray_sortedlist_search_from_to): New function.
9898         (gl_carray_list_implementation): Update.
9899         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
9900         gl_linked_sortedlist_indexof_from_to): New functions.
9901         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9902         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9903         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
9904         gl_tree_sortedlist_indexof_from_to): New functions.
9905         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9906         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9907         Update.
9908         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9909         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
9910         Update.
9911
9912 2006-10-05  Bruno Haible  <bruno@clisp.org>
9913
9914         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
9915         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
9916         (struct gl_list_implementation): Add fields search_from_to,
9917         indexof_from_to. Remove fields search, indexof.
9918         (gl_list_search): Use the search_from_to method.
9919         (gl_list_search_from, gl_list_search_from_to): New functions.
9920         (gl_list_indexof): Use the indexof_from_to method.
9921         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9922         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
9923         (gl_list_search_from, gl_list_search_from_to): New functions.
9924         (gl_list_indexof): Use the indexof_from_to method.
9925         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9926         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
9927         gl_array_indexof. Add start_index, end_index arguments.
9928         (gl_array_search_from_to): Renamed from gl_array_search. Add
9929         start_index, end_index arguments.
9930         (gl_array_remove, gl_array_list_implementation): Update.
9931         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
9932         gl_carray_indexof. Add start_index, end_index arguments.
9933         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
9934         start_index, end_index arguments.
9935         (gl_carray_remove, gl_carray_list_implementation): Update.
9936         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
9937         gl_linked_search. Add start_index, end_index arguments.
9938         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
9939         start_index, end_index arguments.
9940         (gl_linked_remove): Update.
9941         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9942         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9943         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
9944         field to 'size_t'.
9945         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
9946         gl_tree_search. Add start_index, end_index arguments.
9947         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9948         start_index, end_index arguments.
9949         (gl_tree_remove): Update.
9950         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9951         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9952         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
9953         function.
9954         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
9955         gl_tree_search. Add start_index, end_index arguments.
9956         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9957         start_index, end_index arguments.
9958         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9959         Update.
9960         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
9961
9962 2006-10-05  Bruno Haible  <bruno@clisp.org>
9963
9964         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
9965
9966         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
9967         fwriteerror_temp): New declarations.
9968         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
9969         (descriptors): New variable.
9970         (cleanup): First, close the descriptors.
9971         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
9972         fclose_temp, fwriteerror_temp): New functions.
9973
9974 2006-10-04  Jim Meyering  <jim@meyering.net>
9975
9976         * lib/fts.c (fts_open): Tiny comment change.
9977
9978 2006-10-04  Bruno Haible  <bruno@clisp.org>
9979
9980         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
9981         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
9982         gl_LOCK_BODY.
9983         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
9984         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
9985         gl_LOCK_EARLY_BODY.
9986         (gl_LOCK): Require gl_LOCK_BODY.
9987
9988 2006-10-04  Bruno Haible  <bruno@clisp.org>
9989
9990         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
9991         (gl_oset_search_atleast): New declaration.
9992         (struct gl_oset_implementation): Add field 'search_atleast'.
9993         (gl_oset_search_atleast): New inline function.
9994         * lib/gl_oset.c (gl_oset_search_atleast): New function.
9995         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
9996         (gl_array_oset_implementation): Update.
9997         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
9998         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
9999         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10000
10001 2006-10-04  Bruno Haible  <bruno@clisp.org>
10002
10003         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10004
10005 2006-10-03  Bruno Haible  <bruno@clisp.org>
10006
10007         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10008         from gl_avltreehash_list_implementation.
10009
10010 2006-10-03  Bruno Haible  <bruno@clisp.org>
10011
10012         * lib/gl_oset.c (gl_oset_add): Fix return type.
10013
10014 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10015
10016         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10017
10018 2006-10-02  Eric Blake  <ebb9@byu.net>
10019
10020         * modules/strnlen (Depends-on): Add extensions.
10021
10022 2006-10-02  Eric Blake  <ebb9@byu.net>
10023
10024         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10025         definition in 2.60+.
10026
10027 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10028
10029         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10030         checks.
10031
10032 2006-10-02  Bruno Haible  <bruno@clisp.org>
10033
10034         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10035         to the AUTOMAKE_OPTIONS.
10036         Reported by Jim Meyering.
10037
10038 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10039
10040         Work around bug in Solaris 10 /proc file system:
10041         /proc/self/fd/NNN/.. isn't the parent directory of
10042         the directory whose file descriptor is NNN.  This needs to
10043         be worked around at run time, not compile time, since a
10044         program might be built on Solaris 8, where things work, and
10045         run on Solaris 10.
10046         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10047         to use the following interface instead:
10048         (OPENAT_BUFFER_SIZE): New macro.
10049         (openat_proc_name): New function.
10050         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10051         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10052         Likewise.
10053         * lib/openat-proc.c: New file.
10054         * modules/openat (Files): Add lib/openat-proc.c.
10055         (Depends-on): Add same-inode, stdbool.
10056         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10057
10058 2006-09-29  Bruno Haible  <bruno@clisp.org>
10059
10060         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10061         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10062         argument. Set stdout_closed before testing for ferror, not after.
10063         (fwriteerror, fwriteerror_no_ebadf): New functions.
10064
10065 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10066
10067         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10068
10069 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
10070
10071         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
10072         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
10073
10074 2006-09-28  Jim Meyering  <jim@meyering.net>
10075
10076         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
10077         Include <unistd.h>.
10078
10079 2006-09-28  Bruno Haible  <bruno@clisp.org>
10080
10081         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
10082         * modules/linkedhash-list (Depends-on): Likewise.
10083         * modules/rbtreehash-list (Depends-on): Likewise.
10084
10085 2006-09-28  Bruno Haible  <bruno@clisp.org>
10086
10087         * lib/strndup.h: Simplify the redefinition of strndup.
10088         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
10089         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
10090
10091 2006-09-28  Bruno Haible  <bruno@clisp.org>
10092
10093         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
10094         * lib/gl_linkedhash_list.c: Likewise.
10095         * lib/gl_rbtreehash_list.c: Likewise.
10096
10097 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10098
10099         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
10100         getaddrinfo.
10101
10102         * lib/__fpending.h: Don't include <stdio_ext.h> unless
10103         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
10104         it causes <stdio_ext.h> to cause a compile-time error.
10105         Problem reported by Nelson H. F. Beebe.
10106         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
10107         of HAVE_DECL___PENDING.
10108
10109         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
10110         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
10111         declaration.
10112
10113 2006-09-27  Jim Meyering  <jim@meyering.net>
10114
10115         This file could end up with a definition for a function
10116         named __strndup, rather than rpl_strndup on a system with
10117         incomplete weak_alias support.
10118         * lib/strndup.c (strndup): Rename from __strndup.
10119         Remove #defines that used to map __strndup to strndup.
10120         Don't use K&R prototypes.
10121         Remove LIBC-related code, since this file is not sync'd with glibc.
10122         * lib/strndup.h: Revamp, accordingly.
10123         * m4/strndup.m4: Modernize.
10124
10125 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10126
10127         * modules/savewd (Depends-on): Add 'raise'.
10128         * lib/savewd.c: Include <signal.h>, for 'raise'.
10129
10130 2006-09-26  Jim Meyering  <jim@meyering.net>
10131
10132         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
10133         when we detect Darwin 8.7.0's acl_get_file bug.
10134         Rearrange to perform the new (below) run-test while $LIBS
10135         contains any acl-related library.  Set USE_ACL at the end.
10136         (gl_ACL_GET_FILE): New function.
10137
10138 2006-09-26  Eric Blake  <ebb9@byu.net>
10139
10140         * lib/verror.c: Include <config.h> unconditionally.
10141
10142 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
10143
10144         * modules/clock-time (Maintainer): Add self.
10145         * modules/getlogin_r (Depends-on): Add extensions.
10146
10147 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10148
10149         * modules/clock-time: New module.
10150         * modules/nanosleep (Depends-on): Add clock-time.
10151         * modules/gethrxtime (Depends-on): Likewise.
10152         * modules/gettime (Depends-on): Likewise.
10153         * modules/settime (Depends-on): Likewise.
10154
10155         * modules/fts-lgpl: Depend on openat.
10156         * modules/mkancesdirs: Depend on savewd.
10157         * modules/mkdir-p: Likewise.
10158
10159 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10160
10161         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
10162
10163         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
10164         `gl_have_arbitrary_file_name_length_limit' to
10165         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
10166         actually works between configure runs.
10167
10168 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10169             Bruno Haible  <bruno@clisp.org>
10170
10171         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
10172
10173 2006-09-25  Jim Meyering  <jim@meyering.net>
10174
10175         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
10176         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
10177
10178 2006-09-25  Eric Blake  <ebb9@byu.net>
10179
10180         * gnulib-tool (func_import, func_create_testdir): Fix typos in
10181         exec's in 2006-09-18 patch when shuffling fds.
10182
10183 2006-09-25  Bruno Haible  <bruno@clisp.org>
10184
10185         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
10186         Reported by Jim Meyering.
10187
10188 2006-09-24  Jim Meyering  <jim@meyering.net>
10189
10190         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
10191         compare a pointer against a literal "0".  That caused failures with
10192         at least HP-UX's hpcc.
10193
10194 2006-09-22  Simon Josefsson  <jas@extundo.com>
10195
10196         * modules/gc-sha1:
10197         * modules/gc-md4:
10198         * modules/gc-hmac-sha1:
10199         * modules/gc-hmac-md5:
10200         * modules/gc-des:
10201         * modules/gc-arcfour: Distribute more files.
10202
10203 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10204
10205         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
10206         (gl_linked_iterator_from_to): Initialize struct completely.
10207         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
10208         (gl_tree_iterator_from_to): Likewise
10209         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
10210         * lib/gl_array_list.c [lint] (gl_array_iterator)
10211         (gl_array_iterator_from_to): Likewise.
10212         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
10213         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
10214         (gl_carray_iterator_from_to): Likewise.
10215
10216         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
10217         * lib/md4.c (md4_process_block): Remove unused variable.
10218         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
10219         parentheses for clarity.
10220
10221 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10222
10223         * modules/bison-i18n (Depends-on): Add gettext.
10224
10225 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10226
10227         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
10228         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
10229         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
10230         also add missing comma that caused broken test.
10231         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
10232         stdlib.h, for `abort'.
10233         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
10234         variables.
10235         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
10236         include unistd.h if present, for `rmdir'.
10237         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
10238         variables.
10239         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
10240         in the process include standard headers for prototypes.
10241         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
10242         gets declared on GNU/Linux.
10243         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
10244         unistd.h, for `rmdir'.
10245         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
10246
10247         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10248         always true.
10249         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10250
10251         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10252
10253 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10254
10255         * gnulib-tool (func_version): Create output all at once.  This
10256         may help avoid triggering unnecessary SIGPIPEs, and at any
10257         rate it doesn't hurt.
10258
10259 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10260             Bruno Haible  <bruno@clisp.org>
10261
10262         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10263         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10264         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10265
10266         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10267         (gl_FUNC_VASPRINTF): Invoke it.
10268
10269 2006-09-22  Bruno Haible  <bruno@clisp.org>
10270
10271         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10272         getloadavg.c as first argument.
10273
10274 2006-09-22  Bruno Haible  <bruno@clisp.org>
10275
10276         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10277         at the beginning of the gl_INIT macro.
10278         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10279         gl_GETLOADAVG.
10280
10281 2006-09-22  Bruno Haible  <bruno@clisp.org>
10282
10283         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10284         module.
10285         Suggested by Ralf Wildenhues.
10286
10287 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10288
10289         Import this patch from libc:
10290
10291         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10292
10293         * lib/regex_internal.c (re_string_reconstruct): Handle
10294         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10295         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10296         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10297         re_string_context_at.
10298
10299         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10300         now requires it.
10301         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10302         gl_REGEX now does it for us.
10303         (gl_REGEX): Add test taken from
10304         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10305
10306         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10307         Check that large offsets work.  Modernize Autoconf usages.
10308         Prefer "yes" to mean a good thing rather than a bad.
10309         Don't put "#define mkstemp" in config.h, as this might interfere
10310         with standard system headers that "#define mkstemp mkstemp64".
10311
10312         * modules/mkstemp (Depends-on): Add extensions, so that
10313         mkstemp is visible on some platforms.
10314         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10315         (Include): Change to "mkstemp.h" from <stdlib.h>.
10316         (Files): Add mkstemp.h.
10317
10318         * lib/mkstemp.h: New file, since some standard headers
10319         #define mkstemp.
10320         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10321         Include "mkstemp.h".
10322         Make the _LIBC code resemble glibc original more,
10323         e.g., use K&R style.
10324         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10325         (mkstemp): Remove, since mkstemp.h does this for us.
10326         * lib/stdlib--.h: Include mkstemp.h.
10327
10328         Import this patch from libc:
10329
10330         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10331
10332         * lib/tempname.c (__gen_tempname): Change attempts_min
10333         into a macro.  Use preprocessor to decide how to initialize
10334         attempts [Coverity CID 67].
10335
10336 2006-09-20  Bruno Haible  <bruno@clisp.org>
10337
10338         * lib/mkdtemp.c: Import from libc.
10339         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10340                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10341                 attempts_min into a macro.  Use preprocessor to decide how to
10342                 initialize attempts [Coverity CID 67].
10343         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10344                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10345                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10346
10347 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10348
10349         * gnulib-tool (func_exit): New function, to allow to pass the
10350         exit status portably through the trap.  Use everywhere.
10351         (--help, --version): Signal a write error.
10352         (trap): catch SIGPIPE, for write errors.
10353         Exit at the end of the trap, with the correct exit status.
10354
10355 2006-09-19  Karl Berry  <karl@gnu.org>
10356
10357         * doc/gnulib.texi: note about the license texinfo files.
10358
10359 2006-09-19  Eric Blake  <ebb9@byu.net>
10360
10361         * gnulib-tool: Avoid space-tab.
10362
10363 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10364
10365         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10366         that prevented coreutils 6.1 from building.  Problem reported
10367         by Petter Reinholdtsen.
10368
10369 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10370
10371         * gnulib-tool (avoidlist): Fix typo that broke options like
10372         --avoid=lock that are used by coreutils bootstrap.
10373
10374 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10375
10376         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10377         more systematically.
10378
10379 2006-09-18  Jim Meyering  <jim@meyering.net>
10380
10381         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10382
10383 2006-09-18  Bruno Haible  <bruno@clisp.org>
10384
10385         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10386
10387 2006-09-18  Bruno Haible  <bruno@clisp.org>
10388
10389         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10390         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10391         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10392         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10393         * m4/gettext.m4: Require autoconf >= 2.52.
10394         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10395         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10396         of gl_cv_header_inttypes_h.
10397
10398 2006-09-18  Bruno Haible  <bruno@clisp.org>
10399
10400         * lib/javaversion.c: Include configmake.h.
10401
10402 2006-09-18  Bruno Haible  <bruno@clisp.org>
10403
10404         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10405         avoid that the while loops be executed in a subshell.
10406
10407 2006-09-18  Bruno Haible  <bruno@clisp.org>
10408
10409         * MODULES.html.sh (func_module): Break long lines.
10410         Suggested by Bruce Korb <bkorb@gnu.org>.
10411
10412 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10413
10414         Speed up by a factor of 1.12.
10415         * gnulib-tool (nl): New variable.
10416         (func_import): Rewrite include directive extraction to only read each
10417         directive once.
10418
10419 2006-09-17  Bruno Haible  <bruno@clisp.org>
10420
10421         * modules/javaversion (Makefile.am): Remove DEFS setting.
10422         (Depends-on): Add configmake, for PKGDATADIR definition.
10423
10424 2006-09-17  Bruno Haible  <bruno@clisp.org>
10425
10426         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10427
10428 2006-09-17  Bruno Haible  <bruno@clisp.org>
10429
10430         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10431         (func_modules_transitive_closure, func_modules_add_dummy,
10432         func_modules_to_filelist, func_import, func_create_testdir,
10433         func_create_megatestdir, ...): Use it wherever possible.
10434         Suggested by Ralf Wildenhues.
10435
10436 2006-09-16  Karl Berry  <karl@gnu.org>
10437
10438         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10439         to avoid sectioning errors.
10440         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10441         [ifinfo]: blank line after @center-ed titles.
10442         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10443         Spell FSF address consistently with others.
10444         (These changes approved by rms.)
10445
10446 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10447
10448         Speed up by a factor of 1.61.
10449         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10450         already checked module names again.
10451
10452 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10453
10454         Speed up by a factor of 1.13.
10455         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10456         for new_files, and the input to func_add_or_update.
10457
10458 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10459
10460         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10461         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10462
10463 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10464
10465         * modules/mkancesdirs (Depends-on): Add fcntl.
10466         * modules/savewd: New file.
10467         * MODULES.html.sh (File system functions): Add savewd.
10468
10469         * modules/configmake (Makefile.am): Add support for the
10470         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10471
10472 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10473
10474         * m4/savewd.m4: New file.
10475
10476 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10477
10478         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10479         (dirchownmod): New arg FD.  All callers changed.
10480         Use FD rather than opening the directory ourself, as opening is
10481         now the caller's responsibility.
10482         * lib/dirchownmod.h: Likewise.
10483         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10484         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10485         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10486         (test_dir): Remove.
10487         (mkancesdirs): Return length of prefix of FILE that has already
10488         been made, or -2 if there is a child doing the work.  Redo
10489         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10490         ".", and treat ".." specially since it might stray back into
10491         already-created areas.  Use a subprocess if necessary.  New arg
10492         WD; all users changed.  MAKE_DIR function should now return 1
10493         if it creates a directory that is not readable.  Return -2 if
10494         a child process is spun off.
10495         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10496         Adjust signature to match code.
10497         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10498         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10499         all users changed.
10500         * lib/savewd.c, lib/savewd.h: New files.
10501
10502 2006-09-15  Jim Meyering  <jim@meyering.net>
10503
10504         * modules/rename-dest-slash: New module.
10505         * MODULES.html.sh (posix_compat): Add it here.
10506
10507         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10508
10509 2006-09-15  Jim Meyering  <jim@meyering.net>
10510
10511         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10512         file.
10513
10514         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10515
10516 2006-09-15  Jim Meyering  <jim@meyering.net>
10517
10518         * lib/rename-dest-slash.c (has_trailing_slash): Use
10519         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10520         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10521         test before testing whether SRC is a directory.
10522         Suggestions from Bruno Haible.
10523
10524         Avoid a warning about an unused variable.
10525         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10526         into the #ifdef block where it's used.
10527
10528         * lib/rename-dest-slash.c: New file.
10529
10530 2006-09-14  Bruno Haible  <bruno@clisp.org>
10531
10532         * lib/allocsa.c: Include <config.h> unconditionally.
10533         * lib/asnprintf.c: Likewise.
10534         * lib/asprintf.c: Likewise.
10535         * lib/c-strcasecmp.c: Likewise.
10536         * lib/c-strcasestr.c: Likewise.
10537         * lib/c-strncasecmp.c: Likewise.
10538         * lib/c-strstr.c: Likewise.
10539         * lib/classpath.c: Likewise.
10540         * lib/clean-temp.c: Likewise.
10541         * lib/concatpath.c: Likewise.
10542         * lib/copy-file.c: Likewise.
10543         * lib/csharpcomp.c: Likewise.
10544         * lib/csharpexec.c: Likewise.
10545         * lib/execute.c: Likewise.
10546         * lib/fatal-signal.c: Likewise.
10547         * lib/findprog.c: Likewise.
10548         * lib/fwriteerror.c: Likewise.
10549         * lib/gl_array_list.c: Likewise.
10550         * lib/gl_array_oset.c: Likewise.
10551         * lib/gl_avltree_list.c: Likewise.
10552         * lib/gl_avltree_oset.c: Likewise.
10553         * lib/gl_avltreehash_list.c: Likewise.
10554         * lib/gl_carray_list.c: Likewise.
10555         * lib/gl_linked_list.c: Likewise.
10556         * lib/gl_linkedhash_list.c: Likewise.
10557         * lib/gl_list.c: Likewise.
10558         * lib/gl_oset.c: Likewise.
10559         * lib/gl_rbtree_list.c: Likewise.
10560         * lib/gl_rbtree_oset.c: Likewise.
10561         * lib/gl_rbtreehash_list.c: Likewise.
10562         * lib/imaxabs.c: Likewise.
10563         * lib/imaxdiv.c: Likewise.
10564         * lib/javacomp.c: Likewise.
10565         * lib/javaexec.c: Likewise.
10566         * lib/javaversion.c: Likewise.
10567         * lib/linebreak.c: Likewise.
10568         * lib/localcharset.c: Likewise.
10569         * lib/lock.c: Likewise.
10570         * lib/mbchar.c: Likewise.
10571         * lib/mbswidth.c: Likewise.
10572         * lib/mkdtemp.c: Likewise.
10573         * lib/pipe.c: Likewise.
10574         * lib/printf-args.c: Likewise.
10575         * lib/printf-parse.c: Likewise.
10576         * lib/progname.c: Likewise.
10577         * lib/progreloc.c: Likewise.
10578         * lib/readlink.c: Likewise.
10579         * lib/sh-quote.c: Likewise.
10580         * lib/stpcpy.c: Likewise.
10581         * lib/stpncpy.c: Likewise.
10582         * lib/strcasecmp.c: Likewise.
10583         * lib/strcasestr.c: Likewise.
10584         * lib/strcspn.c: Likewise.
10585         * lib/striconv.c: Likewise.
10586         * lib/strncasecmp.c: Likewise.
10587         * lib/strnlen1.c: Likewise.
10588         * lib/strstr.c: Likewise.
10589         * lib/strtok_r.c: Likewise.
10590         * lib/tls.c: Likewise.
10591         * lib/tmpdir.c: Likewise.
10592         * lib/unicodeio.c: Likewise.
10593         * lib/unsetenv.c: Likewise.
10594         * lib/vasnprintf.c: Likewise.
10595         * lib/vasprintf.c: Likewise.
10596         * lib/wait-process.c: Likewise.
10597         * lib/xallocsa.c: Likewise.
10598         * lib/xsetenv.c: Likewise.
10599         * lib/xstriconv.c: Likewise.
10600
10601 2006-09-13  Simon Josefsson  <jas@extundo.com>
10602
10603         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
10604         that internally, suggested by Ralf Wildenhues
10605         <Ralf.Wildenhues@gmx.de>.
10606
10607 2006-09-13  Simon Josefsson  <jas@extundo.com>
10608
10609         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
10610         @LIBOBJS@.
10611         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10612
10613 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
10614
10615         * lib/_fpending.c: Include <config.h> unconditionally, since we no
10616         longer worry about uses that don't define HAVE_CONFIG_H.
10617         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
10618         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
10619         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
10620         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
10621         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
10622         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
10623         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
10624         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
10625         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
10626         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
10627         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
10628         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
10629         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
10630         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
10631         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
10632         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
10633         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
10634         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
10635         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
10636         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
10637         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
10638         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
10639         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
10640         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
10641         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
10642         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
10643         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
10644         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
10645         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
10646         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
10647         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
10648         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
10649         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
10650         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
10651         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
10652         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
10653         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
10654         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
10655         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
10656         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
10657         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
10658         Likewise.
10659
10660 2006-09-13  Eric Blake  <ebb9@byu.net>
10661
10662         * lib/getopt.c: Fix typo in last commit.
10663
10664 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10665
10666         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
10667         dgettext.
10668
10669 2006-09-12  Jim Meyering  <jim@meyering.net>
10670
10671         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
10672         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
10673         Reported by Nelson H. F. Beebe.
10674
10675 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10676
10677         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
10678         program_invocation_name and program_invocation_short_name are
10679         initialized.
10680         * lib/argp-namefrob.h: Move declarations of program_invocation_name
10681         and program_invocation_short_name to argp.h, so they are visible
10682         to user programs.
10683         * lib/argp.h: Likewise
10684
10685 2006-09-10  Bruno Haible  <bruno@clisp.org>
10686
10687         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10688         m4/inttypes_h.m4, m4/uintmax_t.m4.
10689
10690 2006-09-10  Bruno Haible  <bruno@clisp.org>
10691
10692         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
10693         gl_AC_TYPE_UINTMAX_T.
10694
10695 2006-09-10  Bruno Haible  <bruno@clisp.org>
10696
10697         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
10698
10699 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10700
10701         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
10702         convention.  Text proposed by Bruno Haible.
10703         (struct argp_option): Document the use of N_() wrappers.
10704
10705         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
10706         '\v', and translate the two parts separately, instead of feeding
10707         the whole string to gettext.  This allows to exclude
10708         '\v' from the strings visible to the translator by writing doc
10709         strings as N_("..") "\v" N_("..").
10710
10711 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
10712
10713         * config/srclist.txt: Undo latest change; the bug was fixed.
10714
10715 2006-09-09  Bruno Haible  <bruno@clisp.org>
10716
10717         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
10718         assignments if building a library without libtool.
10719         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
10720         in func_emit_lib_Makefile_am.
10721         (func_import): When building a static library libfoo.a, arrange to
10722         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
10723         (func_create_testdir): Likewise.
10724         * modules/gc (configure.ac, Makefile.am): If building statically,
10725         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
10726         * modules/iconvme (configure.ac, Makefile.am): Likewise.
10727         * modules/striconv (configure.ac, Makefile.am): Likewise.
10728         Based on a suggestion by Ralf Wildenhues.
10729
10730 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10731
10732         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
10733         Check for unistd.h too, since Autoconf doesn't assume POSIX.
10734         Also:
10735
10736         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10737         Add year_2050_test to catch glibc bug 2821
10738         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10739
10740         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10741         Prefer #ifdef to #if.
10742
10743         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
10744         Return from 'main' instead of calling 'exit'.
10745
10746 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10747
10748         * lib/mktime.c (guess_time_tm): Fix bug where mktime
10749         returned the maximum time_t value rather than (time_t) -1.
10750         Problem originally reported by William Bardwell
10751         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10752
10753         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10754         Moved to here ...
10755         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10756         ... from here.
10757
10758 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10759
10760         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
10761         2821 is fixed.
10762
10763 2006-09-08  Jim Meyering  <jim@meyering.net>
10764
10765         Don't make generated files read-only.  That would bother too many
10766         people.  However, do retain the ability to work when targets are
10767         read-only: remove the destination and temporary files before writing
10768         them (when generated via sed or echo), or by using the -f option for
10769         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
10770         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10771         * modules/byteswap, modules/configmake, modules/fcntl:
10772         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10773         * modules/localcharset, modules/netinet_in, modules/poll:
10774         * modules/stdbool, modules/stdint, modules/sys_select:
10775         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10776
10777 2006-09-08  Jim Meyering  <jim@meyering.net>
10778
10779         Avoid new build failure on FreeBSD 6.0.
10780         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
10781         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
10782         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
10783
10784 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10785
10786         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
10787
10788 2006-09-07  Jim Meyering  <jim@meyering.net>
10789
10790         Fix global typo in last change: use chmod u-w, not chmod u-x.
10791         Spotted by Paul Eggert and Bruce Korb.
10792         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10793         * modules/byteswap, modules/configmake, modules/fcntl:
10794         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10795         * modules/localcharset, modules/netinet_in, modules/poll:
10796         * modules/stdbool, modules/stdint, modules/sys_select:
10797         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10798
10799 2006-09-06  Jim Meyering  <jim@meyering.net>
10800
10801         Make generated files be read-only.
10802         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
10803         Ensure that each generated file is now read-only.
10804         * modules/argz: Likewise.
10805         * modules/arpa_inet: Likewise.
10806         * modules/byteswap: Likewise.
10807         * modules/configmake: Likewise.
10808         * modules/fcntl: Likewise.
10809         * modules/fnmatch: Likewise.
10810         * modules/getopt: Likewise.
10811         * modules/glob: Likewise.
10812         * modules/inttypes: Likewise.
10813         * modules/netinet_in: Likewise.
10814         * modules/poll: Likewise.
10815         * modules/stdbool: Likewise.
10816         * modules/stdint: Likewise.
10817         * modules/sys_select: Likewise.
10818         * modules/sys_socket: Likewise.
10819         * modules/sys_stat: Likewise.
10820         * modules/sysexits: Likewise.
10821         * modules/localcharset: Same as above, but continue using temporary
10822         file named "t-$@" (why different?) rather than the "$@-t" used
10823         everywhere else.
10824
10825         * modules/sysexits (Makefile.am): Replace literal occurrences
10826         of "sysexit.h" more readable, and more consistent, "$@".
10827
10828 2006-09-06  Bruno Haible  <bruno@clisp.org>
10829
10830         * modules/striconv: New file.
10831         * modules/xstriconv: New file.
10832         * MODULES.html.sh (Internationalization functions): Add striconv,
10833         xstriconv.
10834
10835 2006-09-06  Bruno Haible  <bruno@clisp.org>
10836
10837         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
10838         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
10839         not using libtool correctly.
10840
10841 2006-09-06  Bruno Haible  <bruno@clisp.org>
10842
10843         * lib/striconv.h: New file.
10844         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
10845         iconvstring.c.
10846         * lib/xstriconv.h: New file.
10847         * lib/xstriconv.c: New file.
10848
10849 2006-09-06  Bruno Haible  <bruno@clisp.org>
10850
10851         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
10852         lib_..._LDFLAGS.
10853
10854 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10855
10856         * lib/argz_.h: Sync from Libtool.
10857
10858         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
10859                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10860
10861         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
10862
10863 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10864
10865         * modules/trim: New file.
10866
10867 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10868
10869         * lib/trim.h: New file.
10870         * lib/trim.c: New file.
10871
10872 2006-09-05  Bruno Haible  <bruno@clisp.org>
10873
10874         * MODULES.html.sh (String handling): Add trim.
10875
10876 2006-09-04  Karl Berry  <karl@gnu.org>
10877
10878         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
10879         until next release.
10880
10881 2006-09-03  Bruno Haible  <bruno@clisp.org>
10882
10883         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
10884         correctly.
10885
10886 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10887
10888         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
10889         not gl_GETLOADAVG.  Omit unneeded semicolons.
10890         Problems reported by Ralf Wildenhues in
10891         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10892         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
10893         at the end, which is the usual gnulib style.
10894
10895         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
10896         of doing all the work ourselves.
10897         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
10898         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
10899
10900 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10901
10902         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
10903         Problem reported by Ralf Wildenhues in
10904         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10905
10906         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
10907         HAVE_STRUCT_STATFS_F_FSTYPENAME.
10908
10909 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10910
10911         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
10912         yesterday's patch by changing test -n to test -z.
10913
10914 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10915
10916         * modules/getloadavg (Files): Add m4/getloadavg.m4.
10917         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
10918         the former is now obsolescent.
10919
10920         * modules/chdir-long (Depends-on): Add fcntl.
10921
10922 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10923
10924         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
10925         obsolescent, and programs should use gnulib instead.
10926         * m4/getloadavg.m4: New file, with contents taken from Autoconf
10927         but with prefixes changed.
10928
10929 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10930
10931         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
10932         or stdbool.h, because they might not exist while configuring.
10933
10934         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
10935         Don't include unistd.h or limits.h; not needed, since chdir-long.h
10936         does that for us.
10937         (O_DIRECTORY): Remove.
10938
10939 2006-08-31  Eric Blake  <ebb9@byu.net>
10940
10941         * gnulib-tool: Don't let emacs change spaces to TAB.
10942
10943 2006-08-31  Bruno Haible  <bruno@clisp.org>
10944
10945         * gnulib-tool: When calling func_import more than once, do it in a
10946         subshell.
10947         Reported by Eric Blake <ebb9@byu.net>.
10948
10949 2006-08-31  Bruno Haible  <bruno@clisp.org>
10950
10951         * gnulib-tool (nl): Remove variable.
10952         (sed_transform_lib_file): Use more robust test for config-h module.
10953         (func_import): Fix typo in 2006-08-25 patch.
10954
10955 2006-08-31  Bruno Haible  <bruno@clisp.org>
10956
10957         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
10958         specified, augment Makefile.am variables instead of assigning them.
10959
10960 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10961
10962         Work around a bug in both the Linux and SunOS 64-bit kernels:
10963         nanosleep mishandles sleeps for longer than 2**31 seconds.
10964         Problem reported by Frank v Waveren in
10965         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10966         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
10967         Check for nanosleep bug.
10968         (LIB_NANOSLEEP): Append clock_gettime library if needed.
10969
10970 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10971
10972         Work around a bug in both the Linux and SunOS 64-bit kernels:
10973         nanosleep mishandles sleeps for longer than 2**31 seconds.
10974         Problem reported by Frank v Waveren in
10975         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10976         * lib/nanosleep.c (BILLION): New constant.
10977         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
10978         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
10979         implementation.
10980
10981 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10982
10983         * modules/nanosleep (Depends-on): Add gettime.
10984
10985 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10986         and Simon Josefsson  <jas@extundo.com>
10987         and Oskar Liljeblad  <oskar@osk.mine.nu>
10988
10989         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
10990         * gnulib-tool (func_import): New license type 'unmodifiable license
10991         text'.
10992         * modules/fdl: Use it.  Longer description.
10993         * module/gpl, module/lgpl: New files.
10994
10995 2006-08-30  Jim Meyering  <jim@meyering.net>
10996
10997         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
10998         shadowing the parameter.
10999
11000 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11001
11002         Sync from Libtool:
11003
11004         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11005
11006         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11007         sharing with gnulib.  Report by Eric Blake.
11008
11009 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11010
11011         * modules/isapipe: New file.
11012         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11013
11014 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11015
11016         * modules/configmake (Makefile.am): Add a comment, and omit
11017         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11018         by Bruno Haible.
11019
11020 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11021
11022         * m4/isapipe.m4: New file.
11023
11024 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11025
11026         * lib/isapipe.c, lib/isapipe.h: New files.
11027
11028 2006-08-29  Jim Meyering  <jim@meyering.net>
11029
11030         * modules/configmake (Makefile.am): Make configmake.h depend on
11031         Makefile.  Otherwise, a stale configmake.h could hang around.
11032
11033 2006-08-29  Eric Blake  <ebb9@byu.net>
11034
11035         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11036         resolution of upstream bug 3044.
11037
11038 2006-08-29  Bruno Haible  <bruno@clisp.org>
11039
11040         * modules/localcharset (Depends-on): Add configmake.
11041         (Makefile.am): Remove setting of LIBDIR through DEFS.
11042
11043 2006-08-29  Bruno Haible  <bruno@clisp.org>
11044
11045         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11046         defined.
11047
11048 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11049
11050         * modules/fcntl: New file.
11051         * modules/chdir-safer (Depends-on): Add fcntl.
11052         * modules/fts: Likewise.
11053         * modules/mkdir-p: Likewise.
11054
11055         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11056         This undoes the most recent change, since we're now addressing the
11057         problem in a different way.
11058
11059         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11060         into output, since the output might be called Makefile.am even
11061         if $makefile_name is something different.
11062         (func_import): Use $makefile_am rather than
11063         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11064         empty.
11065
11066         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11067
11068 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11069
11070         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
11071         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
11072         recent change to stdint.m4, since we're now addressing the problem in a
11073         different way.
11074
11075 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11076
11077         * m4/fcntl_h.m4: New file.
11078
11079 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11080
11081         * lib/fcntl_.h: New file.
11082         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
11083         the fcntl module.
11084         * lib/dirchownmod.c: Likewise.
11085         * lib/fts.c: Likewise.
11086
11087         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
11088         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
11089         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
11090         just before including <inttypes.h>, to avoid circular inclusion.
11091
11092 2006-08-28  Jim Meyering  <jim@meyering.net>
11093
11094         * doc/visibility.texi: Actually read and correct the grammar of the
11095         sentence affected by yesterday's change.
11096
11097 2006-08-28  Eric Blake  <ebb9@byu.net>
11098
11099         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
11100         needs wrapper.
11101
11102 2006-08-28  Eric Blake  <ebb9@byu.net>
11103
11104         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
11105
11106 2006-08-28  Eric Blake  <ebb9@byu.net>
11107
11108         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
11109
11110 2006-08-28  Bruno Haible  <bruno@clisp.org>
11111
11112         * modules/c-strstr: New file, from GNU gettext.
11113         * MODULES.html.sh (String handling): Add c-strstr.
11114
11115 2006-08-28  Bruno Haible  <bruno@clisp.org>
11116
11117         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
11118         macros.
11119         Reported by Eric Blake.
11120
11121 2006-08-28  Bruno Haible  <bruno@clisp.org>
11122
11123         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
11124         (VASNPRINTF): Return a string of length > INT_MAX without failing.
11125         * lib/vasprintf.c: Include errno.h, limits.h.
11126         (EOVERFLOW): New fallback definition.
11127         (vasprintf): Test here whether the string length is > INT_MAX.
11128         * lib/vsnprintf.c: Include errno.h, limits.h.
11129         (EOVERFLOW): New fallback definition.
11130         (vsnprintf): Fix bug when generated string was too long for the buffer.
11131         Test here whether the string length is > INT_MAX.
11132
11133 2006-08-28  Bruno Haible  <bruno@clisp.org>
11134
11135         * lib/inttypes_.h (SCNX*): Remove definitions.
11136         Reported by Eric Blake.
11137
11138 2006-08-28  Bruno Haible  <bruno@clisp.org>
11139
11140         * lib/c-strstr.h: New file, from GNU gettext.
11141         * lib/c-strstr.c: New file, from GNU gettext.
11142
11143 2006-08-28  Bruno Haible  <bruno@clisp.org>
11144
11145         * gnulib-tool: Reorder some statements.
11146
11147 2006-08-28  Bruno Haible  <bruno@clisp.org>
11148
11149         * gnulib-tool: New option --makefile-name.
11150         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
11151         $makefile_name.
11152         (func_import): Write $makefile_name to the cache file, and read it from
11153         there unless explicitly specified. Use $makefile_name as file name
11154         instead of Makefile.am. Adjust the recommendations accordingly.
11155
11156 2006-08-28  Bruno Haible  <bruno@clisp.org>
11157
11158         * gnulib-tool (func_verify_module): Check against misapplying patch.
11159
11160 2006-08-28  Bruno Haible  <bruno@clisp.org>
11161
11162         * gnulib-tool (func_relativize, func_relconcat): New functions.
11163         Give an error if --local-dir is given with --update.
11164         Remove trailing slashes from $local_gnulib_dir.
11165         (func_import): Store the relativized $local_gnulib_dir in
11166         gnulib-cache.m4, and read it from there if not specified explicitly.
11167
11168 2006-08-28  Bruno Haible  <bruno@clisp.org>
11169
11170         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
11171         is the current directory. Respect also $local_gnulib_dir.
11172
11173 2006-08-28  Bruno Haible  <bruno@clisp.org>
11174             Simon Josefsson  <jas@extundo.com>
11175
11176         BeOS portability.
11177         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
11178
11179 2006-08-27  Jim Meyering  <jim@meyering.net>
11180
11181         * doc/visibility.texi: Remove duplicate word: "pointer".
11182
11183 2006-08-26  Bruno Haible  <bruno@clisp.org>
11184
11185         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
11186         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
11187         (Makefile.am): Create inttypes.h from inttypes_.h.
11188         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
11189
11190         * modules/imaxabs: New file.
11191
11192         * modules/imaxdiv: New file.
11193
11194 2006-08-26  Bruno Haible  <bruno@clisp.org>
11195
11196         * m4/inttypes.m4: New file.
11197         * m4/_inttypes_h.m4: Remove file.
11198         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
11199         PRI_MACROS_BROKEN.
11200         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
11201
11202         * m4/imaxabs.m4: New file.
11203
11204         * m4/imaxdiv.m4: New file.
11205
11206 2006-08-26  Bruno Haible  <bruno@clisp.org>
11207
11208         * lib/inttypes_.h: New file.
11209         * lib/inttypes.h: Remove file.
11210         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
11211
11212         * lib/imaxabs.c: New file.
11213
11214         * lib/imaxdiv.c: New file.
11215
11216 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11217
11218         New config-h module, so that "make" output needn't be cluttered
11219         by -DHAVE_CONFIG_H.
11220         * MODULES.html.sh (Support for building libraries and executables):
11221         Add config-h.
11222         * modules/config-h: New file.
11223         * gnulib-tool (nl, sed_transform_lib_file): New vars.
11224         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
11225         the config-h module is used.
11226
11227         New configmake module, so that "make" output needn't be cluttered
11228         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
11229         * MODULES.html.sh (Support for building libraries and executables):
11230         Add configmake.
11231         * modules/configmake: New file.
11232
11233 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11234
11235         * m4/config-h.m4: New file.
11236
11237 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11238
11239         * config/srclist.txt: Add elisp-comp.
11240
11241 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11242
11243         * MODULES.html.sh (Support for building libraries and executables):
11244         Add elisp-comp.
11245         * build-aux/elisp-comp: New file.
11246         * modules/elisp-comp: New file.
11247
11248 2006-08-24  Bruno Haible  <bruno@clisp.org>
11249
11250         * gnulib-tool (func_create_testdir): Use non-default values of
11251         sourcebase and m4base.
11252
11253 2006-08-24  Bruno Haible  <bruno@clisp.org>
11254
11255         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11256         HTML structure.
11257
11258 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11259
11260         * modules/openat (Depends-on): Add lchown.
11261
11262 2006-08-23  Bruno Haible  <bruno@clisp.org>
11263
11264         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11265         of gl_LOCK_EARLY instead of gl_LOCK.
11266
11267 2006-08-23  Bruno Haible  <bruno@clisp.org>
11268
11269         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11270         on OSF/1 to no.
11271         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11272
11273 2006-08-23  Bruno Haible  <bruno@clisp.org>
11274
11275         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11276         as unusable.
11277
11278         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11279         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11280         (gl_LOCK): New macro.
11281
11282 2006-08-22  Simon Josefsson  <jas@extundo.com>
11283
11284         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11285         to md5 module.
11286
11287 2006-08-22  Simon Josefsson  <jas@extundo.com>
11288
11289         * MODULES.html.sh: Add "Support for maintaining and release
11290         projects".
11291
11292         * build-aux/gnupload: New file, from coreutils.
11293
11294 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11295
11296         Avoid the need for AC_LIBSOURCES in m4 macros.
11297         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11298         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11299         * modules/check-version (EXTRA_DIST): Add check-version.h.
11300         * modules/crc (EXTRA_DIST): Add crc.h.
11301         * modules/des (EXTRA_DIST): Add des.h.
11302         * modules/gc (EXTRA_DIST): Add gc.h.
11303         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11304         * modules/getline (EXTRA_DIST): Add getline.h.
11305         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11306         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11307         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11308         * modules/md2 (EXTRA_DIST): Add md2.h.
11309         * modules/md4 (EXTRA_DIST): Add md4.h.
11310         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11311         * modules/read-file (EXTRA_DIST): Add read-file.h.
11312         * modules/readline (EXTRA_DIST): Add readline.h.
11313         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11314         rijndael-api-fst.h.
11315
11316 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11317
11318         * m4/rijndael.m4 (gl_ARCFOUR):
11319         * m4/arctwo.m4 (gl_ARCTWO):
11320         * m4/check-version.m4 (gl_CHECK_VERSION):
11321         * m4/crc.m4 (gl_CRC):
11322         * m4/des.m4 (gl_DES):
11323         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11324         * m4/gc.m4 (gl_GC):
11325         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11326         * m4/getline.m4 (gl_FUNC_GETLINE):
11327         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11328         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11329         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11330         * m4/md2.m4 (gl_MD2):
11331         * m4/md4.m4 (gl_MD4):
11332         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11333         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11334         * m4/readline.m4 (gl_FUNC_READLINE):
11335         * m4/rijndael.m4 (gl_RIJNDAEL):
11336         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11337         to get the necessary .h files and whatnot.
11338
11339 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11340
11341         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11342         gnulib rather than the other way around.
11343         * config/srclistvars.sh (COREUTILS): Remove.
11344
11345 2006-08-22  Jim Meyering  <jim@meyering.net>
11346
11347         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11348
11349         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11350
11351 2006-08-22  Eric Blake  <ebb9@byu.net>
11352
11353         * modules/regexprops-generic: New file.
11354         * MODULES.html.sh (Support for building documentation): List it.
11355
11356 2006-08-22  Eric Blake  <ebb9@byu.net>
11357
11358         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11359         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11360         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11361         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11362
11363 2006-08-22  Bruno Haible  <bruno@clisp.org>
11364
11365         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11366         and lib_LTLIBRARIES like the other lib_* variables.
11367
11368 2006-08-22  Bruno Haible  <bruno@clisp.org>
11369
11370         * build-aux/x-to-1.in: New file, from GNU gettext.
11371
11372 2006-08-22  Bruno Haible  <bruno@clisp.org>
11373
11374         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11375         <utmpx.h> exists.
11376
11377 2006-08-22  Bruno Haible  <bruno@clisp.org>
11378
11379         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11380         <utmpx.h> exists.
11381
11382 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         BeOS portability.
11385         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11386         exist.
11387         Problem reported by Bruno Haible.
11388
11389 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11390
11391         Avoid the need for AC_LIBSOURCES in m4 macros.
11392         * modules/acl (EXTRA_DIST): Add acl.h.
11393         * modules/argmatch (Files): Add m4/argmatch.m4.
11394         (configure.ac): Add gl_ARGMATCH.
11395         (EXTRA_DIST): Renamed from lib_SOURCES, for
11396         consistency with the other modules.  Remove argmatch.c.
11397         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11398         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11399         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11400         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11401         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11402         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11403         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11404         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11405         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11406         * modules/closeout (EXTRA_DIST): Add closeout.h.
11407         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11408         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11409         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11410         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11411         dirname.h; remove basename.c and stripslash.c.
11412         * modules/exclude (EXTRA_DIST): Add exclude.h.
11413         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11414         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11415         * modules/file-type (EXTRA_DIST): Add file-type.h.
11416         * modules/filemode (EXTRA_DIST): Add filemode.h.
11417         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11418         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11419         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11420         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11421         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11422         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11423         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11424         * modules/getdate (EXTRA_DIST): Add getdate.c.
11425         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11426         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11427         * modules/getpass (EXTRA_DIST): Add getpass.h.
11428         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11429         * modules/group-member (EXTRA_DIST): Add group-member.h.
11430         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11431         * modules/hash (EXTRA_DIST): Add hash.h.
11432         * modules/human (EXTRA_DIST): Add human.h.
11433         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11434         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11435         * modules/lchown (EXTRA_DIST): Add lchown.h.
11436         * modules/long-options (EXTRA_DIST): Add long-options.h.
11437         * modules/lstat (EXTRA_DIST): Add lstat.h.
11438         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11439         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11440         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11441         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11442         * modules/memxor (EXTRA_DIST): Add memxor.h.
11443         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11444         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11445         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11446         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11447         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11448         * modules/physmem (EXTRA_DIST): Add physmem.h.
11449         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11450         * modules/posixver (EXTRA_DIST): Add posixver.h.
11451         * modules/quote (EXTRA_DIST): Add quote.h.
11452         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11453         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11454         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11455         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11456         regex_internal.h regexec.c.
11457         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11458         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11459         * modules/same (EXTRA_DIST): Add same.h.
11460         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11461         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11462         * modules/savedir (EXTRA_DIST): Add savedir.h.
11463         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11464         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11465         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11466         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11467         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11468         * modules/strdup (EXTRA_DIST): Add strdup.h.
11469         * modules/strftime (EXTRA_DIST): Add strftime.h.
11470         * modules/strndup (EXTRA_DIST): Add strndup.h.
11471         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11472         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11473         * modules/time_r (EXTRA_DIST): Add time_r.h.
11474         * modules/timespec (EXTRA_DIST): Add timespec.h.
11475         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11476         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11477         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11478         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11479         * modules/userspec (EXTRA_DIST): Add userspec.h.
11480         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11481         * modules/utimens (EXTRA_DIST): Add utimens.h.
11482         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11483         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11484         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11485         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11486         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11487         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11488         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11489         * modules/yesno (EXTRA_DIST): Add yesno.h.
11490
11491 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11492
11493         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11494
11495         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11496         * m4/dev-ino.m4, same-inode.m4: Remove.
11497
11498         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11499         * m4/acl.m4 (AC_FUNC_ACL):
11500         * m4/backupfile.m4 (gl_BACKUPFILE):
11501         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11502         * m4/canon-host.m4 (gl_CANON_HOST):
11503         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11504         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11505         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11506         * m4/cloexec.m4 (gl_CLOEXEC):
11507         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11508         * m4/closeout.m4 (gl_CLOSEOUT):
11509         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11510         * m4/dirname.m4 (gl_DIRNAME):
11511         * m4/exclude.m4 (gl_EXCLUDE):
11512         * m4/exitfail.m4 (gl_EXITFAIL):
11513         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11514         * m4/file-type.m4 (gl_FILE_TYPE):
11515         * m4/filemode.m4 (gl_FILEMODE):
11516         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11517         * m4/fpending.m4 (gl_FUNC_FPENDING):
11518         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11519         * m4/fts.m4 (gl_FUNC_FTS):
11520         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11521         * m4/getdate.m4 (gl_GETDATE):
11522         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11523         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11524         * m4/getpass.m4 (gl_FUNC_GETPASS):
11525         * m4/gettime.m4 (gl_GETTIME):
11526         * m4/getugroups.m4 (gl_GETUGROUPS):
11527         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11528         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11529         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11530         * m4/hash.m4 (gl_HASH):
11531         * m4/idcache.m4 (gl_IDCACHE):
11532         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
11533         * m4/lchown.m4 (gl_FUNC_LCHOWN):
11534         * m4/long-options.m4 (gl_LONG_OPTIONS):
11535         * m4/lstat.m4 (gl_FUNC_LSTAT):
11536         * m4/md5.m4 (gl_MD5):
11537         * m4/memcasecmp.m4 (gl_MEMCASECMP):
11538         * m4/memcoll.m4 (gl_MEMCOLL):
11539         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
11540         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
11541         * m4/memxor.m4 (gl_MEMXOR):
11542         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
11543         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
11544         * m4/modechange.m4 (gl_MODECHANGE):
11545         * m4/mountlist.m4 (gl_MOUNTLIST):
11546         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
11547         * m4/openat.m4 (gl_FUNC_OPENAT):
11548         * m4/pathmax.m4 (gl_PATHMAX):
11549         * m4/physmem.m4 (gl_PHYSMEM):
11550         * m4/posixtm.m4 (gl_POSIXTM):
11551         * m4/posixver.m4 (gl_POSIXVER):
11552         * m4/quote.m4 (gl_QUOTE):
11553         * m4/quotearg.m4 (gl_QUOTEARG):
11554         * m4/readtokens.m4 (gl_READTOKENS):
11555         * m4/readutmp.m4 (gl_READUTMP):
11556         * m4/regex.m4 (gl_REGEX):
11557         * m4/safe-read.m4 (gl_SAFE_READ):
11558         * m4/safe-write.m4 (gl_SAFE_WRITE):
11559         * m4/same.m4 (gl_SAME):
11560         * m4/save-cwd.m4 (gl_SAVE_CWD):
11561         * m4/savedir.m4 (gl_SAVEDIR):
11562         * m4/settime.m4 (gl_SETTIME):
11563         * m4/sha1.m4 (gl_SHA1):
11564         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
11565         * m4/stat-macros.m4 (gl_STAT_MACROS):
11566         * m4/stat-time.m4 (gl_STAT_TIME):
11567         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
11568         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
11569         * m4/strdup.m4 (gl_FUNC_STRDUP):
11570         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
11571         * m4/strndup.m4 (gl_FUNC_STRNDUP):
11572         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
11573         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
11574         * m4/time_r.m4 (gl_TIME_R):
11575         * m4/timespec.m4 (gl_TIMESPEC):
11576         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
11577         * m4/unlinkdir.m4 (gl_UNLINKDIR):
11578         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
11579         * m4/userspec.m4 (gl_USERSPEC):
11580         * m4/utimecmp.m4 (gl_UTIMECMP):
11581         * m4/utimens.m4 (gl_UTIMENS):
11582         * m4/xalloc.m4 (gl_XALLOC):
11583         * m4/xgetcwd.m4 (gl_XGETCWD):
11584         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
11585         * m4/xreadlink.m4 (gl_XREADLINK):
11586         * m4/xstrtod.m4 (gl_XSTRTOD):
11587         * m4/yesno.m4 (gl_YESNO):
11588         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11589         to get the necessary .h files and whatnot.
11590
11591 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
11592             Bruno Haible  <bruno@clisp.org>
11593
11594         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
11595         /bin/sh understanding of '!' conditional negation.
11596
11597 2006-08-21  Jim Meyering  <jim@meyering.net>
11598
11599         * modules/openat (Depends-on): Really alphabetize.
11600
11601         * modules/acl (Depends-on): Add error and quote.
11602
11603         * check-module (find_included_lib_files): Add at-func.c to the
11604         ok-to-include-more-than-once white list.
11605
11606         * modules/openat (Depends-on): Add lstat.  Alphabetize.
11607
11608 2006-08-21  Bruno Haible  <bruno@clisp.org>
11609
11610         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11611         Emit a pkgdata_DATA variable only if some snippets add contents to it.
11612         Reported by Martin Lambers <marlam@marlam.de>.
11613
11614 2006-08-21  Bruno Haible  <bruno@clisp.org>
11615
11616         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
11617         specify an installation location, don't emit a noinst_LIBRARIES or
11618         noinst_LTLIBRARIES assignment.
11619
11620 2006-08-21  Bruno Haible  <bruno@clisp.org>
11621
11622         BeOS portability.
11623         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
11624         BeOS has mbrtowc() but no <wctype.h>.
11625
11626 2006-08-21  Bruno Haible  <bruno@clisp.org>
11627
11628         BeOS portability.
11629         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
11630         exist.
11631
11632 2006-08-21  Bruno Haible  <bruno@clisp.org>
11633
11634         BeOS portability.
11635         * lib/mbchar.h: Include <wctype.h> only if it exists.
11636
11637 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11638
11639         Remove files that are no longer needed by their respective modules.
11640         * m4/obstack.m4: Remove.
11641         * m4/strerror_r.m4: Remove.
11642         * m4/uint32_t.m4: Remove.
11643         * m4/uintptr_t.m4: Remove.
11644         * m4/ullong_max.m4: Remove.
11645         * m4/xstrtoimax.m4: Remove.
11646         * m4/xstrtoumax.m4: Remove.
11647
11648         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
11649         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
11650         dependencies now capture this.
11651
11652         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
11653         Do not use AC_LIBSOURCES, since gnulib modules now do this.
11654         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
11655         * m4/human.m4 (gl_HUMAN): Likewise.
11656         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
11657         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
11658
11659         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
11660
11661         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
11662         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
11663         stdint.
11664         * m4/human.m4 (gl_HUMAN): Likewise.
11665         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
11666         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
11667         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11668         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11669         * m4/xstrtol (gl_XSTRTOL): Likewise.
11670
11671         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
11672         AC_TYPE_LONG_LONG_INT.
11673         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11674         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
11675         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
11676         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11677
11678         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
11679         on stdbool.
11680
11681         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
11682         (gl_PREREQ_XSTRTOUL): Remove.
11683
11684         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
11685
11686         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
11687         mode.
11688
11689 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11690
11691         Add and change modules to make it easier for coreutils to use
11692         gnulib-tool.
11693         * modules/backupfile (Files): Remove m4/d-ino.m4.
11694         (Depends-on): Add d-ino.
11695         * modules/cycle-check (Depends-on): Add stdint.
11696         (lib_SOURCES): Add cycle-check.h.
11697         * modules/d-ino: New module.
11698         * modules/d-type: New module.
11699         * modules/error (Files): Remove m4/strerror_r.m4.
11700         * modules/filemode (Files): Add m4/st_dm_mode.m4.
11701         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11702         m4/inttypes_h.m4, m4/uintmax_t.m4.
11703         (Depends-on): Add stdint.
11704         (lib_SOURCES): Add fsusage.h.
11705         * modules/getcwd (Files): Remove d-ino.m4.
11706         (Depends-on): Add d-ino.
11707         * modules/getndelim2 (Depends-on): Add stdint.
11708         * modules/glob (Files): Remove m4/d-type.m4.
11709         (Depends-on): Add d-type.
11710         * modules/host-os: New module.
11711         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
11712         m4/inttypes_h.m4, m4/uintmax_t.m4.
11713         * Depends-on: Add stdint.
11714         (lib_SOURCES): Add human.h.
11715         * modules/inttostr (Files): Remove m4/intmax_t.m4,
11716         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
11717         m4/uintmax_t.m4, m4/ulonglong.m4.
11718         (Depends-on): Add stdint.
11719         (EXTRA_DIST): Add inttostr.h.
11720         * modules/lchmod: New module.
11721         * modules/link-follow: New module.
11722         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
11723         (Depends-on): Add lchmod.
11724         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
11725         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
11726         (Depends-on): Add stdint.
11727         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
11728         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
11729         (Depends-on): Add stdint.
11730         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
11731         * modules/perl: New module.
11732         * modules/regex (Depends-on): Add stdint.
11733         * modules/rmdir-errno: New module.
11734         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11735         m4/intmax_t.m4.
11736         (Depends-on): Add stdint.
11737         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11738         m4/uintmax_t.m4.
11739         (Depends-on): Add stdint.
11740         * modules/unlink-busy: New module.
11741         * modules/utimecmp (Depends-on): Add stdint.
11742         * modules/uptime: New module.
11743         * modules/winsz-ioctl: New module.
11744         * modules/winsz-termios: New module.
11745         * modules/xnanosleep (Depends-on): Add nanosleep.
11746         * modules/ullong_max: Remove.
11747         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
11748         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
11749         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
11750         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
11751         (Depends-on): Add inttypes.
11752         (lib_SOURCES): Add xstrtol.h.
11753         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
11754         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
11755         * MODULES.html.sh: Move 'assert' into the assert section.
11756         Move 'dummy' into the linking section.
11757         Remove ullong_max.
11758         Add section for compatibility checks for POSIX:2001 functions,
11759         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
11760         winsz-ioctl, and winsz-termios into it.
11761         Add lchmod.
11762         Add top-level Misc section and put host-os, perl, and uptime
11763         into it.
11764
11765 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11766
11767         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
11768         now assume the stdint module.  Do not include inttypes.h.
11769         * lib/fsusage.h: Likewise.
11770         * lib/getndelim2.c: Likewise.
11771         * lib/human.h: Likewise.
11772         * lib/inttostr.h: Likewise.
11773         * lib/obstack.c: Likewise.
11774         * lib/regex_internal.h: Likewise.
11775         * lib/tempname.c: Likewise.
11776         * lib/utimecmp.c: Likewise.
11777         * lib/xstrtol.h: Likewise.
11778
11779         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
11780
11781         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
11782         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
11783         * lib/xtime.h: Likewise.
11784
11785 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11786
11787         * modules/openat (Files): Add lib/fchmodat.c.
11788         Fixes problem reported by Jay Youngman.
11789
11790 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11791
11792         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
11793         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
11794
11795 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
11796             Bruno Haible  <bruno@clisp.org>
11797
11798         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
11799         and is a script that invokes bison. Tighten the code. Add comments.
11800
11801 2006-08-18  Jim Meyering  <jim@meyering.net>
11802
11803         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
11804         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
11805         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
11806         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
11807
11808 2006-08-18  Bruno Haible  <bruno@clisp.org>
11809
11810         * modules/bison-i18n: New file.
11811         * MODULES.html.sh (Internationalization functions): Add it.
11812
11813 2006-08-18  Bruno Haible  <bruno@clisp.org>
11814
11815         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
11816         sys/statvfs.h. When getmntinfo was found, check its declaration and
11817         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
11818
11819 2006-08-18  Bruno Haible  <bruno@clisp.org>
11820
11821         * m4/bison-i18n.m4: New file, from bison.
11822
11823 2006-08-18  Bruno Haible  <bruno@clisp.org>
11824
11825         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
11826         (ME_DUMMY): Treat "kernfs" as a dummy.
11827         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
11828
11829 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11830
11831         Update from coreutils.
11832
11833         2006-08-15  Jim Meyering  <jim@meyering.net>
11834
11835         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
11836
11837         2006-01-17  Jim Meyering  <jim@meyering.net>
11838
11839         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
11840
11841         2006-01-11  Jim Meyering  <jim@meyering.net>
11842
11843         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
11844         Check for the lchmod function.
11845
11846 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11847
11848         Update from coreutils.
11849
11850         * lib/__fpending.h: Add copyright notice.
11851         * lib/fprintftime.h: Likewise.
11852         * lib/savedir.c: Use (C) in copyright notice.
11853         * lib/savedir.h: Likewise.
11854
11855         2006-08-15  Jim Meyering  <jim@meyering.net>
11856
11857         * lib/at-func.c: New file, with the logic of all emulated at-functions.
11858         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
11859         in support of the EXPECTED_ERRNO macro.
11860         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
11861         definitions.  Instead, define the appropriate symbols and include
11862         "at-func.c".
11863         * lib/mkdirat.c (mkdirat): Likewise.
11864         * lib/fchmodat.c (fchmodat): Likewise.
11865         (ENOSYS): Remove definition.
11866         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
11867         it.  Don't include "unistd--.h" -- it wasn't ever used.
11868
11869         2006-01-17  Jim Meyering  <jim@meyering.net>
11870
11871         Rewrite fts.c not to change the current working directory,
11872         by using openat, fstatat, fdopendir, etc..
11873
11874         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
11875         (HAVE_OPENAT_SUPPORT): Define.
11876         [_LIBC] (fchdir): Don't undef or define; no longer used.
11877         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
11878         Now, this `function' always succeeds, and consumes its file descriptor
11879         parameter -- so callers must not close such FDs.  Update callers.
11880         (diropen_fd, opendirat, cwd_advance_fd): New functions.
11881         (diropen): Add parameter, SP.  Adjust all callers.
11882         Implement using diropen_fd, rather than open.
11883         (fts_open): Initialize new member, fts_cwd_fd.
11884         Remove fts_rft-setting code.
11885         (fts_close): Close fts_cwd_fd, if necessary.
11886         (__opendir2): Define in terms of opendir or opendirat,
11887         depending on whether the FST_NOCHDIR flag is set.
11888         (fts_build): Since fts_safe_changedir consumes its FD, and since
11889         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
11890         and close the dup'd file descriptor upon failure.
11891         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
11892         (fts_safe_changedir): Tweak semantics to reflect that this function
11893         now calls cwd_advance_fd and hence consumes its FD argument.
11894         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
11895         [struct FTS] (fts_rft): Remove now-unused member.
11896         [struct FTS] (fts_cycle.state): Improve comment.
11897
11898         * lib/openat.c (openat_needs_fchdir): New function.
11899         * lib/openat.h (openat_needs_fchdir): Declare it.
11900
11901 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11902
11903         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
11904         Problem and fix reported by Pádraig Brady in
11905         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
11906
11907 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11908
11909         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
11910
11911 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11912
11913         * lib/memcoll.c (memcoll): Optimize for the common case where the
11914         arguments are bytewise equal.
11915
11916 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11917
11918         * doc/regexprops-generic.texi: Add a copyright notice.
11919
11920 2006-08-15  Bruno Haible  <bruno@clisp.org>
11921
11922         * modules/tmpdir (License): Change to LGPL.
11923
11924 2006-08-15  Bruno Haible  <bruno@clisp.org>
11925
11926         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
11927         module.
11928
11929 2006-08-14  Simon Josefsson  <jas@extundo.com>
11930
11931         * config/srclist.txt: Add gnupload.
11932
11933 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11934
11935         Change copyright notice from LGPL 2 to GPL 2, since that's the
11936         standard form used in the gnulib repository.
11937         * tests/test-lock.c: Likewise.
11938         * tests/test-stdint.c: Likewise.
11939         * tests/test-tls.c: Likewise.
11940
11941         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
11942         prelude-manager.  User shorter URLs for GNU projects, without '?'.
11943         Add copyright notice.
11944
11945         * check-module: Add copyright notice.  Output a copyright
11946         notice if "--version" is specified.
11947         * modules/COPYING: New file.
11948         * tests/test-getaddrinfo.c: Add copyright notice.
11949         * tests/test-verify.c: Likewise.
11950
11951 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11952
11953         Change copyright notice from LGPL 2 to GPL 2, since that's the
11954         standard form used in the gnulib repository.
11955         * lib/lock.c: LGPL -> GPL.
11956         * lib/lock.h: Likewise.
11957         * lib/strnlen1.c: Likewise.
11958         * lib/strnlen1.h: Likewise.
11959         * lib/tls.c: Likewise.
11960         * lib/tls.h: Likewise.
11961         * lib/tmpdir.c: Likewise.
11962
11963         * lib/TODO: Remove; this belongs only in coreutils.
11964
11965 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11966
11967         Add copyright notices to long-enough files that lack them, since
11968         otherwise the files aren't clearly free.  Use the same notice that
11969         getdate.texi already uses.
11970         * doc/alloca-opt.texi: Add copyright notice.
11971         * doc/alloca.texi: Likewise.
11972         * doc/ctime.texi: Likewise.
11973         * doc/functions.texi: Likewise.
11974         * doc/gcd.texi: Likewise.
11975         * doc/gnulib-tool.texi: Likewise.
11976         * doc/inet_ntoa.texi: Likewise.
11977         * doc/visibility.texi: Likewise.
11978
11979         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
11980         * doc/quote.texi: Add copyright notice.
11981
11982         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
11983         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
11984         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
11985         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
11986         is now obsolete, and give a pointer to the Sun list.
11987         Add copyright notice.
11988
11989 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11990
11991         * config/srclistvars.sh: Add copyright notice.
11992
11993 2006-08-14  Eric Blake  <ebb9@byu.net>
11994
11995         Import the following change from libc:
11996
11997         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
11998
11999         Upstream bug 2997.
12000         * lib/misc/error.c: Add space between program name and message if file
12001         name is missing.
12002
12003 2006-08-12  Karl Berry  <karl@gnu.org>
12004
12005         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12006         remove, these originate in gnulib now.
12007
12008 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12009
12010         * doc/Makefile (standards.info standards.html standards.dvi):
12011         Also depend on make-stds.texi.
12012
12013 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12014
12015         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12016         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12017
12018         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12019         in wchar_t.  Problem reported by Eric Blake.
12020
12021         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12022         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12023         Also, help the compiler to keep LEN in a register.
12024
12025 2006-08-11  Eric Blake  <ebb9@byu.net>
12026
12027         * users.txt: Sort.  Add tar.
12028
12029 2006-08-11  Bruno Haible  <bruno@clisp.org>
12030
12031         * users.txt: New file.
12032
12033 2006-08-11  Bruno Haible  <bruno@clisp.org>
12034
12035         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12036         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12037
12038 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12039
12040         * modules/snprintf (Depends-on): Remove minmax.
12041         (Maintainer): Add self and Bruno.
12042
12043 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12044
12045         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12046         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12047         (EOVERFLOW): Define if the system does not.
12048         Do not include "minmax.h"; it wasn't used.
12049         (snprintf): Don't assume size_t promotes to an unsigned type.
12050         Fix bug when generated string was too long for the buffer: the
12051         buffer's contents are supposed to be the initial prefix of the
12052         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12053         exceeds INT_MAX; do the check ourselves.
12054
12055         Import the following changes from libc:
12056
12057         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12058
12059         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12060         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12061         set wc to the byte which couldn't be converted.
12062         (re_string_reconstruct): Don't clear valid_raw_len before calling
12063         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12064         tip_context using re_string_context_at.
12065
12066         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12067
12068         * lib/posix/regex.h: g++ still cannot handled [restrict].
12069
12070         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
12071
12072         * lib/posix/regex.h: Remove special handling for VMS.
12073
12074 2006-08-10  Jim Meyering  <jim@meyering.net>
12075
12076         * modules/same-inode: New module.
12077         * modules/dev-ino: New module.
12078         * modules/cycle-check: Depend on these modules, rather than simply
12079         including their .h files.
12080         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
12081         required via m4/cycle-check.m4.
12082         * modules/same: Depend on new same-inode module, rather than
12083         including same-inode.h.
12084         * modules/chdir-safer: New file.
12085
12086         * modules/chown (Depends-on): Add stat-macros.
12087
12088 2006-08-10  Jim Meyering  <jim@meyering.net>
12089
12090         * m4/cycle-check.m4: New file.
12091         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
12092         * m4/dev-ino.m4, m4/same-inode.m4: New files.
12093
12094 2006-08-10  Eric Blake  <ebb9@byu.net>
12095
12096         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
12097         in from original proposal.
12098
12099 2006-08-10  Eric Blake  <ebb9@byu.net>
12100         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12101
12102         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
12103         namespace.
12104
12105 2006-08-10  Bruno Haible  <bruno@clisp.org>
12106
12107         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
12108         as well.
12109
12110 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12111
12112         Sync from coreutils.
12113
12114         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
12115
12116         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
12117         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
12118
12119 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12120
12121         * modules/restrict: Remove; no longer needed now that we assume
12122         Autoconf 2.59 or later.
12123         * MODULES.html.sh: Remove 'restrict'.
12124         * modules/argp (Depends-on): Remove 'restrict'.
12125         * modules/base64 (Depends-on): Likewise.
12126         * modules/gc (Depends-on): Likewise.
12127         * modules/getaddrinfo (Depends-on): Likewise.
12128         * modules/glob (Depends-on): Likewise.
12129         * modules/inet_ntop (Depends-on): Likewise.
12130         * modules/inet_pton (Depends-on): Likewise.
12131         * modules/memxor (Depends-on): Likewise.
12132         * modules/regex (Depends-on): Likewise.
12133         * modules/strtok_r (Depends-on): Likewise.
12134         * modules/time_r (Depends-on): Likewise.
12135
12136 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12137
12138         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
12139         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
12140         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12141         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
12142         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
12143         * m4/memxor.m4 (gl_MEMXOR): Likewise.
12144         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
12145         gl_C_RESTRICT replaced by AC_C_RESTRICT.
12146
12147         Merge from coreutils.
12148         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
12149         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
12150         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
12151         * m4/time_r.m4 (gl_TIME_R): Likewise.
12152
12153 2006-08-09  Karl Berry  <karl@gnu.org>
12154
12155         * config/srclist.txt: no more gettext-tools, per Bruno.
12156
12157 2006-08-08  Eric Blake  <ebb9@byu.net>
12158
12159         * modules/verror: New module.
12160         * MODULES.html.sh: Document it.
12161
12162 2006-08-08  Eric Blake  <ebb9@byu.net>
12163
12164         * lib/verror.h, lib/verror.c: New files.
12165
12166 2006-08-08  Eric Blake  <ebb9@byu.net>
12167
12168         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
12169         verror_at_line output complies with GNU Coding Standards even when
12170         file is NULL.
12171
12172 2006-08-07  Bruno Haible  <bruno@clisp.org>
12173
12174         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
12175         versions of AIX.
12176         Reported by Ralf Wildenhues.
12177
12178 2006-08-07  Bruno Haible  <bruno@clisp.org>
12179
12180         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
12181         in an AC_DEFUN. Needed so that the autoconf snippets can use
12182         AC_REQUIRE.
12183
12184 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12185
12186         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12187         Initialize pkgdata_DATA.
12188         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
12189         overriding it.
12190
12191 2006-08-06  Eric Blake  <ebb9@byu.net>
12192
12193         * lib/error.h: Fold in some upstream changes from glibc.
12194         * lib/error.c: Likewise.
12195
12196 2006-08-04  Bruno Haible  <bruno@clisp.org>
12197
12198         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12199         Make the mostlyclean-local rule depend on mostlyclean-generic.
12200         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
12201
12202 2006-07-31  Bruno Haible  <bruno@clisp.org>
12203
12204         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
12205         <stdlib.h>, <string.h>.
12206
12207 2006-07-30  Bruno Haible  <bruno@clisp.org>
12208
12209         * modules/readlink (License): Change to LGPL.
12210
12211 2006-07-30  Bruno Haible  <bruno@clisp.org>
12212
12213         * modules/javaversion (Makefile.am): Distribute javaversion.java and
12214         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
12215         set PKGDATADIR to point to it.
12216
12217 2006-07-30  Bruno Haible  <bruno@clisp.org>
12218
12219         * modules/csharpexec (configure.ac): Comment out macro invocation.
12220         * modules/javaexec (configure.ac): Likewise.
12221         * modules/javacomp-script (configure.ac): Likewise.
12222
12223         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
12224
12225 2006-07-30  Bruno Haible  <bruno@clisp.org>
12226
12227         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
12228         linked-list.
12229
12230 2006-07-30  Bruno Haible  <bruno@clisp.org>
12231
12232         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
12233
12234 2006-07-30  Bruno Haible  <bruno@clisp.org>
12235
12236         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12237         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
12238         get removed.
12239
12240 2006-07-29  Bruno Haible  <bruno@clisp.org>
12241
12242         Make it possible for gnulib-tool to work with locally modified or
12243         augmented gnulib repositories.
12244         * gnulib-tool (func_usage): Document --local-dir option.
12245         (local_gnulib_dir): New variable.
12246         Handle --local-dir option.
12247         (func_lookup_file): New function.
12248         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12249         (func_get_description, func_get_filelist, func_get_description,
12250         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12251         func_get_automake_snippet, func_get_include_directive,
12252         func_get_license, func_get_maintainer): Use func_lookup_file.
12253         (func_import, func_create_testdir): Use func_lookup_file.
12254
12255 2006-07-29  Bruno Haible  <bruno@clisp.org>
12256
12257         * modules/setenv (Depends-on): Add unistd.
12258
12259 2006-07-29  Bruno Haible  <bruno@clisp.org>
12260
12261         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12262
12263 2006-07-29  Bruno Haible  <bruno@clisp.org>
12264
12265         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12266
12267 2006-07-29  Bruno Haible  <bruno@clisp.org>
12268
12269         * gnulib-tool (import, update): If there is no Makefile.am, look at
12270         aclocal.m4, instead of bailing out.
12271
12272 2006-07-29  Bruno Haible  <bruno@clisp.org>
12273
12274         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12275         Categorize the options by when they are useful.
12276
12277 2006-07-29  Bruno Haible  <bruno@clisp.org>
12278
12279         * gnulib-tool (func_usage): Document option --no-libtool.
12280         Handle option --no-libtool.
12281         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12282         for changed semantics of $libtool variable.
12283         (func_import): Likewise. If libtool is not used, show this through
12284         an option --no-libtool.
12285         (func_create_testdir): Update.
12286
12287 2006-07-29  Bruno Haible  <bruno@clisp.org>
12288
12289         * gnulib-tool (func_import): Extend error message about missing
12290         --doc-base.
12291
12292 2006-07-29  Bruno Haible  <bruno@clisp.org>
12293
12294         * gnulib-tool (func_import): Don't create the $docbase directory if
12295         there is no file to store there.
12296
12297 2006-07-29  Bruno Haible  <bruno@clisp.org>
12298
12299         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12300         relevant, look for configure.ac there, not in the current directory.
12301         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12302
12303 2006-07-29  Bruno Haible  <bruno@clisp.org>
12304
12305         * gnulib-tool (SORT): New variable.
12306         (func_usage): Undocument --assume-autoconf option.
12307         Remove --assume-autoconf option handling.
12308         (autoconf_minversion): Determine from the contents of configure.ac.
12309         (func_import): Remove autoconf_minversion handling.
12310         Suggested by Eric Blake.
12311
12312 2006-07-29  Bruno Haible  <bruno@clisp.org>
12313
12314         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12315
12316 2006-07-29  Bruno Haible  <bruno@clisp.org>
12317
12318         * config/srclist.txt (*setenv.[ch]): Remove rules.
12319
12320 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12321
12322         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12323
12324 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12325
12326         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12327         arpa/inet.h.
12328
12329 2006-07-28  Simon Josefsson  <jas@extundo.com>
12330
12331         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12332         * modules/inet_pton (Depends-on): Likewise.
12333
12334 2006-07-28  Simon Josefsson  <jas@extundo.com>
12335
12336         * m4/netinet_in_h.m4: New file.
12337
12338 2006-07-28  Simon Josefsson  <jas@extundo.com>
12339
12340         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12341         #include's.
12342
12343 2006-07-28  Simon Josefsson  <jas@extundo.com>
12344
12345         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12346         #include's.
12347
12348 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12349
12350         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12351         setgid on directories only if they set these bits.
12352         * lib/modechange.h: Remove obsolete comment about masks.
12353
12354 2006-07-28  Eric Blake  <ebb9@byu.net>
12355
12356         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12357         macro expansion.
12358
12359 2006-07-28  Bruno Haible  <bruno@clisp.org>
12360
12361         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12362
12363 2006-07-28  Bruno Haible  <bruno@clisp.org>
12364
12365         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12366
12367 2006-07-28  Bruno Haible  <bruno@clisp.org>
12368
12369         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12370         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12371         Define fallbacks.
12372         Avoids link error on FreeBSD 4.x.
12373         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12374
12375         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12376         encoding.
12377         * lib/mbswidth.c (iswcntrl): Likewise.
12378
12379 2006-07-27  Bruno Haible  <bruno@clisp.org>
12380
12381         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12382         test.
12383
12384 2006-07-27  Bruno Haible  <bruno@clisp.org>
12385
12386         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12387         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12388         defined.
12389
12390 2006-07-26  Eric Blake  <ebb9@byu.net>
12391
12392         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12393
12394 2006-07-26  Eric Blake  <ebb9@byu.net>
12395
12396         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12397         like mingw that lack mkstemp.
12398         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12399         avoid compilation warning on mingw.
12400
12401 2006-07-26  Bruno Haible  <bruno@clisp.org>
12402
12403         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12404         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12405         INT_FAST*_MIN, INTPTR_MIN.
12406
12407 2006-07-25  Bruno Haible  <bruno@clisp.org>
12408
12409         * modules/version-etc (Depends-on): Add stdarg.
12410
12411 2006-07-25  Bruno Haible  <bruno@clisp.org>
12412
12413         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12414         complex commands.
12415
12416 2006-07-25  Bruno Haible  <bruno@clisp.org>
12417
12418         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12419         defined in <stdarg.h> or config.h.
12420
12421 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12422
12423         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12424         (gl_STDIO_SAFER): Remove.
12425
12426 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12427
12428         * MODULES.html.sh (File stream based Input/Output):
12429         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12430         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12431         * modules/fopen-safer, modules/tmpfile-safer: New files.
12432         * modules/stdio-safer: Remove.
12433
12434 2006-07-24  Bruno Haible  <bruno@clisp.org>
12435
12436         * modules/tmpdir: New file.
12437         * MODULES.html.sh (File system functions): Add it.
12438
12439 2006-07-24  Bruno Haible  <bruno@clisp.org>
12440
12441         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12442         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12443
12444 2006-07-24  Bruno Haible  <bruno@clisp.org>
12445
12446         * modules/clean-temp: New file.
12447
12448 2006-07-24  Bruno Haible  <bruno@clisp.org>
12449
12450         * m4/tmpdir.m4: New file, from GNU gettext.
12451
12452 2006-07-24  Bruno Haible  <bruno@clisp.org>
12453
12454         * lib/tmpdir.h: New file, from GNU gettext.
12455         * lib/tmpdir.c: New file, from GNU gettext.
12456
12457 2006-07-24  Bruno Haible  <bruno@clisp.org>
12458
12459         * lib/clean-temp.h: New file, from GNU gettext.
12460         * lib/clean-temp.c: New file, from GNU gettext.
12461
12462 2006-07-23  Eric Blake  <ebb9@byu.net>
12463
12464         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12465         (Depends-on): Add binary-io.
12466
12467 2006-07-23  Eric Blake  <ebb9@byu.net>
12468
12469         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12470
12471 2006-07-23  Eric Blake  <ebb9@byu.net>
12472
12473         * lib/tmpfile-safer.c: New file.
12474         * lib/stdio-safer.h (fopen_safer): Add prototype.
12475         * lib/stdio--.h (tmpfile): Make safer.
12476
12477 2006-07-23  Bruno Haible  <bruno@clisp.org>
12478
12479         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12480         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12481         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12482         gl_linked_remove_at): Use it.
12483
12484 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12485         and Simon Josefsson <jas@extundo.com>
12486
12487         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12488
12489         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12490
12491 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12492
12493         * modules/close-stream: New file.
12494         * modules/closeout (Description): Make it clear that it exits
12495         with a diagnostic on error.
12496         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12497         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12498
12499 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12500
12501         * m4/close-stream.m4: New file.
12502
12503 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12504
12505         * lib/close-stream.c, lib/close-stream.h: New files.
12506
12507 2006-07-22  Bruno Haible  <bruno@clisp.org>
12508
12509         Merge from GNU gettext 0.15.
12510
12511         2006-05-01  Bruno Haible  <bruno@clisp.org>
12512
12513                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12514
12515         2006-07-22  Bruno Haible  <bruno@clisp.org>
12516
12517                 * modules/javaversion: New file.
12518                 * MODULES.html.sh (Java): Add javaversion.
12519
12520         2006-03-12  Bruno Haible  <bruno@clisp.org>
12521
12522                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12523
12524         2005-12-04  Bruno Haible  <bruno@clisp.org>
12525
12526                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12527                 (untested).
12528
12529         2006-06-21  Bruno Haible  <bruno@clisp.org>
12530
12531                 Avoid warnings from recent versions of mcs.
12532                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
12533                 -o, -L, -r any more. Use options documented since mcs-1.0
12534                 instead. Similarly for -g.
12535
12536         2005-12-04  Bruno Haible  <bruno@clisp.org>
12537
12538                 * build-aux/csharpcomp.sh.in: Suffix for resources is
12539                 .resources, not .resource.
12540
12541         2005-07-09  Bruno Haible  <bruno@clisp.org>
12542
12543                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
12544                 add a .dll suffix.
12545                 Reported by Mark Junker <mjscod@gmx.de>.
12546
12547         2006-07-22  Bruno Haible  <bruno@clisp.org>
12548
12549                 * modules/gettext: Upgrade to gettext-0.15.
12550                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
12551                 m4/visibility.m4.
12552                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
12553
12554 2006-07-22  Bruno Haible  <bruno@clisp.org>
12555
12556         Merge from GNU gettext 0.15.
12557
12558         2006-03-25  Bruno Haible  <bruno@clisp.org>
12559
12560                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
12561
12562         2006-07-21  Bruno Haible  <bruno@clisp.org>
12563
12564                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
12565                 "1.1".
12566
12567         2006-05-09  Bruno Haible  <bruno@clisp.org>
12568
12569                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
12570                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
12571                 for the conftestver execution.
12572
12573         2006-05-01  Bruno Haible  <bruno@clisp.org>
12574
12575                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
12576                 optional target-version argument. Verify that the compiler
12577                 groks source of the specified source-version, or add -source
12578                 option as necessary. Verify that the compiler produces
12579                 bytecode in the specified target-version, or add -target and
12580                 -source options as necessary. Make the result of the test
12581                 available as variable CONF_JAVAC. Also log error output in
12582                 config.log.
12583
12584         2006-03-11  Bruno Haible  <bruno@clisp.org>
12585
12586                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
12587
12588         2006-05-09  Bruno Haible  <bruno@clisp.org>
12589
12590                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
12591                 CLASSPATH_SEPARATOR to a semicolon.
12592
12593         2006-03-12  Bruno Haible  <bruno@clisp.org>
12594
12595                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
12596                 available as variable CONF_JAVA, for subsequent autoconf
12597                 tests. Also log error output in config.log.
12598
12599         2006-07-19  Bruno Haible  <bruno@clisp.org>
12600
12601                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
12602                 that getline works on glibc2 systems. Needed to avoid trouble
12603                 in relocatable.c.
12604                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
12605
12606         2005-12-04  Bruno Haible  <bruno@clisp.org>
12607
12608                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
12609                 launcher (untested).
12610
12611         2005-12-04  Bruno Haible  <bruno@clisp.org>
12612
12613                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
12614
12615         2006-07-22  Bruno Haible  <bruno@clisp.org>
12616
12617                 * gettext.m4: Update from GNU gettext-0.15.
12618                 * nls.m4: Likewise.
12619                 * po.m4: Likewise.
12620                 * inttypes-pri.m4: Likewise.
12621                 * inttypes-h.m4: Renamed from inttypes.m4.
12622                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
12623
12624 2006-07-22  Bruno Haible  <bruno@clisp.org>
12625
12626         Merge from GNU gettext 0.15.
12627
12628         2005-07-05  Bruno Haible  <bruno@clisp.org>
12629
12630                 * printf-args.c (printf_fetchargs): Work around broken
12631                 definition of wint_t on mingw.
12632
12633         2005-02-12  Bruno Haible  <bruno@clisp.org>
12634
12635                 * xallocsa.h: Add extern "C" for C++.
12636
12637         2006-05-17  Bruno Haible  <bruno@clisp.org>
12638
12639                 Cygwin portability.
12640                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
12641
12642         2006-04-30  Bruno Haible  <bruno@clisp.org>
12643
12644                 * progreloc.c: Include <mach-o/dyld.h> if available.
12645                 (find_executable): Use _NSGetExecutablePath when possible.
12646
12647         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
12648
12649                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
12650                 function.
12651
12652         2005-12-29  Bruno Haible  <bruno@clisp.org>
12653
12654                 * progreloc.c (set_program_name_and_installdir): Fix
12655                 compilation error.
12656
12657         2005-12-04  Bruno Haible  <bruno@clisp.org>
12658
12659                 Cygwin portability.
12660                 * progreloc.c: Include <windows.h> also on Cygwin.
12661                 (find_executable): Add support for Cygwin.
12662                 (set_program_name_and_installdir): Handle also platforms with
12663                 nonempty EXEEXT.
12664
12665         2006-07-11  Bruno Haible  <bruno@clisp.org>
12666
12667                 * javacomp.c: Fix a comment.
12668                 Reported by Jim Meyering.
12669
12670         2006-04-30  Bruno Haible  <bruno@clisp.org>
12671
12672                 * javacomp.h (compile_java_class): Add source_version,
12673                 target_version arguments.
12674                 * javacomp.c: Rewritten to choose only a compiler that
12675                 respects the specified source_version and target_version.
12676
12677         2006-06-27  Bruno Haible  <bruno@clisp.org>
12678
12679                 Assume correct S_ISDIR macro.
12680                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
12681
12682         2006-07-22  Bruno Haible  <bruno@clisp.org>
12683
12684                 * javaversion.h: New file, from GNU gettext.
12685                 * javaversion.c: New file, from GNU gettext.
12686                 * javaversion.java: New file, from GNU gettext.
12687                 * javaversion.class: New file, from GNU gettext.
12688
12689         2006-05-17  Bruno Haible  <bruno@clisp.org>
12690
12691                 Cygwin portability.
12692                 * javaexec.c (execute_java_class): Test for jview program
12693                 also on Cygwin.
12694
12695         2006-04-09  Bruno Haible  <bruno@clisp.org>
12696
12697                 * fatal-signal.c: Don't include string.h.
12698                 (at_fatal_signal): Use a copying loop instead of memcpy.
12699
12700         2005-12-04  Bruno Haible  <bruno@clisp.org>
12701
12702                 * csharpexec.c: Add support for 'clix' launcher (untested).
12703                 (execute_csharp_using_sscli): New function.
12704                 (execute_csharp_program): Call it.
12705
12706         2006-06-21  Bruno Haible  <bruno@clisp.org>
12707
12708                 Avoid warnings from recent versions of mcs.
12709                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
12710                 -o, -L, -r any more. Use options documented since mcs-1.0
12711                 instead. Similarly for -g.
12712
12713         2005-07-09  Bruno Haible  <bruno@clisp.org>
12714
12715                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
12716                 add a .dll suffix.
12717                 Reported by Mark Junker <mjscod@gmx.de>.
12718
12719         2006-06-17  Bruno Haible  <bruno@clisp.org>
12720
12721                 * config.charset: Update for NetBSD 3.0.
12722
12723         2006-05-17  Bruno Haible  <bruno@clisp.org>
12724
12725                 Cygwin portability.
12726                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
12727
12728         2006-05-16  Bruno Haible  <bruno@clisp.org>
12729
12730                 * localcharset.c [CYGWIN]: Include <windows.h>.
12731                 (get_charset_aliases): For Cygwin, return the same CPxxx
12732                 aliases list as under WIN32.
12733                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
12734                 the environment variables. Fall back to GetACP().
12735
12736         2006-04-05  Bruno Haible  <bruno@clisp.org>
12737
12738                 * config.charset: Update Juan Manuel Guerrero's address.
12739
12740         2005-02-12  Bruno Haible  <bruno@clisp.org>
12741
12742                 * allocsa.h: Add extern "C" for C++.
12743
12744         2005-02-10  Bruno Haible  <bruno@clisp.org>
12745
12746                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
12747                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
12748
12749         2006-07-22  Bruno Haible  <bruno@clisp.org>
12750
12751                 * gettext.h: Update to GNU gettext-0.15.
12752
12753 2006-07-22  Bruno Haible  <bruno@clisp.org>
12754
12755         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
12756         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
12757         lib-prefix.m4, longdouble.m4, ssize_t.m4.
12758
12759 2006-07-21  Eric Blake  <ebb9@byu.net>
12760
12761         * modules/stdlib-safer: New file.
12762         * MODULES.html.sh (File stream based Input/Output): Add
12763         stdlib-safer.
12764
12765 2006-07-21  Eric Blake  <ebb9@byu.net>
12766
12767         * lib/stdlib-safer.h: New file from coreutils, required by
12768         stdlib--.h.
12769
12770 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
12771
12772         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
12773
12774 2006-07-20  Bruno Haible  <bruno@clisp.org>
12775
12776         * gnulib-tool: Recognize new option --assume-autoconf.
12777         (autoconf_minversion): New variable.
12778         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
12779
12780 2006-07-20  Bruno Haible  <bruno@clisp.org>
12781
12782         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
12783
12784 2006-07-19  Derek R. Price  <derek@ximbiot.com>
12785
12786         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
12787         Reindent and repaginate.
12788
12789 2006-07-19  Derek Price  <derek@ximbiot.com>
12790
12791         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
12792         Correct grammar.
12793
12794 2006-07-17  Bruno Haible  <bruno@clisp.org>
12795
12796         * modules/list: New file.
12797         * modules/array-list: New file.
12798         * modules/carray-list, modules/carray-list-tests: New files.
12799         * modules/linked-list, modules/linked-list-tests: New files.
12800         * modules/avltree-list, modules/avltree-list-tests: New files.
12801         * modules/rbtree-list, modules/rbtree-list-tests: New files.
12802         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
12803         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
12804         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
12805         * modules/oset: New file.
12806         * modules/array-oset: New file.
12807         * modules/avltree-oset, modules/avltree-oset-tests: New files.
12808         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
12809         * tests/test-carray_list.c: New file.
12810         * tests/test-linked_list.c: New file.
12811         * tests/test-avltree_list.c: New file.
12812         * tests/test-rbtree_list.c: New file.
12813         * tests/test-linkedhash_list.c: New file.
12814         * tests/test-avltreehash_list.c: New file.
12815         * tests/test-rbtreehash_list.c: New file.
12816         * tests/test-avltree_oset.c: New file.
12817         * tests/test-rbtree_oset.c: New file.
12818         * MODULES.html.sh (Container data structures): New section.
12819
12820 2006-07-17  Bruno Haible  <bruno@clisp.org>
12821
12822         * m4/gl_list.m4: New file.
12823
12824 2006-07-17  Bruno Haible  <bruno@clisp.org>
12825
12826         * lib/gl_list.h: New file.
12827         * lib/gl_list.c: New file.
12828         * lib/gl_array_list.h: New file.
12829         * lib/gl_array_list.c: New file.
12830         * lib/gl_carray_list.h: New file.
12831         * lib/gl_carray_list.c: New file.
12832         * lib/gl_linked_list.h: New file.
12833         * lib/gl_linked_list.c: New file.
12834         * lib/gl_anylinked_list1.h: New file.
12835         * lib/gl_anylinked_list2.h: New file.
12836         * lib/gl_avltree_list.h: New file.
12837         * lib/gl_avltree_list.c: New file.
12838         * lib/gl_anyavltree_list1.h: New file.
12839         * lib/gl_anyavltree_list2.h: New file.
12840         * lib/gl_rbtree_list.h: New file.
12841         * lib/gl_rbtree_list.c: New file.
12842         * lib/gl_anyrbtree_list1.h: New file.
12843         * lib/gl_anyrbtree_list2.h: New file.
12844         * lib/gl_anytree_list1.h: New file.
12845         * lib/gl_anytree_list2.h: New file.
12846         * lib/gl_linkedhash_list.h: New file.
12847         * lib/gl_linkedhash_list.c: New file.
12848         * lib/gl_anyhash_list1.h: New file.
12849         * lib/gl_anyhash_list2.h: New file.
12850         * lib/gl_avltreehash_list.h: New file.
12851         * lib/gl_avltreehash_list.c: New file.
12852         * lib/gl_rbtreehash_list.h: New file.
12853         * lib/gl_rbtreehash_list.c: New file.
12854         * lib/gl_anytreehash_list1.h: New file.
12855         * lib/gl_anytreehash_list2.h: New file.
12856
12857         * lib/gl_oset.h: New file.
12858         * lib/gl_oset.c: New file.
12859         * lib/gl_array_oset.h: New file.
12860         * lib/gl_array_oset.c: New file.
12861         * lib/gl_avltree_oset.h: New file.
12862         * lib/gl_avltree_oset.c: New file.
12863         * lib/gl_rbtree_oset.h: New file.
12864         * lib/gl_rbtree_oset.c: New file.
12865         * lib/gl_anytree_oset.h: New file.
12866
12867 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12868
12869         * m4/mkancesdirs.m4: New file.
12870         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
12871         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
12872         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
12873         it.
12874
12875 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12876
12877         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
12878         * lib/mkancesdirs.h: New files.
12879         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
12880         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
12881         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
12882         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
12883         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
12884         callers changed.  Revamp internals significantly, by not
12885         attempting to create directories that are temporarily more
12886         permissive than the final results.  Do not attempt to use
12887         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
12888         This removes some race conditions, fixes some bugs, and simplifies
12889         things.  Use new dirchownmod function to do owner and mode changes.
12890         * lib/mkdir-p.h: Likewise.
12891         * lib/modechange.c (octal_to_mode): New function.
12892         (struct mode_change): New member mentioned.
12893         (make_node_op_equals): New arg mentioned.  All callers changed.
12894         (mode_compile): Keep track of which mode bits the user has explicitly
12895         mentioned.
12896         (mode_adjust): New arg DIR, so that we implement the X op correctly.
12897         New arg PMODE_BITS, to keep track of which mode bits the user
12898         mentioned; it treats S_ISUID and S_ISGID speciall.
12899         All callers changed.
12900         * lib/modechange.h: Likewise.
12901
12902 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12903
12904         * MODULES.html.sh: Add mkancestors.
12905         * modules/mkancesdirs: New module.
12906         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
12907         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
12908         The chdir-safer and afs files are now orphans; I'll remove them
12909         unless someone speaks up.
12910         Add lib/dirchownmod.c, lib/dirchownmod.h.
12911         (Depends-on): Remove alloca, chown, save-cwd, dirname.
12912         Add lchown, mkancesdirs.
12913         (Maintainer): Add self.
12914
12915 2006-07-15  Karl Berry  <karl@gnu.org>
12916
12917         * gnulib-tool: help message wording/arrangement.
12918
12919 2006-07-14  Simon Josefsson  <jas@extundo.com>
12920
12921         * doc/gnulib.texi (Libtool and Windows): New section.
12922
12923 2006-07-12  Simon Josefsson  <jas@extundo.com>
12924
12925         * modules/gendocs (License): Fix license, approved by Karl.
12926
12927 2006-07-12  Eric Blake  <ebb9@byu.net>
12928
12929         * MODULES.html.sh: Add gendocs.
12930
12931 2006-07-11  Eric Blake  <ebb9@byu.net>
12932
12933         * modules/fdl: New module, to install doc/fdl.texi.
12934         * MODULES.html.sh: Add new section for documentation modules.
12935         * gnulib-tool: Avoid space-tab.
12936         (--doc-base): New option, to manage files from doc.
12937
12938 2006-07-11  Eric Blake  <ebb9@byu.net>
12939
12940         * m4/absolute-header.m4: Fix comments to match recent change.
12941
12942 2006-07-11  Eric Blake  <ebb9@byu.net>
12943
12944         * gnulib-tool: List --doc-base before --tests-base.
12945
12946 2006-07-11  Derek R. Price  <derek@ximbiot.com>
12947
12948         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
12949
12950 2006-07-11  Bruno Haible  <bruno@clisp.org>
12951
12952         * README: Mention where to put documentation.
12953
12954 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12955
12956         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
12957
12958 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12959
12960         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
12961         to stdint.m4.
12962
12963 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12964
12965         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
12966         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
12967         "no/such/file/stdint.h" when there is no such file, so that
12968         the resulting C code can be parsed by dodgy compilers.
12969         Problems reported by Bob Proulx.
12970
12971 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12972
12973         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
12974         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12975         macros into the GNU _D_EXACT_NAMLEN.
12976         * lib/savedir.c:  Likewise.
12977         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
12978
12979 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12980         and Paul Eggert  <eggert@cs.ucla.edu>
12981
12982         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
12983         * m4/savedir.m4:
12984         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12985         macros into the GNU _D_EXACT_NAMLEN.
12986
12987 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12988
12989         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
12990         around the absolute name, to work around a problem with the HP-UX
12991         11.23 native C compiler, reported by Bob Proulx.
12992
12993 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12994
12995         * doc/maintain.texi, make-stds.texi: Sync from
12996         <http://savannah.gnu.org/projects/gnustandards>.
12997
12998 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12999
13000         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13001
13002 2006-07-09  Jim Meyering  <jim@meyering.net>
13003
13004         * m4/glob.m4: Remove a doubled word in a comment.
13005
13006 2006-07-09  Jim Meyering  <jim@meyering.net>
13007
13008         * lib/argp-pv.c: Remove a doubled word in a comment.
13009         * lib/check-version.c (check_version): Likewise.
13010         * lib/javacomp.c (compile_java_class): Likewise.
13011
13012 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13013
13014         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13015         for the benefit of people using Autoconf 2.60.  If you want to
13016         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13017         (or m4/onceonly.m4, if pre-2.57) manually.
13018
13019 2006-07-08  Jim Meyering  <jim@meyering.net>
13020
13021         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13022         comment.
13023         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13024         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13025         comment.
13026
13027 2006-07-08  Jim Meyering  <jim@meyering.net>
13028
13029         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13030
13031 2006-07-07  Simon Josefsson  <jas@extundo.com>
13032
13033         * tests/test-crc.c: Change expected crc value, the test vector
13034         were probably computed using the old broken crc.c?
13035
13036 2006-07-06  Simon Josefsson  <jas@extundo.com>
13037
13038         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13039         now the canonical place for the M4 file).
13040
13041         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13042         from the sys_socket dependency now.
13043
13044         * modules/inet_pton (Files): Ditto.
13045
13046         * modules/inet_ntop (Files): Ditto.
13047
13048 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13049
13050         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13051         not gl_PREREQ_GETUSERSHELL.
13052
13053 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13054
13055         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13056         with only one argument, for Autoconf 2.60.
13057         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13058         expand to nothing, so add a shell command to avoid syntax error.
13059         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13060
13061 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13062
13063         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13064
13065 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13066
13067         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13068         no longer needed.  Check for isblank decl.
13069         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
13070         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
13071         of existence.
13072
13073 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13074
13075         * lib/getloadavg.c: Use __VMS, not VMS.
13076         * lib/getopt.c: Likewise.
13077         * lib/getpagesize.h: Likewise.
13078         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
13079         and probably does not work.
13080
13081 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13082
13083         * lib/.cppi-disable: Add wcwidth.
13084         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
13085         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
13086         (ISGRAPH): Remove.  All uses changed to isgraph.
13087         (FOLD) [!defined _LIBC]: Remove special case.
13088         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
13089         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
13090         HAVE_ISBLANK.
13091         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
13092         case.
13093
13094 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13095
13096         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
13097         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
13098         brackets.  Other minor changes to suppress some compiler
13099         warnings.
13100
13101 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13102         and Paul Eggert  <eggert@cs.ucla.edu>
13103
13104         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
13105         of invoking obsolescent AC_HEADER_DIRENT macro.
13106         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
13107         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
13108         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
13109         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
13110         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
13111         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13112         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
13113         * m4/readdir.m4: Remove; no longer needed.
13114
13115 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13116         and Paul Eggert  <eggert@cs.ucla.edu>
13117
13118         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
13119         Don't worry about this obsolete case any more.
13120         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
13121         directories.
13122         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
13123         worry about this obsolete case any more.
13124         * lib/fts.c: Likewise.
13125         * lib/getcwd.c: Likewise.
13126         * lib/glob.h: Likewise.
13127         * lib/savedir.c: Likewise.
13128
13129 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13130
13131         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
13132         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
13133         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
13134         needed.
13135         All uses removed.
13136         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13137         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13138         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
13139         needed.
13140         * m4/getdate.m4 (gl_GETDATE): Likewise.
13141         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13142         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13143         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13144         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13145         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13146         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13147         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
13148         needed.
13149
13150 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13151
13152         * lib/memcasecmp.c: Include <limits.h>.
13153         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
13154         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
13155         Don't assume isdigit succeeds only on '0' through '9'.
13156
13157 2006-07-05  Eric Blake  <ebb9@byu.net>
13158
13159         * modules/getaddrinfo (Depends-on): Add snprintf.
13160
13161 2006-07-05  Eric Blake  <ebb9@byu.net>
13162
13163         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
13164         to avoid 'header present but could not be compiled' on cygwin.
13165
13166 2006-07-05  Eric Blake  <ebb9@byu.net>
13167
13168         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
13169         missing from netdb.h.
13170         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
13171
13172 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13173
13174         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
13175         no longer needed.
13176         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
13177         * m4/getdate.m4 (gl_GETDATE): Likewise.
13178         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13179         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13180         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13181         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13182         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13183
13184 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13185
13186         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
13187         All uses of is_space replaced by isspace.
13188         * lib/exit.h: Don't talk about STDC_HEADERS.
13189         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
13190         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
13191         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
13192         replaced by isprint etc.
13193         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
13194         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13195         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
13196         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
13197         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
13198         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13199
13200 2006-07-05  Bruno Haible  <bruno@clisp.org>
13201
13202         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
13203         the function exists, before testing against AIX.
13204         Reported by Martin Lambers <marlam@marlam.de>.
13205
13206 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13207
13208         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
13209         From Mark D. Baushke.
13210
13211 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13212
13213         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
13214         to the absolute name, not just one, to bypass Sun C 5.8's
13215         "warning: #include of /usr/include/... may be non-portable".
13216
13217 2006-07-04  Eric Blake  <ebb9@byu.net>
13218
13219         * modules/dirname-tests: New test module.
13220         * tests/test-dirname.c: New file, replacing dirname.c
13221         TEST_DIRNAME section that was recently deleted.
13222
13223 2006-07-04  Bruno Haible  <bruno@clisp.org>
13224
13225         Assume ANSI C header files and <ctype.h> functions.
13226         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
13227         (mbsnwidth): Use isprint, iscntrl instead.
13228
13229 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13230
13231         Merge from coreutils.
13232         * MODULES.html.sh: Add xstrtold.
13233         * modules/xstrtold: New file.
13234         * modules/cycle-check (Files): Add lib/same-inode.h.
13235         * modules/dirname (Files): Add m4/double-slash-root.m4.
13236         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
13237         * modules/mkdir-p (Files): Add lib/same-inode.h.
13238         * modules/same (Files): Add lib/same-inode.h.
13239
13240 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13241
13242         * m4/absolute-header.m4: Renamed from full-header-path.m4.
13243         This is to keep the terminology clean; POSIX talks about
13244         "absolute pathnames", not "full pathnames", but the GNU
13245         Coding Standards say to use "path" for something else;
13246         so use "absolute" to keep both sides happy.
13247         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13248         Set gl_absolute_header, not gl_full_header_path.
13249         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13250         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13251         All uses changed.
13252
13253         Merge from coreutils.
13254
13255         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13256
13257         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13258         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13259         want to require the building of c-strtod.o.
13260         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13261         needs -lm directly.
13262         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13263
13264         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13265
13266         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13267         --as-needed option if available.  Problem reported by Albert Chin in
13268         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13269         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13270         cc merely issues a bunch of annoying warnings for --as-needed
13271         (this problem was reported by Bob Proulx).  Also, try linking with
13272         -lm to detect a bug in binutils 2.16 (this problem was reported
13273         by Ralf Wildenhues).
13274
13275         2006-06-18  Jim Meyering  <jim@meyering.net>
13276
13277         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13278         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13279         macro.
13280         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13281         also check for glibc-2.4's abort-inducing bug.
13282
13283         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13284         Low-probability clean-up should be to use rmdir to get rid of
13285         the just-created directory, not unlink.
13286
13287         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13288         configure fail, and request a bug report to inform us about it.
13289         Add a comment that, barring reports to the contrary, in 2007 we'll
13290         assume ftruncate is universally available.
13291
13292         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13293
13294         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13295
13296         2006-03-12  Jim Meyering  <jim@meyering.net>
13297
13298         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13299         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13300         * m4/same.m4 (gl_SAME): Likewise.
13301         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13302
13303         2006-03-11  Eric Blake  <ebb9@byu.net>
13304
13305         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13306         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13307         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13308         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13309
13310 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13311
13312         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13313         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13314         reported by Mark D. Baushke, one in
13315         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13316
13317         Merge from coreutils.
13318
13319         * lib/.cppi-disable: Add stdint_.h.
13320         * lib/.cvsignore: Add stdint.h.
13321
13322         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13325         both double and long double versions.
13326         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13327         * lib/xstrtold.c: New file.
13328         * lib/xstrtod.h (xstrtold): New decl.
13329
13330         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13331
13332         * lib/filemode.c (setst): Remove.
13333         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13334         (arguably) clearer, and the generated code is a bit smaller on my
13335         Debian GNU/Linux stable x86 host.
13336
13337         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13338
13339         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13340         Assume that filemode.h includes sys/types.h and sys/stat.h.
13341         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13342         (ftypelet): Reorder to put common cases first, for efficiency.
13343         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13344         to do 'M'.
13345         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13346         of 10, for compatibility with FreeBSD.  All callers changed.
13347         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13348         types that can't be deduced solely from st_mode.  First arg is now a
13349         const pointer.
13350         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13351         (strmode): Renamed from mode_string.
13352         (filemodestring): New decl.
13353         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13354         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13355         needed.
13356         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13357
13358         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13359
13360         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13361         fsusage.h now does that.  Include fsusage.h first, to test interface.
13362         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13363         at most one method (the old code could have generated decls that
13364         didn't conform to C89, not that this was ever exercised).
13365         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13366
13367         2006-03-19  Jim Meyering  <jim@meyering.net>
13368
13369         Work even in a chroot where d_ino values for entries in "/"
13370         don't match the stat.st_ino values for the same names.
13371         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13372         number, iterate through all entries again, using lstat instead.
13373         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13374         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13375
13376         * lib/getcwd.c (__getcwd): Clarify a comment.
13377         Use memcpy in place of a call to strcpy.
13378
13379         2006-03-12  Jim Meyering  <jim@meyering.net>
13380
13381         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13382         matches that of the current directory (which we're about to chdir ".."
13383         out of), then save the dev-ino of the parent, instead.
13384
13385         * lib/same-inode.h (SAME_INODE): New file/macro.
13386         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13387         Include "same-inode.h", instead.
13388         * lib/same.c: Likewise.
13389         * lib/cycle-check.h: Include "same-inode.h".
13390         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13391         * lib/cycle-check.c (SAME_INODE): Remove definition.
13392         * lib/root-dev-ino.h: Include "same-inode.h".
13393
13394         2006-03-11  Eric Blake  <ebb9@byu.net>
13395
13396         * lib/same.c (same_name): s/base_name/last_component/
13397         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13398         * lib/filenamecat.c (file_name_concat): Likewise.
13399
13400         2006-03-11  Eric Blake  <ebb9@byu.net>,
13401                     Paul Eggert  <eggert@cs.ucla.edu>
13402
13403         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13404         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13405         drive prefix.
13406         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13407         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13408         (last_component): New method.
13409         * lib/dirname.c (dir_len): Determine when drive letters need a
13410         subsequent slash.  Preserve // when it is special.
13411         (dir_name): Don't append dot when drive letter is absolute.
13412         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13413         * lib/basename.c (base_name): New semantics - malloc the result.
13414         Preserve // when it is special.  Preserve relative files that look
13415         like drive letters.
13416         (base_len): Preserve // when it is special.
13417         (last_component): New method, similar to old base_name semantics.
13418         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13419         base_name.  Strip redundant slashes from ///.
13420
13421 2006-07-03  Jim Meyering  <jim@meyering.net>
13422
13423         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13424         macro is used before the first cycle_check call.
13425
13426 2006-07-03  Eric Blake  <ebb9@byu.net>
13427
13428         * modules/dirname (Depends-on): Add xstrndup.
13429
13430 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13431
13432         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13433         test cases, so that config.log is a bit easier to follow.
13434
13435 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13436
13437         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13438         both are 64 bits, since this seems to be the tradition, and this
13439         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13440         we ever run into a host that prefers long long to long in this
13441         case, we'll need another configure-time test.  Problem reported by
13442         Jim Meyering.
13443
13444 2006-07-02  Eric Blake  <ebb9@byu.net>
13445
13446         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13447
13448 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13449
13450         * modules/inttypes (Depends-on): No longer depends on stdint.
13451         * modules/stdint (Description): Say more about assumptions.
13452         Say that the fast types might differ.  Say macros are used.
13453         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13454         (Makefile.am): Revise list of substituted symbols to match
13455         new stdint.m4.
13456         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13457         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13458         * tests/test-stdint.c (verify_same_types)
13459         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13460         the code conforms to C99/C89.
13461         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13462         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13463
13464 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13465
13466         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13467         but fix a bug, by requiring at least 64 bits.
13468         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13469         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13470         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13471         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13472
13473         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13474         changes.  Make 2.59 a prerequisite.  Check and substitute for
13475         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13476         inttypes.h.  Do not use special include files; just use the
13477         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13478         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13479         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13480         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13481         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13482         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13483         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13484         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13485         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13486         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13487         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13488         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13489         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13490         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13491         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13492         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13493         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13494         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13495         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13496         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13497         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13498         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13499         not check for things that C99 does not require, e.g., int8_t.  If
13500         a test isn't needed unless <stdint.h> isn't working, and is
13501         unlikely to be needed for any other reason, then don't do it
13502         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13503         size_t, since we assume C89 freestanding at least.  Do not check
13504         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13505         the right thing even if the types are not defined.  Instead use:
13506         (gl_STDINT_TYPE_PROPERTIES): New macro.
13507         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13508         testing whether <sys/types.h> clashes, as Autoconf does this for
13509         us now.  All uses removed.
13510         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13511         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13512         (gl_CHECK_TYPE_SAME):
13513         Remove; no longer needed.
13514         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13515         exists, since we'll return 0 anyway in that case.
13516         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13517
13518 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13519
13520         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13521         possible collision with system files.
13522         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13523         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13524         WCHAR_MIN and WCHAR_MAX in this case.
13525         (<stddef.h>): Do not include; no longer needed.
13526         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13527         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13528         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13529         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13530         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13531         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
13532         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
13533         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
13534         !defined(__c99))]: Include in this case too, since it's harmless
13535         now.
13536         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
13537         dangerous to do so.
13538         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
13539         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
13540         (_STDINT_MIN, _STDINT_MAX): New macros.
13541         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
13542         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
13543         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
13544         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
13545         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
13546         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
13547         macros, not typedefs; this simplifies things quite a bit.
13548         Use long int for all types narrower than int64_t.
13549         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
13550         Define in terms of long long int or int64_t or long int,
13551         not int64_t or int32_t.  This saves some compile-time testing.
13552         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
13553         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
13554         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
13555         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
13556         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
13557         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
13558         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
13559         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
13560         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
13561         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
13562         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13563         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13564         undef any previous version and define our own version, for
13565         simplicity and consistency with the new macros for types.
13566         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13567         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13568         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
13569         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
13570         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
13571         @WINT_T_SUFFIX@ to keep things simple here.
13572         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
13573         Simplify by assuming typical 8/16/32/64 host, since we're
13574         already doing that elsewhere anyway.
13575         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
13576         and assume long long int is 64 bits if available.  This
13577         speeds up 'configure'.
13578
13579 2006-07-01  Eric Blake  <ebb9@byu.net>
13580
13581         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
13582         Reported by Andreas Buening.
13583
13584 2006-07-01  Eric Blake  <ebb9@byu.net>
13585
13586         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
13587
13588 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13589
13590         * lib/getaddrinfo.c: fixed typo
13591
13592 2006-06-29  Jim Meyering  <jim@meyering.net>
13593
13594         * modules/strftime (Maintainer): Add my name, since with the
13595         FPRINTFTIME changes strftime.c has forked from glibc.
13596
13597 2006-06-29  Eric Blake  <ebb9@byu.net>
13598
13599         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
13600
13601 2006-06-29  Eric Blake  <ebb9@byu.net>
13602
13603         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
13604
13605 2006-06-29  Eric Blake  <ebb9@byu.net>
13606
13607         * lib/stat_.h: New file.
13608
13609 2006-06-29  Eric Blake  <ebb9@byu.net>
13610
13611         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
13612         unused static function.
13613
13614 2006-06-29  Eric Blake  <ebb9@byu.net>
13615
13616         * doc/functions.texi (Function Portability): Document missing lstat
13617         on mingw.
13618
13619 2006-06-29  Eric Blake  <ebb9@byu.net>
13620
13621         * MODULES.html.sh: Add sys_stat.
13622         * modules/sys_stat: New module.
13623         * modules/mkstemp (Depends-on): Add sys_stat.
13624
13625 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13626
13627         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
13628
13629 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13630
13631         * m4/c-bs-a.m4: Removed.
13632
13633 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13634
13635         * lib/strftime.c: Assume strftime() exists.
13636
13637 2006-06-29  Derek Price  <derek@ximbiot.com>
13638
13639         * modules/c-bs-a: Removed - \a is C89.
13640         * MODULES.html.sh: Remove c-bs-a.
13641
13642 2006-06-29  Bruno Haible  <bruno@clisp.org>
13643
13644         * modules/wcwidth (License): Change to LGPL.
13645
13646 2006-06-28  Simon Josefsson  <jas@extundo.com>
13647
13648         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
13649         on _WIN32.
13650
13651         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
13652         getnameinfo.
13653
13654 2006-06-28  Simon Josefsson  <jas@extundo.com>
13655
13656         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
13657
13658 2006-06-28  Simon Josefsson  <jas@extundo.com>
13659
13660         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
13661         functions there.  It will succeed on Windows XP, but on Windows
13662         2000 and (presumably) earlier, it will fail, and use the internal
13663         re-implementation.
13664         (use_win32_p): New function.
13665         (getaddrinfo): Use strtoul on servname, to support numeric ports.
13666         Support AI_NUMERICSERV to disable getservbyname.
13667         (getnameinfo): New function, only supports
13668         NI_NUMERICHOST|NI_NUMERICSERV for now.
13669
13670         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
13671         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
13672         getnameinfo.
13673
13674 2006-06-28  Eric Blake  <ebb9@byu.net>
13675
13676         * modules/wcwidth: New file.
13677         * modules/mbchar (Depends-on): Add wcwidth.
13678         * modules/mbswidth (Depends-on): Add wcwidth.
13679         * MODULES.html.sh: Add wcwidth.
13680
13681 2006-06-28  Eric Blake  <ebb9@byu.net>
13682
13683         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
13684         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
13685
13686 2006-06-28  Eric Blake  <ebb9@byu.net>
13687
13688         * lib/xvasprintf.h: Fix comments.
13689
13690 2006-06-28  Eric Blake  <ebb9@byu.net>
13691
13692         * lib/mbchar.h (wcwidth): Include wcwidth.h.
13693         * lib/mbswidth.c (wcwidth): Move from here...
13694         * lib/wcwidth.h: ...to this new file.
13695
13696 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13697
13698         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
13699
13700         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
13701         it's obsolete.
13702         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
13703
13704 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13705
13706         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
13707         Autoconf 2.60 says this stuff was obsolete.
13708
13709 2006-06-28  Bruno Haible  <bruno@clisp.org>
13710
13711         * modules/wcwidth (Files): Add m4/wchar_t.m4.
13712
13713 2006-06-28  Bruno Haible  <bruno@clisp.org>
13714
13715         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
13716         gt_TYPE_WCHAR_T.
13717
13718 2006-06-28  Bruno Haible  <bruno@clisp.org>
13719
13720         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
13721         declaration for wcwidth.
13722         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
13723
13724 2006-06-28  Bruno Haible  <bruno@clisp.org>
13725
13726         * lib/mkdtemp.c [MINGW]: Include <io.h>.
13727         (mkdir): Define using _mkdir.
13728
13729 2006-06-28  Bruno Haible  <bruno@clisp.org>
13730
13731         * lib/getaddrinfo.h: Fix POSIX URL.
13732         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
13733         _WIN32.
13734         (use_win32_p): Make static.
13735         (getaddrinfo): Reject service name if it is empty or does not consist
13736         solely of decimal digits, or if its value is > 65535.
13737         (getnameinfo): Remove useless casts.
13738
13739 2006-06-27  Simon Josefsson  <jas@extundo.com>
13740
13741         * modules/sys_select: New file, suggested by Bruno Haible, Paul
13742         Eggert and Martin Lambers.
13743
13744 2006-06-27  Simon Josefsson  <jas@extundo.com>
13745
13746         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
13747         Eggert and Martin Lambers.
13748
13749 2006-06-27  Bruno Haible  <bruno@clisp.org>
13750
13751         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
13752         result to 0, not to empty.
13753         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
13754
13755 2006-06-27  Bruno Haible  <bruno@clisp.org>
13756
13757         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
13758
13759 2006-06-26  Simon Josefsson  <jas@extundo.com>
13760
13761         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
13762         present.
13763
13764 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
13765
13766         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
13767         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
13768         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
13769
13770 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
13771
13772         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
13773
13774 2006-06-26  Bruno Haible  <bruno@clisp.org>
13775
13776         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
13777
13778 2006-06-26  Bruno Haible  <bruno@clisp.org>
13779
13780         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
13781
13782 2006-06-26  Bruno Haible  <bruno@clisp.org>
13783
13784         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
13785         SGI C compiler in pre-C99 mode.
13786         Suggested by Mark D. Baushke and Larry Jones.
13787
13788 2006-06-26  Bruno Haible  <bruno@clisp.org>
13789
13790         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
13791         WCHAR_MAX.
13792         Reported by Mark D. Baushke and Larry Jones.
13793
13794 2006-06-26  Bruno Haible  <bruno@clisp.org>
13795
13796         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
13797         in pre-C99 mode.
13798         Suggested by Mark D. Baushke and Larry Jones.
13799
13800 2006-06-23  Simon Josefsson  <jas@extundo.com>
13801             Bruno Haible  <bruno@clisp.org>
13802
13803         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
13804         Emit mostlyclean-local rule.
13805         (func_emit_tests_Makefile_am): Likewise.
13806         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
13807
13808 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
13809
13810         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
13811
13812 2006-06-23  Bruno Haible  <bruno@clisp.org>
13813
13814         * tests/test-stdint.c: Update to match ISO C 99 Technical
13815         Corrigendum 1.
13816
13817 2006-06-23  Bruno Haible  <bruno@clisp.org>
13818
13819         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
13820
13821 2006-06-23  Bruno Haible  <bruno@clisp.org>
13822
13823         * lib/stdint_.h: Treat IRIX like OpenBSD.
13824
13825 2006-06-23  Bruno Haible  <bruno@clisp.org>
13826
13827         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
13828         ISO C 99 Technical Corrigendum 1.
13829
13830 2006-06-22  Simon Josefsson  <jas@extundo.com>
13831
13832         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
13833         MinGW.
13834
13835 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13836
13837         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
13838         needed.  Some compiler complained about some of them.  Problem reported
13839         by Larry Jones in
13840         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
13841
13842 2006-06-21  Simon Josefsson  <jas@extundo.com>
13843
13844         * tests/test-getaddrinfo.c: New file.
13845
13846         * modules/getaddrinfo-tests: New file.
13847
13848         * MODULES.html.sh: Add inet_pton.
13849
13850         * modules/inet_pton: New file.
13851
13852 2006-06-21  Simon Josefsson  <jas@extundo.com>
13853
13854         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
13855         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
13856         of using the (limited) gnulib implementation on Windows XP.
13857
13858         * m4/inet_pton.m4: New file.
13859
13860 2006-06-21  Simon Josefsson  <jas@extundo.com>
13861
13862         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
13863         variable.
13864
13865         * lib/socket_.h: Don't define WINVER.
13866
13867         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
13868         slightly modified to work in gnulib.
13869
13870 2006-06-21  Simon Josefsson  <jas@extundo.com>
13871
13872         * doc/gnulib.texi (Windows sockets): Add.
13873
13874 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
13875
13876         * lib/read-file.c (fread_file): Start with buffer allocation of
13877         0 bytes rather than 1 byte; this simplifies the code.
13878         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
13879         code to free buffer and save/restore errno.
13880         (internal_read_file): Remove unused local.
13881
13882 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
13883
13884         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
13885         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
13886         Problem reported by Denis Excoffier in
13887         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
13888
13889 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13890
13891         * modules/sys_socket, modules/socklen: Include sys/types since
13892         FreeBSD 4.x's sys/socket.h needs it.
13893
13894 2006-06-19  Simon Josefsson  <jas@extundo.com>
13895
13896         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
13897
13898 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13899
13900         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
13901
13902 2006-06-19  Bruno Haible  <bruno@clisp.org>
13903
13904         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
13905         and FULL_PATH_INTTYPES_H in angle brackets.
13906         Reported by Mark D. Baushke <mdb@gnu.org>.
13907
13908 2006-06-17  Eric Blake  <ebb9@byu.net>
13909
13910         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
13911         errno.
13912
13913 2006-06-17  Bruno Haible  <bruno@clisp.org>
13914
13915         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
13916         <sys/inttypes.h>.
13917
13918 2006-06-17  Bruno Haible  <bruno@clisp.org>
13919
13920         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
13921         whether errno is declared. Assume <errno.h> declares errno.
13922
13923 2006-06-17  Bruno Haible  <bruno@clisp.org>
13924
13925         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
13926
13927 2006-06-17  Bruno Haible  <bruno@clisp.org>
13928
13929         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
13930         problem on Solaris 2.5.1.
13931
13932 2006-06-16  Eric Blake  <ebb9@byu.net>
13933
13934         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
13935         * lib/unicodeio.c [!defined errno]: Likewise.
13936         * lib/strtol.c [!defined errno]: Likewise.
13937         * lib/strtod.c [!defined errno]: Likewise.
13938
13939 2006-06-15  Eric Blake  <ebb9@byu.net>
13940
13941         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
13942
13943 2006-06-15  Eric Blake  <ebb9@byu.net>
13944
13945         * config/srclist.txt (ssize_t.m4): Lose sync.
13946
13947 2006-06-15  Bruno Haible  <bruno@clisp.org>
13948
13949         * modules/stdint (Files): Include m4/full-header-path.m4,
13950         m4/size_max.m4, m4/wchar_t.m4.
13951         (Makefile.am): Many more substitutions.
13952         * modules/stdint-tests: New file.
13953         * tests/test-stdint.c: New file.
13954
13955 2006-06-15  Bruno Haible  <bruno@clisp.org>
13956
13957         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
13958         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
13959         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
13960         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
13961         gl_CHECK_TYPE_SAME): New macros.
13962
13963 2006-06-15  Bruno Haible  <bruno@clisp.org>
13964
13965         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
13966
13967 2006-06-15  Bruno Haible  <bruno@clisp.org>
13968
13969         * lib/stdint_.h: Rewritten to be fully auto-configured.
13970         Fixes bug on HP-UX/IA64.
13971
13972 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
13973
13974         * lib/getdate.y (__attribute__): Don't define if already defined.
13975         Problem reported by Larry Jones.
13976         * lib/utimens.c (__attribute__): Likewise.
13977
13978 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
13979
13980         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
13981         reported by Andreas Schwab.
13982
13983 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13984             Bruno Haible  <bruno@clisp.org>
13985
13986         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
13987         check for the declaration of strnlen and a run test that exposes the
13988         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
13989         rpl_strndup.
13990
13991 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13992             Bruno Haible  <bruno@clisp.org>
13993
13994         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
13995
13996 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13997
13998         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
13999         compile test, for Tru64 4.0D.
14000
14001 2006-05-28  Karl Berry  <karl@gnu.org>
14002
14003         * config/srclist.txt (printf-args.c): lose sync.
14004
14005 2006-05-26  Martin Lambers  <marlam@marlam.de>
14006
14007         * lib/getpass.c: Updates the test for the native W32 API, and adds
14008         missing includes, thus fixing compilation warnings.
14009
14010 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14011
14012         * lib/exclude.c (exclude_fnmatch): New function.
14013         (excluded_file_name): Call exclude_fnmatch.
14014         * lib/exclude.h (excluded_file_name): New prototype
14015
14016 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14017
14018         * lib/tempname.c (small_open, large_open): New macros.
14019         (__open, __open64) [!_LIBC]: Remove.
14020         (__gen_tempname): Use small_open and large_open instead of __open
14021         and __open64.  This fixes a portability bug on HP-UX 11.11i
14022         reported by Simon Wing-Tang in
14023         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14024
14025 2006-05-24  Bruno Haible  <bruno@clisp.org>
14026
14027         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14028         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14029         Reported by Thorsten Maerz <torte@netztorte.de> via
14030         Aaron Stone <aaron@serendipity.cx>.
14031
14032 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14033
14034         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14035         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14036         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14037         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14038         not really conditional on the cache.
14039         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14040
14041 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14042
14043         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14044         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14045         (my_usleep): Don't mishandle maximum value.
14046
14047 2006-05-19  Jim Meyering  <jim@meyering.net>
14048
14049         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14050
14051 2006-05-17  Bruno Haible  <bruno@clisp.org>
14052
14053         Cygwin portability.
14054         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14055
14056 2006-05-17  Bruno Haible  <bruno@clisp.org>
14057
14058         * lib/stdint_.h: Fix recognition of Cygwin.
14059
14060 2006-05-15  Bruno Haible  <bruno@clisp.org>
14061
14062         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14063         on libtool patch by Ralf Wildenhues.
14064
14065 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14068         test for C99 conformance; (bool) 0.5 is an integer constant
14069         expression, but (bool) -0.5 is not.  Problem reported by Fedor
14070         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
14071
14072 2006-05-11  Simon Josefsson  <jas@extundo.com>
14073
14074         * m4/xvasprintf.m4: Fix obvious typo.
14075
14076 2006-05-11  Jim Meyering  <jim@meyering.net>
14077
14078         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
14079         James Lemley.
14080
14081 2006-05-10  Simon Josefsson  <jas@extundo.com>
14082
14083         * lib/md4.c: Typo fix, update copyright years.
14084         (K1, K2): Don't use L because it turn computations into 64-bit on
14085         64-bit platforms.
14086
14087 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
14088
14089         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
14090         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
14091         unwanted sign propagation, e.g., on hosts with 64-bit int.
14092         There still are some problems with reeelly weird theoretical hosts
14093         (e.g., 33-bit int) but it's not worth worrying about now.
14094         * lib/sha1.c (rol): Likewise.
14095         (K1, K2, K3, K4): Remove unnecessary L suffix.
14096
14097 2006-05-10  Bruno Haible  <bruno@clisp.org>
14098
14099         * lib/des.c: Cast to avoid warnings.
14100
14101 2006-05-09  Bruno Haible  <bruno@clisp.org>
14102
14103         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
14104         (Depends-on): Depend also on xsize, stdarg.
14105         (configure.ac): Add gl_XVASPRINTF.
14106
14107 2006-05-09  Bruno Haible  <bruno@clisp.org>
14108
14109         * m4/xvasprintf.m4: New file.
14110
14111 2006-05-09  Bruno Haible  <bruno@clisp.org>
14112
14113         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
14114         (EOVERFLOW): Define fallback value.
14115         (xstrcat): New function.
14116         (xvasprintf): Recognize the special case of a string concatenation.
14117
14118 2006-05-08  Eric Blake  <ebb9@byu.net>
14119
14120         * gnulib-tool (func_version): Base copyright year on CVS date.
14121         (func_emit_copyright_notice): New function.
14122         (func_emit_lib_Makefile_am): Use it.
14123         (func_emit_tests_Makefile_am): Likewise.
14124         (func_import): Likewise.
14125
14126 2006-05-08  Bruno Haible  <bruno@clisp.org>
14127
14128         * modules/stdarg: New file.
14129         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
14130
14131 2006-05-08  Bruno Haible  <bruno@clisp.org>
14132
14133         * m4/stdarg.m4: New file, from GNU gettext.
14134
14135 2006-05-08  Bruno Haible  <bruno@clisp.org>
14136
14137         * config/srclist.txt (build-aux/config.rpath): different from latest
14138         release.
14139
14140 2006-05-08  Bruno Haible  <bruno@clisp.org>
14141
14142         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
14143
14144 2006-05-05  Jim Meyering  <jim@meyering.net>
14145
14146         * m4/warning.m4: New file, derived from bison's file by the same name.
14147
14148 2006-05-03  Bruno Haible  <bruno@clisp.org>
14149
14150         * lib/stdint_.h: Shorter URL.
14151         * lib/inttypes.h: Likewise.
14152
14153 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
14156
14157 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14158
14159         * lib/verify.h: Document the internals better.  Most of this change
14160         was written by Bruno Haible.
14161
14162 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14163
14164         * doc/verify.texi: New file, partly based on a proposal by
14165         Bruno Haible.
14166
14167 2006-05-02  Bruno Haible  <bruno@clisp.org>
14168
14169         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
14170         test from here...
14171         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
14172
14173 2006-04-29  Bruno Haible  <bruno@clisp.org>
14174
14175         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
14176         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
14177
14178 2006-04-29  Bruno Haible  <bruno@clisp.org>
14179
14180         * gnulib-tool: Make --update option actually work.
14181
14182 2006-04-29  Bruno Haible  <bruno@clisp.org>
14183
14184         * doc/gcd.texi: New file.
14185         * doc/gnulib.texi: Include it.
14186
14187 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
14188
14189         * lib/getdate.y (get_date): When adding relative date, start with the
14190         initial time, not with the result of the first mktime call.
14191
14192 2006-04-25  Bruno Haible  <bruno@clisp.org>
14193
14194         * gnulib-tool (func_import): Output the include directives in three
14195         blocks, sorted separately.
14196         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14197
14198 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14199
14200         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
14201         to define main with arguments, for C++.  Reported by Eric Blake.
14202         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
14203         Prefer 'int main ()' to 'int main (void)', for C++.
14204         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
14205         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
14206         for 'main', for C99 and C++.
14207
14208 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14209
14210         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
14211         Don't assume that exit status -1 is valid.
14212         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14213         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
14214         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
14215         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
14216         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
14217         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
14218         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
14219         functions can be used without declaring them, or that you can
14220         exit with status -1.
14221         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
14222
14223 2006-04-24  Karl Berry  <karl@gnu.org>
14224
14225         * config/srclist.txt (longdouble.m4): sync lost.
14226
14227 2006-04-24  Eric Blake  <ebb9@byu.net>
14228
14229         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
14230
14231 2006-04-24  Bruno Haible  <bruno@clisp.org>
14232
14233         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
14234         poll() implementation in AIX.
14235         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14236
14237 2006-04-24  Bruno Haible  <bruno@clisp.org>
14238
14239         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
14240         assigned exactly once.
14241
14242 2006-04-23  Claudio Fontana  <claudio@gnu.org>
14243             Bruno Haible  <bruno@clisp.org>
14244
14245         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
14246         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14247         for AM_CPPFLAGS.
14248
14249 2006-04-23  Bruno Haible  <bruno@clisp.org>
14250
14251         * modules/copy-file: Depend on unistd.
14252         * modules/execute: Likewise.
14253         * modules/fatal-signal: Likewise.
14254         * modules/findprog: Likewise.
14255         * modules/mkdtemp : Likewise.
14256         * modules/pipe: Likewise.
14257         * modules/wait-process: Likewise.
14258
14259 2006-04-23  Bruno Haible  <bruno@clisp.org>
14260
14261         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14262         condition was already detected.
14263         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14264
14265 2006-04-23  Bruno Haible  <bruno@clisp.org>
14266
14267         * lib/copy-file.c: Include <unistd.h> unconditionally.
14268         * lib/execute.c: Likewise.
14269         * lib/fatal-signal.c: Likewise.
14270         * lib/findprog.c: Likewise.
14271         * lib/mkdtemp.c: Likewise.
14272         * lib/pipe.h: Likewise.
14273         * lib/pipe.c: Likewise.
14274         * lib/wait-process.h: Likewise.
14275
14276 2006-04-23  Bruno Haible  <bruno@clisp.org>
14277
14278         * gnulib-tool (func_usage): Fix --import description. Document
14279         --update.
14280         (func_import): Create temporary file in a temporary directory, if
14281         --dry-run is specified. Silence errors from 'grep' when there are no
14282         m4 files in $m4dir.
14283         (func_create_testdir): Silence errors from 'grep' when there are no
14284         m4 files in $m4dir.
14285         Reported by Karl Berry <karl@freefriends.org>.
14286
14287 2006-04-20  Bruno Haible  <bruno@clisp.org>
14288
14289         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14290         one argument, so that the code will be portable to Autoconf 2.60.
14291         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14292         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14293         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14294
14295 2006-04-19  Derek Price  <derek@ximbiot.com>
14296             Eric Blake  <ebb9@byu.net>
14297
14298         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14299         rather than "/full/path.h".  Update comment to match.  Shorten &
14300         generalize m4_translit call via AS_TR_CPP.
14301
14302 2006-04-19  Derek Price  <derek@ximbiot.com>
14303             Eric Blake  <ebb9@byu.net>
14304
14305         * lib/inttypes.h: Correct grammar in comment.
14306
14307 2006-04-18  Derek Price  <derek@ximbiot.com>
14308             Paul Eggert  <eggert@cs.ucla.edu>
14309
14310         * modules/inttypes: New file.
14311         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14312
14313 2006-04-18  Derek Price  <derek@ximbiot.com>
14314             Paul Eggert  <eggert@cs.ucla.edu>
14315
14316         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14317         New files.
14318
14319 2006-04-18  Derek Price  <derek@ximbiot.com>
14320             Paul Eggert  <eggert@cs.ucla.edu>
14321
14322         * lib/inttypes.h: New file.
14323         * lib/strtoimax.c: Assume <inttypes.h>.
14324
14325 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14326
14327         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14328         isn't mounted.  Problem reported by Kir Kolyshkin.
14329
14330 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14331
14332         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14333         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14334         Derek R. Price.
14335         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14336         implementation.
14337
14338 2006-04-12  Eric Blake  <ebb9@byu.net>
14339
14340         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14341         is now done automatically by the corresponding Autoconf macro.
14342
14343 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14344
14345         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14346         time_r.h.
14347
14348 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14349
14350         Merge regex changes from libc, removing some of our
14351         POSIX-conformance changes that were rejected and redoing them in a
14352         less-intrusive way.
14353
14354         * lib/regcomp.c (re_compile_internal, init_dfa):
14355         Length arg is now size_t, not Idx.  All uses changed.
14356         (peek_token): Forward decl now says internal_function.
14357         (__re_error_msgid, __re_error_msgid_idx):
14358         Now static rather than extern with attribute_hidden.
14359         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14360         For some reason libc prefers K&R style defns for external functions.
14361         (regerror) [!defined _LIBC]: Likewise.
14362         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14363         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14364         (build_range_exp, build_collating_symbol):
14365         Use K&R-style defn.
14366         (re_compile_fastmap): Use '\0' to memset, not 0.
14367         (utf8_sb_map): Make the calculations more obvious.
14368         (init_dfa, parse_bracket_exp, build_charclass_op):
14369         Call calloc and cast result, as glibc does.
14370         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14371         (build_range_exp, build_collating_symbol):
14372         Now internal functions.
14373
14374         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14375
14376         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14377         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14378         Don't depend on VMS; depend on __VMS instead, for POSIX
14379         namespace cleanness.
14380         (regoff_t): Define to ssize_t, not long int.
14381
14382         Remove the REG_ macros named below.  Instead, make the old names
14383         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14384         __USE_GNU_REGEX.
14385         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14386         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14387         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14388         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14389         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14390         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14391         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14392         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14393         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14394         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14395         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14396         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14397         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14398         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14399         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14400         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14401         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14402         (REG_NREGS):
14403         Remove.  All uses replaced by the old RE_* names.
14404         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14405         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14406         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14407         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14408         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14409         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14410         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14411         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14412         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14413         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14414         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14415         Don't bother having these macros be independent of each others'
14416         values, since they no longer exist in the POSIX name space.
14417
14418         Rename the following member names back to their old names,
14419         unless !__USE_GNU_REGEX.  All uses changed back.
14420         (buffer): Renamed from re_buffer.
14421         (allocated): Renamed from re_allocated.
14422         (used): Renamed from re_used.
14423         (syntax): Renamed from re_syntax.
14424         (fastmap): Renamed from re_fastmap.
14425         (translate): Renamed from re_translate.
14426         (can_be_null): Renamed from re_can_be_null.
14427         (regs_allocated): Renamed from re_regs_allocated.
14428         (fastmap_accurate): Renamed from re_fastmap_accurate.
14429         (no_sub): Renamed from re_no_sub.
14430         (not_bol): Renamed from re_not_bol.
14431         (not_eol): Renamed from re_not_eol.
14432         (newline_anchor): Renamed from re_newline_anchor.
14433         (num_regs): Renamed from rm_num_regs.
14434         (start): Renamed from rm_start.
14435         (end): Renamed from rm_end.
14436
14437         (free_state): Move up a bit.
14438
14439         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14440         #define to be empty.
14441         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14442         when that is what is intended.
14443         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14444         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14445         (MAX): New macro.
14446         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14447         All uses changed back to re_malloc, etc.  It's now the caller's
14448         responsibility to check for overflow; all callers changed.
14449         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14450         (re_x2nrealloc): Remove.
14451         (free_state): Remove decl.
14452
14453         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14454         (re_set_registers, re_exec):
14455         Use K&R-style defn.
14456
14457         2006-01-31  Roland McGrath  <roland@redhat.com>
14458
14459         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14460         Reported by Mike Frysinger <vapier@gentoo.org>.
14461
14462         2006-01-15  Andreas Jaeger  <aj@suse.de>
14463
14464         [BZ #1950]
14465         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14466         build_wcs_upper_buffer change.
14467         (build_wcs_upper_buffer): Change return type.
14468
14469         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14470
14471         * lib/regex_internal.h: Include <stdint.h> if available.
14472
14473         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14474
14475         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14476
14477         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14478
14479         * lib/regcomp.c: Adjust for changed secondary hash function.
14480
14481         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14482
14483         * lib/regex.h: Pretty printing.
14484         Clean up namespace a bit.
14485
14486         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14487
14488         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14489         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14490
14491         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14492                     Ulrich Drepper  <drepper@redhat.com>
14493
14494         [BZ #1302]
14495         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14496         changed.
14497         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14498
14499         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14500
14501         [BZ #281]
14502         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14503         * lib/regcomp.c: Remove unnecessary uses of
14504         unsigned RE_TRANSLATE_TYPE.
14505         * lib/regex_internal.h: Likewise.
14506         * lib/regex_internal.c: Likewise.
14507         * lib/regexec.c: Likewise.
14508         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14509
14510         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14511
14512         * lib/regexec.c (find_recover_state): Remove unnecessary
14513         initialization.
14514         (transit_state_bkref): Make DFA a const pointer.
14515         (get_subexp): Likewise.
14516         (check_arrival): Likewise.
14517         (update_cur_sifted_state): Likewise.
14518         (re_search_internal): Likewise.
14519         (prune_impossible_nodes): Likewise.
14520         (acquire_init_state_context): Likewise.
14521         (proceed_next_node): Likewise.
14522         (set_regs): Likewise.
14523         (free_fail_stack_return): Likewise.
14524         (check_arrival_expand_ecl): Mark DFA parameter as const.
14525         (check_arrival_expand_ecl_sub): Likewise.
14526         (check_subexp_limits): Likewise.
14527         (sub_epsilon_src_nodes):  Likewise.
14528         (add_epsilon_src_nodes):  Likewise.
14529         (merge_state_array): Likewise.
14530         (update_regs): Likewise.
14531         (build_trtable): Likewise.
14532         (sift_states_backward): Mark MCTX parameter as const.
14533         (build_sifted_states): Likewise.
14534         (update_cur_sifted_state): Likewise.
14535         (sift_states_mkref): Likewise.
14536         (check_arrival_expand_ecl): Mark eclosure as const.
14537         (check_dst_limits_calc_pos_1): Likewise.
14538         * lib/regex_internal.h (re_match_context_t): Make dfa a const
14539         pointer.
14540
14541         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
14542
14543         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
14544         (transit_state_sb): Likewise.
14545         (transit_state_mb): Likewise.
14546         (sift_states_iter_mb): Likewise.
14547         (check_arrival_add_next_nodes): Likewise.
14548         (check_node_accept_bytes): Change first parameter to pointer-to-const.
14549         [_LIBC] (re_search_2_stub): Use mempcpy.
14550
14551         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
14552         mbrtowc for very simple UTF-8 case.
14553
14554         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
14555         a pointer-to-const.
14556         (re_acquire_state_context): Likewise.
14557         * lib/regex_internal.h: Adjust prototypes.
14558
14559         * lib/regex.c: Prevent using C++ compilers.
14560
14561         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
14562         (re_acquire_state_context): Likewise.
14563
14564 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14565
14566         * modules/regex (Depends-on): Add ssize_t.
14567
14568 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14569
14570         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
14571         translation table.
14572
14573 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14574
14575         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
14576
14577 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
14578             Bruno Haible  <bruno@clisp.org>
14579
14580         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
14581         <sys/types.h> and <inttypes.h>.
14582
14583 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14584
14585         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
14586         `__error_t_defined', so argp.h will not typedef the former.
14587
14588 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
14589
14590         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
14591         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
14592         glibc names.  Even if glibc is changed to conform to POSIX, the
14593         traditional names will be available anyway, since regex depends on
14594         the extensions module.  Also, fix a longstanding typo in the
14595         implementation of Spencer ERE test #75 from grep 2.3.  Problems
14596         reported by Emanuele Giaquinta.  Also, change sense of cached
14597         variable, so that the message makes sense.
14598
14599 2006-03-24  Simon Josefsson  <jas@extundo.com>
14600
14601         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
14602         including some doc fixes.
14603         (base64_encode_alloc): Fix +1 bug on allocation failures.
14604
14605 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14606
14607         * lib/base64.c (base64_encode): Do not read past end of array with
14608         unsanitized input on systems with CHAR_BIT > 8.
14609
14610 2006-03-24  Eric Blake  <ebb9@byu.net>
14611
14612         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
14613
14614 2006-03-22  Karl Berry  <karl@gnu.org>
14615
14616         * config/srclist.txt (*setenv.[ch]): get from coreutils.
14617         * config/srclistvars.sh (COREUTILS): new var.
14618
14619 2006-03-17  Jim Meyering  <jim@meyering.net>
14620
14621         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
14622         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
14623
14624 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14625
14626         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
14627         no longer needs it.  Instead, check that regoff_t is as least
14628         as wide as ptrdiff_t.
14629
14630         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
14631         so that our regex.h stays compatible with the installed regex.
14632         This is helpful for installers who configure --without-included-regex.
14633         Problem reported by Emanuele Giaquinta.
14634
14635 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14636
14637         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
14638         Typedef to long int, not to off_, as POSIX will likely change
14639         in that direction.
14640
14641 2006-03-15  Eric Blake  <ebb9@byu.net>
14642
14643         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
14644
14645 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14646
14647         * lib/argp-help.c (validate_uparams): Fix typo
14648         * lib/argp-parse.c (argp_default_options): Consistently begin help
14649         messages with a lowercase letter.
14650
14651 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
14652
14653         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
14654         overrun buffers and shouldn't be used (much as gets shouldn't be
14655         used).
14656         * lib/time_r.c (asctime_r, ctime_r): Likewise.
14657
14658 2006-03-08  Simon Josefsson  <jas@extundo.com>
14659
14660         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
14661         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14662
14663 2006-03-08  Simon Josefsson  <jas@extundo.com>
14664
14665         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
14666         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14667
14668 2006-03-08  Simon Josefsson  <jas@extundo.com>
14669
14670         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
14671         signal that configure disabled the device.
14672
14673 2006-03-08  Simon Josefsson  <jas@extundo.com>
14674
14675         * build-aux/maint.mk: Fix refresh-po, to handle no translated
14676         languages.
14677
14678 2006-03-07  Simon Josefsson  <jas@extundo.com>
14679
14680         * modules/getopt (Depends-on): Add unistd.
14681
14682         * modules/unistd: New file.
14683
14684 2006-03-07  Simon Josefsson  <jas@extundo.com>
14685
14686         * modules/gc-random: New file.
14687
14688 2006-03-07  Simon Josefsson  <jas@extundo.com>
14689
14690         * m4/unistd_h.m4: New file.
14691
14692 2006-03-07  Simon Josefsson  <jas@extundo.com>
14693
14694         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
14695         test to be side-effect free by storing the result in the cache
14696         variable gl_cv_lib_readline, and moving the assignment of
14697         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
14698         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14699
14700 2006-03-07  Simon Josefsson  <jas@extundo.com>
14701
14702         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
14703         error on missing devices (the functions will return an error).
14704
14705         * m4/gc.m4: Move random stuff to gc-random.m4
14706
14707 2006-03-07  Simon Josefsson  <jas@extundo.com>
14708
14709         * lib/unistd_.h: New file.
14710
14711 2006-03-07  Simon Josefsson  <jas@extundo.com>
14712
14713         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
14714
14715 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
14718         Problem reported by Juan Manuel Guerrero.
14719
14720 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14721
14722         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
14723         the unistd module.
14724         * lib/getlogin_r.c: Likewise.
14725         * lib/getlogin_r.h: Likewise.
14726         * lib/glob.c: Likewise.
14727         * lib/pagealign_alloc.c: Likewise.
14728         * lib/unistd_.h: Remove; no longer needed.
14729
14730 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14731
14732         * MODULES.html.sh (Support for systems lacking POSIX:2001):
14733         Add unistd.
14734         * modules/c-stack (Depends-on): Add unistd.
14735         * modules/getlogin_r: Likewise.
14736         * modules/glob: Likewise.
14737         * modules/pagealign_alloc: Likewise.
14738         * modules/unistd (Files): Remove lib/unistd_.h.
14739         (EXTRA_DIST): Remove.
14740         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
14741         need unistd_.h.
14742         (MOSTLYCLEANFILES): Remove unistd.h-t.
14743
14744 2006-03-03  Simon Josefsson  <jas@extundo.com>
14745
14746         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
14747
14748 2006-03-03  Simon Josefsson  <jas@extundo.com>
14749
14750         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
14751         libidn and bison.
14752
14753 2006-03-03  Simon Josefsson  <jas@extundo.com>
14754
14755         * build-aux/maint.mk: Add indent target.
14756
14757 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
14758
14759         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
14760         our replacement poll.h in any case, to avoid a differing
14761         declaration from a system header.  Seen on AIX.
14762
14763 2006-03-01  Simon Josefsson  <jas@extundo.com>
14764
14765         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
14766         <kasal@ucw.cz>.
14767
14768 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14769
14770         * modules/gettime (Depends-on): Add extensions module.
14771         * modules/nanosleep (Depends-on): Likewise.
14772         * modules/settime (Depends-on): Likewise.
14773
14774 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14775
14776         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
14777         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
14778         pedantically.
14779         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14780         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
14781
14782         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
14783         not "==".  Reported by Ralf Wildenhues.
14784
14785 2006-03-01  Karl Berry  <karl@gnu.org>
14786
14787         * doc/Copyright/request-*: new files, synced from gnuorg.
14788
14789 2006-03-01  Karl Berry  <karl@gnu.org>
14790
14791         * config/srclist.txt (Copyright/*): new entries.
14792
14793 2006-02-28  Simon Josefsson  <jas@extundo.com>
14794
14795         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
14796
14797 2006-02-27  Simon Josefsson  <jas@extundo.com>
14798
14799         * lib/base64.h: Indent #define's.  From Jim Meyering
14800         <jim@meyering.net>.
14801
14802 2006-02-27  Jim Meyering  <jim@meyering.net>
14803
14804         Revert the change of 2006-02-24, so these files can continue
14805         to be sync'd from gettext.
14806         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
14807         of `config.h'.
14808
14809 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14810
14811         * modules/intprops: New file.
14812         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
14813         Add intprops.
14814         * modules/getloadavg (Files): Remove lib/intprops.h.
14815         (Depends-on): Add intprops.
14816         * modules/human: Likewise.
14817         * modules/inttostr: Likewise.
14818         * modules/openat: Likewise.
14819         * modules/sig2str: Likewise.
14820         * modules/userspec: Likewise.
14821         * modules/utimecmp: Likewise.
14822         * modules/xnanosleep: Likewise.
14823         * modules/xstrtol: Likewise.
14824
14825 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
14826
14827         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
14828         * modules/lock-tests (TESTS): Use $(EXEEXT).
14829         * modules/tls-tests: Likewise.
14830         * modules/argp-tests: Likewise.
14831         (check_PROGRAMS): New var, replacing...
14832         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
14833
14834 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14835
14836         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
14837         `config.h'.
14838
14839 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
14840
14841         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
14842
14843 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14844
14845         Sync from coreutils.
14846         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
14847         gl_CHDIR_SAFER.
14848
14849 2006-02-22  Jim Meyering  <jim@meyering.net>
14850
14851         Sync from coreutils.
14852         * m4/chdir-safer.m4: New file.
14853
14854 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
14855
14856         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
14857         AT_FDCWD exceeds INT_MAX.
14858         * lib/openat.h (AT_FDCWD): Likewise.
14859
14860 2006-02-17  Eric Blake  <address@hidden>
14861
14862         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
14863
14864 2006-02-16  Simon Josefsson  <jas@extundo.com>
14865
14866         * modules/getaddrinfo (Depends-on): Add sys_socket.
14867
14868 2006-02-15  Simon Josefsson  <jas@extundo.com>
14869
14870         * build-aux/maint.mk: Add dsyntax-check rule.
14871
14872 2006-02-15  Eric Blake  <ebb9@byu.net>
14873
14874         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
14875         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
14876         'present but cannot compile' warnings on cygwin.
14877         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
14878         use ws2tcpip.h if sys/socket.h works.
14879         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
14880         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
14881
14882 2006-02-14  Simon Josefsson  <jas@extundo.com>
14883
14884         * modules/maintainer-makefile (Files): Rename.
14885
14886         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
14887         and (the local) Makefile.cfg to maint-cfg.mk.
14888
14889         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
14890         to the latter.
14891
14892         * modules/maintainer-makefile: New module.
14893
14894         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
14895         severaly stripped to make it possible to build it up from scratch
14896         with reliable tests.
14897
14898         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
14899         fixes to permit overriding the default actions when configure and
14900         makefile are not available.
14901
14902 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
14903
14904         Sync from coreutils.
14905         * modules/lstat (Depends-on): Don't depend on xalloc.
14906         (License): Change from GPL to LGPL, since this is now simply a
14907         replacement for a libc function.
14908
14909 2006-02-14  Jim Meyering  <jim@meyering.net>
14910
14911         Sync from coreutils.
14912
14913         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
14914         failure on deficient systems, and simplify gnulib lgpl dependencies.
14915         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
14916         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
14917
14918         * lib/xalloc-die.c: Remove unused definition of N_.
14919
14920 2006-02-14  Jim Meyering  <jim@meyering.net>
14921
14922         Sync from coreutils.
14923         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
14924         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
14925         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
14926         double-quote uses of that variable, to accommodate the rare case in
14927         which getmntent is available in none of the libraries checked.  This
14928         happens at least on FreeBSD 5.0.
14929
14930 2006-02-13  Simon Josefsson  <jas@extundo.com>
14931
14932         * gnulib-tool (Usage): Fix --import, from
14933         karl@freefriends.org (Karl Berry).
14934
14935 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14936
14937         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
14938
14939 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
14940
14941         * lib/argp-namefrob.h: Restore changes accidentally lost during the
14942         "autoupdate" on 2005-12-12.
14943
14944 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14945
14946         * modules/closeout (Depends-on): Remove atexit.
14947
14948 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14949
14950         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
14951         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
14952
14953 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
14954
14955         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
14956         __EXTENSIONS__ if this causes compilation to fail.  Problem
14957         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
14958         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
14959
14960 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
14961
14962         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
14963         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
14964         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
14965         All uses changed.
14966
14967 2006-01-26  Simon Josefsson  <jas@extundo.com>
14968
14969         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
14970         prototype is visible on mingw32.
14971
14972         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
14973         for mingw32.
14974
14975         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
14976         mingw32).
14977
14978 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
14979
14980         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
14981         attempt to open for write; this always fails, at least on POSIX
14982         hosts.  This reinstates the 2006-01-09 change, which was
14983         inadvertently removed.
14984
14985 2006-01-26  Bruno Haible  <bruno@clisp.org>
14986
14987         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
14988         Reported by Paul Eggert.
14989
14990 2006-01-26  Bruno Haible  <bruno@clisp.org>
14991             Paul Eggert  <eggert@cs.ucla.edu>
14992
14993         * lib/stdbool_.h (_Bool)
14994         [(! (defined __cplusplus || defined __BEOS__)
14995           && !defined __GNUC__
14996           && !(defined __HP_cc || defined __xlc__
14997                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
14998                || defined __sgi))]:
14999         #define to signed char in these cases too; this simplifies
15000         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15001         etc., separately) and makes it more conservative.
15002
15003 2006-01-25  Simon Josefsson  <jas@extundo.com>
15004
15005         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15006         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15007         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15008
15009 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15010
15011         * lib/argp-namefrob.h: Bugfix. Remove stray #
15012
15013 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15014
15015         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15016         so that we test the test.
15017         Check for yet another HP-UX cc bug involving *bool |= bool.
15018
15019 2006-01-25  Karl Berry  <karl@gnu.org>
15020
15021         * config/srclist.txt (vasnprintf.c): sync lost.
15022
15023 2006-01-25  Jim Meyering  <jim@meyering.net>
15024
15025         Sync from the stable (b5) branch of coreutils:
15026
15027         * lib/fts.c (fts_children): Don't let close() clobber errno from
15028         failed fchdir().
15029
15030         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15031         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15032         a dangling symlink.  That can also happen at least for ELOOP.
15033         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15034         FYI, this bug predates the inclusion of fts.c in coreutils.
15035
15036         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15037         in their own block, so pre-c99 compilers don't object.
15038
15039         Avoid the double-free (first in fts_read, second in fts_close) that
15040         would occur when an `active' directory is made inaccessible (e.g.,
15041         via chmod a-x) during a traversal.
15042         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15043         before returning.  Reproduce this failure by
15044         mkdir -p a/b; cd a; chmod a-x . b
15045         Reported by Stavros Passas.
15046
15047 2006-01-25  Jim Meyering  <jim@meyering.net>
15048
15049         * lib/fileblocks.c: Remove more useless parentheses.
15050         * lib/readutmp.h: Likewise.
15051
15052 2006-01-25  Bruno Haible  <bruno@clisp.org>
15053
15054         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15055         warnings.
15056         Reported by Paul Eggert.
15057
15058 2006-01-25  Bruno Haible  <bruno@clisp.org>
15059
15060         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15061         rid of a trap command. For Solaris sh.
15062         Reported by Mark D. Baushke <mdb@gnu.org>.
15063
15064 2006-01-24  Simon Josefsson  <jas@extundo.com>
15065
15066         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15067         Bruno.
15068
15069 2006-01-24  Karl Berry  <karl@gnu.org>
15070
15071         * config/srclist.txt (argp-namefrob.h): sync lost.
15072
15073 2006-01-24  Jim Meyering  <jim@meyering.net>
15074
15075         * modules/openat (Files): Add lib/intprops.h.
15076         From Mark D. Baushke.
15077
15078 2006-01-24  Jim Meyering  <jim@meyering.net>
15079
15080         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
15081         Reported by Mark D. Baushke.
15082
15083 2006-01-24  Jim Meyering  <jim@meyering.net>
15084
15085         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
15086
15087 2006-01-24  Bruno Haible  <bruno@clisp.org>
15088
15089         * modules/strnlen (Maintainer): Change from glibc to all.
15090
15091 2006-01-24  Bruno Haible  <bruno@clisp.org>
15092
15093         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
15094         Patch by Paul Eggert.
15095
15096 2006-01-24  Bruno Haible  <bruno@clisp.org>
15097
15098         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
15099         already has it.
15100         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
15101         2005-11-26.
15102
15103         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
15104         'signed char' to avoid problems with the built-in _Bool type.
15105         Reported by Paul Eggert on 2005-11-26.
15106
15107 2006-01-24  Bruno Haible  <bruno@clisp.org>
15108
15109         * gnulib-tool (func_import): Avoid constructing complicated sed
15110         expressions inside backquote.
15111         Report and solution by Mark D. Baushke <mdb@gnu.org>.
15112
15113 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
15114
15115         These changes imported from libc.
15116         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
15117         test and two separate function calls.
15118         * lib/strndup.c (__strndup): Add libc_hidden_def.
15119
15120 2006-01-23  Simon Josefsson  <jas@extundo.com>
15121
15122         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
15123         Remove the test_*_SOURCES variable: automake infers it by default.
15124         * modules/tls-tests: Likewise.
15125
15126 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15127
15128         Work around porting bugs reported by Dieter in
15129         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
15130         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
15131         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
15132         Include "getopt.h" first, to check interface.
15133         (getenv): Declare only if defined HAVE_DECL_GETENV &&
15134         !HAVE_DECL_GETENV.
15135         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
15136         (__strndup): Revert to K&R-style function dfns, the glibc style.
15137         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
15138         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
15139         Include strnlen.h first, to get prototype properly.
15140         (strnlen): Renamed from __strnlen.
15141         Remove weak alias.
15142
15143 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15144
15145         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
15146
15147 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15148
15149         * config/srclist.txt: Adjust to reflect glibc reorganization.
15150         This affects only comments.
15151
15152 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15153
15154          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
15155          Reported by Bruce Korb <bkorb@gnu.org>.
15156
15157 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
15158
15159         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
15160         to pacify gcc -Wswitch-default.
15161
15162 2006-01-22  Bruno Haible  <bruno@clisp.org>
15163
15164         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
15165         temporary buffer for sprintf, take into account the precision also
15166         for 'd', 'i', 'u', 'o', 'x', 'X'.
15167
15168 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15169
15170         * modules/argp-tests: New module
15171         * tests/test-argp.c: New file
15172         * tests/test-argp-2.sh: New file
15173
15174 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15175
15176         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
15177         (__argp_base_name): Removed
15178         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
15179         typo.
15180         (__argp_base_name): Provide macro definition or extern declaration
15181         depending on the configuration
15182
15183 2006-01-20  Simon Josefsson  <jas@extundo.com>
15184
15185         * modules/inet_ntop (Depends-on): Depend on sys_socket.
15186
15187 2006-01-20  Simon Josefsson  <jas@extundo.com>
15188
15189         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
15190
15191 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15192
15193         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
15194         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
15195         Suggested by Bruno Haible.
15196
15197 2006-01-20  Karl Berry  <karl@gnu.org>
15198
15199         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
15200         until changes propagate, I guess.
15201
15202 2006-01-19  Simon Josefsson  <jas@extundo.com>
15203
15204         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
15205
15206 2006-01-19  Simon Josefsson  <jas@extundo.com>
15207
15208         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
15209
15210 2006-01-19  Simon Josefsson  <jas@extundo.com>
15211
15212         * gnulib-tool: Set check_PROGRAMS.
15213
15214         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15215         modules/des-tests, modules/gc-arcfour-tests,
15216         modules/gc-arctwo-tests, modules/gc-des-tests,
15217         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15218         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15219         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15220         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15221         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15222         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
15223         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
15224         test_*_SOURCES.
15225
15226 2006-01-18  Simon Josefsson  <jas@extundo.com>
15227
15228         * modules/socklen (Depends-on): Depend on sys_socket.
15229
15230 2006-01-18  Simon Josefsson  <jas@extundo.com>
15231
15232         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15233         modules/des-tests, modules/gc-arcfour-tests,
15234         modules/gc-arctwo-tests, modules/gc-des-tests,
15235         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15236         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15237         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15238         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15239         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15240         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
15241         $(EXEEXT) to automake TESTS variable, for mingw32.
15242
15243 2006-01-17  Simon Josefsson  <jas@extundo.com>
15244
15245         * modules/socklen (Include): Need sys/socket.h.
15246
15247 2006-01-17  Bruno Haible  <bruno@clisp.org>
15248
15249         * modules/ssize_t (Include): Add <sys/types.h>.
15250
15251 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15252
15253         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15254         it's not portable and it doesn't work with cross-compiles.
15255         Problem reported by Bruno Haible.  Fix missing-$ typo in
15256         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15257         -zignore from being used with Sun's C compiler.
15258
15259 2006-01-12  Simon Josefsson  <jas@extundo.com>
15260
15261         * lib/base64.c: Fix warning, reported by Bruno Haible
15262         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15263
15264 2006-01-12  Bruno Haible  <bruno@clisp.org>
15265
15266         * modules/ldd: New file.
15267         * build-aux/ldd.sh.in: New file.
15268         * MODULES.html.sh (Support for building libraries and executables): Add
15269         ldd.
15270
15271 2006-01-12  Bruno Haible  <bruno@clisp.org>
15272
15273         * m4/ldd.m4: New file.
15274
15275 2006-01-12  Bruno Haible  <bruno@clisp.org>
15276
15277         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15278         endless loop while replacing $auxdir with build-aux.
15279
15280 2006-01-11  Simon Josefsson  <jas@extundo.com>
15281
15282         * lib/stdint_.h (SIZE_MAX): Add missing (.
15283
15284 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15285
15286         Sync from coreutils.
15287         * lib/md5.c: Fix commentary typos.
15288         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15289         * lib/md5.h (__attribute__): Remove; unused.
15290         * lib/sha1.c: Fix commentary to match md5 better.
15291         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15292         so that we don't need to worry about alignment.  All uses changed.
15293         This merges the 2005-10-28 md5 change into sha1.
15294
15295 2006-01-11  Jim Meyering  <jim@meyering.net>
15296
15297         Sync from coreutils.
15298         * lib/md5.c (OP): Fix spacing.
15299
15300 2006-01-11  Bruno Haible  <bruno@clisp.org>
15301
15302         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15303         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15304         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15305
15306 2006-01-11  Bruno Haible  <bruno@clisp.org>
15307
15308         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15309         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15310         the "early" section as well.
15311
15312 2006-01-11  Bruno Haible  <bruno@clisp.org>
15313
15314         Avoid "ar: no archive members specified" error on MacOS X.
15315         * gnulib-tool (func_modules_add_dummy): New function.
15316         (func_import, func_create_testdir): Invoke it.
15317
15318 2006-01-11  Bruno Haible  <bruno@clisp.org>
15319
15320         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15321         with $auxdir in AC_CONFIG_FILES statements.
15322
15323 2006-01-11  Bruno Haible  <bruno@clisp.org>
15324
15325         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15326         Initialize also noinst_HEADERS to empty.
15327
15328 2006-01-11  Bruno Haible  <bruno@clisp.org>
15329
15330         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15331         variables.
15332         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15333         autoreconf.
15334
15335 2006-01-11  Bruno Haible  <bruno@clisp.org>
15336
15337         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15338         overridable by the user.
15339         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15340
15341 2006-01-10  Simon Josefsson  <jas@extundo.com>
15342
15343         * modules/sys_socket: New file.
15344
15345 2006-01-10  Simon Josefsson  <jas@extundo.com>
15346
15347         * m4/sys_socket_h.m4: New file.
15348
15349 2006-01-10  Simon Josefsson  <jas@extundo.com>
15350
15351         * lib/socket_.h: New file.
15352
15353 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15354
15355         * modules/readutmp (Maintainer): Add myself.
15356
15357 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15358
15359         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15360         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15361         People who are still concerned with buggy memcmp implementations
15362         can invoke gl_FUNC_MEMCMP themselves.
15363
15364 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15365
15366         * lib/regex_internal.h (BITSET_WORD_BITS):
15367         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15368         preprocessor mishandles large unsigned values as if they were signed.
15369         Problem reported by Claudio Fontana in
15370         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15371
15372 2006-01-10  Jim Meyering  <jim@meyering.net>
15373
15374         Avoid the double-free (first in fts_read, second in fts_close) that
15375         would occur when an `active' directory is made inaccessible (e.g.,
15376         via chmod a-x) during a traversal.
15377         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15378         before returning.  Reproduce this failure by
15379         mkdir -p a/b; cd a; chmod a-x . b
15380         Reported by Stavros Passas.
15381
15382         Sync from coreutils.
15383         * lib/sha1.c: Tweak grammar in a comment.
15384
15385 2006-01-10  Jim Meyering  <jim@meyering.net>
15386
15387         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15388         Patch by Joerg Sonnenberger.
15389
15390 2006-01-10  Bruno Haible  <bruno@clisp.org>
15391
15392         * modules/readutmp: Depend on module free.
15393         * modules/strtok_r: Depend on module restrict.
15394
15395 2006-01-10  Bruno Haible  <bruno@clisp.org>
15396
15397         * modules/gettext (configure.ac): Add an invocation of
15398         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15399
15400 2006-01-10  Bruno Haible  <bruno@clisp.org>
15401
15402         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15403         Reported by Werner Lemberg <wl@gnu.org>.
15404
15405 2006-01-10  Bruno Haible  <bruno@clisp.org>
15406
15407         * lib/localcharset.c: Update from GNU gettext.
15408
15409 2006-01-10  Bruno Haible  <bruno@clisp.org>
15410
15411         * lib/argp.h (__const): Remove macro. Use const instead.
15412         * lib/argp-fmtstream.h (__const): Likewise.
15413         * lib/glob_.h (__const): Remove macro.
15414         * lib/glob-libc.h: Use const instead of __const.
15415
15416 2006-01-10  Bruno Haible  <bruno@clisp.org>
15417
15418         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15419         variable.
15420         Needed to avoid an automake error regarding the 'gettext' module.
15421
15422 2006-01-09  Simon Josefsson  <jas@extundo.com>
15423
15424         * modules/inet_ntop (Depends-on): Add restrict.
15425
15426 2006-01-09  Simon Josefsson  <jas@extundo.com>
15427
15428         * modules/gc-rijndael-tests (License): Put under LGPL.
15429
15430         * modules/gc-des-tests (License): Likewise.
15431
15432         * modules/gc-arcfour-tests (License): Likewise.
15433
15434         * modules/gc-arctwo-tests (License): Likewise.
15435
15436         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15437
15438         * modules/gc-hmac-sha1-tests (Files): Likewise.
15439
15440         * modules/gc-hmac-md5-tests (License): Likewise.
15441
15442         * modules/gc-sha1-tests (License): Likewise.
15443
15444         * modules/gc-md5-tests (License): Likewise.
15445
15446         * modules/gc-md4-tests (License): Likewise.
15447
15448         * modules/gc-md2-tests (License): Likewise.
15449
15450         * modules/gc-tests (License): Likewise.
15451
15452         * modules/des-tests (License): Likewise.
15453
15454         * modules/md4-tests (License): Likewise.
15455
15456         * modules/md2-tests (License): Likewise.
15457
15458 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15459
15460         Sync from coreutils:
15461
15462         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15463         * modules/lib-ignore: New file.
15464         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15465         chdir-safer.m4, lchmod.m4.
15466         * modules/openat: Add mkdirat.c, openat-priv.h.
15467
15468 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15469
15470         Sync from coreutils.
15471         * m4/lib-ignore.m4: New file.
15472         * m4/lchmod.m4: New file.
15473
15474 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15475
15476         Sync from coreutils.
15477         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15478         for write access: POSIX says that must fail.
15479         * lib/fts.c (diropen): Likewise.
15480         * lib/save-cwd.c (save_cwd): Likewise.
15481         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15482         well, for minor improvements on hosts that lack O_DIRECTORY.
15483         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15484         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15485         Fall back on chown if open failed with EACCES.
15486
15487         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15488         Report an error at compile-time if only a 1-second nominal clock
15489         resolution is found.
15490
15491         * lib/lchmod.h: New file.
15492         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15493         (make_dir_parents): Use lchown rather than chown, and
15494         lchmod rather than chmod.
15495
15496         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15497         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15498         "proc" reported by n0dalus.
15499
15500         * lib/mountlist.c: Include <limits.h>.
15501         (dev_from_mount_options)
15502         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15503         New function.  It no longer assumes "dev=" has the System V meaning
15504         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15505         (read_file_system_list)
15506         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15507         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15508         dev= in that case.
15509
15510         * lib/posixtm.h (PDS_PRE_2000): New macro.
15511         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15512         allow_century.  All usages changed.  Reject dates outside the range
15513         1969-1999 if PDS_PRE_2000 is used.
15514
15515 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15516
15517         Sync from coreutils.
15518         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15519         (Time of day items): Mention the possibility of leap seconds.
15520         Problem reported by Dr. David Alan Gilbert.
15521
15522 2006-01-09  Jim Meyering  <jim@meyering.net>
15523
15524         Sync from coreutils.
15525
15526         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15527
15528         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15529
15530         * lib/modechange.c (mode_compile): Reject an invalid mode string
15531         that starts with an octal digit.  From Andreas Gruenbacher.
15532
15533         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
15534         and dup to open_safer and dup_safer, respectively.
15535         (openat_permissive): Fix typo in comment.
15536
15537         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
15538         "gettext.h"; either no longer needed or are guaranteed by openat.h.
15539         (_): Remove; no longer needed.
15540         (openat): Renamed from rpl_openat; no need for rpl_openat
15541         since openat.h renames openat for us.
15542         Replace most of the body with a call to openat_permissive,
15543         to avoid duplicate code.
15544         Port to (probably hypothetical) environments were mode_t is
15545         wider than int.
15546         (openat_permissive): Require mode arg, so that we can check
15547         types better.  Put it just after flags.  Change cwd failure
15548         indicator from pointer-to-bool to pointer-to-errno-value.
15549         All callers changed.
15550         Invoke openat_save_fail and/or openat_restore_fail if
15551         cwd_errno is null, so that openat can call us.
15552         (openat_permissive, fdopendir, fstatat, unlinkat):
15553         Simplify errno handling to avoid some duplicate code,
15554         as it's OK to set errno on success.
15555         * lib/openat.h: Revamp code so that function macros depend on
15556         __OPENAT_PREFIX only, not also on AT_FDCWD.
15557         (openat_ro): Remove.  Caller changed to use openat_permissive.
15558         (openat_permissive): Now a macro, if not a function.
15559         (openat_restore_fail, openat_save_fail): Now always functions,
15560         since mkdirat needs them even if __OPENAT_PREFIX is defined.
15561
15562         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
15563         and openat.c.
15564         * lib/mkdirat.c: Include openat-priv.h.
15565         Remove definitions of macros defined therein.
15566         * lib/openat.c: Likewise.
15567
15568         * lib/mkdirat.c (mkdirat): New file and function.
15569         * lib/openat.h (mkdirat): Declare.
15570
15571         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
15572
15573         * lib/openat.h (openat_permissive): Declare.
15574         (openat_ro): Define.
15575
15576         * lib/openat.c (EXPECTED_ERRNO): New macro.
15577         (openat_permissive): New function -- used in remove.c rewrite.
15578         (all functions): Set errno just before returning, only if there
15579         was an actual failure.
15580         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
15581
15582         Emulate openat-family functions using Linux's procfs, if possible.
15583         Idea and some code based on Ulrich Drepper's glibc changes.
15584
15585         * lib/openat.c: (BUILD_PROC_NAME): New macro.
15586         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
15587         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
15588         before falling back on save_cwd and restore_cwd.
15589         (fdopendir, fstatat, unlinkat): Likewise.
15590
15591         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
15592         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
15593
15594         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
15595         as second argument to va_arg.  Otherwise, some versions of gcc
15596         warn that `if this code is reached, the program will abort'.
15597
15598 2006-01-09  Jim Meyering  <jim@meyering.net>
15599
15600         Sync from coreutils.
15601         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
15602         Require openat-priv.h.
15603
15604 2006-01-09  Bruno Haible  <bruno@clisp.org>
15605
15606         * modules/strnlen (Include): Use strnlen.h.
15607
15608 2006-01-09  Bruno Haible  <bruno@clisp.org>
15609
15610         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
15611
15612 2006-01-09  Bruno Haible  <bruno@clisp.org>
15613
15614         * lib/sysexit_.h (EX_OK): New macro.
15615         Suggested by Martin Lambers <marlam@marlam.de>.
15616
15617 2006-01-09  Bruno Haible  <bruno@clisp.org>
15618
15619         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
15620         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
15621
15622 2006-01-09  Bruno Haible  <bruno@clisp.org>
15623
15624         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
15625         numbers.
15626
15627 2006-01-09  Bruno Haible  <bruno@clisp.org>
15628
15629         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
15630         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
15631         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
15632         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
15633
15634 2006-01-09  Bruno Haible  <bruno@clisp.org>
15635
15636         * build-aux/javacomp.sh.in: New file, moved from lib/.
15637         * modules/javacomp-script (Files): Update.
15638         (configure.ac): Add AC_CONFIG_FILES invocation.
15639         (EXTRA_DIST): Remove variable.
15640
15641         * build-aux/javaexec.sh.in: New file, moved from lib/.
15642         * modules/javaexec (Files): Update.
15643         (configure.ac): Add AC_CONFIG_FILES invocation.
15644         (EXTRA_DIST): Remove javaexec.sh.in.
15645
15646         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
15647         * modules/csharpcomp-script (Files): Update.
15648         (configure.ac): Add AC_CONFIG_FILES invocation.
15649         (EXTRA_DIST): Remove variable.
15650
15651         * build-aux/csharpexec.sh.in: New file, moved from lib/.
15652         * modules/csharpexec (Files): Update.
15653         (configure.ac): Add AC_CONFIG_FILES invocation.
15654         (EXTRA_DIST): Remove csharpexec.sh.in.
15655
15656 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15657
15658         Sync from coreutils.
15659
15660         Add POSIX ACL support
15661         * lib/acl.h (copy_acl, set_acl): Add declarations.
15662         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
15663         systems other than Linux.
15664         (chmod_or_fchmod): New function: use fchmod when possible,
15665         and chmod otherwise.
15666         (file_has_acl): Add a POSIX ACL implementation, with a
15667         Linux-specific subcase.
15668         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
15669         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
15670         acls are unsupported.
15671         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
15672         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
15673         are unsupported.
15674
15675 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15676
15677         Sync from coreutils.
15678         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
15679
15680 2006-01-07  Bruno Haible  <bruno@clisp.org>
15681
15682         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
15683         gl_EARLY.
15684
15685 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15686
15687         * lib/strftime.c (tzname): Don't declare if it is already #defined.
15688         Problem reported for Mingw by Mark Junker.
15689
15690 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15691
15692         * README: Gnulib normally doesn't generate a tarball.
15693
15694 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
15695
15696         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
15697         long int, not int, for nanosecond counts, so that people who are
15698         used to POSIX struct timespec won't be surprised.  Reported by Jim
15699         Meyering.
15700
15701 2005-12-28  Bruno Haible  <bruno@clisp.org>
15702
15703         * build-aux/config.rpath: Update from GNU gettext.
15704
15705 2005-12-16  Jim Meyering  <jim@meyering.net>
15706
15707         * modules/fprintftime: New module.
15708         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
15709
15710 2005-12-16  Jim Meyering  <jim@meyering.net>
15711
15712         * m4/fprintftime.m4: New file.
15713
15714 2005-12-16  Jim Meyering  <jim@meyering.net>
15715
15716         * lib/fprintftime.c, lib/fprintftime.h: New files.
15717
15718 2005-12-15  Simon Josefsson  <jas@extundo.com>
15719
15720         * modules/socklen (configure.ac): Fix M4 macro name, to align with
15721         new m4/socklen.m4.
15722
15723 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15724
15725         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
15726         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
15727
15728 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15729
15730         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
15731         * lib/argp-help.c (fill_in_uparams): Check if the constructed
15732         struct uparams is valid. Fall back to the default values if it is
15733         not.
15734
15735 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15736
15737         * modules/argp (Files): Add argp-pin.c
15738         (Depends-on): dirname
15739         (lib_SOURCES): Add argp-pin.c
15740
15741 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15742
15743         * m4/argp.m4:  Check if program_invocation_name and
15744         program_invocation_short_name are declared and define appropriate
15745         macros if they are not.
15746
15747 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15748
15749         * lib/argp-help.c (__argp_base_name): New function
15750         (__argp_short_program_name): Rewrite using __argp_base_name
15751         * lib/argp-namefrob.h: Define program_invocation_name and
15752         program_invocation_short_name if requested
15753         (__argp_base_name): Add prototype
15754         * lib/argp-parse.c (argp_def): Use gettext wrappers
15755         (argp_default_parser): Use __argp_base_name
15756         * lib/argp-pin.c: New file. Defines program_invocation_name and
15757         program_invocation_short_name on systems that lack them.
15758
15759 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15760
15761         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
15762         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15763         porting problem reported by Georg Schwarz in
15764         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15765
15766 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15767
15768         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
15769         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15770         porting problem reported by Georg Schwarz in
15771         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15772
15773 2005-12-05  Bruno Haible  <bruno@clisp.org>
15774
15775         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
15776         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
15777         Reported by Mark Junker <mjscod@gmx.de>.
15778
15779 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
15780
15781         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
15782         Use implementation from Albert Chin, with some
15783         comments/corrections by Stepan Kasal and myself.
15784
15785 2005-12-02  Bruno Haible  <bruno@clisp.org>
15786
15787         * gnulib-tool (func_import): Accept GPLed build tool modules when
15788         --lgpl is given.
15789         * modules/csharpcomp-script: New file.
15790         * modules/csharpcomp: Depend on it.
15791         * modules/javacomp-script: New file.
15792         * modules/javacomp: Depend on it.
15793         Suggested by Simon Josefsson.
15794
15795 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
15796
15797         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
15798         statement, to work around an HP-UX 10.20 compiler bug reported by
15799         Peter O'Gorman.
15800
15801 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15802
15803         * modules/savedir (Depends-on): Add openat.
15804
15805 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15806
15807         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
15808         (uintmax_t) [defined uintmax_t]: Do not declare.
15809         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
15810         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
15811         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
15812         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
15813         sake of portability to weird hosts that C allows (though we don't
15814         know of any practical examples).
15815
15816         * lib/savedir.h (fdsavedir): New decl.
15817         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
15818         contains most of the former guts of savedir.
15819         (savedir): Use savedirstream.
15820         Include "openat.h".
15821
15822 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15823
15824         * modules/obstack (Files): Add m4/ulonglong.m4.
15825         Problem reported by Davide Angelocola.
15826
15827 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
15828
15829         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
15830         coreutils no longer futzes with rounding modes.
15831
15832 2005-11-14  Jim Meyering  <jim@meyering.net>
15833
15834         * lib/mkstemp-safer.c: Include <config.h>, required for possible
15835         replacement of mkstemp.
15836
15837 2005-11-10  Simon Josefsson  <jas@extundo.com>
15838
15839         * lib/readline.c: Remove EOL.
15840
15841 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15842
15843         * modules/gethrxtime (Depends-on): Add gettime.
15844
15845 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15846
15847         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
15848         or gettimeofday; no longer needed.
15849
15850 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15851
15852         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
15853         time business.
15854         (gethrxtime) [! (HAVE_NANOUPTIME
15855         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
15856         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
15857         our own approximation.
15858
15859 2005-11-08  Eric Blake  <ebb9@byu.net>
15860
15861         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15862
15863 2005-11-08  Eric Blake  <ebb9@byu.net>
15864
15865         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15866
15867 2005-11-04  Bruno Haible  <bruno@clisp.org>
15868
15869         * gnulib-tool: Implement --update mode.
15870
15871 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15872
15873         Fix porting problem reported by Theodoros V. Kalamatianos.
15874         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
15875         Don't assume that futimes failing means we must fail.
15876
15877 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15878
15879         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
15880         variables to suggest the intended function of the PATH_MAX check.
15881
15882 2005-10-30  Kean Johnston  <jkj@sco.com>
15883
15884         Trivial changes to support SCO systems.
15885         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
15886         as PATH_MAX.
15887         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
15888         where __ptr is null when no I/O is pending.
15889
15890 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15891
15892         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
15893         leave errno alone.  Problem reported by Dmitry V. Levin.
15894
15895 2005-10-28  Simon Josefsson  <jas@extundo.com>
15896
15897         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
15898         Test more.
15899
15900         * tests/test-gc-md2.c, tests/test-md2.c: New files.
15901
15902         * modules/md2, modules/md2-tests: New files.
15903
15904 2005-10-28  Simon Josefsson  <jas@extundo.com>
15905
15906         * m4/inet_ntop.m4: More tests.
15907
15908         * m4/gc-md2.m4, md2.m4: New file.
15909
15910 2005-10-28  Simon Josefsson  <jas@extundo.com>
15911
15912         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
15913         "restrict" keywords, as per POSIX.  Protect the function
15914         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
15915         Don't use K&R prototypes.  Check the sprintf return values.
15916         Re-define EAFNOSUPPORT if not present.  Indent.
15917
15918         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
15919         suggested by Bruno Haible <bruno@clisp.org>.
15920
15921         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
15922
15923         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
15924
15925         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
15926         libgcrypt).
15927
15928         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
15929
15930         * lib/md2.h, lib/md2.c: New files.
15931
15932 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
15933
15934         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
15935         errno alone.  Problem reported by Frederic Jolliton.
15936
15937 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
15938
15939         * modules/verify (License): Change from GPL to LGPL.  This is a
15940         tiny module and there are apparently near-equivalents that are
15941         under the BSD license.
15942
15943 2005-10-24  Simon Josefsson  <jas@extundo.com>
15944
15945         * modules/sha1: Relicense to LGPL.
15946
15947 2005-10-24  Simon Josefsson  <jas@extundo.com>
15948
15949         * lib/md4.h: Shrink buffer size, now that we changed the type.
15950
15951 2005-10-23  Simon Josefsson  <jas@extundo.com>
15952
15953         * gnulib-tool (func_import): Fix --tests-base.
15954
15955 2005-10-22  Simon Josefsson  <jas@extundo.com>
15956
15957         * modules/arcfour (Depends-on): Need stdint.
15958
15959 2005-10-22  Simon Josefsson  <jas@extundo.com>
15960
15961         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
15962         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
15963
15964 2005-10-22  Simon Josefsson  <jas@extundo.com>
15965
15966         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
15967         suggested by Bruno Haible <bruno@clisp.org>.
15968
15969 2005-10-22  Simon Josefsson  <jas@extundo.com>
15970
15971         * lib/crc.h: Include stddef.h, for size_t.
15972
15973 2005-10-22  Simon Josefsson  <jas@extundo.com>
15974
15975         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
15976         arcfour_context struct (simplify test vector testing in GNU
15977         Shishi).
15978
15979 2005-10-21  Simon Josefsson  <jas@extundo.com>
15980
15981         * modules/des, modules/des-tests: New files.
15982
15983         * modules/gc-des, modules/gc-des-tests: New files.
15984
15985         * tests/test-des.c, tests/test-gc-des.c: New file.
15986
15987 2005-10-21  Simon Josefsson  <jas@extundo.com>
15988
15989         * modules/arctwo, modules/arctwo-tests: New files.
15990
15991         * tests/test-arctwo.c: New file.
15992
15993         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
15994
15995         * tests/test-gc-arctwo.c: New file.
15996
15997 2005-10-21  Simon Josefsson  <jas@extundo.com>
15998
15999         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16000         Bruno Haible <bruno@clisp.org>.
16001
16002         * m4/gc-des.m4: New file.
16003
16004 2005-10-21  Simon Josefsson  <jas@extundo.com>
16005
16006         * m4/arctwo.m4: New file.
16007
16008         * m4/gc-arctwo.m4: New file.
16009
16010 2005-10-21  Simon Josefsson  <jas@extundo.com>
16011
16012         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16013         block.
16014
16015 2005-10-21  Simon Josefsson  <jas@extundo.com>
16016
16017         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16018         <bruno@clisp.org>.
16019
16020         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16021
16022         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16023         Bruno Haible <bruno@clisp.org>.
16024
16025         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16026         <bruno@clisp.org>.
16027
16028 2005-10-21  Simon Josefsson  <jas@extundo.com>
16029
16030         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16031
16032 2005-10-21  Simon Josefsson  <jas@extundo.com>
16033
16034         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16035
16036 2005-10-21  Simon Josefsson  <jas@extundo.com>
16037
16038         * lib/des.h, lib/des.c: New files.
16039
16040         * lib/gc-gnulib.c: Support DES.c
16041
16042 2005-10-21  Simon Josefsson  <jas@extundo.com>
16043
16044         * lib/arctwo.h, lib/arctwo.c: New files.
16045
16046         * lib/gc-gnulib.c: Support ARCTWO.
16047
16048 2005-10-21  Simon Josefsson  <jas@extundo.com>
16049
16050         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16051         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16052
16053 2005-10-21  Simon Josefsson  <jas@extundo.com>
16054
16055         * gnulib-tool (func_import, func_create_testdir): Define automake
16056         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16057         Makefile.am snippet),
16058         suggested by Bruno Haible <bruno@clisp.org>.
16059
16060         * modules/gc (Makefile.am): Use it.
16061
16062 2005-10-21  Bruno Haible  <bruno@clisp.org>
16063
16064         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16065         patch.
16066
16067 2005-10-19  Simon Josefsson  <jas@extundo.com>
16068
16069         * tests/test-gc-rijndael.c: New file.
16070
16071         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
16072
16073 2005-10-19  Simon Josefsson  <jas@extundo.com>
16074
16075         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
16076         interface too.
16077
16078 2005-10-19  Simon Josefsson  <jas@extundo.com>
16079
16080         * tests/test-gc-arcfour.c: New file.
16081
16082         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
16083
16084 2005-10-19  Simon Josefsson  <jas@extundo.com>
16085
16086         * modules/gc-md4, modules/gc-md4-tests: New file.
16087
16088         * tests/test-gc-md4.c: New file.
16089
16090 2005-10-19  Simon Josefsson  <jas@extundo.com>
16091
16092         * m4/gc-md4.m4: New file.
16093
16094 2005-10-19  Simon Josefsson  <jas@extundo.com>
16095
16096         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
16097         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
16098         <kasal@ucw.cz>.
16099
16100 2005-10-19  Simon Josefsson  <jas@extundo.com>
16101
16102         * m4/gc-arcfour.m4: New file.
16103
16104         * m4/gc-rijndael.m4: New file.
16105
16106 2005-10-19  Simon Josefsson  <jas@extundo.com>
16107
16108         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
16109
16110 2005-10-19  Simon Josefsson  <jas@extundo.com>
16111
16112         * lib/gc-gnulib.c: Support ARCFOUR.
16113
16114 2005-10-19  Simon Josefsson  <jas@extundo.com>
16115
16116         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
16117         support.
16118
16119         * lib/gc.h: Add ECB enum type.
16120
16121         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
16122
16123 2005-10-18  Simon Josefsson  <jas@extundo.com>
16124
16125         * tests/test-md5.c: New file.
16126
16127         * modules/md5-tests: New file.
16128
16129 2005-10-18  Simon Josefsson  <jas@extundo.com>
16130
16131         * tests/test-md4.c: New file.
16132
16133         * modules/md4, modules/md4-tests: New files.
16134
16135 2005-10-18  Simon Josefsson  <jas@extundo.com>
16136
16137         * m4/md4.m4: New file.
16138
16139 2005-10-18  Simon Josefsson  <jas@extundo.com>
16140
16141         * lib/md4.h, lib/md4.c: New files, based on md5.?.
16142
16143 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
16144
16145         * gnulib-tool (func_create_testdir): Omit the second check whether
16146         BUILT_SOURCES in nonempty.
16147
16148 2005-10-17  Simon Josefsson  <jas@extundo.com>
16149
16150         * tests/test-rijndael.c: New file.
16151
16152 2005-10-17  Simon Josefsson  <jas@extundo.com>
16153
16154         * modules/sha1: Depend on stdint instead of md5.
16155
16156         * modules/md5: Depend on stdint, remove uint32_t.
16157
16158 2005-10-17  Simon Josefsson  <jas@extundo.com>
16159
16160         * modules/gc-sha1-tests: New file.
16161
16162         * tests/test-gc-sha1.c: New file.
16163
16164 2005-10-17  Simon Josefsson  <jas@extundo.com>
16165
16166         * m4/md5.m4: Remove call to uint32_t.m4.
16167
16168 2005-10-17  Simon Josefsson  <jas@extundo.com>
16169
16170         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
16171
16172         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
16173         md5.h.
16174
16175         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
16176
16177         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
16178
16179 2005-10-17  Simon Josefsson  <jas@extundo.com>
16180
16181         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
16182
16183 2005-10-17  Simon Josefsson  <jas@extundo.com>
16184
16185         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
16186
16187 2005-10-17  Simon Josefsson  <jas@extundo.com>
16188
16189         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
16190
16191         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
16192
16193 2005-10-17  Bruno Haible  <bruno@clisp.org>
16194
16195         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
16196         that it can also be used in a test.
16197
16198 2005-10-16  Bruno Haible  <bruno@clisp.org>
16199
16200         * gnulib-tool (func_emit_tests_Makefile_am): Also define
16201         TESTS_ENVIRONMENT, so that individual tests can augment it.
16202
16203         * gnulib-tool (func_create_testdir): Use an intermediate target for
16204         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
16205         macros, like $(ALLOCA_H), which cannot be passed through the command
16206         line.
16207
16208 2005-10-15  Simon Josefsson  <jas@extundo.com>
16209
16210         * modules/rijndael-tests: New file.
16211
16212         * modules/rijndael: New file.
16213
16214 2005-10-15  Simon Josefsson  <jas@extundo.com>
16215
16216         * m4/rijndael.m4: New file.
16217
16218 2005-10-15  Simon Josefsson  <jas@extundo.com>
16219
16220         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
16221
16222         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
16223
16224 2005-10-14  Simon Josefsson  <jas@extundo.com>
16225
16226         * tests/test-arcfour.c: New file.
16227
16228         * modules/arcfour, modules/arcfour-tests: New files.
16229
16230 2005-10-14  Simon Josefsson  <jas@extundo.com>
16231
16232         * m4/arcfour.m4: New file.
16233
16234 2005-10-14  Simon Josefsson  <jas@extundo.com>
16235
16236         * lib/arcfour.h, lib/arcfour.c: New files.
16237
16238 2005-10-14  Roland McGrath  <roland@redhat.com>
16239
16240         Import from libc.  [BZ #1331]
16241         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
16242         macro argument.
16243         Reported by Matej Vela <vela@debian.org>.
16244
16245 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16246
16247         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16248         include <wchar.h>; no longer needed.
16249
16250 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16251
16252         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16253
16254 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16255         and  Ulrich Drepper  <drepper@redhat.com>
16256
16257         Import from libc.
16258         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16259         instead of inline stream orientation test and two separate
16260         function calls.  Pay no attention to USE_IN_LIBIO.
16261
16262 2005-10-13  Simon Josefsson  <jas@extundo.com>
16263
16264         * modules/gc-hmac-md5-tests: New file.
16265
16266         * tests/test-gc-hmac-sha1.c: New file.
16267
16268         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16269
16270         * modules/gc-hmac-md5-tests: New file.
16271
16272         * tests/test-gc-md5.c: New file.
16273
16274         * modules/gc-md5-tests: New file.
16275
16276 2005-10-13  Simon Josefsson  <jas@extundo.com>
16277
16278         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16279         Move memory allocation outside of loop.
16280
16281 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16282
16283         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16284         intermediate directory is in a read-only file system.  Problem
16285         reported by Eric Blake.
16286
16287 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16288
16289         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16290
16291 2005-10-12  Simon Josefsson  <jas@extundo.com>
16292
16293         * tests/test-hmac-sha1.c: New file.
16294
16295         * modules/hmac-sha1-tests: New file.
16296
16297         * modules/hmac-sha1: New file.
16298
16299 2005-10-12  Simon Josefsson  <jas@extundo.com>
16300
16301         * modules/gc-sha1: New file.
16302
16303 2005-10-12  Simon Josefsson  <jas@extundo.com>
16304
16305         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16306
16307         * tests/test-gc-pbkdf2-sha1.c: New file.
16308
16309 2005-10-12  Simon Josefsson  <jas@extundo.com>
16310
16311         * modules/gc-md5, modules/gc-hmac-md5: New files.
16312
16313         * modules/gc (Files): Remove md5, memxor and hmac files.
16314
16315 2005-10-12  Simon Josefsson  <jas@extundo.com>
16316
16317         * m4/gc-pbkdf2-sha1.m4: New file.
16318
16319         * m4/gc-hmac-sha1.m4: New file.
16320
16321         * m4/gc-sha1: New file.
16322
16323         * m4/hmac-sha1.m4: New file.
16324
16325 2005-10-12  Simon Josefsson  <jas@extundo.com>
16326
16327         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16328
16329         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16330
16331 2005-10-12  Simon Josefsson  <jas@extundo.com>
16332
16333         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16334         suggested by Bruno Haible <bruno@clisp.org>.
16335
16336 2005-10-12  Simon Josefsson  <jas@extundo.com>
16337
16338         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16339
16340 2005-10-12  Simon Josefsson  <jas@extundo.com>
16341
16342         * lib/gc-pbkdf2-sha1.c: New file.
16343
16344         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16345
16346 2005-10-12  Simon Josefsson  <jas@extundo.com>
16347
16348         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16349
16350         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16351
16352 2005-10-12  Simon Josefsson  <jas@extundo.com>
16353
16354         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16355         GC_USE_HMAC_MD5, respectively.
16356
16357         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16358         (gc_md5): Fix typo.
16359
16360         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16361
16362         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16363
16364         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16365
16366 2005-10-12  Bruno Haible  <bruno@clisp.org>
16367
16368         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16369         Reported by Stepan Kasal <kasal@ucw.cz>.
16370
16371 2005-10-11  Simon Josefsson  <jas@extundo.com>
16372
16373         * tests/test-crc.c: New file.
16374
16375         * modules/crc, modules/crc-tests: New files.
16376
16377 2005-10-11  Simon Josefsson  <jas@extundo.com>
16378
16379         * m4/crc.m4: New file.
16380
16381 2005-10-11  Simon Josefsson  <jas@extundo.com>
16382
16383         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16384
16385         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16386
16387         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16388
16389 2005-10-11  Simon Josefsson  <jas@extundo.com>
16390
16391         * lib/crc.h, lib/crc.c: New files.
16392
16393         * lib/gc.h (gc_hash_buffer): Add doc.
16394
16395 2005-10-11  Bruno Haible  <bruno@clisp.org>
16396
16397         * modules/c-strcasestr: New file.
16398         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16399
16400 2005-10-11  Bruno Haible  <bruno@clisp.org>
16401
16402         * modules/c-strcase: New file.
16403         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16404
16405 2005-10-11  Bruno Haible  <bruno@clisp.org>
16406
16407         * lib/strcasecmp.c: Include limits.h.
16408         (strcasecmp): Avoid integer overflow on exotic platforms.
16409         * lib/strncasecmp.c: Include limits.h.
16410         (strncasecmp): Avoid integer overflow on exotic platforms.
16411         Reported by Paul Eggert.
16412
16413 2005-10-11  Bruno Haible  <bruno@clisp.org>
16414
16415         * lib/c-strcasestr.h: New file, from GNU gettext.
16416         * lib/c-strcasestr.c: New file, from GNU gettext.
16417
16418 2005-10-11  Bruno Haible  <bruno@clisp.org>
16419
16420         * lib/c-strcase.h: New file, from GNU gettext.
16421         * lib/c-strcasecmp.c: New file, from GNU gettext.
16422         * lib/c-strncasecmp.c: New file, from GNU gettext.
16423
16424 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16425
16426         * modules/mempcpy (License): GPL -> LGPL.
16427         * modules/strchrnul (License): Likewise.
16428         * modules/sysexits (License): Likewise.
16429
16430 2005-10-08  Simon Josefsson  <jas@extundo.com>
16431
16432         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16433
16434 2005-10-07  Simon Josefsson  <jas@extundo.com>
16435
16436         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16437
16438 2005-10-06  Simon Josefsson  <jas@extundo.com>
16439
16440         * tests/test-hmac-md5.c: New file.
16441
16442         * modules/hmac-md5-tests: New file.
16443
16444         * modules/hmac-md5: New file.
16445
16446 2005-10-06  Simon Josefsson  <jas@extundo.com>
16447
16448         * m4/hmac-md5.m4: New file.
16449
16450         * m4/memxor.m4: Require gl_C_RESTRICT.
16451
16452 2005-10-06  Simon Josefsson  <jas@extundo.com>
16453
16454         * lib/memxor.c (memxor): Avoid casts and warnings.
16455
16456 2005-10-06  Simon Josefsson  <jas@extundo.com>
16457
16458         * lib/hmac-md5.c: New file.
16459
16460         * lib/hmac.h: New file.
16461
16462 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16463
16464         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16465         promotes to int, not unsigned int, to catch the AIX 5.3
16466         compiler bug.
16467
16468 2005-10-05  Simon Josefsson  <jas@extundo.com>
16469
16470         * modules/memxor: New file.
16471
16472         * modules/iconv (Files): Move config.rpath to havelib, it is used
16473         there.
16474
16475         * modules/havelib (Files): Add config.rpath.
16476
16477 2005-10-05  Simon Josefsson  <jas@extundo.com>
16478
16479         * m4/memxor.m4: New file.
16480
16481 2005-10-05  Simon Josefsson  <jas@extundo.com>
16482
16483         * lib/memxor.c (memxor): Fix compiler error.
16484
16485         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16486         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16487
16488         * lib/memxor.h, lib/memxor.c: New files.
16489
16490         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16491         we assume all systems have it, suggested by Jim Meyering
16492         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16493         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16494         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16495         same reasons.
16496
16497 2005-10-05  Simon Josefsson  <jas@extundo.com>
16498
16499         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16500
16501 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16502
16503         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16504         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16505         needed, since the source code now assumes these .h files.
16506
16507 2005-10-05  Derek Price  <derek@ximbiot.com>
16508
16509         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16510
16511 2005-10-05  Bruno Haible  <bruno@clisp.org>
16512
16513         * modules/stdint (License): Change to LGPL.
16514
16515 2005-10-04  Simon Josefsson  <jas@extundo.com>
16516
16517         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16518         D. Baushke" <mdb@gnu.org>.
16519
16520 2005-10-04  Bruno Haible  <bruno@clisp.org>
16521
16522         * lib/verify.h (verify_true): Provide alternative definition for C++.
16523
16524 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16525
16526         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16527         (SSIZE_MAX): New macro, if not already defined.
16528         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16529         than 2 GiB.
16530
16531 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16532
16533         Sync from coreutils.
16534         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
16535         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
16536         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
16537         ULLONG_MAX doesn't work with 2.7.2.1.
16538
16539 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16540
16541         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
16542         From Ben Pfaff.
16543
16544         * modules/exclude (Depends-on): Depend on verify.
16545         * modules/strtoimax (Depends-on): Likewise.
16546         * modules/utimecmp (Depends-on): Likewise.
16547
16548 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16549
16550         * lib/exclude.c: Include verify.h.
16551         (verify): Remove.  All callers changed to use verify.h's version.
16552         * lib/strtoimax.c: Likewise.
16553         * lib/utimecmp.c: Likewis.e
16554
16555         Sync from coreutils.
16556         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
16557         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
16558         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
16559         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
16560         bother returning ENOSYS if settimeofday or stime fails; just let
16561         them return whatever errno they want to return.
16562         * lib/utimens.c: Include unistd.h, for dup2.
16563         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
16564         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
16565
16566 2005-10-02  Jim Meyering  <jim@meyering.net>
16567
16568         Sync from coreutils.
16569         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
16570         from glibc-2.2.5 that fails for read-only files.
16571
16572 2005-10-02  Jim Meyering  <jim@meyering.net>
16573
16574         Sync from coreutils.
16575         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
16576         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
16577         `#if HAVE_CONFIG_H'.
16578         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
16579         Remove AT_FDCWD test.
16580         Do not consume the fd unless successful.
16581         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
16582         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
16583         block, so that we don't even try to compile it if settimeofday is
16584         available.  This works around a compilation failure on OSF1 V5.1,
16585         due to stime requiring a `long int*' while tv_sec is `int'.
16586
16587 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
16588
16589         Sync from coreutils.
16590         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
16591         against `yes', rather than just testing for nonempty.
16592
16593 2005-10-01  Simon Josefsson  <jas@extundo.com>
16594
16595         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
16596         and Darwin.
16597
16598         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
16599         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
16600         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
16601         freeaddrinfo and gai_strerror are declared by the POSIX headers.
16602         Check if struct addrinfo is declared.
16603
16604 2005-10-01  Simon Josefsson  <jas@extundo.com>
16605
16606         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
16607         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
16608         AI_* and EAI_* definitions.  Protect function declarations.
16609
16610 2005-10-01  Jim Meyering  <jim@meyering.net>
16611
16612         Sync from coreutils.
16613
16614         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
16615         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
16616         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
16617         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16618         in the inet and nsl libraries.  Required on Solaris 5.7.
16619
16620 2005-10-01  Jim Meyering  <jim@meyering.net>
16621
16622         Sync from coreutils.
16623         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16624         in the inet and nsl libraries.  Required on Solaris 5.7.
16625
16626 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
16627
16628         * lib/getdelim.c (getdelim): Remove unused variables.
16629
16630 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
16631
16632         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
16633         so that the code works even with ancient cpp.  Portability problem
16634         with GCC 2.7.2.1 reported by Thomas M.Ott.
16635
16636 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
16637
16638         * modules/regex (Depends-on): Add strcase.
16639
16640         * modules/gethostname (Licence): Change from GPL to LGPL, since
16641         gethostname.c is a trivial implementation of a standard library
16642         function.
16643         * modules/poll (License): Change from GPL to LGPL, since it's
16644         derived from LGPL code.
16645
16646 2005-09-27  Jim Meyering  <jim@meyering.net>
16647
16648         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
16649         HAVE_CONFIG_H.
16650
16651         * lib/intprops.h (signed_type_or_expr__): Define.
16652         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
16653         for unsigned types.
16654
16655 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
16656
16657         * lib/verify.h (verify_expr): Remove, replacing with:
16658         (verify_true): New macro that returns true instead of void.
16659         (verify_type__): Remove.
16660         (verify): Use verify_true rather than verify_type__.
16661
16662 2005-09-26  Bruno Haible  <bruno@clisp.org>
16663
16664         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
16665         is necessary.
16666         (lib_SOURCES): Remove mbchar.c.
16667         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
16668         (Files): Add m4/mbrtowc.m4.
16669         * modules/mbiter: Likewise.
16670         * modules/mbuiter: Likewise.
16671
16672 2005-09-26  Bruno Haible  <bruno@clisp.org>
16673
16674         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
16675         compile mbchar.c if they are not both present.
16676         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
16677         * m4/mbiter.m4 (gl_MBITER): Likewise.
16678         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
16679         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
16680         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
16681
16682 2005-09-25  Jim Meyering  <jim@meyering.net>
16683
16684         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
16685         also uses socklen_t.
16686
16687 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
16688
16689         * lib/utimens.c (ENOSYS): Define if not already defined.
16690         (futimens): Support having a null PATH if the file descriptor
16691         is nonnegative.
16692
16693         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
16694         Remove.
16695         (__attribute): Define to empty unless GCC 3.1 or later.
16696         This works around a core dump on OpenBSD 3.4, which has GCC
16697         2.95.3, which dumps core when given __attribute__(()).  It also
16698         simplifies other tests, since we really don't want to bother with
16699         worrying about which ancient version of GCC supported what.
16700         Original problem reported by Yoann Vandoorselaere, with part of
16701         the fix suggested by Derek Price.
16702
16703 2005-09-24  Jim Meyering  <jim@meyering.net>
16704
16705         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
16706         so we can once again use a positive bitfield width of 1 -- now we
16707         don't have to explain why we were using a bitfield width of 2.
16708
16709 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16710
16711         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
16712         and similarly for the other external symbols.  Problem reported
16713         by James Gallager.
16714
16715         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
16716         bug reported by Jim Meyering.
16717
16718         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
16719         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
16720         not needed, since socklen is a prerequisite module.
16721
16722 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16723
16724         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
16725         Problem reported by Eric Blake.
16726         (getaddrinfo): Initialize se so that it's not garbage.
16727         Redo internal storage allocation so that it doesn't make unportable
16728         assumptions about alignment.
16729         Fix a memory leak.
16730
16731         * lib/utimens.c (futimens): Use futimesat if available.
16732         Prefer it to futimes since it doesn't have the futimes bug.
16733
16734         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
16735         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
16736         Instead, declare a function that returns a pointer to an array,
16737         and use verify_type__ to declare the size of the array.
16738         Problem and germ of a solution reported by Bruno Haible.
16739         (verify_type__): Use 2, not 1, for bitfield size, to avoid
16740         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
16741
16742 2005-09-23  Jim Meyering  <jim@meyering.net>
16743
16744         Sync from coreutils.
16745         Correct build failure (socklen_t not defined) on at least
16746         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
16747         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
16748
16749 2005-09-23  Jim Meyering  <jim@meyering.net>
16750
16751         * modules/getaddrinfo (Depends-on): Add socklen.
16752
16753 2005-09-23  Bruno Haible  <bruno@clisp.org>
16754
16755         * tests/test-verify.c: New file.
16756
16757 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16758
16759         Sync from coreutils.
16760
16761         * modules/argmatch (Depends-on): Add verify.
16762         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
16763         unistd-safer.
16764         * modules/save-cwd (Depends-on): Likewise.
16765
16766         * modules/openat (Files): Add lib/openat-die.c.
16767         (Depends-on): Remove error, exitfail.
16768         Add dirname.
16769
16770         * modules/verify: New file.
16771         * MODULES.html.sh (Diagnostics <assert.h>): New section,
16772         with "verify" module.
16773
16774 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16775
16776         Sync from coreutils.
16777
16778         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
16779         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
16780         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
16781         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
16782         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
16783         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
16784         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
16785         Don't bother checking for string.h, stdlib.h, unistd.h.
16786         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
16787         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
16788         module's job.
16789         * m4/jm-macros.m4 (gl_MACROS): Likewise.
16790         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
16791
16792         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
16793         (gl_GETDATE): Use it.
16794
16795         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
16796
16797 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16798
16799         Sync from coreutils.
16800
16801         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
16802         stat-time.h.
16803         * lib/argmatch.h: Include verify.h
16804         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
16805         (ARGMATCH_ASSERT): Remove; unused.
16806         * lib/canonicalize.c: Assume STDC_HEADERS.
16807         * lib/exclude.c: Include "strcase.h".
16808         * lib/regex_internal.h [!defined _LIBC]: Likewise.
16809         * lib/getusershell.c: Include stdio--.h rather than stdio.h
16810         and stdio-safer.h.
16811         (getusershell): Call fopen, not fopen_safer.
16812         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
16813         Do not include unistd-safer.h.
16814         (save_cwd): Don't call fd_safer; no longer needed
16815         now that we include fcntl--.h.
16816
16817         * lib/getdate.y (relative_time): New type.
16818         (RELATIVE_TIME_0): New constant.
16819         (parser_control): Use relative_time instead of doing it ourselves.
16820         (%union): Add new relative_time rel member.
16821         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
16822         Now typeless.
16823         (relunit, relunit_snumber): Now of type rel.
16824         (zone, rel, relunit, get_date): Adjust to above changes.
16825
16826         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
16827         Do not include unistd-safer.h.
16828         (getloadavg): Don't call fd_safer; no longer needed
16829         now that we include fcntl--.h.
16830
16831         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
16832         (make_dir_parents): Treat ENOSYS like EEXIST.
16833
16834         Improve quality of diagnostics on restore_cwd failure.
16835         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
16836         (make_dir_parents): Last arg is now int * (for errno), not bool *.
16837         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
16838         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
16839         each time through the loop.  Do not diagnose restore_cwd failure;
16840         that is the caller's job (and perhaps the caller does not care).
16841
16842         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
16843         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
16844         If the file already exists but is not a directory, don't bother
16845         to try to make its parents.
16846         Close potential file descriptor leak if we can't chdir("/") (!).
16847         Don't always return true if chdir($PWD) fails; return true only
16848         if the requested action was done successfully (except for the
16849         chdir($PWD)).
16850         Don't log final directory unless we actually made it.
16851         Refactor to avoid duplicate code to fix up permissions.
16852         Don't attempt to fix up parent permissions if chdir($PWD) fails.
16853
16854         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
16855         to make it a bit faster and (I hope) clearer.
16856         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
16857         Fix bug in formats like %2N.
16858
16859         * lib/verify.h: New file.
16860
16861 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16862
16863         Sync from coreutils.
16864         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
16865
16866 2005-09-22  Jim Meyering  <jim@meyering.net>
16867
16868         Sync from coreutils.
16869
16870         * m4/lstat.m4 (gl_FUNC_LSTAT):
16871         Use AC_LIBSOURCES to require lstat.c and lstat.h.
16872         Remove obsolete comment.
16873         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
16874         * m4/xstrtod.m4: Likewise.
16875
16876         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
16877
16878 2005-09-22  Jim Meyering  <jim@meyering.net>
16879
16880         Sync from coreutils.
16881
16882         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
16883
16884         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
16885         the .tm_year member, since otherwise gcc-4.0 would now warn about
16886         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
16887
16888         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
16889         order to avoid an unsuppressible warning from gcc on 64-bit systems.
16890
16891         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
16892         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
16893         when run in a time zone for which daylight savings time is in effect
16894         for the starting date.
16895
16896         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
16897         stop us from restricting permissions of just-created absolute-named
16898         directories.
16899         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
16900         to restore initial working directory.
16901         * lib/mkdir-p.c (make_dir_parents): New parameter:
16902         different_working_dir, to tell caller if/when we change the working
16903         directory and are unable to return to the initial one.
16904         * lib/mkdir-p.h (make_dir_parents): Update prototype.
16905         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
16906         `return false'.  This fixes a bug introduced on 2004-07-30.
16907
16908         * lib/openat.c (fdopendir): Be sure to close the supplied
16909         file descriptor before returning.  This makes our replacement
16910         implementation a little closer to Solaris's, where fdopendir
16911         ties the file descriptor to the returned DIR* pointer.
16912         * lib/openat.c (unlinkat): New function.
16913         * lib/openat.h (unlinkat): Add prototype.
16914         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
16915         (openat_restore_fail): Rename from openat_restore_die.
16916         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
16917
16918         Provide an alternative to exiting immediately upon save_cwd or
16919         restore_cwd failure.  Now, an application can arrange e.g.,
16920         to perform a longjump in that case.
16921         * lib/openat.c: Include dirname.h.
16922         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
16923         (rpl_openat, fdopendir, fstatat): Call openat_save_die
16924         and openat_restore_die rather than calling error directly.
16925         Don't include "error.h" or "exitfail.h"; they're no longer needed.
16926
16927         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
16928         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
16929         define.
16930
16931         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
16932         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
16933                             int utc, int nanoseconds);
16934         Background:
16935         date should not have to allocate a megabyte of virtual memory to
16936         handle a format argument like +%1048575T.  When implemented with
16937         strftime, it must allocate such a buffer, use strftime to fill it
16938         in, print it, then free it.
16939         With fprintftime, it simply prints everything and exits.
16940         With no need for memory allocation, that's one fewer way to fail.
16941         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
16942         optional field width, not before, so we accept %9:z, not %:9z.
16943         (my_strftime): Be sure to use L_('x') for literals.
16944
16945         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
16946         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
16947         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
16948         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
16949         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
16950         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
16951         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
16952         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
16953         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
16954         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
16955         * lib/xgethostname.c, lib/xreadlink.c:
16956         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
16957
16958         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
16959         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
16960         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
16961         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16962         and don't include <sys/file.h>).
16963
16964 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
16965
16966         Sync from coreutils.
16967
16968         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
16969         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
16970         [!LDAV_DONE]: Avoid unused variable warning.
16971
16972 2005-09-21  Bruno Haible  <bruno@clisp.org>
16973
16974         * lib/unicodeio.h (unicode_to_mb): New declaration.
16975
16976 2005-09-20  Derek Price  <derek@ximbiot.com>
16977
16978         * lib/getaddrinfo.c: Don't include <netdb.h> included from
16979         getaddrinfo.h.
16980
16981 2005-09-20  Bruno Haible  <bruno@clisp.org>
16982
16983         * gnulib-tool: Remove trailing slashes from the values specified for
16984         --source-base, --m4-base, --tests-base, --aux-dir.
16985         Suggested by Simon Josefsson <jas@extundo.com>.
16986
16987 2005-09-20  Bruno Haible  <bruno@clisp.org>
16988
16989         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
16990         func_modules_to_filelist, func_import, func_create_testdir): Make all
16991         sorting results locale-independent, so that gnulib-cache.m4 doesn't
16992         change when gnulib-tool is invoked in a different locale.
16993
16994 2005-09-19  Simon Josefsson  <jas@extundo.com>
16995
16996         * m4/socklen.m4: Fix typo.
16997
16998 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
16999
17000         Use a consistent style for including <config.h>.
17001         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17002         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17003         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17004         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17005         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17006         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17007         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17008         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17009         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17010         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17011         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17012         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17013         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17014         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17015         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17016         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17017         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17018         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17019         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17020         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17021         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17022         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17023         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17024         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17025         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17026         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17027         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17028         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17029         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17030         lib/xstrtoumax.c, lib/yesno.c:
17031         Standardize inclusion of config.h.
17032         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17033         lib/inttostr.h:  Removed inclusion of config.h from header files.
17034         * lib/inttostr.c:  Adjusted in-tree users.
17035         * lib/timespec.h: Remove superfluous warning to include config.h.
17036         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17037         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17038         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17039         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17040         config.h with HAVE_CONFIG_H.
17041
17042 2005-09-19  Jim Meyering  <jim@meyering.net>
17043
17044         * modules/pathmax (License): Change to LGPL.
17045
17046 2005-09-19  Derek Price  <derek@ximbiot.com>
17047
17048         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17049
17050 2005-09-19  Bruno Haible  <bruno@clisp.org>
17051
17052         * gnulib-tool (import): Provide default for --tests-base.
17053
17054 2005-09-19  Bruno Haible  <bruno@clisp.org>
17055
17056         * doc/quote.texi: New file, extracted from gnulib.texi.
17057         * doc/ctime.texi: New file, extracted from gnulib.texi.
17058         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17059         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17060         * doc/gnulib.texi: Include them.
17061
17062 2005-09-18  Bruno Haible  <bruno@clisp.org>
17063
17064         Portability fix.
17065         * gnulib-tool (func_readlink): New function.
17066         (func_ln_if_changed): Use it.
17067
17068 2005-09-18  Bruno Haible  <bruno@clisp.org>
17069
17070         * gnulib-tool: Support --with-tests also with --import.
17071         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
17072         (func_import): Use variables $testsbase and $inctests. Emit a
17073         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
17074         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
17075         SUBDIRS += $testsdir.
17076         (func_create_testdir): Update.
17077
17078 2005-09-18  Bruno Haible  <bruno@clisp.org>
17079
17080         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
17081         instead of $dry_run.
17082         (func_cp_if_changed, func_mv_if_changed): Remove functions.
17083         (func_ln_if_changed): Don't handle dry-run here.
17084         (func_import): In dry-run mode, detect more precisely which actions
17085         would be performed, and don't use "...ing" verbs.
17086
17087 2005-09-18  Bruno Haible  <bruno@clisp.org>
17088
17089         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
17090         (func_import): Use join on two temporary files instead of three nested
17091         loops, in order to determine which files are new or old.
17092
17093 2005-09-18  Bruno Haible  <bruno@clisp.org>
17094
17095         * gnulib-tool (func_import): Comment out code that spits out the
17096         new files with --dry-run.
17097
17098 2005-09-18  Bruno Haible  <bruno@clisp.org>
17099
17100         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
17101
17102 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17103
17104         * lib/stat-time.h: New file.
17105         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
17106         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
17107         in a different way.
17108         (timespec_cmp): New function.
17109         * lib/utimecmp.c: Include stat-time.h.
17110         (SYSCALL_RESOLUTION): Depend on whether various struct stat
17111         members exist, not on the obsolescent ST_MTIM_NSEC.
17112         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
17113
17114 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17115
17116         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
17117
17118 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17119
17120         * MODULES.html.sh (File system functions): Add stat-time.
17121         * modules/stat-time: New file.
17122         * modules/timespec (Files): Remove m4/st_mtim.m4; this
17123         is now done in a different way, by the stat-time module.
17124         * modules/utimecmp (Depends-on): Add stat-time.
17125
17126 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
17127
17128         * m4/st_mtim.m4: Remove.  Superseded by...
17129         * m4/stat-time.m4: New file.
17130         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
17131         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
17132
17133 2005-09-15  Derek Price  <derek@ximbiot.com>
17134
17135         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
17136
17137 2005-09-15  Derek Price  <derek@ximbiot.com>
17138
17139         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
17140         * lib/regex_internal.c: Ditto, using this...
17141         (__GNUC_PREREQ): ...new macro.
17142         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
17143         using...
17144         (__GNUC_PREREQ): ...this new macro.
17145
17146         * lib/strstr.h: Include string.h. Define strstr as a macro here.
17147
17148 2005-09-15  Derek Price  <derek@ximbiot.com>
17149             Paul Eggert  <eggert@cs.ucla.edu>
17150
17151         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
17152         changes, consolidating in...
17153         * lib/regex_internal.h: ...this file.
17154
17155 2005-09-13  Jim Meyering  <jim@meyering.net>
17156
17157         * lib/canon-host.c: Filter through gnu indent and reword comments
17158         slightly.
17159         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
17160
17161 2005-09-13  Derek Price  <derek@ximbiot.com>
17162
17163         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
17164         failure.
17165         Reported by Jim Meyering  <jim@meyering.net>.
17166
17167 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
17168
17169         * lib/base64.c: Typo.
17170         (base64_encode): Put b64str in initialized data section.
17171
17172 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
17173
17174         Merge glibc and coreutils changes into gnulib, plus a few
17175         extra fixes.
17176         * lib/md5.c: Use #error rather than a string.
17177         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
17178         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
17179         (__attribute__): Define to empty for non recent-GCC.
17180         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
17181         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
17182         Renamed from their non-__ counterparts, with new macros replacing
17183         them if not _LIBC.  Add __THROW attribute.
17184         (rol): Remove.
17185         (struct md5_ctx): Align buffer if using GCC.
17186         * lib/sha1.h (struct sha1_ctx): Likewise.
17187         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
17188         The old name was backwards.
17189         (NOTSWAP): Remove; not used.
17190         (rol): New macro, moved here from md5.h.
17191         (sha1_process_block): Remove a FIXME that doesn't make sense.
17192
17193 2005-09-12  Derek Price  <derek@ximbiot.com>
17194
17195         Return usable errors from canon-host.
17196         * lib/canon-host.h: New file.
17197         * lib/canon-host.c (canon_host): Wrap...
17198         (canon_host_r): ...this new function, which now relies exclusively on
17199         getaddrinfo.
17200         (ch_strerror): New function.
17201         (last_cherror): New global.
17202         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
17203         interface.
17204         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
17205         void *.
17206         (freeaddrinfo): Free ai->ai_canonname when set.
17207
17208 2005-09-12  Derek Price  <derek@ximbiot.com>
17209
17210         Make canon-host require getaddrinfo.
17211         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
17212         AC_LIBSOURCE canon-host.h.  Call...
17213         (gl_PREREQ_CANON_HOST): ...this new function, which requires
17214         gl_GETADDRINFO.
17215         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
17216
17217 2005-09-12  Derek Price  <derek@ximbiot.com>
17218
17219         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
17220         LGPL.
17221         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
17222
17223 2005-09-12  Derek Price  <derek@ximbiot.com>
17224
17225         * lib/gai_strerror.c: Include config.h when available.  Include
17226         getaddrinfo.h before other headers to test interface.
17227         Reported by Larry Jones <lawrence.jones@ugs.com>.
17228
17229 2005-09-12  Derek Price  <derek@ximbiot.com>
17230             Paul Eggert  <eggert@cs.ucla.edu>
17231
17232         * modules/glob (Files): Add glob-libc.h.
17233
17234 2005-09-12  Derek Price  <derek@ximbiot.com>
17235             Paul Eggert  <eggert@cs.ucla.edu>
17236
17237         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
17238         glob_.h, glob-libc.h.
17239         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
17240
17241 2005-09-12  Derek Price  <derek@ximbiot.com>
17242             Paul Eggert  <eggert@cs.ucla.edu>
17243
17244         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
17245         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
17246         protecting things that should be done only in gnulib contexts.
17247         * lib/glob_.h: New file, containing only the glob things needed for
17248         gnulib.
17249         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17250         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17251         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17252         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17253         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17254         and to respect the namespace rules better.
17255
17256 2005-09-08  Simon Josefsson  <jas@extundo.com>
17257
17258         * modules/socklen: New file.
17259
17260 2005-09-08  Simon Josefsson  <jas@extundo.com>
17261
17262         * m4/socklen.m4: New file.
17263
17264 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17265
17266         * modules/utimens (Files): Add m4/utimbuf.m4, since
17267         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17268         Reported by Sergey Poznyakoff.
17269
17270 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17271
17272         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17273         definitions, since that's the preferred style in glibc.
17274         Fix a minor spacing issue, and update copyright notice to match
17275         glibc's.
17276
17277 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17278
17279         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17280
17281 2005-09-06  Simon Josefsson  <jas@extundo.com>
17282
17283         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17284         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17285
17286 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17287
17288         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17289         warning.
17290
17291 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17292
17293         * config/srclist.txt: Add glibc bug 1302.
17294
17295 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17296
17297         Change bitset word type from unsigned int to unsigned long int,
17298         as this has better performance on typical 64-bit hosts.
17299         Port bitset code to hosts with unusual word sizes.
17300         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17301         (build_collating_symbol):
17302         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17303         argument is a bitset.  This is merely a style issue, but it makes
17304         it clearer that an entire array is expected.
17305         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17306         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17307         Port to the case where bitset_word is not the same as unsigned int.
17308         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17309         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17310         Likewise.
17311         * lib/regexec.c (check_dst_limits_calc_pos_1,
17312         check_subexp_matching_top):
17313         (build_trtable, group_nodes_into_DFAstates):
17314         Likewise.
17315         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17316         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17317         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17318         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17319         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17320         * lib/regcomp.c (optimize_subexps, lower_subexp):
17321         Work even if bitset_word has holes in its bitwise representation.
17322         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17323         * lib/regexec.c (check_dst_limits_calc_pos_1,
17324         check_subexp_matching_top):
17325         Likewise.
17326         * lib/regex_internal.c (re_string_reconstruct):
17327         Don't assume UCHAR_MAX == 255.
17328         * lib/regex_internal.h (bitset_set_all): Likewise.
17329         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17330         All uses changed.
17331         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17332         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17333         All uses changed.
17334         (BITSET_WORD_MAX): New macro.
17335         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17336         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17337         (bitset_empty, bitset_copy):
17338         Prefer sizeof (bitset) to multiplying it out ourselves.
17339         (bitset_not_merge): Remove; unused.
17340         (bitset_contain): Return bool, not unsigned int with one bit on.
17341         All callers changed.
17342         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17343         alignment than re_node_set; do this by defining a new internal
17344         type struct dests_alloc and using it to allocate memory.
17345
17346 2005-09-05  Bruno Haible  <bruno@clisp.org>
17347
17348         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17349         links.
17350
17351 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17352
17353         * modules/size_max (Makefile.am): Add size_max.h
17354
17355 2005-09-04  Derek Price  <derek@ximbiot.com>
17356
17357         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17358
17359 2005-09-03  Simon Josefsson  <jas@extundo.com>
17360
17361         * gnulib-tool: Fix typo.
17362
17363 2005-09-03  Simon Josefsson  <jas@extundo.com>
17364
17365         * config/srclist.txt: Add glibc bug 1293.
17366
17367 2005-09-03  Derek Price  <derek@ximbiot.com>
17368
17369         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17370         From Larry Jones <lawrence.jones@ugs.com>.
17371
17372 2005-09-02  Simon Josefsson  <jas@extundo.com>
17373
17374         * modules/socklen: New file.
17375
17376 2005-09-02  Simon Josefsson  <jas@extundo.com>
17377
17378         * modules/havelib: New module.
17379
17380         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17381         Use havelib.
17382
17383 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17384
17385         Check for arithmetic overflow when calculating sizes, to prevent
17386         some buffer-overflow issues.  These patches are conservative, in the
17387         sense that when I couldn't determine whether an overflow was possible,
17388         I inserted a run-time check.
17389         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17390         macros.
17391         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17392         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17393         (re_xnrealloc, re_x2nrealloc): New inline functions.
17394         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17395         parse_bracket_exp):
17396         (build_equiv_class, build_charclass): Check for arithmetic overflow
17397         in size expression calculations.
17398         * lib/regex_internal.c (re_string_realloc_buffers):
17399         (build_wcs_upper_buffer, re_node_set_add_intersect):
17400         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17401         (re_dfa_add_node, register_state): Likewise.
17402         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17403         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17404         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17405         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17406
17407 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17408
17409         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17410         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17411
17412 2005-09-02  Bruno Haible  <bruno@clisp.org>
17413
17414         Support for lib vs. lib64 distinction on biarch platforms.
17415         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17416         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17417         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17418
17419 2005-09-02  Bruno Haible  <bruno@clisp.org>
17420
17421         * gnulib-tool (import): In the other first-use case, provide defaults
17422         as well.
17423
17424 2005-09-02  Bruno Haible  <bruno@clisp.org>
17425
17426         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17427         patches not yet found in the latest gettext release.
17428
17429 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17430
17431         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17432         to avoid a collision with bits/local_lim.h in glibc.
17433         All uses changed.  Problem reported by Dmitry V. Levin in
17434         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17435
17436         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17437         bugs in int versus size_t comparisons.
17438         (re_string_context_at): Fix bug where the code assumed that
17439         Idx is signed.
17440
17441         Use bool where appropriate.
17442         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17443         All callers changed.
17444         (calc_eclosure_iter): Likewise, for ROOT arg.
17445         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17446         (build_charclass_op): Likewise, for NON_MATCH arg.
17447         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17448         (re_string_construct_common): Likewise, for ICASE arg.
17449         * lib/regexec.c (re_search_2_stub, re_search_stub):
17450         Likewise, for RET_LEN arg.
17451         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17452         (set_regs): Likewise, for FL_BACKTRACK arg.
17453         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17454         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17455         (calc_eclosure_iter, parse_bracket_exp):
17456         Use bool for internal variables that are booleans.
17457         * lib/regexec.c (re_search_internal, check_matching,
17458         proceed_next_node):
17459         (set_regs, build_sifted_states, sift_states_bkref):
17460         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17461         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17462         (find_collation_sequence_value):
17463         Likewise.
17464         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17465         (re_node_set_compare):
17466         Return bool, not int. All callers changed.
17467         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17468         (build_trtable, check_node_accept): Likewise.
17469         * lib/regex_internal.h: Include stdbool.h.
17470
17471         Fix bugs uncovered when converting to bool.
17472         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17473         failure instead of charging ahead blindly.
17474         * lib/regex_internal.c (register_state): Likewise.
17475         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17476         for freeing internal storage.
17477         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17478         bitset pieces used as boolean, to avoid undefined behavior
17479         on hosts that do int overflow checking.
17480
17481 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17482
17483         * config/srclist.txt: Add glibc bugs 1285-1287.
17484
17485 2005-09-01  Jim Meyering  <jim@meyering.net>
17486
17487         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17488         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17489         Require gl_STAT_MACROS, too.
17490
17491 2005-09-01  Bruno Haible  <bruno@clisp.org>
17492
17493         * gnulib-tool (import): In the first-use case, provide defaults.
17494
17495 2005-09-01  Bruno Haible  <bruno@clisp.org>
17496
17497         * gnulib-tool (func_import): Remove the .tmp files.
17498
17499 2005-09-01  Bruno Haible  <bruno@clisp.org>
17500
17501         * gnulib-tool (func_import): Fix handling of symbolic links.
17502
17503 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17504
17505         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17506         old glibc regex code mishandles strings longer than 2**31 bytes.
17507         This patch fixes this when the regex code is used in gnulib
17508         (i.e., outside glibc).
17509
17510         This patch should not affect the use of the regex code inside
17511         glibc.  No doubt this problem also needs to be handled for glibc
17512         as well, but the result will be an incompatible change to the
17513         glibc ABI, and the old ABI will have to be supported too.  That
17514         can be the the subject for another patch.
17515
17516         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17517         governing whether the rest of this patch is active.  By default,
17518         the macro is disabled and the patch has no effect.
17519         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17520         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17521         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17522         (re_match_2, re_set_registers): Use the new types.
17523         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17524         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17525         New macros.
17526         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17527         (re_string_context_at, bin_tree_t, re_dfastate_t):
17528         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17529         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17530         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17531         (re_string_char_size_at, re_string_wchar_at):
17532         (re_string_elem_size_at):
17533         Use the new types and macros to port to 64-bit hosts.
17534         Use unsigned types for internal values, so that the code
17535         mostly works even for arrays larger than SSIZE_MAX.
17536         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
17537         (search_duplicated_node, calc_eclosure_iter, fetch_number):
17538         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
17539         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
17540         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
17541         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
17542         (calc_inveclosure, parse_dup_op, build_range_exp):
17543         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
17544         (fetch_number, create_token_tree, mark_opt_subexp):
17545         Likewise.
17546         * lib/regex_internal.c (re_string_construct_common,
17547         create_ci_newstate):
17548         (create_cd_newstate, re_string_allocate, re_string_construct):
17549         (re_string_realloc_buffers, build_wcs_upper_buffer):
17550         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17551         (re_string_reconstruct, re_string_peek_byte_case):
17552         (re_string_fetch_byte_case, re_string_context_at):
17553         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17554         (re_node_set_init_copy, re_node_set_add_intersect):
17555         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17556         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17557         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17558         (re_acquire_state, re_acquire_state_context, register_state):
17559         Likewise.
17560         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
17561         search_cur_bkref_entry):
17562         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
17563         (re_search_internal, re_search_2_stub, re_search_stub)
17564         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
17565         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
17566         (update_cur_sifted_state, check_dst_limits):
17567         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17568         (check_subexp_limits, sift_states_bkref, merge_state_array):
17569         (check_subexp_matching_top, get_subexp, get_subexp_sub):
17570         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
17571         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17572         (expand_bkref_cache, check_node_accept_bytes):
17573         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
17574         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
17575         (acquire_init_state_context, check_halt_node_context):
17576         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
17577         (sift_states_backward, clean_state_log_if_needed):
17578         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
17579         (find_recover_state, transit_state_sb, transit_state_mb):
17580         (transit_state_bkref, build_trtable, match_ctx_clean):
17581         Likewise.
17582         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
17583         to work around an assumption that REG_MISSING is negative.
17584
17585         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
17586         (seek_collating_symbol_entry) [defined _LIBC]:
17587         (lookup_collation_sequence_value) [defined _LIBC]:
17588         (build_range_exp, build_collating_symbol) [defined _LIBC]:
17589         Use prototypes rather than old-style function definitions.
17590         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
17591         (transit_state_sb) [0]:
17592         (find_collation_sequence_value) [defined _LIBC]: Likewise.
17593
17594         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
17595         rm_eo.
17596
17597         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
17598         (optimize_subexps, lower_subexp):
17599         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
17600         since the signed shift might overflow.  Use 1u<<31 instead.
17601         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17602         Likewise.
17603         * lib/regexec.c (check_dst_limits_calc_pos_1,
17604         check_subexp_matching_top): Likewise.
17605
17606         * lib/regcomp.c (optimize_subexps, lower_subexp):
17607         Use CHAR_BIT rather than 8, for clarity.
17608         * lib/regexec.c (check_dst_limits_calc_pos_1):
17609         (check_subexp_matching_top): Likewise.
17610         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
17611         have to worry about portability issues when shifting it left.
17612         Remove no-longer-needed test for table_size > 0.
17613         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
17614         in a word, as the resulting behavior is undefined.
17615         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
17616         in one case, a <= should have been an <, and in another case the
17617         whole test was missing.
17618         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
17619         the standard name CHAR_BIT.
17620         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
17621         this is not true on one's complement and signed-magnitude hosts.
17622
17623         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
17624         next_last_offset.
17625         (struct re_dfa_t): Remove unused member states_alloc.
17626         * lib/regcomp.c (init_dfa): Don't initialize unused members.
17627
17628 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17629
17630         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
17631         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
17632         and large-file glibc and in 32-bit large-file Solaris.
17633
17634 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17635
17636         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
17637         lengths fit in regoff_t; this isn't true if regoff_t is the same
17638         width as size_t.
17639         * lib/regex.c (re_search_internal): 5th arg is LAST_START
17640         (= START + RANGE) instead of RANGE.  This avoids overflow
17641         problems when regoff_t is the same width as size_t.
17642         All callers changed.
17643         (re_search_2_stub): Check for overflow when adding the
17644         sizes of the two strings.
17645         (re_search_stub): Check for overflow when adding START
17646         to RANGE; if it occurs, substitute the extreme value.
17647
17648 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17649
17650         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
17651
17652 2005-08-31  Jim Meyering  <jim@meyering.net>
17653
17654         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
17655         a pointer-to-const.
17656         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
17657         (register_state): Likewise.
17658         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
17659         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17660         (group_nodes_into_DFAstates): Likewise.
17661
17662 2005-08-31  Jim Meyering  <jim@meyering.net>
17663
17664         * check-module: Add a FIXME comment.
17665
17666 2005-08-31  Eric Blake  <ebb9@byu.net>
17667
17668         * modules/unistd-safer (Files): Add unistd--.h.
17669         * modules/stdio-safer (Files): Add stdio--.h.
17670
17671 2005-08-31  Derek Price  <derek@ximbiot.com>
17672
17673         * lib/getdelim.c (getdelim): Return EOF on EOF.
17674         Reported by Larry Jones <lawrence.jones@ugs.com>.
17675
17676 2005-08-31  Bruno Haible  <bruno@clisp.org>
17677
17678         Avoid unnecessary diffs in the generated lib/Makefile.am.
17679         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
17680         the generated files.
17681         (func_import): Don't set cmd.
17682
17683 2005-08-31  Bruno Haible  <bruno@clisp.org>
17684
17685         * lib/strstr.c: Include <stddef.h>, for NULL.
17686         * lib/strcasestr.c: Likewise.
17687         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17688
17689 2005-08-31  Bruno Haible  <bruno@clisp.org>
17690
17691         * gnulib-tool: New option --macro-prefix.
17692         (func_import): Use macro_prefix.
17693         (import): Handle option --macro-prefix.
17694
17695 2005-08-31  Bruno Haible  <bruno@clisp.org>
17696
17697         * gnulib-tool (import): Rename most ac_* variables to cached_*.
17698         Also use new variables cached_lgpl, cached_libtool.
17699
17700 2005-08-31  Bruno Haible  <bruno@clisp.org>
17701
17702         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
17703         always instantiating them.
17704
17705 2005-08-31  Bruno Haible  <bruno@clisp.org>
17706
17707         * gnulib-tool (func_import): Read the previous cached settings
17708         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
17709         earlier added by gnulib but are now dropped. Warn when a gnulib file
17710         overwrites a non-gnulib file.
17711
17712 2005-08-31  Bruno Haible  <bruno@clisp.org>
17713
17714         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
17715         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
17716         projects that don't keep autogenerated files in CVS. Put into
17717         actioncmd only the specified modules, not the transitive closure.
17718
17719 2005-08-31  Bruno Haible  <bruno@clisp.org>
17720
17721         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
17722         Create directories that shall be filled.
17723         (import): Don't look for gl_* macros in configure.ac. Recurse across
17724         all directories containing a gnulib-cache.m4 files, if meaningful.
17725
17726 2005-08-31  Bruno Haible  <bruno@clisp.org>
17727
17728         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
17729         (import): Set seen_libtool when we see gl_LIBTOOL.
17730
17731 2005-08-31  Bruno Haible  <bruno@clisp.org>
17732
17733         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
17734         declaration macro definitions from generated gnulib.m4.
17735
17736 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
17737
17738         * lib/iconvme.h: Add prototype for iconv_alloc.
17739
17740 2005-08-29  Simon Josefsson  <jas@extundo.com>
17741
17742         * lib/iconvme.c: Fix errno.
17743
17744 2005-08-29  Bruno Haible  <bruno@clisp.org>
17745
17746         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
17747         that it works when the directory contains spaces.
17748
17749 2005-08-29  Bruno Haible  <bruno@clisp.org>
17750
17751         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
17752
17753 2005-08-29  Bruno Haible  <bruno@clisp.org>
17754
17755         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
17756         Emit more advice.
17757
17758 2005-08-29  Bruno Haible  <bruno@clisp.org>
17759         and Stepan Kasal  <kasal@ucw.cz>
17760
17761         * check-module: If more parameters are given, check each of them
17762         separately; add more exceptions, as noted by Jim Meyering.
17763         (check_module): New procedure.
17764         (%exempt_header): Now contains all exceptions.
17765
17766 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
17767
17768         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
17769
17770 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17771
17772         * lib/iconvme.c: Split iconv_string into iconv_alloc.
17773
17774 2005-08-28  Bruno Haible  <bruno@clisp.org>
17775
17776         * m4/gnulib-tool.m4: New file.
17777
17778 2005-08-27  Jim Meyering  <jim@meyering.net>
17779
17780         * modules/unistd-safer (Files): Add pipe-safer.c.
17781         * modules/fcntl-safer (Files): Add creat-safer.c.
17782
17783 2005-08-27  Jim Meyering  <jim@meyering.net>
17784
17785         * m4/stdlib-safer.m4: New file.  From coreutils.
17786         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
17787         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
17788         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
17789         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
17790         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
17791
17792 2005-08-27  Jim Meyering  <jim@meyering.net>
17793
17794         * lib/fopen-safer.c: Merge minor changes from coreutils.
17795         * lib/dup-safer.c: Likewise.
17796         * lib/fd-safer.c: Likewise.
17797
17798         Merge from coreutils.
17799         * lib/stdio--.h: New file.
17800         * lib/stdlib--.h: New file.
17801         * lib/mkstemp-safer.c: New file.
17802
17803         GNU tar needs these.
17804         * lib/pipe-safer.c: New file.
17805         * lib/creat-safer.c: New file.
17806         * lib/fcntl--.h (creat): Define to creat_safer.
17807         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
17808         * lib/unistd--.h (pipe): Define to pipe_safer.
17809         * lib/unistd-safer.h: Declare pipe_safer.
17810
17811 2005-08-26  Simon Josefsson  <jas@extundo.com>
17812
17813         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
17814         Haible <bruno@clisp.org>.
17815
17816 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
17817
17818         * lib/regex_internal.h: Remove all references to
17819         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
17820         or better.
17821         (bitset_not, bitset_merge, bitset_not_merge):
17822         (bitset_mask, re_string_allocate, re_string_construct):
17823         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
17824         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
17825         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
17826         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
17827         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17828         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17829         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
17830         (re_acquire_state_context):
17831         Remove unnecessary forward decls.
17832         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
17833         Put __attribute at function definition,
17834         now that the function decl has been removed.
17835         * lib/regex_internal.c (re_string_peek_byte_case):
17836         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
17837         Likewise.
17838
17839 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
17840
17841         * m4/regex.m4: Add AC_PREREQ(2.50).
17842         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
17843
17844 2005-08-25  Simon Josefsson  <jas@extundo.com>
17845
17846         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
17847         __fsetlocking.
17848
17849 2005-08-25  Simon Josefsson  <jas@extundo.com>
17850
17851         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
17852         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
17853         GLIBC specific code.
17854
17855 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17856
17857         Make regex safe for g++.  This fixes one real bug (an "err"
17858         that should have been "*err").  g++ problem reported by
17859         Sam Steingold.
17860         * lib/regex_internal.h (re_calloc): New macro, consistent with
17861         re_malloc etc.  All callers of calloc changed to use re_calloc.
17862         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
17863         not int.  All callers changed.
17864         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
17865         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
17866         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
17867         (find_recover_state): Change "err" to "*err"; this fixes what
17868         appears to be a real bug.
17869         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
17870         versus int.
17871
17872 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17873
17874         * modules/regex (Depends-on): Add malloc, since the code
17875         assumes that !malloc(0) means failure.
17876
17877 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17878
17879         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
17880
17881         alloca modernization/simplification for regex.
17882         * lib/regex.c: Remove portability cruft for alloca.  This no longer
17883         needs to be at the start of the file, and can be moved into
17884         regex_internal.h and simplified.
17885         * lib/regex_internal.h: Include <alloca.h>.
17886         (__libc_use_alloca) [!defined _LIBC]: New macro.
17887         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
17888         now works outside glibc.
17889
17890 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17891
17892         * config/srclist.txt: Add glibc bugs 1241, 1245.
17893
17894 2005-08-25  Jim Meyering  <jim@meyering.net>
17895
17896         * lib/open-safer.c: Include <config.h>.
17897         Otherwise, we'd lose LARGEFILE support in any file using
17898         e.g. "fcntl--.h"
17899
17900 2005-08-25  Bruno Haible  <bruno@clisp.org>
17901
17902         * m4/minmax.m4: Require autoconf 2.52.
17903         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
17904         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
17905         alternatives of translit over the alphabet.
17906         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
17907
17908 2005-08-24  Simon Josefsson  <jas@extundo.com>
17909
17910         * tests/test-getpass.c: New file.
17911
17912 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17913
17914         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
17915         for GNU regex features.
17916
17917 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17918
17919         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
17920         * lib/regex.h (regerror): Likewise.
17921
17922         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
17923         requires this.  (The code never needed it.)
17924
17925         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
17926         All uses of recently-renamed identifiers changed to use the new,
17927         POSIX-compliant names.  The code will build and run just fine
17928         without these changes, but it's better to eat our own dog food
17929         and use the standard-conforming names.
17930
17931         * lib/regex.h: Fix a multitude of POSIX name space violations.
17932         These changes have an effect only for programs that define
17933         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
17934         do not change anything for programs compiled in the normal way.
17935         Also, there is no effect on the ABI.
17936
17937         (_REGEX_SOURCE): New macro.
17938         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
17939         defined and _GNU_SOURCE is not; this fixes a name space violation.
17940
17941         Rename the following macros to obey POSIX requirements.
17942         The old names are still visible as macros if _REGEX_SOURCE is defined.
17943         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
17944         RE_BACKSLASH_ESCAPE_IN_LISTS.
17945         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
17946         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
17947         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
17948         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
17949         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
17950         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
17951         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
17952         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
17953         (REG_INTERVALS): renamed from RE_INTERVALS.
17954         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
17955         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
17956         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
17957         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
17958         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
17959         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
17960         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
17961         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
17962         RE_UNMATCHED_RIGHT_PAREN_ORD.
17963         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
17964         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
17965         (REG_DEBUG): renamed from RE_DEBUG.
17966         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
17967         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
17968         unusual, since we can't clash with the POSIX REG_ICASE.
17969         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
17970         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
17971         (REG_NO_SUB): renamed from RE_NO_SUB.
17972         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
17973         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
17974         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
17975         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
17976         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
17977         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
17978         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
17979         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
17980         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
17981         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
17982         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
17983         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
17984         RE_SYNTAX_POSIX_MINIMAL_BASIC.
17985         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
17986         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
17987         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
17988         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
17989         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
17990         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
17991         (REG_FIXED): Renamed from REGS_FIXED.
17992         (REG_NREGS): Renamed from RE_NREGS.
17993
17994         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
17995         of other REG_* macros, since POSIX says the user is allowed to
17996         #undef these macros selectively.
17997
17998         (reg_errcode_t): Update comment stating what other tables need
17999         to be consistent.
18000
18001         Rename the following enum values to obey POSIX requirements.
18002         The old names are still visible as macros.
18003         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18004         is not defined, since GNU is supposed to be a superset of POSIX as
18005         much as possible, and since we want reg_errcode_t to be a signed
18006         type for implementation consistency.
18007         (_REG_NOERROR): Renamed from REG_NOERROR.
18008         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18009         (_REG_BADPAT): Renamed from REG_BADPAT.
18010         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18011         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18012         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18013         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18014         (_REG_EBRACK): Renamed from REG_EBRACK.
18015         (_REG_EPAREN): Renamed from REG_EPAREN.
18016         (_REG_EBRACE): Renamed from REG_EBRACE.
18017         (_REG_BADBR): Renamed from REG_BADBR.
18018         (_REG_ERANGE): Renamed from REG_ERANGE.
18019         (_REG_ESPACE): Renamed from REG_ESPACE.
18020         (_REG_BADRPT): Renamed from REG_BADRPT.
18021         (_REG_EEND): Renamed from REG_EEND.
18022         (_REG_ESIZE): Renamed from REG_ESIZE.
18023         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18024         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18025         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18026         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18027         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18028
18029         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18030         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18031         changed.  But support the old name if the new one is not defined
18032         and if _REGEX_SOURCE.
18033
18034         Change the following member names in struct re_pattern_buffer.
18035         The old names are still supported if !_REGEX_SOURCE.
18036         The new names are always supported, regardless of _REGEX_SOURCE.
18037         (re_buffer): Renamed from buffer.
18038         (re_allocated): Renamed from allocated.
18039         (re_used): Renamed from used.
18040         (re_syntax): Renamed from syntax.
18041         (re_fastmap): Renamed from fastmap.
18042         (re_translate): Renamed from translate.
18043         (re_can_be_null): Renamed from can_be_null.
18044         (re_regs_allocated): Renamed from regs_allocated.
18045         (re_fastmap_accurate): Renamed from fastmap_accurate.
18046         (re_no_sub): Renamed from no_sub.
18047         (re_not_bol): Renamed from not_bol.
18048         (re_not_eol): Renamed from not_eol.
18049         (re_newline_anchor): Renamed from newline_anchor.
18050
18051         Change the following member names in struct re_registers.
18052         The old names are still supported if !_REGEX_SOURCE.
18053         The new names are always supported, regardless of _REGEX_SOURCE.
18054         (rm_num_regs): Renamed from num_regs.
18055         (rm_start): Renamed from start.
18056         (rm_end): Renamed from end.
18057
18058         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18059         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18060         Prepend __ to parameter names.
18061
18062         Undo yesterday's changes.
18063
18064 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18065
18066         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18067         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18068         lib/regex.c.
18069
18070 2005-08-24  Jim Meyering  <jim@meyering.net>
18071
18072         Sync from coreutils.
18073         * m4/fcntl-safer.m4: New file.
18074
18075         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
18076         and object files for this module.
18077
18078 2005-08-24  Jim Meyering  <jim@meyering.net>
18079
18080         Sync from coreutils.
18081         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
18082
18083 2005-08-24  Jim Meyering  <jim@meyering.net>
18084
18085         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
18086         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
18087
18088 2005-08-24  Jim Meyering  <jim@meyering.net>
18089
18090         * modules/fcntl-safer: New module.
18091         * modules/fts (Depends-on): Add fcntl-safer.
18092         * MODULES.html.sh (File descriptor based Input/Output):
18093         Add fcntl-safer.
18094
18095 2005-08-24  Bruno Haible  <bruno@clisp.org>
18096
18097         Support for unit test modules.
18098         * modules/README: Mention tests modules.
18099         * modules/TEMPLATE-TESTS: New file.
18100         * gnulib-tool: New options --extract-tests-module, --with-tests and
18101         --tests-base (unused for the moment).
18102         (testsbase, inctests): New variables.
18103         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
18104         (func_verify_module): Exclude TEMPLATE-TESTS.
18105         (func_verify_nontests_module, func_verify_tests_module): New functions.
18106         (func_get_dependencies): Add implicit dependency for tests modules.
18107         (func_get_tests_module): New function.
18108         (func_modules_transitive_closure): When --with-tests was specified,
18109         include the unit tests as well, unless explicitly avoided.
18110         (func_emit_lib_Makefile_am): Ignore the tests modules here.
18111         (func_emit_tests_Makefile_am): New function.
18112         (func_create_testdir): When --with-tests was specified, emit a
18113         tests/ directory.
18114         * MODULES.html.sh (Future developments): Update.
18115
18116 2005-08-24  Bruno Haible  <bruno@clisp.org>
18117
18118         * modules/tls-tests: New file.
18119         * tests/test-tls.c: New file, from GNU gettext.
18120
18121 2005-08-24  Bruno Haible  <bruno@clisp.org>
18122
18123         * modules/lock-tests: New file.
18124         * tests/test-lock.c: New file, from GNU gettext.
18125
18126 2005-08-24  Bruno Haible  <bruno@clisp.org>
18127
18128         * lib/lock.h: Add multiple inclusion guard.
18129         * lib/tls.h: Add multiple inclusion guard.
18130
18131 2005-08-24  Bruno Haible  <bruno@clisp.org>
18132
18133         * gnulib-tool: Add support for the --aux-dir option to
18134         --create-testdir, --create-megatestdir, --test, --megatest.
18135         (func_create_testdir, func_create_megatestdir): Optionally emit a
18136         AC_CONFIG_AUX_DIR directive.
18137         (create-testdir, create-megatestdir, test, megatest): Provide a
18138         default value for $auxdir.
18139
18140 2005-08-24  Bruno Haible  <bruno@clisp.org>
18141
18142         * gnulib-tool (import): Use compound statement instead of subshell
18143         where possible.
18144
18145 2005-08-24  Bruno Haible  <bruno@clisp.org>
18146
18147         * gnulib-tool (import): Change --aux-dir default to "build-aux".
18148
18149 2005-08-24  Bruno Haible  <bruno@clisp.org>
18150
18151         * gnulib-tool (func_version): Update.
18152
18153 2005-08-24  Bruno Haible  <bruno@clisp.org>
18154
18155         * gnulib-tool (func_import, func_create_testdir,
18156         func_create_megatestdir): Quote all autoconf macro arguments.
18157
18158 2005-08-24  Bruno Haible  <bruno@clisp.org>
18159
18160         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
18161         option --force, because --force causes the aclocal.m4 of each
18162         subdirectory to be newer than the corresponding config.h.in.
18163
18164 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18165
18166         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
18167         All contents moved to gl_REGEX.
18168         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
18169         assume that it does.
18170
18171 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18172
18173         * lib/regex.h (REG_NOSYS)
18174         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
18175         Define, since POSIX requires it as of 2001.
18176         (_REG_ENOSYS)
18177         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
18178         New private symbol, used to keep the enum signed in all cases.
18179         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
18180         Youngman in
18181         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
18182
18183         * lib/regex_internal.c (re_string_skip_chars, register_state):
18184         (calc_state_hash):
18185         Remove forward decls; no longer needed now that we use prototypes.
18186         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
18187         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
18188         (clean_state_log_if_needed): Likewise.
18189
18190 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18191
18192         * config/srclist.txt: Add glibc bugs 1231-1233.
18193
18194 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18195
18196         Fix problems reported by Sam Steingold in
18197         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
18198         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
18199         assumed that reg_errcode_t is a signed type, which is not
18200         necessarily true if _XOPEN_SOURCE is not defined.
18201         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
18202         since some compilers warn about it otherwise.
18203
18204 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18205
18206         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
18207         (init_word_char, create_initial_state, duplicate_node_closure):
18208         (fetch_token, peek_token_bracket, build_range_exp):
18209         (build_collating_symbol): Remove forward decls; no longer needed
18210         now that we use prototypes.
18211
18212         * lib/regcomp.c:
18213         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
18214         (re_compile_fastmap_iter, regcomp, regerror, regfree):
18215         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
18216         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
18217         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
18218         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
18219         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
18220         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
18221         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
18222         (build_range_exp, build_collating_symbol, parse_bracket_exp):
18223         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
18224         (build_charclass, build_charclass_op, fetch_number, create_tree):
18225         (create_token_tree, mark_opt_subexp, duplicate_tree):
18226         Use prototypes rather than old-style definitions.
18227
18228         * lib/regex_internal.c:
18229         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
18230         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
18231         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18232         (re_string_reconstruct, re_string_peek_byte_case):
18233         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
18234         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18235         (re_node_set_init_copy, re_node_set_add_intersect):
18236         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18237         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18238         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18239         (re_acquire_state, re_acquire_state_context, register_state):
18240         (create_ci_newstate, create_cd_newstate, free_state):
18241         Likewise.
18242         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
18243         re_search_2):
18244         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
18245         (re_search_internal, prune_impossible_nodes):
18246         (acquire_init_state_context, check_matching, static):
18247         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18248         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18249         (update_regs, sift_states_backward, build_sifted_states):
18250         (clean_state_log_if_needed, merge_state_array):
18251         (update_cur_sifted_state, add_epsilon_src_nodes):
18252         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18253         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18254         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18255         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18256         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18257         (check_arrival, check_arrival_add_next_nodes):
18258         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18259         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18260         (check_node_accept_bytes, check_node_accept, extend_buffers):
18261         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18262         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18263         (sift_ctx_init):
18264         Likewise.
18265
18266         * lib/regex_internal.h:
18267         (re_string_allocate, re_string_construct, re_string_reconstruct):
18268         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18269         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18270         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18271         (re_string_context_at, re_string_peek_byte_case):
18272         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18273         is defined, since we now use prototypes always.
18274
18275         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18276         C89 or better.  All uses removed.
18277
18278 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18279
18280         * config/srclist.txt: Add glibc bugs 1220-1227.
18281
18282 2005-08-20  Jim Meyering  <jim@meyering.net>
18283
18284         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18285         of unused local, dfa.
18286
18287 2005-08-20  Bruno Haible  <bruno@clisp.org>
18288
18289         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18290
18291 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18292
18293         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18294         (re_node_set_insert_last, re_dfa_add_node):
18295         Rename local variables to avoid GCC shadowing warnings.
18296
18297 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18298
18299         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18300         [defined lint]: Suppress bogus uninitialized-variable warnings.
18301
18302         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18303         and let the caller return REG_ESPACE if out of space.  This
18304         removes an uninitialied-variable warning with GCC 4.0.1, and also
18305         avoids taking the address of a local variable.  All callers
18306         changed.
18307
18308 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18309
18310         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18311         $LIBCSRC/posix/regexec.c.
18312         Add glibc bug 1217 for regcomp.c.
18313
18314 2005-08-19  Jim Meyering  <jim@meyering.net>
18315
18316         * lib/regexec.c (proceed_next_node): Redo local variables to
18317         avoid GCC shadowing warnings.
18318
18319 2005-08-18  Bruno Haible  <bruno@clisp.org>
18320
18321         * lib/strstr.c (strstr): Fix return value in multibyte case.
18322         * lib/strcasestr.c (strcasestr): Likewise.
18323
18324 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18325
18326         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18327
18328 2005-08-17  Jim Meyering  <jim@meyering.net>
18329
18330         Make the %s format (seconds since the epoch) work for a negative
18331         number and when used with a zero-padded field width, e.g. %015s.
18332
18333         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18334         label so that it precedes the code to set `digits'.  Otherwise,
18335         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18336         print `00-22'.  Now, it prints `-0022', as it should.
18337
18338 2005-08-17  Bruno Haible  <bruno@clisp.org>
18339
18340         * modules/strstr (Files): Add m4/mbrtowc.m4.
18341         (Depends-on): Add mbuiter.
18342
18343 2005-08-17  Bruno Haible  <bruno@clisp.org>
18344
18345         * modules/strcasestr: New file.
18346         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18347         strcasestr.
18348
18349 2005-08-17  Bruno Haible  <bruno@clisp.org>
18350
18351         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18352
18353 2005-08-17  Bruno Haible  <bruno@clisp.org>
18354
18355         * modules/mbuiter: New file.
18356         * MODULES.html.sh (Extended multibyte and wide character utilities):
18357         Add mbuiter.
18358
18359 2005-08-17  Bruno Haible  <bruno@clisp.org>
18360
18361         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18362         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18363
18364 2005-08-17  Bruno Haible  <bruno@clisp.org>
18365
18366         * m4/strcasestr.m4: New file.
18367
18368 2005-08-17  Bruno Haible  <bruno@clisp.org>
18369
18370         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18371         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18372
18373 2005-08-17  Bruno Haible  <bruno@clisp.org>
18374
18375         * lib/strcasestr.h: New file.
18376         * lib/strcasestr.c: New file.
18377
18378 2005-08-17  Bruno Haible  <bruno@clisp.org>
18379
18380         * lib/strcasecmp.c: Use mbuiter.h.
18381
18382 2005-08-17  Bruno Haible  <bruno@clisp.org>
18383
18384         * lib/mbuiter.h: New file.
18385
18386 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18387
18388         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18389         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18390         and gl_GETOPT are both invoked via different paths (as happens
18391         with GNU tar CVS because it uses both argp and getopt), the former
18392         wins.
18393
18394 2005-08-16  Bruno Haible  <bruno@clisp.org>
18395
18396         * modules/tls: New file.
18397         * MODULES.html.sh (Multithreading): Add tls.
18398
18399 2005-08-16  Bruno Haible  <bruno@clisp.org>
18400
18401         * modules/strnlen1: New file.
18402         * MODULES.html.sh (String handling): Add strnlen1.
18403
18404 2005-08-16  Bruno Haible  <bruno@clisp.org>
18405
18406         * modules/strcase (Files): Add m4/mbrtowc.m4.
18407         (Depends-on): Add strnlen1, mbchar.
18408
18409 2005-08-16  Bruno Haible  <bruno@clisp.org>
18410
18411         * modules/mbiter: New file.
18412         * MODULES.html.sh (Extended multibyte and wide character utilities):
18413         Add mbiter.
18414
18415 2005-08-16  Bruno Haible  <bruno@clisp.org>
18416
18417         * modules/mbfile: New file.
18418         * MODULES.html.sh (Extended multibyte and wide character utilities):
18419         Add mbfile.
18420
18421 2005-08-16  Bruno Haible  <bruno@clisp.org>
18422
18423         * modules/mbchar: New file.
18424         * MODULES.html.sh (Extended multibyte and wide character utilities):
18425         New section.
18426
18427 2005-08-16  Bruno Haible  <bruno@clisp.org>
18428
18429         * m4/tls.m4: New file, from GNU gettext.
18430
18431 2005-08-16  Bruno Haible  <bruno@clisp.org>
18432
18433         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18434         always.
18435         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18436
18437 2005-08-16  Bruno Haible  <bruno@clisp.org>
18438
18439         * m4/mbiter.m4: New file.
18440
18441 2005-08-16  Bruno Haible  <bruno@clisp.org>
18442
18443         * m4/mbfile.m4: New file.
18444
18445 2005-08-16  Bruno Haible  <bruno@clisp.org>
18446
18447         * m4/mbchar.m4: New file.
18448
18449 2005-08-16  Bruno Haible  <bruno@clisp.org>
18450
18451         * lib/tls.h: New file, from GNU gettext.
18452         * lib/tls.c: New file, from GNU gettext.
18453
18454 2005-08-16  Bruno Haible  <bruno@clisp.org>
18455
18456         * lib/strnlen1.h: New file.
18457         * lib/strnlen1.c: New file.
18458
18459 2005-08-16  Bruno Haible  <bruno@clisp.org>
18460
18461         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18462         (mbi_init): Update.
18463         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18464         NUL byte, not after it.
18465
18466 2005-08-16  Bruno Haible  <bruno@clisp.org>
18467
18468         * lib/strcase.h (strcasecmp): Add note in comments.
18469         * lib/strncasecmp.c: Use code from strcasecmp.c.
18470         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18471         (strcasecmp): Work correctly in multibyte locales.
18472
18473 2005-08-16  Bruno Haible  <bruno@clisp.org>
18474
18475         * lib/mbiter.h: New file.
18476
18477 2005-08-16  Bruno Haible  <bruno@clisp.org>
18478
18479         * lib/mbfile.h: New file.
18480
18481 2005-08-16  Bruno Haible  <bruno@clisp.org>
18482
18483         * lib/mbchar.h: New file.
18484         * lib/mbchar.c: New file.
18485
18486 2005-08-16  Bruno Haible  <bruno@clisp.org>
18487
18488         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18489         the valid ones. Makes the comparison operations transitive:
18490         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18491         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18492
18493 2005-08-15  Simon Josefsson  <jas@extundo.com>
18494
18495         * modules/ssize_t (License): Change to 'unlimited'.
18496
18497         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18498
18499 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18500
18501         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18502         Add comments for each pending glibc patch.
18503
18504 2005-08-15  Bruno Haible  <bruno@clisp.org>
18505
18506         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18507         __cplusplus is defined.
18508
18509 2005-08-14  Jim Meyering  <jim@meyering.net>
18510
18511         Sync from coreutils.
18512
18513         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18514         Use the hash-table-based cycle-detection code not just when
18515         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18516         Reported by James Youngman in
18517         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18518         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18519         FTS_TIGHT_CYCLE_CHECK.
18520         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18521         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18522         once again.
18523         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18524         * lib/fts.c (fd_safer): Remove decl.
18525         Include fcntl--.h rather than unistd-safer.h
18526         (fts_safe_changedir): Don't call fd_safer; no longer needed
18527         now that we include fcntl--.h.
18528
18529 2005-08-12  Simon Josefsson  <jas@extundo.com>
18530
18531         * modules/getndelim2: Use ssize_t module.
18532         * modules/getnline: Likewise.
18533         * modules/safe-read: Likewise.
18534         * modules/xreadlink: Likewise.
18535
18536         * modules/ssize_t: New file.
18537
18538 2005-08-12  Simon Josefsson  <jas@extundo.com>
18539
18540         * m4/readline.m4: Look for termcap, curses or ncurses if required.
18541
18542 2005-08-12  Simon Josefsson  <jas@extundo.com>
18543
18544         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18545         ssize_t.
18546
18547 2005-08-12  Simon Josefsson  <jas@extundo.com>
18548
18549         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
18550         readline, getdelim and check_version.
18551         (Support for systems lacking ISO C 99: Sizes of integer types):
18552         Add size_max.
18553
18554 2005-08-12  Bruno Haible  <bruno@clisp.org>
18555
18556         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
18557
18558 2005-08-11  Simon Josefsson  <jas@extundo.com>
18559
18560         * modules/readline: New file.
18561
18562         * modules/strnlen (Files): Add strnlen.h.
18563
18564 2005-08-11  Simon Josefsson  <jas@extundo.com>
18565
18566         * m4/readline.m4: New file.
18567
18568 2005-08-11  Simon Josefsson  <jas@extundo.com>
18569
18570         * lib/readline.h, readline.c: New file.
18571
18572 2005-08-11  Simon Josefsson  <jas@extundo.com>
18573
18574         * doc/gnulib.texi (Initial import, Finishing touches): Mention
18575         gl_AVOID.
18576
18577 2005-08-11  Bruno Haible  <bruno@clisp.org>
18578
18579         * lib/strnlen.h (strnlen): Change parameter name to match comment.
18580
18581 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
18582
18583         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
18584
18585 2005-08-10  Simon Josefsson  <jas@extundo.com>
18586
18587         * tests/test-iconvme.c: New file.
18588
18589 2005-08-10  Simon Josefsson  <jas@extundo.com>
18590
18591         * m4/strnlen.m4: New file.
18592
18593         * m4/strndup.m4: Don't check for strnlen declaration, done in
18594         strnlen.m4.
18595
18596 2005-08-10  Simon Josefsson  <jas@extundo.com>
18597
18598         * lib/strndup.c: Use strnlen.h.
18599
18600         * lib/strnlen.h: New file.
18601
18602 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18603
18604         * README: Typos.
18605
18606 2005-08-02  Simon Josefsson  <jas@extundo.com>
18607
18608         * modules/readline: New file.
18609
18610 2005-08-02  Simon Josefsson  <jas@extundo.com>
18611
18612         * modules/getdelim: New file.
18613
18614         * modules/getline: Rewrite, don't use getndelim2.
18615
18616 2005-08-02  Simon Josefsson  <jas@extundo.com>
18617
18618         * m4/getline.m4: Separate out getdelim stuff into separate module.
18619
18620         * m4/getdelim.m4: New file.
18621
18622 2005-08-02  Simon Josefsson  <jas@extundo.com>
18623
18624         * lib/getline.h, getline.c: Rewrite.
18625
18626         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
18627
18628 2005-07-31  Bruno Haible  <bruno@clisp.org>
18629
18630         * lib/lock.h (gl_lock_initializer): New macro.
18631         (gl_lock_define_initialized): Use it.
18632         (gl_rwlock_initializer): New macro.
18633         (gl_rwlock_define_initialized): Use it.
18634         (gl_recursive_lock_initializer): New macro.
18635         (gl_recursive_lock_define_initialized): Use it.
18636
18637 2005-07-30  Karl Berry  <karl@gnu.org>
18638
18639         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
18640         Report from Ben Pfaff, regarding getopt.
18641
18642 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
18643
18644         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
18645         normal way.
18646         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
18647         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
18648         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
18649         (gl_GETOPT): Use the new macros.  Most of the implementation
18650         is moved to the new macros.  This is for programs like Emacs
18651         that don't want all the functionality of gl_GETOPT.
18652
18653 2005-07-26  Bruno Haible  <bruno@clisp.org>
18654
18655         * m4/lock.m4: Update from GNU gettext.
18656
18657 2005-07-26  Bruno Haible  <bruno@clisp.org>
18658
18659         * lib/lock.h: Update from GNU gettext.
18660         * lib/lock.c: Update from GNU gettext.
18661
18662 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
18663
18664         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
18665         obsolescent AC_TRY_RUN.  Include the default includes files, for
18666         'exit'.
18667
18668 2005-07-24  Bruno Haible  <bruno@clisp.org>
18669
18670         * modules/visibility: New file.
18671         * MODULES.html.sh (Misc): Add visibility.
18672
18673 2005-07-24  Bruno Haible  <bruno@clisp.org>
18674
18675         * m4/visibility.m4: New file.
18676
18677 2005-07-24  Bruno Haible  <bruno@clisp.org>
18678
18679         * doc/visibility.texi: New file.
18680
18681 2005-07-22  Bruno Haible  <bruno@clisp.org>
18682
18683         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
18684         $(ALLOCA_H), redundant through BUILT_SOURCES.
18685         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
18686         redundant through BUILT_SOURCES.
18687         * modules/byteswap (Makefile.am): Remove explicit dependency on
18688         $(BYTESWAP_H), redundant through BUILT_SOURCES.
18689         * modules/fnmatch (Makefile.am): Remove explicit dependency on
18690         $(FNMATCH_H), redundant through BUILT_SOURCES.
18691         * modules/getopt (Makefile.am): Remove explicit dependency on
18692         $(GETOPT_H), redundant through BUILT_SOURCES.
18693         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
18694         redundant through BUILT_SOURCES.
18695         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
18696         redundant through BUILT_SOURCES.
18697         * modules/stdbool (Makefile.am): Remove explicit dependency on
18698         $(STDBOOL_H), redundant through BUILT_SOURCES.
18699         * modules/stdint (Makefile.am): Remove explicit dependency on
18700         $(STDINT_H), redundant through BUILT_SOURCES.
18701         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
18702         Remove explicit dependency on $(SYSEXITS_H).
18703         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
18704
18705 2005-07-18  Simon Josefsson  <jas@extundo.com>
18706
18707         * lib/check-version.c (check_version): Accept identical versions too.
18708
18709 2005-07-18  Bruno Haible  <bruno@clisp.org>
18710
18711         * modules/lock: New file.
18712         * MODULES.html.sh (Multithreading): New section.
18713
18714 2005-07-18  Bruno Haible  <bruno@clisp.org>
18715
18716         * m4/lock.m4: New file, from GNU gettext.
18717
18718 2005-07-18  Bruno Haible  <bruno@clisp.org>
18719
18720         * lib/lock.h: New file, from GNU gettext.
18721         * lib/lock.c: New file, from GNU gettext.
18722
18723 2005-07-18  Bruno Haible  <bruno@clisp.org>
18724
18725         * lib/lock.h (gl_once_t): New type.
18726         (gl_once_define, gl_once): New macros.
18727         * lib/lock.c (fresh_once): New variable.
18728         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
18729         functions.
18730
18731 2005-07-16  Simon Josefsson  <jas@extundo.com>
18732
18733         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
18734         workaround, suggested by Bruno.
18735
18736 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18737
18738         * modules/xalloc (Depends-on): Add xalloc-die.
18739         * modules/xvasprintf (Depends-on): Add xalloc-die.
18740
18741 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18742
18743         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
18744         with a minor change.
18745
18746 2005-07-15  Bruno Haible  <bruno@clisp.org>
18747
18748         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
18749         When using lib/poll.c, define poll as rpl_poll.
18750
18751 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
18752
18753         * modules/argp (Depends-on): Remove unlocked-io.
18754
18755 2005-07-14  Derek Price  <derek@ximbiot.com>
18756
18757         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
18758         for glob symlink bug.
18759
18760 2005-07-14  Bruno Haible  <bruno@clisp.org>
18761
18762         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
18763         Instead, test for *_unlocked function declarations directly.
18764
18765 2005-07-11  Simon Josefsson  <jas@extundo.com>
18766
18767         * modules/size_max: New file.
18768
18769         * modules/xsize: Depend on size_max module for size_max.m4.
18770
18771 2005-07-11  Simon Josefsson  <jas@extundo.com>
18772
18773         * lib/size_max.h: New file.
18774
18775 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
18776
18777         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
18778         copyright symbol and the year.
18779         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
18780         (version_etc_va): Use parameterized copyright notice.
18781         Reword to conform to the current GNU coding standards.
18782
18783 2005-07-11  Karl Berry  <karl@gnu.org>
18784
18785         * doc/gnulib.texi (Quoting): new node.
18786         (Initial import): more info, from Patrice.
18787
18788 2005-07-11  Bruno Haible  <bruno@clisp.org>
18789
18790         * gnulib-tool (func_usage): Document option --avoid.
18791         (Command line options): Handle --avoid.
18792         (func_acceptable): New function.
18793         (func_modules_transitive_closure): Use it.
18794
18795 2005-07-11  Bruno Haible  <bruno@clisp.org>
18796
18797         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
18798         Reported by Jim Meyering.
18799
18800 2005-07-10  Bruno Haible  <bruno@clisp.org>
18801
18802         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
18803         Needed when size_t is smaller than 'unsigned int'.
18804         Reported by Paul Eggert.
18805
18806 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18807
18808         * modules/argp (Depends-on): Add unlocked-io
18809
18810 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18811
18812         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
18813         block of defines.
18814
18815 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
18816
18817         * config/srclist.txt: Comment out regcomp.c, since we have a porting
18818         fix now.
18819
18820 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
18821         and Paul Eggert  <eggert@cs.ucla.edu>
18822
18823         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
18824         in wint_t, not wchar_t.  Remove now-unnecessary cast.
18825
18826 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18827
18828         * modules/regex (Files): Add lib/regex_internal.c,
18829         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
18830         (Depends-on): Add extensions.
18831         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
18832
18833 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18834
18835         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
18836         pathconf.
18837         * m4/same.m4 (gl_SAME): Likewise.
18838         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
18839
18840         * m4/regex.m4: Adjust to new libc regex implementation.
18841         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
18842         all the .c and .h parts of (the new) regex.
18843         Quote the m4 stuff better.
18844         Check for RE_ICASE bug of old gnulib.
18845         Check for REG_STARTEND of recent libc.
18846         Rename local variables from jm_* to gl_*.
18847         Quote operand of "test -f".
18848         Say "recent enough" version of libc, not "version 2".
18849         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
18850         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
18851         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
18852         Remove check for btowc, isascii.
18853         Require AM_LANGINFO_CODESET.
18854
18855 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18856
18857         * lib/regex.c, regex.h: Sync from libc.
18858         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
18859         * lib/regexec.c:
18860         New files, synced from libc, except that regex_internal.h
18861         currently has a small porting fix.
18862
18863 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18864
18865         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
18866         regex_internal.c, regexec.c.
18867         Add regex_internal.h too, but as a comment, since the libc version
18868         is currently broken in gnulib mode.
18869
18870 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
18871
18872         Support programs like Emacs that use gnulib but not gettext.
18873         * MODULES.html.sh (Internationalization functions): Add gettext-h.
18874         * modules/gettext-h: New file.
18875         * modules/gettext (Files): Remove lib/gettext.h.
18876         (Depends-on): Add gettext-h.
18877         (Makefile.am): Remove lib_SOURCES.
18878         * modules/argmatch, modules/c-stack, modules/closeout:
18879         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
18880         * modules/execute, modules/file-type, modules/getaddrinfo:
18881         * modules/getopt, modules/human, modules/javacomp:
18882         * modules/javaexec, modules/mkdir-p, modules/obstack:
18883         * modules/openat, modules/pagealign_alloc, modules/pipe:
18884         * modules/quotearg, modules/regex, modules/rpmatch:
18885         * modules/unicodeio, modules/userspec, modules/version-etc:
18886         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
18887         * modules/xsetenv:
18888         Depend on gettext-h, not gettext.
18889
18890 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
18891
18892         * gnulib-tool (func_import): Add support for 'public domain' license.
18893         * modules/alloca, modules/atexit, modules/memmove:
18894         Now public domain, not GPL.
18895         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
18896         * modules/realloc, modules/strerror, modules/strtod:
18897         Now LGPL, not GPL.
18898
18899 2005-07-05  Bruno Haible  <bruno@clisp.org>
18900
18901         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
18902         autoconf CVS. Needed for mingw.
18903
18904 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18905
18906         Remove the dependency of the strftime module on the tzset module.
18907         * modules/strftime (Depends-on): Remove dependency on tzset.
18908
18909 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18910
18911         Remove the dependency of the strftime module on the tzset module.
18912         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
18913         gl_FUNC_TZSET_CLOBBER.
18914
18915 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18916
18917         Remove the dependency of the strftime module on the tzset module.
18918         * lib/strftime.c (my_strftime)
18919         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
18920         Copy the input structure, to work around some of the bug with
18921         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
18922         Solaris releases, you should also use the tzset module, but we won't
18923         require it as a dependency any more since we don't want LGPLed code
18924         to depend on GPLed code.
18925
18926 2005-07-02  Jim Meyering  <jim@meyering.net>
18927
18928         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
18929         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
18930         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
18931         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
18932
18933 2005-07-02  Jim Meyering  <jim@meyering.net>
18934
18935         * lib/backupfile.c (backup_args): Change a `0' to NULL.
18936
18937 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
18938
18939         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
18940         declares only 'struct timespec;' (!).
18941
18942 2005-07-01  Jim Meyering  <jim@meyering.net>
18943
18944         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
18945         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
18946         * lib/save-cwd.c, tempname.c:
18947         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
18948         and don't include <sys/file.h>).
18949
18950 2005-06-29  Jim Meyering  <jim@meyering.net>
18951
18952         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
18953         type name.  Use the variable name instead.
18954         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
18955         Likewise.
18956
18957 2005-06-28  Simon Josefsson  <jas@extundo.com>
18958
18959         * modules/check-version (Files): Add check-version.m4.
18960
18961 2005-06-28  Simon Josefsson  <jas@extundo.com>
18962
18963         * m4/check-version.m4: New file, suggested by Jim Meyering
18964         <jim@meyering.net>.
18965
18966 2005-06-28  Simon Josefsson  <jas@extundo.com>
18967
18968         * lib/check-version.h, lib/check-version.c: New files.
18969
18970 2005-06-28  Simon Josefsson  <jas@extundo.com>
18971
18972         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
18973         collision with global variable.  Better indentation.  Don't
18974         increment buffer pointer beyond buffer end.  Based on comments
18975         from Paul Eggert <eggert@cs.ucla.edu>.
18976
18977         * lib/base64.h: Indent.
18978
18979 2005-06-28  Simon Josefsson  <jas@extundo.com>
18980
18981         * doc/gnulib.texi (Library version handling): New section.
18982
18983 2005-06-28  Jim Meyering  <jim@meyering.net>
18984
18985         * check-module (find_included_lib_files): Hard-code another
18986         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
18987         but modules/fts-lgpl (correctly) does not list those files.
18988
18989         * modules/canonicalize (Files): Add lib/pathmax.h.
18990
18991 2005-06-25  Simon Josefsson  <jas@extundo.com>
18992
18993         * modules/check-version: New file.
18994
18995 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
18996
18997         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
18998         initializer of struct addrinfo, as an indication that we don't
18999         care how many members the structure has.
19000
19001 2005-06-24  Derek Price  <derek@ximbiot.com>
19002         and Bruno Haible  <bruno@clisp.org>
19003
19004         Remove stat module & update lstat.
19005         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19006         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19007         * m4/stat.m4: Remove this file.
19008
19009 2005-06-24  Derek Price  <derek@ximbiot.com>
19010         and Bruno Haible  <bruno@clisp.org>
19011
19012         Remove stat module & update lstat.
19013         * lib/stat.c: Remove this file...
19014         (slash_aware_lstat): ...moving this content and its support...
19015         * lib/lstat.c (rpl_lstat): ...into here.
19016         * lib/lstat.h: New file.
19017
19018 2005-06-24  Derek Price  <derek@ximbiot.com>
19019         and Bruno Haible  <bruno@clisp.org>
19020
19021         Remove stat module & update lstat.
19022         * config/srclist.txt (libc sources): Remove stat.
19023
19024 2005-06-24  Derek Price  <derek@ximbiot.com>
19025         and Bruno Haible  <bruno@clisp.org>
19026
19027         Remove stat module & update lstat.
19028         * MODULES.html.sh (stat): Remove.
19029         * MODULES.html: Regenerated.
19030         * modules/lstat (Description): Correct function name.
19031         (Files): Add "lstat.h".
19032         (Depends-on): Remove stat, add xalloc, stat-macros.
19033         * modules/stat: Remove this file.
19034         (Include): Add "lstat.h", remove <sys/stat.h>.
19035
19036 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19037
19038         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19039         (ranged_convert): Don't save conversion in a temporary struct.
19040         This causes a warning with GCC 4.0.0, and anyway in the typical
19041         case it's not worth the extra 100 bytes or so of code.
19042         (ranged_convert, __mktime_internal): When calling a function via a
19043         pointer P, use P () rather than (*P) (), as we now assume C89 or
19044         better.
19045
19046 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19047
19048         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19049         "who -r" failed to give output.  Problem reported by Tim Waugh.
19050
19051         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19052         (xcalloc): Use it to avoid needless tests.
19053         Problem reported by Jim Meyering.
19054
19055 2005-06-20  Derek Price  <derek@ximbiot.com>
19056
19057         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19058         unnecessary for Autoconfs > 2.59c.
19059
19060 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19061
19062         * lib/argp.h (__option_is_short): Check upper limit of
19063         __key. Isprint() requires its argument to have the value
19064         of an unsigned char or EOF.
19065
19066 2005-06-16  Jim Meyering  <jim@meyering.net>
19067
19068         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19069         when either N or S is zero.
19070
19071 2005-06-16  Derek Price  <derek@ximbiot.com>
19072
19073         * m4/bison.m4: Declare YACC & YFLAGS precious.
19074
19075 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
19076
19077         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
19078         multibyte string or pattern, fall back on unibyte matching.
19079         Problem reported by James Youngman.
19080
19081 2005-06-08  Bruno Haible  <bruno@clisp.org>
19082
19083         * modules/csharpcomp: New file.
19084         * MODULES.html.sh (C#): Add csharpcomp.
19085
19086 2005-06-08  Bruno Haible  <bruno@clisp.org>
19087
19088         * m4/csharpcomp.m4: New file, from GNU gettext.
19089
19090 2005-06-08  Bruno Haible  <bruno@clisp.org>
19091
19092         * lib/csharpcomp.h: New file, from GNU gettext.
19093         * lib/csharpcomp.c: New file, from GNU gettext.
19094         * lib/csharpcomp.sh.in: New file, from GNU gettext.
19095
19096 2005-06-08  Bruno Haible  <bruno@clisp.org>
19097
19098         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
19099         warning on mingw.
19100
19101 2005-06-07  Derek Price  <derek@ximbiot.com>
19102
19103         Sync from CVS.
19104         * lib/glob_.h: Indent nested #ifdef.
19105
19106 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19107
19108         Sync from coreutils.
19109         Use "file name" when talking about file names, instead of "filename"
19110         or "path", as per the GNU coding standards.
19111         * lib/mkdir-p.c: Renamed from makepath.c.
19112         (make_dir_parents): Renamed from make_path.  All callers changed.
19113         * lib/mkdir-p.h: Likewise.  All includers changed.
19114         * lib/filenamecat.c: Renamed from path-concat.c.
19115         (file_name_concat): Renamed from path_concat.  All callers changed.
19116         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
19117         * lib/filenamecat.h: Likewise.  All includers changed.
19118         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
19119         in comments or local variable names.
19120         * lib/basename.c: Likewise.
19121         * lib/canonicalize.c, canonicalize.h: Likewise.
19122         * lib/dirname.c, dirname.h: Likewise.
19123         * lib/euidaccess.c: Likewise.
19124         * lib/exclude.c: Likewise
19125         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
19126         * lib/fsusage.c, fsuage.h: Likewise.
19127         * lib/fts.c, fts_.h: Likewise.
19128         * lib/getcwd.c: Likewise.
19129         * lib/getloadavg.c: Likewise.
19130         * lib/mkstemp.c: Likewise.
19131         * lib/mountlist.c, mountlist.h: Likewise.
19132         * lib/openat.c, openat.h: Likewise.
19133         * lib/readlink-stub.c: Likewise.
19134         * lib/readutmp.c, readutmp.h: Likewise.
19135         * lib/rename.c: Likewise.
19136         * lib/rmdir.c: Likewise.
19137         * lib/same.c: Likewise.
19138         * lib/savedir.c: Likewise.
19139         * lib/stripslash.c: Likewise.
19140         * lib/tempname.c: Likewise.
19141         * lib/xreadlink.c: Likewise.
19142         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
19143         All uses changed.
19144         * lib/exclude.h: Likewise.
19145
19146         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
19147         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19148         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
19149         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19150         * lib/pathmax.h: Include <limits.h> unconditionally, since other
19151         files have been getting away with it for years (MORE/BSD 4.3
19152         is extinct now).
19153         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
19154         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19155
19156         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
19157         Define to 256, not 255, as per modern POSIX.
19158
19159 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19160
19161         Sync from coreutils.
19162         Use "file name" when talking about file names, instead of "filename"
19163         or "path", as per the GNU coding standards.
19164         * MODULES.html.sh: mkdir-p renamed from makepath.
19165         filenamecat renamed from path-concat.
19166         * modules/filenamecat: Renamed from modules/path-concat.
19167         (Files): filenamecat.h and filenamecat.c renamed from
19168         path-concat.h and path-concat.c.
19169         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
19170         (Include): filenamecat.h, not path-concat.h.
19171         * modules/mkdir-p: Renamed from modules/makepath.
19172         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
19173         makepath.c.
19174         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
19175         (Include): mkdir-p.h, not makepath.h.
19176
19177 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19178
19179         Sync from coreutils.
19180         * m4/mkdir-p.m4: Renamed from makepath.m4.
19181         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
19182         Rename files from makepath.c to mkdir-p.c, and from
19183         makepath.h to mkdir-p.h.
19184         * m4/filenamecat.m4: Renamed from path-concat.m4.
19185         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
19186         Rename files from path-concat.c to filenamecat.c,
19187         and from path-concat.h to filenamecat.h.
19188         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
19189         "file name" in local variables or comments.
19190         * m4/rename.m4: Likewise.
19191
19192 2005-06-01  Bruno Haible  <bruno@clisp.org>
19193
19194         * modules/csharpexec: New file.
19195         * MODULES.html.sh (C#): New section.
19196
19197 2005-06-01  Bruno Haible  <bruno@clisp.org>
19198
19199         * m4/csharp.m4: New file, from GNU gettext.
19200         * m4/csharpexec.m4: New file, from GNU gettext.
19201
19202 2005-06-01  Bruno Haible  <bruno@clisp.org>
19203
19204         * lib/csharpexec.h: New file, from GNU gettext.
19205         * lib/csharpexec.c: New file, from GNU gettext.
19206         * lib/csharpexec.sh.in: New file, from GNU gettext.
19207
19208 2005-05-31  Derek Price  <derek@ximbiot.com>
19209             Paul Eggert  <eggert@cs.ucla.edu>
19210
19211         Sync from cvs.
19212         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19213
19214 2005-05-31  Derek Price  <derek@ximbiot.com>
19215             Paul Eggert  <eggert@cs.ucla.edu>
19216
19217         Sync from cvs.
19218         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19219
19220 2005-05-29  Derek Price  <derek@ximbiot.com>
19221
19222         * config/srclist.txt (glob_.h, glob.c): Add these files.
19223
19224 2005-05-29  Derek Price  <derek@ximbiot.com>
19225
19226         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
19227         * modules/glob: New file.
19228         * modules/getlogin_r: Add link to POSIX spec in description.
19229
19230 2005-05-29  Derek Price  <derek@ximbiot.com>
19231             Paul Eggert  <eggert@cs.ucla.edu>
19232
19233         * m4/glob.m4: New file.
19234
19235 2005-05-29  Derek Price  <derek@ximbiot.com>
19236             Paul Eggert  <eggert@cs.ucla.edu>
19237
19238         * lib/glob_.h, lib/glob.c: New files.
19239
19240 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19241
19242         * modules/fts (Files): Remove m4/inttypes-pri.m4.
19243         * modules/fts-lgpl (Depends-on): Remove gettext.
19244
19245 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19246
19247         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19248         and don't require gt_INTTYPES_PRI.
19249
19250 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19251
19252         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19253
19254         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19255         the configuration hassle isn't worth it.
19256         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19257         (LONGEST_MODIFIER, PRIuMAX): Remove.
19258
19259 2005-05-27  Bruno Haible  <bruno@clisp.org>
19260
19261         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19262
19263 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19264
19265         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19266         _POSIX_PTHREAD_SEMANTICS for Solaris.
19267
19268 2005-05-25  Derek Price  <derek@ximbiot.com>
19269
19270         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19271
19272 2005-05-25  Derek Price  <derek@ximbiot.com>
19273             Paul Eggert  <eggert@cs.ucla.edu>
19274
19275         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19276         * lib/getlogin_r.c, getlogin_r.h: New files.
19277
19278 2005-05-25  Bruno Haible  <bruno@clisp.org>
19279             Derek Price  <derek@ximbiot.com>
19280
19281         * lib/getlogin_r.h: Simplify API documentation.
19282
19283 2005-05-23  Derek Price  <derek@ximbiot.com>
19284
19285         * modules/minmax (Files): Add m4/minmax.m4.
19286         (configure.ac): Add gl_MINMAX.
19287
19288 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19289
19290         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19291         so that unistd-safer.h (GPL'ed code) need not be included.
19292
19293 2005-05-22  Bruno Haible  <bruno@clisp.org>
19294
19295         * m4/minmax.m4: New file.
19296         Based on a patch by Derek Price <derek@ximbiot.com>.
19297
19298 2005-05-22  Bruno Haible  <bruno@clisp.org>
19299
19300         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19301         (INT64_MIN): Fix definition.
19302         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19303
19304         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19305         NEED_SIGNED_INT_TYPES.
19306
19307         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19308         HAVE_SYSTEM_INTTYPES.
19309
19310 2005-05-22  Bruno Haible  <bruno@clisp.org>
19311
19312         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19313         Also include <sys/param.h> if it defines MIN, MAX.
19314         Based on a patch by Derek Price <derek@ximbiot.com>.
19315
19316 2005-05-21  Jim Meyering  <jim@meyering.net>
19317
19318         * modules/fts (Files): Add m4/inttypes-pri.m4.
19319         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19320
19321 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19322
19323         New fts module.
19324         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19325         (setup_dir, free_dir): New functions.
19326         (enter_dir, leave_dir): Define trivial
19327         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19328         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19329         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19330         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19331         Move to fts-cycle.c.
19332         (fts_open): Use setup_dir.
19333         (fts_close): Use free_dir.
19334         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19335         This adds a label and some gotos, but the alternatives were messier.
19336         Check for memory allocation failure when entering a dir.
19337         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19338         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19339         (FTS): New member fts_cycle, that is a union that contains the
19340         old active_dir_ht and cycle_state.  All uses changed to mention
19341         fts_cycle.ht and fts_cycle.state.
19342         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19343         fts.c, with the following changes:
19344         (setup_dir, free_dir): New functions.
19345         (enter_dir): Now returns bool.  Return true if successful, false
19346         if memory exhausted.  All callers changed.
19347         Do not bother partly cleaning up on
19348         memory allocation failure; that is free_dir's job.
19349         However, free ad if hash_insert fails, to avoid memory leak.
19350         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19351         fts->fts_options to see which union member to use.
19352
19353 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19354
19355         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19356         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19357
19358 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19359
19360         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19361
19362 2005-05-20  Jim Meyering  <jim@meyering.net>
19363
19364         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19365         Now a macro, to pacify GCC.
19366
19367 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19368
19369         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19370         of -1.
19371
19372 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19373
19374         * lib/chown.c (rpl_chown): Return -1 on failure.
19375
19376 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19377
19378         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19379         Don't check for stddef.h.
19380         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19381         don't use its results.
19382         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19383         since we include them unconditionally.  Don't require
19384         AM_STDBOOL_H, since stdbool is a prerequisite.
19385         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19386         since we assume C89 or better.
19387         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19388         as we don't use their results.
19389         Don't check for fchdir, memmove, memset, strrchr, as we use
19390         them unconditionally.
19391         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19392         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19393
19394 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19395
19396         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19397         Include <stddef.h> unconditionally, since we assume C89 now.
19398         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19399         * lib/fts.c: Include fts_.h first, to check interface.
19400         Do not include intprops.h; no longer needed.
19401         Include cycle-check.h and hash.h, since fts_.h no longer does.
19402         Remove unnecessary casts of closedir to void.
19403         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19404         decide whether to decrement nlinks.
19405         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19406         (FTS): Use struct hash_table * instead of Hash_table, so that
19407         we no longer need to include hash.h here.
19408
19409 2005-05-18  Jim Meyering  <jim@meyering.net>
19410
19411         * modules/dirfd (License): Change to LGPL.  Most of the code
19412         is already in the public domain.
19413
19414 2005-05-18  Jim Meyering  <jim@meyering.net>
19415
19416         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19417         Reported by Yoann Vandoorselaere.
19418
19419 2005-05-17  Jim Meyering  <jim@meyering.net>
19420
19421         * m4/fts.m4: New file, from coreutils.
19422
19423 2005-05-17  Jim Meyering  <jim@meyering.net>
19424
19425         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19426
19427 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19428
19429         Sync from coreutils.
19430         * m4/unlinkdir.m4: New file.
19431
19432 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19433
19434         Sync from coreutils.
19435         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19436         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19437         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19438         White space changes only.
19439         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19440         special.
19441         * lib/yesno.c: Include getline.h, not ctype.h.
19442         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19443         Use getline to remove arbitrary restriction on response length.
19444
19445 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19446
19447         * config/srclist-update: Spell out "Street" in FSF postal
19448         mail address; this is the style the FSF seems to prefer.
19449
19450         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19451         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19452         this updates FSF postal mail address.
19453
19454         Sync from coreutils.
19455         * modules/unlinkdir: New file.
19456         * modules/yesno (Depends-on): Add getline.
19457         * MODULES.html.sh (File system functions): Add unlinkdir.
19458
19459 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19460
19461         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19462         lib/strsep.h:
19463         Change the initial comment to refer to GPL, not LGPL.
19464         gnulib-tool will change it to LGPL as needed.
19465
19466         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19467         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19468         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19469         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19470         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19471         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19472         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19473         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19474         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19475         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19476         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19477         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19478         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19479         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19480         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19481         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19482         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19483         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19484         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19485         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19486         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19487         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19488         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19489         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19490         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19491         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19492         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19493         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19494         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19495         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19496         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19497         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19498         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19499         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19500         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19501         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19502         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19503         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19504         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19505         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19506         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19507         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19508         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19509         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19510         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19511         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19512         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19513         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19514         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19515         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19516         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19517         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19518         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19519         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19520         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19521         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19522         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19523         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19524         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19525         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19526         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19527         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19528         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19529         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19530         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19531         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
19532         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
19533         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
19534         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
19535         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
19536         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
19537         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
19538         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
19539         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
19540         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
19541         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
19542         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
19543         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
19544         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
19545         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
19546         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
19547         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
19548         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
19549         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
19550         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
19551         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
19552         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
19553         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
19554         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
19555         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
19556         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
19557         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
19558         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
19559         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
19560         lib/yesno.c, lib/yesno.h:
19561         Update FSF postal mail address.
19562
19563 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19564
19565         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
19566         tests/test-memmem.c, tests/test-stpncpy.c:
19567         Update FSF postal mail address.
19568
19569 2005-05-13  Bruno Haible  <bruno@clisp.org>
19570
19571         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
19572         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
19573         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
19574         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
19575         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
19576         Add support for 64-bit integers in the MSVC compiler.
19577
19578 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19579
19580         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
19581
19582 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
19583
19584         * gnulib-tool (func_import): Sort and uniquify recommended includes.
19585
19586 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
19587
19588         * doc/getdate.texi (General date syntax): Don't say that date
19589         date --iso-8601=ns generates acceptable dates; it doesn't yet.
19590         Problem reported by Nic Ferrier.
19591
19592 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19593
19594         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
19595         specified in ai_socktype. Fix invalid ai_protocol
19596         check. ai_protocol is usually set to 0 or depending on
19597         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
19598         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
19599         ai_socktype / ai_protocol in the returned addrinfo structure.
19600
19601 2005-05-10  Simon Josefsson  <jas@extundo.com>
19602
19603         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
19604         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
19605
19606 2005-05-10  Karl Berry  <karl@gnu.org>
19607
19608         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
19609         (from http://www.gnu.org/licenses).
19610         * doc/COPYING.LIB: also rename to COPYING.LESSER.
19611         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
19612         fdl.texi suffices.
19613
19614 2005-05-10  Karl Berry  <karl@gnu.org>
19615
19616         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
19617         (COPYING.DOC): remove.
19618
19619         * config/srclist-update: new FSF address.
19620
19621 2005-05-10  Derek Price  <derek@ximbiot.com>
19622
19623         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
19624         possible.
19625
19626 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19627             Bruno Haible  <bruno@clisp.org>
19628
19629         * modules/inet_ntop: New file.
19630         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19631         inet_ntop.
19632
19633 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19634             Bruno Haible  <bruno@clisp.org>
19635
19636         * m4/inet_ntop.m4: New file.
19637
19638 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19639             Bruno Haible  <bruno@clisp.org>
19640
19641         * lib/inet_ntop.h: New file.
19642         * lib/inet_ntop.c: New file, from glibc with modifications.
19643
19644 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
19645
19646         * modules/time_r (License): Change to LGPL.
19647         * modules/extensions (License): Change to LGPL.  Actually,
19648         the license is more permissive than that, but currently gnulib-tool
19649         doesn't know how to handle more-permissive licenses.
19650
19651         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
19652         Problem reported by Dave Love.
19653
19654 2005-05-08  Jim Meyering  <jim@meyering.net>
19655
19656         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
19657         blank.
19658
19659 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19660
19661         * modules/argmatch (Depends-on): Add stdbool.
19662         * modules/backupfile (Depends-on): Likewise.
19663         * modules/chdir-long (Depends-on): Likewise.
19664         * modules/closeout (Depends-on): Likewise.
19665         * modules/cycle-check (Depends-on): Likewise.
19666         * modules/dirname (Depends-on): Likewise.
19667         * modules/fnmatch (Depends-on): Likewise.
19668         * modules/fsusage (Depends-on): Likewise.
19669         * modules/fwriteerror (Depends-on): Likewise.
19670         * modules/getcwd (Depends-on): Likewise.
19671         * modules/getloadavg (Depends-on): Likewise.
19672         * modules/hard-locale (Depends-on): Likewise.
19673         * modules/makepath (Depends-on): Likewise.
19674         * modules/mountlist (Depends-on): Likewise.
19675         * modules/nanosleep (Depends-on): Likewise.
19676         * modules/posixtm (Depends-on): Likewise.
19677         * modules/quotearg (Depends-on): Likewise.
19678         * modules/readtokens (Depends-on): Likewise.
19679         * modules/readtokens0 (Depends-on): Likewise.
19680         * modules/readutmp (Depends-on): Likewise.
19681         * modules/save-cwd (Depends-on): Likewise.
19682         * modules/strftime (Depends-on): Likewise.
19683         * modules/userspec (Depends-on): Likewise.
19684         * modules/utimecmp (Depends-on): Likewise.
19685         * modules/xgetcwd (Depends-on): Likewise.
19686         * modules/xnanosleep (Depends-on): Likewise.
19687         * modules/xstrtod (Depends-on): Likewise.
19688         * modules/yesno (Depends-on): Likewise.
19689
19690 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
19691
19692         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
19693         needless checks.
19694
19695 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19696
19697         Merge from coreutils.  Among other things,
19698         add bulletproofing for cases where stdin, stdout, or stderr are closed.
19699         * lib/fd-safer.c: New file.
19700         * lib/fcntl-safer.h, open-safer.c: Remove.
19701         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
19702         * lib/dup-safer.c: Include unistd-safer.h first.
19703         Don't include errno.h.
19704         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
19705         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
19706         * lib/file-type.c: Rely on file-type.h change.
19707         * lib/getloadavg.c: Include unistd-safer.h.
19708         (getloadavg): Use safer open.
19709         * lib/getusershell.c: Include "stdio-safer.h".
19710         (getusershell): Use safer fopen.
19711         * lib/long-options.c (long_options): Use NULL rather than 0.
19712         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
19713         'free'.
19714         * lib/modechange.c: Likewise.
19715         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
19716         (MODE_DONE): New constant.
19717         (struct mode_change): Remove 'next' member.
19718         (make_node_op_equals): New function; like the old one of the
19719         same name, except it allocates an array.
19720         (mode_compile, mode_create_from_ref): Use it.
19721         (mode_compile): Allocate result as an array, not a linked list.
19722         Parse octal string ourself, so that we catch mistakes like "+0".
19723         (mode_adjust): Arg is an array, not a linked list.
19724         * lib/modechange.c: Include stat-macros.h, xalloc.h.
19725         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
19726         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
19727         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
19728         Remove.  This is now stat-macros.h's job.
19729         (talloc): Remove.  All callers replaced by xalloc, so that
19730         our invokers don't have to worry about reporting memory failures.
19731         (make_node_op_equals): Remove.
19732         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19733         New constants.
19734         (struct mode_change): Moved here from modechange.h.
19735         (mode_append_entry): Remove.
19736         (mode_compile): Remove MASKED_OPS arg, since it encouraged
19737         apps to have incorrect behavior.  Use simpler algorithm for head
19738         and tail.  Don't futz with umask; that's now the job of mode_adjust.
19739         Detect more invalid usages rather than having somewhat-random behavior.
19740         Don't insert an "a=" action, as that leads to incorrect behavior.
19741         (mode_compile, mode_create_from_ref): Return NULL on error instead
19742         of an enum, since now there's only one way to have an error.  All
19743         callers changed.
19744         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
19745         at the correct time.  Simplify calculation of "+u" and its ilk.
19746         Don't mishandle "+X".
19747         (mode_free): Remove "register" and localize decls.
19748         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19749         (struct mode_change): Move to modechange.c; callers don't
19750         need to see this stuff.
19751         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
19752         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
19753         (mode_change, mode_adjust): Reflect the new signatures noted above.
19754         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
19755         that might redefine system include files.
19756         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
19757         (my_usleep): Use NULL rather than (void *) 0.
19758         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
19759         Use siginterrupt to specify that system calls should be interrupted.
19760         (rpl_nanosleep): Move initialization of suspended closer to call of
19761         my_usleep.
19762         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
19763         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
19764         (desirable_utmp_entry): New function.
19765         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
19766         using x2nrealloc, to simplify logic.
19767         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
19768         size calculation.  Do not assume utmp file is a regular file.
19769         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
19770         (READ_UTMP_CHECK_PIDS): New constant.
19771         * lib/save-cwd.c: Include unistd-safer.h.
19772         (save_cwd): Use fd_safer.
19773         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
19774         [!_LIBC] Include "stat-macros.h" instead.
19775         * lib/unistd-safer.h (fd_safer): New decl.
19776
19777 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19778
19779         * modules/getloadavg (Depends-on): Add unistd-safer.
19780         * modules/getusershell (Depends-on): Add stdio-safer.
19781         * modules/lstat (Depends-on): Remove xalloc.
19782         * modules/mkstemp (Depends-on): Add stat-macros.
19783         * modules/modechange (Depends-on): Remove xstrtol.
19784         Add stat-macros, xalloc.
19785         * modules/save-cwd (Depends-on): Add unistd-safer.
19786         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
19787         * modules/unistd-safer (Files): Add lib/fd-safer.c
19788         (Makefile.am): Remove lib_SOURCES.
19789
19790         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
19791         Remove fcntl-safer; unistd-safer supersedes it.
19792
19793 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19794
19795         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
19796         AC_HEADER_STAT.
19797         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
19798         (gl_PREREQ_CHOWN): Remove.
19799         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
19800         it.  Don't require AC_HEADER_STAT.
19801         (gl_PREREQ_LSTAT): Remove.
19802         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
19803         Don't require AC_HEADER_STAT.
19804         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
19805         (gl_PREREQ_RMDIR): Remove.
19806         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
19807         mention stat-macros.h or AC_HEADER_STAT, since we'll make
19808         the stat-macros module a prerequisite.
19809         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
19810         * m4/filemode.m4 (gl_FILEMODE): Likewise.
19811         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
19812         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
19813         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
19814         variable names.
19815         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
19816         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
19817         variable prefixes.
19818         * m4/fcntl-safer.m4: Remove.
19819         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
19820         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
19821         Invoke gl_PREREQ_FD_SAFER.
19822         (gl_PREREQ_FD_SAFER): New macro.
19823         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
19824         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
19825         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
19826         Remove duplicate call to AC_LIBOBJ(readutmp).
19827         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
19828
19829         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
19830         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
19831
19832 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19833
19834         * MODULES.html.sh (Misc): Add byteswap.
19835
19836 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19837
19838         * modules/getcwd (Depends-on): Add extensions.
19839         * modules/openat (Depends-on): Likewise.
19840
19841 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19842
19843         * modules/byteswap: New file.
19844
19845 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19846
19847         * m4/byteswap.m4: New file.
19848
19849 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19850
19851         * lib/byteswap_.h: New file.
19852
19853 2005-04-25  Karl Berry  <karl@gnu.org>
19854
19855         * m4/gettext.m4: Update from GNU gettext 0.14.4.
19856
19857 2005-04-25  Albert Chin  <china@thewrittenword.com>
19858
19859         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
19860         Toolkit C bug.
19861
19862 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
19863
19864         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
19865         (func_ln_if_changed) Remove forcibly for no error message
19866         in case file does not exist.
19867
19868 2005-04-19  Simon Josefsson  <jas@extundo.com>
19869
19870         * gnulib-tool (Options): Make --symlink mean --symbolic.
19871
19872 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
19873
19874         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
19875
19876 2005-04-16  Simon Josefsson  <jas@extundo.com>
19877
19878         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
19879
19880 2005-04-15  Simon Josefsson  <jas@extundo.com>
19881
19882         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
19883
19884 2005-04-15  Simon Josefsson  <jas@extundo.com>
19885
19886         * gnulib-tool: Rename --symlink to --symbolic.
19887
19888 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
19889
19890         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
19891         symbolic links to files instead of copying/moving.  Add --aux-dir,
19892         specifying directory relative --dir where auxiliary build tools
19893         are placed.
19894
19895 2005-04-14  Bruno Haible  <bruno@clisp.org>
19896
19897         * modules/allocsa (License): Change to LGPL.
19898         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
19899
19900 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
19901
19902         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
19903         that "UTC +1 second" continues to work.  Problem reported
19904         by Dmitry V. Levin.
19905         (relunit_snumber): New rule.
19906         (relunit): Use it.
19907
19908 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
19909
19910         * lib/getdate.y (universal_time_zone_table): New constant.
19911         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
19912         universal_time_zone_table.
19913         (lookup_zone): Prefer universal_time_zone_table to
19914         local_time_zone_table, so that "GMT" time stamps are allowed in
19915         London during the summer.  Problem reported by Ian Abbott.
19916
19917 2005-04-12  Jim Meyering  <jim@meyering.net>
19918
19919         * lib/human.c (humblock): Set *options even when returning due to
19920         xstrtoumax conversion failure.  Thanks to a used-uninitialized
19921         warning from gcc-4.
19922
19923 2005-04-09  Jim Meyering  <jim@meyering.net>
19924
19925         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
19926         -Wuninitialized: initialize tm0.tm_year.
19927
19928 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
19929
19930         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
19931         count, since there's no maximum.  All uses changed.
19932         Add member dsts_seen.
19933         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
19934         not being INT_MAX.
19935         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
19936         Use pc_rels_seen to decide whther a date is absolute.
19937
19938         * lib/getdate.y (number): Don't overwrite year.
19939         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
19940         check.
19941
19942 2005-04-02  Simon Josefsson  <jas@extundo.com>
19943
19944         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
19945         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
19946
19947 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
19948
19949         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
19950         where no absolute path name can be longer than PATH_MAX.
19951
19952 2005-03-27  Jim Meyering  <jim@meyering.net>
19953
19954         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
19955
19956 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
19957
19958         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
19959         "one's complement" -> "ones' complement" in comment, as per Knuth.
19960         "value of type" -> "type or expression" in comment.
19961         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
19962
19963 2005-03-26  Jim Meyering  <jim@meyering.net>
19964
19965         Comment nits.
19966         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
19967         Correct typos: s/or/of/.
19968
19969 2005-03-26  Jim Meyering  <jim@meyering.net>
19970
19971         * modules/check-include-files: Move to ../ and rename to...
19972         * check-module: ...this.
19973
19974 2005-03-25  Jim Meyering  <jim@meyering.net>
19975
19976         * modules/xvasprintf (Files): Add xalloc.h.
19977
19978 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
19979
19980         * modules/gettext (Files): config/config.rpath ->
19981         build-aux/config.rpath
19982         * modules/iconv (Files): Likewise.
19983         Problem reported by Oskar Liljeblad.
19984
19985 2005-03-23  Jim Meyering  <jim@meyering.net>
19986
19987         * modules/check-include-files: New script to check for
19988         missing dependencies, multiple includes, etc.
19989
19990         * modules/c-strtold (Depends-on): Add xalloc.
19991         * modules/c-strtod (Depends-on): Add xalloc.
19992         * modules/hash (Depends-on): Add xalloc.
19993         (Files): Remove lib/xalloc.h.
19994
19995         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
19996         * modules/userspec (Files): Add lib/inttostr.h.
19997
19998 2005-03-23  Jim Meyering  <jim@meyering.net>
19999
20000         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20001
20002 2005-03-22  Jim Meyering  <jim@meyering.net>
20003
20004         * modules/stat-macros: New module.
20005         * modules/canonicalize, modules/euidaccess, modules/file-type,
20006         * modules/filemode, modules/lchown, modules/makepath,
20007         * modules/rmdir, modules/stat: Depend on new stat-macros module
20008         rather than listing lib/stat-macros.h manually.
20009         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20010
20011 2005-03-22  Jim Meyering  <jim@meyering.net>
20012
20013         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20014
20015 2005-03-22  Bruno Haible  <bruno@clisp.org>
20016
20017         * config/srclist.txt: Replace target directory 'config' with
20018         'build-aux'.
20019         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20020         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20021         ../build-aux/.
20022
20023 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20024
20025         * modules/chdir-long (Depends-on): Add mempcpy.
20026
20027         * modules/acl, modules/backupfile, modules/c-strtod,
20028         modules/c-strtold, modules/canon-host, modules/canonicalize,
20029         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20030         modules/exclude, modules/exitfail, modules/file-type,
20031         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20032         modules/getdate, modules/getline, modules/getpagesize,
20033         modules/getpass, modules/getugroups, modules/group-member,
20034         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20035         modules/inttostr, modules/long-options, modules/makepath,
20036         modules/md5, modules/memcasecmp, modules/memcoll,
20037         modules/modechange, modules/mountlist, modules/path-concat,
20038         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20039         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20040         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20041         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20042         modules/strftime, modules/strndup, modules/strverscmp,
20043         modules/timespec, modules/unlocked-io, modules/userspec,
20044         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20045         modules/yesno:
20046         Remove lib_SOURCES line from Makefile.am section, as this is now
20047         done automatically by the corresponding Autoconf macro.
20048
20049 2005-03-21  Jim Meyering  <jim@meyering.net>
20050
20051         Changes imported from coreutils.
20052
20053         * lib/cycle-check.c: Don't include xalloc.h.
20054
20055         * lib/path-concat.c: Don't include assert.h.
20056         (path_concat): Remove assertion that would have triggered
20057         for ABASE starting with more than one slash.
20058         Reported by Andreas Schwab.
20059
20060         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20061         properly when ABASE is an absolute file name.
20062         Correct the description of this function.
20063         Include <assert.h>.
20064         Add an assertion and a test driver.
20065         This fixes a bug introduced on 2004-07-02.
20066         Andreas Schwab reported the resulting failure of cp --parents:
20067         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20068
20069 2005-03-21  Jim Meyering  <jim@meyering.net>
20070
20071         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
20072         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
20073
20074 2005-03-21  Jim Meyering  <jim@meyering.net>
20075         and  Paul Eggert  <eggert@cs.ucla.edu>
20076
20077         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
20078         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
20079         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
20080         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
20081         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
20082         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
20083         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
20084         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
20085         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
20086         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
20087         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
20088         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
20089         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
20090         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
20091         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
20092         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
20093         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
20094         for these modules.
20095
20096 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
20097
20098         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
20099         (which shouldn't happen), generate nothing instead of returning 0
20100         immediately, so that nstrftime (NULL, ...) doesn't return 0.
20101
20102 2005-03-16  Bruno Haible  <bruno@clisp.org>
20103
20104         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
20105         HAVE_LONGLONG_64BIT.
20106
20107 2005-03-16  Bruno Haible  <bruno@clisp.org>
20108
20109         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
20110         HAVE_LONGLONG_64BIT.
20111
20112 2005-03-16  Bruno Haible  <bruno@clisp.org>
20113
20114         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
20115         HAVE_LONGLONG_64BIT.
20116
20117 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20118
20119         * lib/strftime.c (my_strftime): Prepend space to format so that we can
20120         reliably distinguish strftime failure from empty output on POSIX
20121         hosts.
20122
20123 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20124
20125         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
20126         (iconv_string): Don't guess a size-zero buffer, as that might cause
20127         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
20128         result would be 'too large', where 'too large' is (heuristically)
20129         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
20130         overflow concerns.  This will prevent some unwanted malloc failures
20131         when the inputs are very large.
20132
20133 2005-03-15  Karl Berry  <karl@gnu.org>
20134
20135         * config/srclist.txt (config.rpath): from gettext.
20136         * config/config.rpath: update.
20137
20138 2005-03-15  Bruno Haible  <bruno@clisp.org>
20139
20140         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
20141         to 'negate'.
20142
20143         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
20144         variable.
20145
20146         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
20147         results.
20148
20149 2005-03-14  Simon Josefsson  <jas@extundo.com>
20150
20151         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
20152         <fx@gnu.org>.
20153
20154 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
20155
20156         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
20157         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
20158         intprops.h.
20159         * lib/strtol.c: Likewise.
20160
20161 2005-03-14  Jim Meyering  <jim@meyering.net>
20162
20163         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
20164         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
20165         to be nonzero so that we (and caller) can detect the difference
20166         between a valid zero-length expansion and an error return, even
20167         when the underlying strftime fails before writing anything into
20168         that location.
20169
20170 2005-03-14  Bruno Haible  <bruno@clisp.org>
20171
20172         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
20173         Update from GNU gettext 0.14.3.
20174
20175 2005-03-10  Jim Meyering  <jim@meyering.net>
20176
20177         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
20178
20179 2005-03-10  Jim Meyering  <jim@meyering.net>
20180
20181         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
20182         so that this module works on systems without fchdir.
20183
20184 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20185
20186         Factor int-properties macros into a single file, except for
20187         glibc-related files.
20188         * lib/intprops.h: New file.
20189         * lib/getloadavg.c: Include it instead of limits.h.
20190         (INT_STRLEN_BOUND): Remove.
20191         * lib/human.c: Include intprops.h.
20192         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
20193         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
20194         302/1000.
20195         * lib/inttostr.h: Include intprops.h instead of limits.h.
20196         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
20197         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
20198         for consistency with intprops.h.
20199         (time_t_is_integer, twos_complement_arithmetic): Use them.
20200         * lib/sig2str.h: Include <signal.h>, intprops.h.
20201         (INT_STRLEN_BOUND): Remove.
20202         * lib/strftime.c (TYPE_SIGNED): Remove.
20203         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
20204         * lib/strtol.c: Adjust comments to match intprops.h.
20205         * lib/userspec.c: Include intprops.h.
20206         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
20207         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
20208         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
20209         instead of rolling our own expressions.
20210         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
20211
20212         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
20213         instead of int.
20214         (my_strftime): Do not mishandle years close to INT_MAX, by doing
20215         the right thing even if adding 1900 would overflow.  Similarly
20216         for tm_mon + 1 and tm_yday + 1.
20217         Make %Y always equivalent to %C%y, and similarly for %G and %g.
20218         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
20219         (DO_SIGNED_NUMBER): New macro.
20220         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
20221
20222 2005-03-07  Bruno Haible  <bruno@clisp.org>
20223
20224         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
20225
20226 2005-03-07  Bruno Haible  <bruno@clisp.org>
20227
20228         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
20229
20230 2005-03-04  Derek R. Price  <derek@ximbiot.com>
20231
20232         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
20233         (func_import): Only replace files via --import when they have actually
20234         changed.
20235
20236 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20237
20238         * m4/mmap-anon.m4: New file.
20239         * m4/pagealign_alloc.m4: New file.
20240
20241 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20242             Bruno Haible  <bruno@clisp.org>
20243
20244         * modules/pagealign_alloc: New file.
20245         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
20246
20247 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20248             Bruno Haible  <bruno@clisp.org>
20249
20250         * lib/pagealign_alloc.h: New file.
20251         * lib/pagealign_alloc.c: New file.
20252
20253 2005-03-03  Bruno Haible  <bruno@clisp.org>
20254
20255         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20256         Use an all-permissive copyright notice, recommended by RMS.
20257
20258 2005-03-02  Bruno Haible  <bruno@clisp.org>
20259
20260         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20261         of AIX, the replacement has to be done only after <string.h> is
20262         included, therefore not in config.h. stpncpy.h does the replacement,
20263         and stpncpy.c uses it.
20264
20265 2005-03-02  Bruno Haible  <bruno@clisp.org>
20266
20267         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20268         stpncpy.c uses it.
20269
20270 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20271
20272         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20273         The workaround isn't strictly needed for POSIX conformance, and
20274         it's too much of a pain to configure and maintain.  We'll ask
20275         people to fix their kernels instead.
20276         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20277         (NANOSLEEP_BUG_WORKAROUND): Remove.
20278         (xnanosleep): Remove the workaround.
20279
20280 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20281
20282         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20283         Reported by Derek Price.
20284         (Include): Add "timespec.h".
20285
20286         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20287
20288 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20289
20290         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20291         to detect nanosleep bug.
20292
20293 2005-03-01  Bruno Haible  <bruno@clisp.org>
20294
20295         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20296
20297 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20298
20299         * modules/gethrxtime: New file.
20300         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20301         (Depends-on): Add gethrxtime.
20302         (configure.ac): Add gl_XNANOSLEEP.
20303         (Makefile.am): Remove lib_SOURCES line.
20304
20305 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20306
20307         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20308         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20309
20310 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20311
20312         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20313         * lib/timespec.h (gettime): Return void, since it always
20314         succeeds now.  All uses changed.
20315         * lib/gettime.c (gettime) Likewise.
20316         [HAVE_NANOTIME]: Prefer nanotime.
20317         Assume gettimeofday succeeds, as POSIX requires.
20318         Assime time () succeeds, since other code already does.
20319         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20320         (timespec_subtract): Remove.
20321         (NANOSLEEP_BUG_WORKAROUND): New constant.
20322         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20323         things considerably.  Use it only on GNU/Linux hosts, since the
20324         workaround shouldn't be needed elsewhere.
20325
20326 2005-02-24  Bruno Haible  <bruno@clisp.org>
20327
20328         * modules/gettext (Files): Add m4/glibc2.m4.
20329
20330 2005-02-24  Bruno Haible  <bruno@clisp.org>
20331
20332         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20333         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20334         * m4/progtest.m4:
20335         Update from GNU gettext 0.14.2.
20336         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20337
20338 2005-02-24  Bruno Haible  <bruno@clisp.org>
20339
20340         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20341         * lib/config.charset: Update from GNU gettext 0.14.2.
20342
20343 2005-02-24  Bruno Haible  <bruno@clisp.org>
20344
20345         * lib/gettext.h: Update from GNU gettext 0.14.2.
20346
20347 2005-02-23  Simon Josefsson  <jas@extundo.com>
20348
20349         * m4/iconvme.m4: New file.
20350
20351 2005-02-23  Jim Meyering  <jim@meyering.net>
20352
20353         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20354         change.
20355         Thanks to Bruno Haible for catching it.
20356
20357 2005-02-22  Simon Josefsson  <jas@extundo.com>
20358
20359         * modules/iconvme: New file.
20360
20361         * MODULES.html.sh: Add iconvme.
20362
20363 2005-02-22  Simon Josefsson  <jas@extundo.com>
20364
20365         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20366
20367 2005-02-22  Simon Josefsson  <jas@extundo.com>
20368
20369         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20370
20371 2005-02-22  Jim Meyering  <jim@meyering.net>
20372
20373         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20374         s/ifndef/ifdef/.
20375
20376 2005-02-20  Neil Conway  <neilc@samurai.com>
20377
20378         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20379         returned by OSX/Darwin if the specified buffer is not large
20380         enough for the hostname.
20381
20382 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20383
20384         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20385         pass it to _help, otherwise the latter coredumps trying to
20386         dereference state.root_argp.
20387
20388 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20389
20390         * modules/chdir-long (Depends-on): Add memrchr.
20391         * modules/memrchr (Files): Add lib/memrchr.h.
20392         (Include): "memrchr.h".
20393
20394 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20395
20396         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20397
20398 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20399
20400         * lib/memrchr.h: New file.
20401         * lib/chdir-long.c: Include it.
20402         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20403         Don't bother including stddef.h.
20404
20405 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20406
20407         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20408         inclusion.
20409         Include <sys/types.h>, for dev_t.
20410         (ME_DUMMY, ME_REMOTE): Move from here....
20411         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20412         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20413         Dmitry V. Levin.
20414         Include mountlist.h first, to test the interface.
20415
20416 2005-01-29  Bruno Haible  <bruno@clisp.org>
20417
20418         * lib/progname.c (program_name): Initialize.
20419         Needed when linking statically on MacOS X.
20420
20421 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20422
20423         Sync from coreutils.
20424         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20425         (Depends-on): Add c-strtod.
20426         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20427
20428 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20429
20430         Sync from coreutils.
20431         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20432
20433         Remove files that are specific to coreutils.
20434         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20435
20436 2005-01-28  Bruno Haible  <bruno@clisp.org>
20437
20438         * modules/javacomp: New file.
20439         * MODULES.html.sh (Java): Add javacomp.
20440
20441 2005-01-28  Bruno Haible  <bruno@clisp.org>
20442
20443         * m4/javacomp.m4: New file, from GNU gettext.
20444
20445 2005-01-28  Bruno Haible  <bruno@clisp.org>
20446
20447         * lib/javacomp.sh.in: New file, from GNU gettext.
20448         * lib/javacomp.h: New file, from GNU gettext.
20449         * lib/javacomp.c: New file, from GNU gettext.
20450
20451 2005-01-26  Simon Josefsson  <jas@extundo.com>
20452
20453         * lib/gai_strerror.c: Use GPL in header.
20454
20455 2005-01-26  Bruno Haible  <bruno@clisp.org>
20456
20457         * modules/javaexec: New file.
20458         * MODULES.html.sh (Java): Add javaexec.
20459
20460 2005-01-26  Bruno Haible  <bruno@clisp.org>
20461
20462         * m4/javaexec.m4: New file, from GNU gettext.
20463
20464 2005-01-26  Bruno Haible  <bruno@clisp.org>
20465
20466         * lib/javaexec.sh.in: New file, from GNU gettext.
20467         * lib/javaexec.h: New file, from GNU gettext.
20468         * lib/javaexec.c: New file, from GNU gettext.
20469
20470 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20471
20472         * modules/lchown (Depends-on): Remove lchown.h
20473
20474 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20475
20476         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20477         must be defined if the header file was not found, in order
20478         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20479
20480 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20481
20482         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20483         initializers for struct pentry_state.
20484         (__argp_error): Check return value of __asprintf
20485         (__argp_failure): Translate error message
20486
20487         * lib/argp-parse.c: Removed braces around the expansion of N_()
20488
20489 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20490
20491         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20492         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20493         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20494         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20495         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20496         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20497         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20498         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20499         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20500         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20501         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20502         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20503         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20504         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20505         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20506         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20507         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20508         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20509         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20510         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20511         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20512         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20513         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20514         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20515         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20516         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20517         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20518         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20519         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20520         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20521         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20522         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20523         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20524         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20525         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20526         Use an all-permissive copyright notice, recommended by RMS.
20527
20528 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20529
20530         * modules/chdir-long (Depends-on): Remove mempcpy.
20531
20532 2005-01-21  Jim Meyering  <jim@meyering.net>
20533
20534         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
20535         same value as for Solaris 9.
20536
20537         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
20538         component length.  This included changing the parameter to be
20539         of type `char *' rather than `char const *'.
20540         * lib/chdir-long.h (chdir_long): Update prototype.
20541
20542         * lib/openat.c (fdopendir, fstatat): New functions.
20543         * lib/openat.h: Include headers required for use of DIR and struct
20544         stat.
20545         [AT_SYMLINK_NOFOLLOW]: Define.
20546         (fdopendir, fstatat): Add prototypes.
20547
20548 2005-01-21  Bruno Haible  <bruno@clisp.org>
20549
20550         * modules/classpath: New file.
20551         * MODULES.html.sh (Java): Add classpath.
20552
20553 2005-01-21  Bruno Haible  <bruno@clisp.org>
20554
20555         * lib/classpath.h: New file, from GNU gettext.
20556         * lib/classpath.c: New file, from GNU gettext.
20557
20558 2005-01-20  Simon Josefsson  <jas@extundo.com>
20559
20560         * modules/version-etc-fsf: New file.
20561
20562 2005-01-20  Simon Josefsson  <jas@extundo.com>
20563
20564         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
20565         * lib/version-etc.c: Remove version_etc_copyright.
20566         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
20567         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
20568
20569 2005-01-20  Simon Josefsson  <jas@extundo.com>
20570
20571         * lib/base64.h (isbase64): Add.
20572
20573         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
20574         using a unsigned prototype, don't inline.
20575         (base64_decode): Use it.
20576
20577 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20578
20579         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
20580         it.
20581
20582 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20583
20584         * lib/save-cwd.c (save_cwd): Remove code to support the case
20585         where fchdir is missing or flaky.
20586
20587 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20588
20589         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
20590
20591 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
20592
20593         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
20594         AC_LIBSOURCES now does this.
20595         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
20596         with new ullong_max module.
20597
20598 2005-01-19  Bruno Haible  <bruno@clisp.org>
20599
20600         * modules/sh-quote: New file.
20601         * MODULES.html.sh (Executing programs): Add sh-quote.
20602
20603 2005-01-19  Bruno Haible  <bruno@clisp.org>
20604
20605         * lib/sh-quote.h: New file, from GNU gettext.
20606         * lib/sh-quote.c: New file, from GNU gettext.
20607
20608 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20609
20610         Merge from coreutils.
20611         * m4/ullong_max.m4: New file.
20612         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
20613         (gl_MACROS): Assume localeconv exists.
20614
20615 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20616
20617         Merge changes from coreutils, as described below in several
20618         changelogs dated today.
20619
20620         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
20621         (O_DIRECTORY): Remove; not needed here, since "." must be
20622         a directory.  All uses removed.
20623         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
20624         universal on Suns, and we also need to test for IRIX.
20625         Revamp code to use 'if' rather than '#if'.
20626         Avoid unnecessary comparison of cwd->desc to 0.
20627
20628         * lib/utimens.c (futimens): Robustify the previous patch, by checking
20629         for known valid error numbers rather than observed invalid ones.
20630
20631 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20632
20633         * modules/ullong_max: New file.
20634
20635         * modules/chdir-long, modules/openat: New files.
20636         * modules/save-cwd (Depends-on): Depend on chdir-long.
20637         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
20638
20639 2005-01-18  Jim Meyering  <jim@meyering.net>
20640
20641         Merge from coreutils.
20642         * m4/chdir-long.m4, m4/openat.m4: New files.
20643         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
20644         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
20645         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
20646         is sane and DOES follow symlinks.  Besides, testing 20 different
20647         systems found no broken chown implementations.
20648         Prompted by a change in rsync's copy of this macro.
20649         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
20650
20651         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
20652
20653         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
20654         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
20655         NULL-means-set-to-current-time semantics.
20656         Remove temporary file immediately, rather than waiting
20657         for configure's at-exit trap code to do it.
20658
20659 2005-01-18  Jim Meyering  <jim@meyering.net>
20660
20661         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20662
20663         * lib/utimens.c (futimens): Account for the fact that futimes
20664         can also fail with errno == ENOSYS or errno == ENOENT.
20665         Patch from Dmitry V. Levin.
20666
20667         Change the name of the robust chdir function from chdir to chdir_long.
20668         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
20669         (restore_cwd): Use chdir_long, not chdir.
20670         * lib/chdir-long.c: Renamed from chdir.c.
20671         * lib/chdir-long.h: Renamed from chdir.h.
20672         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
20673         Hurd.
20674
20675 2005-01-18  Bruno Haible  <bruno@clisp.org>
20676
20677         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
20678         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
20679         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
20680         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
20681         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
20682         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
20683         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
20684         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
20685         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
20686         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
20687         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
20688         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
20689         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
20690         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
20691         Use an all-permissive copyright notice, recommended by RMS.
20692
20693 2005-01-18  Bob Proulx  <bob@proulx.com>
20694
20695         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
20696         simplify offsetof() macro construct to avoid compile failure with
20697         native HP-UX 11.0 ANSI C compiler.
20698
20699 2005-01-17  Bruno Haible  <bruno@clisp.org>
20700
20701         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
20702         redundant because stpncpy.m4 takes care of it.
20703
20704 2005-01-17  Bruno Haible  <bruno@clisp.org>
20705
20706         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
20707
20708 2005-01-17  Bruno Haible  <bruno@clisp.org>
20709
20710         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
20711         used.
20712
20713 2005-01-17  Bruno Haible  <bruno@clisp.org>
20714
20715         * lib/fwriteerror.h (fwriteerror): Change specification to include
20716         fclose.
20717         * lib/fwriteerror.c: Include <stdbool.h>.
20718         (fwriteerror): At the end, close the file stream. Record whether
20719         stdout was already closed.
20720
20721 2005-01-17  Bruno Haible  <bruno@clisp.org>
20722
20723         * lib/execute.c (environ): Declare if needed.
20724         * lib/pipe.c (environ): Likewise.
20725         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
20726
20727 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20728
20729         * modules/argp: Depend on vsnprintf
20730
20731 2005-01-10  Jim Meyering  <jim@meyering.net>
20732
20733         * modules/closeout (Depends-on): Add atexit.
20734
20735 2005-01-06  Bruno Haible  <bruno@clisp.org>
20736
20737         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
20738
20739 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
20740
20741         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
20742         definitions to be after all include files, to avoid collisions.
20743         Problem reported by Bob Proulx.
20744
20745 2005-01-04  Jim Meyering  <jim@meyering.net>
20746
20747         Changes imported from coreutils.
20748         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
20749         as the mkstemp template, use a temporary directory and an
20750         8.3-friendly template to avoid trouble on systems like DJGPP.
20751         Reported by Juan M. Guerrero via Stepan Kasal.
20752         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
20753         close. Remove the temporary directory right away, rather than waiting
20754         for configure's at-exit trap code to do it.
20755         Suggestion from Stepan Kasal.
20756
20757 2005-01-01  Simon Josefsson  <jas@extundo.com>
20758
20759         * gnulib-tool: Print #include directives when --import'ing.
20760
20761 2004-12-28  Simon Josefsson  <jas@extundo.com>
20762
20763         * tests/test-base64.c: Include required header files.  Remove
20764         unused variables.
20765
20766 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20767
20768         * modules/error (Depends-on): Remove gettext.
20769
20770 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20771
20772         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
20773         not needed.  This removes a dependency on the gettext module.
20774         [defined _LIBC]: Do not include <libintl.h>; not needed.
20775
20776 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20777
20778         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
20779         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
20780
20781 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20782
20783         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
20784         HAVE_DECL_STRTOLD.
20785
20786 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20787
20788         * modules/getdate (Depends-on): Remove alloca-opt.
20789
20790 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20791
20792         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
20793
20794 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20795
20796         * lib/argp-parse.c: Include <stddef.h>.
20797         (alignof, alignto): New macros.
20798         (parser_init): Don't assume that void * is aligned sufficiently
20799         for struct option.
20800
20801         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
20802         need to extend the stack.
20803         (YYINITDEPTH): New macro, so that the initial stack isn't overly
20804         large.
20805
20806 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20807
20808         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
20809
20810 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20811
20812         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
20813         (2004-10-24) change.  Apparently this was a false alarm.
20814
20815         * modules/getdate: Depend on alloca-opt, not alloca.
20816
20817 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20818
20819         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
20820         Remove now-obsolete comment about AIX.
20821         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
20822         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
20823         (YYMAXDEPTH): New macro.
20824
20825 2004-12-18  Simon Josefsson  <jas@extundo.com>
20826
20827         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
20828
20829 2004-12-18  Bruno Haible  <bruno@clisp.org>
20830
20831         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
20832
20833 2004-12-18  Bruno Haible  <bruno@clisp.org>
20834
20835         * lib/fatal-signal.c (fatal_signals): Make non-const.
20836         (init_fatal_signals): New function.
20837         (uninstall_handlers, install_handlers): Ignore signals that were set to
20838         SIG_IGN.
20839         (at_fatal_signal): Call init_fatal_signals.
20840         (init_fatal_signal_set): Likewise. Ignore signals that were set to
20841         SIG_IGN.
20842         Reported by Paul Eggert.
20843
20844 2004-12-18  Bruno Haible  <bruno@clisp.org>
20845
20846         * doc/alloca.texi: New file.
20847         * doc/alloca-opt.texi: New file.
20848
20849 2004-12-17  Jim Meyering  <jim@meyering.net>
20850
20851         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
20852         Otherwise, install-sh could exit with improper exit status when
20853         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
20854
20855 2004-12-16  Simon Josefsson  <jas@extundo.com>
20856
20857         * tests/test-base64.c: Add license.
20858
20859 2004-12-15  Stepan Kasal  <address@hidden>
20860
20861         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
20862
20863 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
20864
20865         * modules/getcwd (Files): Add m4/d-ino.m4.
20866         Suggested by Mark D. Baushke.
20867
20868 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20869
20870         * lib/getdate.y (textint): New member "negative".
20871         (time_zone_hhmm): New function.
20872         Expect 14 shift-reduce conflicts, not 13.
20873         (o_colon_minutes): New rule.
20874         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
20875         (yylex): Set the "negative" member of signed numbers.
20876
20877 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20878
20879         * doc/getdate.texi (Time of day items, Time zone items):
20880         Describe new formats +00:00, UTC+00:00.
20881
20882 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
20883
20884         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
20885         spurious "-l"s.  Problem reported by Stepan Kasal.
20886
20887 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
20888
20889         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
20890         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
20891
20892 2004-12-04  Simon Josefsson  <jas@extundo.com>
20893
20894         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
20895         Vandoorselaere <yoann@prelude-ids.org>.
20896
20897 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20898
20899         Changes imported from coreutils.
20900         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
20901         exist.
20902         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
20903
20904 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20905
20906         Changes imported from coreutils.
20907         * lib/hard-locale.c: Assume <locale.h> exists.
20908         Include "strdup.h".
20909         (GLIBC_VERSION): New macro.
20910         (hard_locale): Assume setlocale exists.
20911         Rewrite to avoid #ifdef.
20912         Use strdup rather than malloc + strcpy.
20913         * lib/human.c: Assume <locale.h> exists.
20914         (human_readable): Assume localeconv exists.
20915
20916 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20917
20918         * modules/hard-locale (Depends-on): Add strdup.
20919
20920 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
20921
20922         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
20923         convert T2, not T.  (Imported from libc.)
20924
20925 2004-11-30  Simon Josefsson  <jas@extundo.com>
20926
20927         * modules/restrict (License): Change to LGPL.
20928
20929 2004-11-30  Simon Josefsson  <jas@extundo.com>
20930
20931         * m4/restrict.m4: Add copyright and copying conditions.
20932
20933 2004-11-30  Simon Josefsson  <jas@extundo.com>
20934
20935         * m4/base64.m4: New file.
20936
20937 2004-11-30  Simon Josefsson  <jas@extundo.com>
20938
20939         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
20940         base64.
20941
20942         * tests/test-base64.c: New file.
20943
20944         * modules/base64: New file.
20945
20946 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20947
20948         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
20949         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
20950
20951         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
20952
20953 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20954
20955         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
20956         (__getcwd.c): Don't restore errno; glibc doesn't.
20957         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
20958         first, falling back to our code only if its results look suspicious.
20959         Ensure that the resulting buffer is only as large as necessary.
20960
20961         * lib/readutmp.c: Include readutmp.h first.
20962         Include <errno.h>, since readutmp.h no longer does that.
20963         * lib/readutmp.h: Don't include <errno.h>,
20964         <sys/param.h>, <time.h>; not needed to establish interface.
20965         (errno): Remove decl.
20966         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
20967         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
20968         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
20969
20970 2004-11-28  Simon Josefsson  <jas@extundo.com>
20971
20972         * lib/base64.h, base64.c: New file.
20973
20974 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
20975
20976         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
20977
20978 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
20979
20980         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
20981         (Depends-on): Remove pathmax, same.  Add mempcpy.
20982         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
20983         (Makefile.am): Append getcwd.h to lib_SOURCES.
20984         (Include): Add getcwd.h.
20985         (Maintainer): Change from Jim Meyering to "all, glibc",
20986         since getdate now uses intended-for-glibc code.
20987         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
20988         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
20989
20990 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20991
20992         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
20993         HP's ANSI C compiler.
20994         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
20995         Declaring int functions causes warnings on some modern systems and
20996         shouldn't be needed to compile on ancient ones.
20997         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
20998         defined.
20999
21000         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21001         with the following changes.
21002         (__set_errno): Parenthesize properly.
21003         Include <stdbool.h>.
21004         (MIN, MAX, MATCHING_INO): New macros.
21005         (__getcwd): Define with prototype, not K&R form.
21006         Use heuristics to allocate default buffer on stack if possible.
21007         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21008         behavior, and to avoid the PATH_MAX limit when computing
21009         ../../../../...
21010         Use MATCHING_INO to compare inode number to file.
21011         Check for arithmetic overflow in size calculations.
21012         Fix bug in reallocation of dot array that caused getcwd to fail
21013         on directories nested deeper than 75.
21014         Be more careful about saving errno on error.
21015         Do not use realloc; use only free+malloc, as this is a bit
21016         more flexible and avoids a needless copy operation.
21017         Do not inspect st_dev and st_ino for symbolic links; POSIX
21018         doesn't specify the latter.
21019         Check for closedir errors.
21020         Avoid needless casts.
21021         Use "#ifdef weak_alias" around weak_alias, to be like other
21022         glibc code.
21023         The following changes to getcwd.c have effect only when used in
21024         gnulib; they have no effect inside glibc proper.
21025         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21026         as alloca isn't used.
21027         (alloca, __alloca): Likewise.
21028         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21029         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21030         unconditionally, as gnulib assumes C89 or better.
21031         Do not include <sys/param.h>.
21032         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21033         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21034         better.
21035         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21036         Include <dirent.h> in a way that is compatible with modern Autoconf.
21037         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21038         New macros, if not already defined.
21039         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21040         Use "_LIBC", not "defined _LIBC", for consistency.
21041         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21042         a mempcpy module.
21043         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21044         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21045         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21046         credit only to Jim Meyering and adjust the copyright dates.
21047         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21048         <stdlib.h>, <unistd.h>, "pathmax.h".
21049         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21050         (INITIAL_BUFFER_SIZE): Remove.
21051         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21052
21053 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21054
21055         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21056         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21057         Use the _ONCE methods, for efficiency.
21058         Check for fcntl.h.  In test program, include <errno.h>
21059         and <fcntl.h> if available.  Remove old K&R cruft from
21060         test program.  Check for common errors in GNU/Linux,
21061         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21062         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21063         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21064         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21065         name accordingly.
21066         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21067         accommodate new getcwd.c.
21068         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21069         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
21070         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
21071         that's all we need now.
21072
21073 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21074
21075         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
21076         argp-parse.c depends on getopt internals, that means we should
21077         always use our getopt, to be on the safe side.
21078         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
21079         order not to spoil the result of an eventual previous invocation
21080         of gl_GETOPT_SUBSTITUTE.
21081
21082 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21083
21084         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
21085         redefinition warnings. To avoid them, include the defines
21086         in `#if !defined __need_getopt ... #endif'. The only place
21087         where __getopt_argv_const is used is in definitions
21088         of getopt_long and getopt_long_only below, which are as well
21089         protected by `#ifndef __need_getopt'.
21090         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
21091         __need_getopt after including <stdio.h> and <unistd.h> These
21092         headers might have defined it.
21093
21094 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21095
21096         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
21097
21098 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21099
21100         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
21101         (futimens): New function, which uses futimes if available.
21102         (futimens, utimens): Support timespec==NULL, with same semantics
21103         as utime and utimens.
21104         * lib/utimens.h (futimens): New decl.
21105
21106 2004-11-23  Jim Meyering  <jim@meyering.net>
21107
21108         * lib/getopt_.h: Remove trailing blanks.
21109
21110 2004-11-23  Jim Meyering  <jim@meyering.net>
21111
21112         * lib/__fpending.c: Add comment.
21113
21114 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
21115
21116         * modules/canonicalize (Depends-on): Add xreadlink.
21117         Problem reported by James Youngman.
21118
21119 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
21120
21121         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
21122         New macros.
21123         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
21124         optopt): Use them instead of invoking ## directly; otherwise, the
21125         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
21126
21127 2004-11-19  Bruno Haible  <bruno@clisp.org>
21128
21129         * lib/strtok_r.c: Move comments from here...
21130         * lib/strtok_r.h: ... to here.
21131
21132 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21133
21134         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
21135         implementations that mishandle size_t overflow.
21136
21137 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21138
21139         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
21140         might fail.  Problem reported by Yoann Vandoorselaere.
21141         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
21142         implementations that mishandle size_t overflow.
21143
21144 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21145
21146         * modules/canon-host (Depends-on): Add strdup.
21147
21148 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21149
21150         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
21151
21152 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21153
21154         * lib/canon-host.c: Include "strdup.h".
21155         (canon_host): Use getaddrinfo if available, so that IPv6 works.
21156         Use strdup instead of malloc/strcpy to duplicate strings.
21157
21158         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
21159         (human_space_before_unit): New constant.
21160         * lib/human.c (human_readable): Support it.
21161
21162         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
21163         (xgetcwd): Set errno correctly when failing.
21164         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
21165         the failure is actually due to a PATH_MAX problem.
21166
21167         Further getopt changes to make it more likely that glibc will
21168         buy the changes back.
21169         * lib/getopt.c (POSIXLY_CORRECT): New constant.
21170         (getopt): Use it, so to preserve glibc semantic
21171         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
21172         when compiling for libc.
21173         * lib/getopt_.h (__getopt_argv_const): Bring it back.
21174         (getopt_long, getopt_long_only): Use it.
21175
21176         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21177         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
21178         (getopt): Argv is now char * const *, as per standard.
21179         (_getopt_internal_r, _getopt_internal): Argv is now char **,
21180         not char *__getopt_argv_const *.
21181         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21182         _getopt_long_only_r): Likewise.
21183         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
21184         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21185         _getopt_long_r, _getopt_long_only_r): Likewise.
21186         * lib/getopt_.h (__getopt_argv_const): Remove.
21187         (getopt): Argv is now char * const *, as per standard.
21188
21189         * lib/getdate.y (tORDINAL): New token.
21190         (day, relunit): Allow it for relative times.
21191         (relative_time_table): Use tORDINAL for ordinals.
21192
21193 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21194
21195         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
21196         Document that "second" isn't allowed as an ordinal number.
21197
21198 2004-11-16  Jim Meyering  <jim@meyering.net>
21199
21200         * modules/closeout (Depends-on): Add fpending.
21201
21202 2004-11-15  Jim Meyering  <jim@meyering.net>
21203
21204         * lib/closeout.c: Include "__fpending.h" once again.
21205         Include <stdbool.h>.
21206         (close_stdout): Don't fail just because stdout was closed initially,
21207         since some programs don't write to stdout in the normal course of
21208         operation (other than --version and --help), and we don't want this
21209         function to make e.g. `touch file >&-' fail.
21210         But do fail if it was closed and someone has tried to write to it.
21211         E.g., `printf foo >&-' must fail.
21212
21213 2004-11-13  Jim Meyering  <jim@meyering.net>
21214
21215         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
21216
21217 2004-11-12  Simon Josefsson  <jas@extundo.com>
21218
21219         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
21220         small doc fix is still pending.
21221
21222 2004-11-11  Simon Josefsson  <jas@extundo.com>
21223
21224         * modules/strtok_r: New file.
21225
21226         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21227         strtok_r.
21228
21229 2004-11-11  Simon Josefsson  <jas@extundo.com>
21230
21231         * m4/strtok_r.m4: New file.
21232
21233         * m4/getopt.m4: Replace opterr.
21234
21235 2004-11-11  Simon Josefsson  <jas@extundo.com>
21236
21237         * lib/strtok_r.h, strtok_r.c: New file.
21238
21239 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21240
21241         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
21242         of replacing opterr, getopt, etc.  This should handle the
21243         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
21244
21245 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21246
21247         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21248         we can stop lying to compilers about the constness of argv when we
21249         are compiled outside glibc.
21250         (getopt, getopt_long, getopt_long_only): Use it.
21251         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21252         _getopt_internal, getopt): Likewise.
21253         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21254         _getopt_long_only_r): Likewise.
21255         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21256         _getopt_long_r, _getopt_long_only_r): Likewise.
21257
21258         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21259         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21260         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21261         the other external symbols.
21262         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21263         declaration, since the above renaming now works around collisions.
21264
21265 2004-11-11  Jim Meyering  <jim@meyering.net>
21266
21267         * lib/linebreak.c: Remove trailing blanks.
21268         * lib/alloca_.h: Likewise.
21269         * lib/acosl.c: Likewise.
21270         * lib/euidaccess.c: Likewise.
21271         * lib/allocsa.h: Likewise.
21272
21273 2004-11-10  Simon Josefsson  <jas@extundo.com>
21274
21275         * m4/getaddrinfo.m4: New file.
21276
21277 2004-11-10  Simon Josefsson  <jas@extundo.com>
21278
21279         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21280
21281 2004-11-10  Simon Josefsson  <jas@extundo.com>
21282
21283         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21284         getaddrinfo.
21285
21286         * modules/getaddrinfo: New file.
21287
21288 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21289
21290         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21291
21292 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21293
21294         * lib/mktime.c (SHR): New macro, which is a portable
21295         substitute for >> that should work even on Crays.
21296         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21297         Problem reported by Mark D. Baushke in
21298         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21299         * lib/getdate.y (SHR): Likewise.
21300         (tm_diff): Use it.
21301         * lib/strftime.c (SHR): Likewise.
21302         (tm_diff): Use it.
21303         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21304         quote_these_too, so that right shifts are well defined.  All uses
21305         changed.
21306
21307 2004-11-10  Jim Meyering  <jim@meyering.net>
21308
21309         Ensure that no close failure goes unreported.
21310         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21311         return early when it seems there's nothing to flush.
21312         Don't include __fpending.h.
21313
21314 2004-11-10  Jim Meyering  <jim@meyering.net>
21315
21316         * modules/closeout (Depends-on): Remove fpending.
21317
21318 2004-11-10  Jim Meyering  <jim@meyering.net>
21319
21320         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21321
21322 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21323
21324         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21325         gl_FUNC_STRFTIME.
21326         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21327         and AC_REQUIRE when possible, to avoid duplicate checks.
21328         Check for <wchar.h>.
21329
21330 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21331
21332         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21333
21334 2004-11-09  Bruno Haible  <bruno@clisp.org>
21335
21336         * m4/sockpfaf.m4: New file.
21337
21338 2004-11-05  Bruno Haible  <bruno@clisp.org>
21339
21340         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21341         Reported by Mark D. Baushke <mdb@cvshome.org>.
21342
21343 2004-11-04  Bruno Haible  <bruno@clisp.org>
21344
21345         2004-09-11  Bruno Haible  <bruno@clisp.org>
21346                 * allocsa.valgrind: New file.
21347         2004-02-06  Bruno Haible  <bruno@clisp.org>
21348                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21349                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21350                 Reported by Christopher Seip <chris.seip@hp.com>.
21351
21352 2004-11-04  Bruno Haible  <bruno@clisp.org>
21353
21354         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21355         (Makefile.am): Distribute it.
21356
21357 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21358
21359         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21360         with errno == ERANGE if the buffer is too small.
21361         Problem reported by Mark D. Baushke.
21362
21363 2004-11-03  Albert Chin  <china@thewrittenword.com>
21364             Paul Eggert  <eggert@cs.ucla.edu>
21365
21366         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21367         equivalent, substitute $ac_type for equivalent type rather than
21368         blindly using uint32_t *always* which won't work if uint32_t is not
21369         available.  Define _UINT32_T to work around typedef of uint32_t if
21370         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21371         2.5.1.
21372
21373 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21374
21375         * m4/jm-macros.m4: Sync from coreutils.
21376         (gl_MACROS): Check for mbrlen, for pathchk.
21377         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21378
21379 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21380
21381         * lib/xreadlink.c (MAXSIZE): New macro.
21382         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21383         size does not exceed MAXSIZE.  Avoid cast.
21384         As suggested by Mark D. Baushke in
21385         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21386         if readlink fails with buffer size just under MAXSIZE, try again
21387         with MAXSIZE.
21388
21389 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21390
21391         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21392
21393 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21394         and  Paul Eggert  <eggert@cs.ucla.edu>
21395
21396         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21397         (get_date): Overparenthesize to avoid GCC warning.
21398
21399 2004-11-02  Bruno Haible  <bruno@clisp.org>
21400
21401         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21402         returns void.
21403
21404 2004-11-02  Bruno Haible  <bruno@clisp.org>
21405
21406         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21407         function returns void.
21408
21409 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21410
21411         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21412         fflush_unlocked, flockfile, funlockfile, funlockfile,
21413         fputs_unlocked, putc_unlocked.
21414
21415 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21416
21417         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21418         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21419         already declared.
21420
21421 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21422
21423         * modules/getdate (Files): Add doc/getdate.texi.
21424         (Depends-on): Add setenv, xalloc.
21425
21426 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21427
21428         * lib/getdate.y: Add support for TZ="foo" within a date string.
21429         Fix some bugs near time_t boundaries.  Reject dates with
21430         out-of-range components, e.g., "Sept 31".
21431         Include <stdlib.h>, "setenv.h", "xalloc.h".
21432         (ISDIGIT_LOCALE): Remove; unused.
21433         Note that the TZ and time functions used here are not reentrant.
21434         (mktime_ok, get_tz): New functions.
21435         (TZBUFSIZE): New constant.
21436         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21437         This requires that we sometimes generate our own TZ="XXX..." setting.
21438
21439 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21440
21441         * doc/getdate.texi: New file, from coreutils with modifications for
21442         the new TZ parsing.
21443
21444 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21445
21446         * lib/mktime.c (not_equal_tm): Remove redundant check.
21447
21448 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21449
21450         * modules/regex (lib_SOURCES): Add regex.c.
21451         Reported by James Youngman in
21452         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21453
21454 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21455
21456         * lib/getdate.y: Use Bison 1.875 features, and some minor
21457         code cleanups.  This change does not affect semantics.
21458         Don't include <stdlib.h>; no longer needed.
21459         Don't include unlocked-io.h; only the "#if TEST" code uses
21460         stdio, and performance isn't crucial there.
21461         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21462         Bison 1.875 features as described below.
21463         All uses of "PC." replaced by "pc->".
21464         (YYSTYPE): Add a forward declaration.
21465         (yylex, yyerror): Use full prototypes in forward decls.
21466         Use "%pure-parser" rather than obsolescent "%pure_parser".
21467         Use %parse-param and %lex-param instead of obsolescent
21468         YYPARSE_PARAM and YYLEX_PARAM.
21469         (meridian_table, month_and_day_table, time_units_table,
21470         relative_time_table, time_zone_table, military_table,
21471         lookup_zone, lookup_word, get_date):
21472         Use NULL instead of 0 where appropriate.
21473         (to_hour): Avoid abort (), to avoid a dependency on
21474         stdlib.h.
21475         (yyerror, yylex): Now accepts parser_control * arg.
21476         (main) [TEST]: Use '\0' rather than 0 for char.
21477
21478 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21479
21480         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21481
21482 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21483
21484         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21485         It's now the caller's responsibility to handle the case where
21486         !HAVE_GETPAGESIZE && !defined getpagesize.
21487
21488         * lib/mktime.c (leapyear): Arg is long int, not int.
21489
21490 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21491
21492         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21493
21494 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21495
21496         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21497         missing.  Problem reported by James Youngman.
21498
21499 2004-10-16  Simon Josefsson  <jas@extundo.com>
21500
21501         * gnulib-tool: Fix comments.  Fix parse problem.
21502         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21503
21504 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21505
21506         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21507         implementation of getopt_long.  Problem reported by Alexander Taler in:
21508         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21509
21510 2004-10-15  Bruno Haible  <bruno@clisp.org>
21511
21512         * gnulib-tool: Untabify. Initialize supplied_libname.
21513         (func_usage): More homogenous output.
21514         (func_modules_transitive_closure, func_modules_to_filelist,
21515         func_emit_lib_Makefile_am): New functions.
21516         (func_import): New function, extracted from big case statement. Use
21517         func_get_license, func_modules_transitive_closure,
21518         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21519         opt_lgpl. Don't use test -a, as it's not portable.
21520         (func_create_testdir): Use func_modules_transitive_closure,
21521         func_modules_to_filelist, func_emit_lib_Makefile_am.
21522
21523 2004-10-15  Bruno Haible  <bruno@clisp.org>
21524
21525         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21526
21527 2004-10-15  Bruno Haible  <bruno@clisp.org>
21528
21529         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21530         the portions belonging to each module.
21531         Suggested by Derek Robert Price <derek@ximbiot.com>.
21532
21533 2004-10-12  Simon Josefsson  <jas@extundo.com>
21534
21535         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21536         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
21537         to real functions.
21538
21539 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21540
21541         * modules/vsnprintf: New file.
21542
21543 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21544
21545         * m4/vsnprintf.m4: New file.
21546
21547 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21548
21549         * lib/vsnprintf.h: New file.
21550         * lib/vsnprintf.c: New file.
21551
21552 2004-10-11  Bruno Haible  <bruno@clisp.org>
21553
21554         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
21555         vsnprintf.
21556
21557 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
21558
21559         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
21560
21561 2004-10-07  Bruno Haible  <bruno@clisp.org>
21562
21563         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
21564         fits into the provided buffer.
21565
21566 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
21567
21568         * lib/diacrit.c, diacrit.h: Add GPL notice.
21569
21570         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
21571         notice.
21572         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
21573         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
21574         This avoids a potential constant-folding bug.
21575
21576 2004-10-05  Bruno Haible  <bruno@clisp.org>
21577
21578         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
21579         for the declaration of strsep.
21580
21581 2004-10-05  Bruno Haible  <bruno@clisp.org>
21582
21583         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
21584
21585 2004-10-04  Simon Josefsson  <jas@extundo.com>
21586
21587         * modules/memmem: New file.
21588         * tests/test-memmem.c: New file.
21589         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
21590
21591 2004-10-04  Simon Josefsson  <jas@extundo.com>
21592
21593         * m4/memmem.m4: New file.
21594
21595 2004-10-04  Simon Josefsson  <jas@extundo.com>
21596
21597         * lib/memmem.h: New file.
21598         * lib/memmem.c: New file, taken from glibc.
21599
21600 2004-10-04  Simon Josefsson  <jas@extundo.com>
21601
21602         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
21603         '#ifdef USE_UNLOCKED_IO'.
21604
21605 2004-10-04  Simon Josefsson  <jas@extundo.com>
21606
21607         * config/srclist.txt: Add memmem from glibc.
21608
21609 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21610
21611         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
21612
21613         * modules/argmatch, modules/argp, modules/closeout, modules/error,
21614         modules/exclude, modules/getdate, modules/getline,
21615         modules/getndelim2, modules/getpass, modules/getpass-gnu,
21616         modules/getusershell, modules/linebuffer, modules/md5,
21617         modules/mountlist, modules/posixtm, modules/readtokens,
21618         modules/readutmp, modules/regex, modules/sha1,
21619         modules/version-etc, modules/yesno:
21620         Remove dependency on unlocked-io.
21621
21622 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21623
21624         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
21625
21626         * m4/unlocked-io.m4: Add copyright notice.
21627         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
21628
21629 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21630
21631         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
21632         * lib/xmalloc.c (xmemdup): Likewise.
21633         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
21634         XFREE): Remove these long-obsolescent macros.
21635         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
21636         * lib/xstrdup.c: Remove.
21637
21638         * lib/regex.c (re_comp): Cast gettext return value to char *,
21639         Problem reported by Martin Neitzel via Mark D. Baushke.
21640
21641 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21642
21643         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
21644         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
21645         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
21646         regex.c, sha1.c, version-etc.c, yesno.c:
21647         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
21648         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
21649         the includer's responsibility.
21650
21651         Sync from coreutils.
21652
21653         * lib/modechange.c (mode_compile): Don't decrement a pointer that
21654         points to the start of a string, as the C Standard says the
21655         resulting behavior is undefined.
21656
21657         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
21658         simple -> simple_backups, numbered_existing ->
21659         numbered_existing_backups, numbered -> numbered_backups
21660         to avoid shadowing problems.  All uses changed.
21661         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
21662         * lib/backupfile.c (check_extension, numbered_backup):
21663         Rename locals to avoid shadowing 'basename'.
21664         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
21665         once.
21666
21667         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
21668         * lib/.cvsignore: Add getopt.h.
21669
21670 2004-10-04  Bruno Haible  <bruno@clisp.org>
21671
21672         * modules/README: New file.
21673         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
21674         not a module.
21675
21676 2004-10-02  Jim Meyering  <jim@meyering.net>
21677
21678         * lib/dirfd.h, getpagesize.h: Add copyright notice.
21679
21680 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21681
21682         * modules/strsep: New file.
21683
21684 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21685
21686         * m4/strsep.m4: New file.
21687
21688 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21689
21690         * lib/strsep.h: New file.
21691         * lib/strsep.c: New file.
21692
21693 2004-10-01  Simon Josefsson  <jas@extundo.com>
21694
21695         * lib/snprintf.c (snprintf): Handle size==0.
21696
21697 2004-10-01  Simon Josefsson  <jas@extundo.com>
21698             Bruno Haible  <bruno@clisp.org>
21699
21700         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
21701         (snprintf): Declare 'args'.
21702
21703 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
21704
21705         * lib/snprintf.c: Remove comments as to why each header is needed.
21706
21707 2004-10-01  Bruno Haible  <bruno@clisp.org>
21708
21709         * MODULES.html.sh: Add strsep.
21710
21711 2004-09-30  Simon Josefsson  <jas@extundo.com>
21712
21713         * modules/snprintf: New file.
21714
21715 2004-09-30  Simon Josefsson  <jas@extundo.com>
21716
21717         * m4/snprintf.m4: New file.
21718
21719 2004-09-30  Simon Josefsson  <jas@extundo.com>
21720
21721         * lib/snprintf.h, lib/snprintf.c: New files.
21722
21723 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21724
21725         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
21726         (hol_entry_help): Never translate an empty string.
21727         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
21728         * lib/argp.h (OPTION_NO_TRANS): New option.
21729
21730 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21731
21732         * modules/argp (Maintainer): Replace Simon Josefsson
21733         by Sergey Poznyakoff.
21734
21735 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21736
21737         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
21738         changes merged back into glibc.
21739
21740 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21741
21742         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
21743
21744 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
21745
21746         * lib/xvasprintf.c: Include xalloc.h.
21747         (xvasprintf): Use xalloc_die, not xmalloc_die.
21748
21749 2004-09-29  Bruno Haible  <bruno@clisp.org>
21750
21751         * modules/alloca-opt: New file, derived from modules/alloca.
21752         * modules/allocsa: Depend on alloca-opt instead of alloca.
21753         * modules/setenv: Likewise.
21754         * modules/vasnprintf: Likewise.
21755         * MODULES.html.sh: Add alloca-opt.
21756
21757 2004-09-28  Simon Josefsson  <jas@extundo.com>
21758
21759         * gnulib-tool: New parameter --lgpl, to asseert that modules are
21760         LGPL, and to replace license template from GPL to LGPL.
21761
21762 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21763
21764         * modules/dummy: Change license to LGPL.
21765
21766 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21767
21768         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
21769
21770 2004-09-24  Simon Josefsson  <jas@extundo.com>
21771
21772         * modules/minmax (License): Change from GPL to LGPL.
21773
21774 2004-09-23  Simon Josefsson  <jas@extundo.com>
21775
21776         * gnulib-tool (--import): Typo.
21777
21778 2004-09-23  Simon Josefsson  <jas@extundo.com>
21779
21780         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
21781
21782 2004-09-22  Bruno Haible  <bruno@clisp.org>
21783
21784         * modules/*: Add 'License' field.
21785         * gnulib-tool: Accept --extract-license option.
21786         (func_get_license): New function.
21787
21788 2004-09-21  Bruno Haible  <bruno@clisp.org>
21789
21790         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
21791         Reported by Simon Josefsson.
21792
21793 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21794
21795         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
21796         gl_AC_TYPE_LONG_LONG.
21797
21798 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21799
21800         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
21801
21802 2004-09-18  Simon Josefsson  <jas@extundo.com>
21803         and  Paul Eggert  <eggert@cs.ucla.edu>
21804
21805         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
21806         calls with autoreconf.  Define GL_LIB.
21807
21808 2004-09-14  Karl Berry  <karl@gnu.org>
21809
21810         * config/srclist.txt: unsync setenv.c, sigh.
21811
21812 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21813
21814         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
21815         Problem reported by Bruno Haible in:
21816         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
21817
21818 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21819
21820         * config/srclist.txt: Comment out argp-pvh.c.
21821
21822 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
21823
21824         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
21825         in case some system header has #define'd it.  Problem reported by
21826         Soeren D. Schulze in
21827         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
21828
21829 2004-09-09  Karl Berry  <karl@gnu.org>
21830
21831         * regex.[ch]: delete from the root.  These were supposed to be
21832                 synced with emacs cvs, but this has not happened for about
21833                 a year, and anyway nothing else uses emacs regex.[ch].
21834                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
21835                 lib/regex[.ch] is untouched.
21836
21837 2004-09-09  Bruno Haible  <bruno@clisp.org>
21838
21839         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
21840
21841 2004-09-09  Bruno Haible  <bruno@clisp.org>
21842
21843         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
21844         modifications.
21845         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
21846
21847 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21848
21849         * modules/xvasprintf: New file.
21850         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
21851
21852 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21853
21854         * lib/xvasprintf.h: New file.
21855         * lib/xvasprintf.c: New file.
21856         * lib/xasprintf.c: New file.
21857
21858 2004-09-08  Bruno Haible  <bruno@clisp.org>
21859
21860         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
21861
21862 2004-09-08  Bruno Haible  <bruno@clisp.org>
21863
21864         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
21865         length is > INT_MAX.
21866         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
21867         more.
21868
21869 2004-09-08  Bruno Haible  <bruno@clisp.org>
21870
21871         * lib/stdint_.h: New file, taken from GNU clisp.
21872
21873 2004-09-08  Bruno Haible  <bruno@clisp.org>
21874             Oskar Liljeblad  <oskar@osk.mine.nu>
21875
21876         * modules/stdint: New file.
21877         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
21878
21879 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21880
21881         Import from coreutils.
21882         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
21883         strings on unbounded length.  alloca's performance benefits aren't
21884         that important here.
21885         (V_STRDUP): Remove.
21886         (parse_with_separator): New function, with most of the internals
21887         of the old parse_user_spec.  Allow user to omit both user and group,
21888         for compatibility with FreeBSD.
21889         Clone only the user name, not the entire spec.
21890         Do not set *uid, *gid unless entirely successful.
21891         Avoid memory leak in some failing cases.
21892         Fix regression for USER.GROUP reported by Dmitry V. Levin in
21893         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
21894         (parse_user_spec): Rewrite to use parse_with_separator.
21895
21896 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21897
21898         * modules/userspec: Don't depend on alloca.
21899
21900 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21901
21902         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
21903
21904 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
21905
21906         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
21907         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
21908         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
21909
21910 2004-08-16  Simon Josefsson  <jas@extundo.com>
21911
21912         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
21913         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
21914         Add --dry-run for --import.
21915         Let user provided command line parameters override configure.ac
21916         settings.
21917
21918 2004-08-12  Simon Josefsson  <jas@extundo.com>
21919
21920         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
21921         as discussed with Paul Eggert in threads rooted at
21922         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
21923         and
21924         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
21925         Before, the test was empty, and relied on ELIDE_CODE in source
21926         code.)
21927         (gl_PREREQ_GETOPT): New macro.
21928         (gl_GETOPT): Use them.
21929
21930 2004-08-12  Simon Josefsson  <jas@extundo.com>
21931
21932         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
21933         * lib/getopt_.h: Renamed from getopt.h.
21934
21935 2004-08-12  Simon Josefsson  <jas@extundo.com>
21936
21937         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
21938         Change default library name from libfoo to libgnu.
21939         Now, if you have a configure.ac that says:
21940                 gl_SOURCE_BASE(gl)
21941                 gl_M4_BASE(gl/m4)
21942                 gl_MODULES(error getopt etcetera)
21943                 gl_INIT
21944         you can import all you need by running:
21945                 ../gnulib/gnulib-tool --import
21946
21947         * modules/getopt (Files): Rename getopt.h to getopt_.h.
21948         (Makefile.am): Rewrite, use logic from argz.
21949         (Include): Use <getopt.h> instead of "getopt.h".
21950
21951 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21952
21953         * modules/argp (Files): Add m4/unlocked-io.m4.
21954         (Depends-on): Add extensions.
21955
21956 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21957
21958         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
21959         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
21960         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
21961         Check for program_invocation_name, program_invocation_short_name,
21962         flockfile, funlockfile, features.h, _getopt_long_only_r.
21963
21964 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21965
21966         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
21967         its complicated substitute.
21968         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
21969         and program_invocation_name.
21970         (__argp_basename) [!_LIBC]: Remove; the only use was
21971         replaced by its body.
21972         (__argp_short_program_name): Change condition from
21973         !defined __argp_short_program_name to
21974         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
21975         to match argp-namefrob.h.
21976         (__argp_failure): Don't assume strerror_r returns char *.
21977         * lib/argp-parse.c (N_): Define unconditionally.
21978         (argp_default_options): Fill out initializers with 0 to avoid
21979         gcc warnings.
21980
21981 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21982
21983         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
21984         getopt1.c.
21985
21986 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21987
21988         Merge from coreutils.
21989
21990         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
21991
21992         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
21993         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
21994
21995 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21996
21997         Merge from coreutils.
21998
21999         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22000         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22001         for Reliant Unix 5.43.
22002
22003         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22004         (union fooround): Use uintmax_t, not long int.
22005         The rest is a merge from libc:
22006         [defined _LIBC]: Include <shlib-compat.h>.
22007         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22008
22009         * lib/settime.c (settime): Recode to avoid warning with
22010         Sun Forte C 6U2.
22011
22012         * lib/strverscmp.c: Convert to UTF-8.
22013
22014 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22015
22016         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22017         m4/uintmax_t.m4.
22018
22019 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22020
22021         * modules/xalloc-die: New file.
22022         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22023
22024         * modules/md5 (Files): Add m4/uint32_t.m4.
22025         * modules/sha1: Renamed from modules/sha.
22026         (Files):
22027         Rename lib/sha.h to lib/sha1.h.
22028         Rename lib/sha.c to lib/sha1.c.
22029         Rename m4/sha.m4 to m4/sha1.m4.
22030         (lib_SOURCES): Likewise.
22031         (configure.ac): Rename gl_SHA to gl_SHA1.
22032         (Include): sha.h -> sha1.h.
22033
22034 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22035
22036         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22037         * m4/sha1.m4: Renamed from sha.m4.
22038         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22039
22040 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22041
22042         * lib/obstack.h (obstack_empty_p):
22043         Don't assume that chunk->contents is suitably aligned.
22044         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22045         Likewise. Problem reported by Benno in
22046         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22047
22048         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22049         readable.  This could be improved further but it'd take some work.
22050
22051 2004-08-08  Simon Josefsson  <jas@extundo.com>
22052
22053         * modules/xgethostname (Depends-on): Remove exit and error (not
22054         used).
22055
22056         * modules/getpass-gnu: Add getpass.h.
22057         (Depends-on): Add stdbool.
22058         * modules/getpass: Add getpass.h.
22059
22060 2004-08-08  Simon Josefsson  <jas@extundo.com>
22061
22062         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22063         Check getpass declaration.
22064
22065 2004-08-08  Simon Josefsson  <jas@extundo.com>
22066
22067         * lib/xgethostname.c: Don't include error.h (not used).
22068
22069         * lib/getpass.h: Add.
22070         * lib/getpass.c: Include getpass.h first.
22071
22072 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
22073
22074         * lib/xalloc-die.c: New file.
22075         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
22076         All uses removed.
22077         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
22078         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
22079         xalloc-die.c.
22080         (_, N_, xalloc_die): Move to xalloc-die.c.
22081         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
22082         so that we needn't mess with xalloc_msg_memory_exhausted.
22083
22084         * lib/sha1.h: Renamed from sha.h.
22085         (SHA1_H): Renamed from _SHA_H.
22086         (sha1_ctx): Renamed from sha_ctx.
22087         (sha1_init_ctx): Renamed from sha_init_ctx.
22088         (sha1_process_block): Renamed from sha_process_block.
22089         (sha1_process_bytes): Renamed from sha_process_bytes.
22090         (sha1_finish_ctx): Renamed from sha_finish_ctx.
22091         (sha1_read_ctx): Renamed from sha_read_ctx.
22092         (sha1_stream): Renamed from sha_stream.
22093         (sha1_buffer): Renamed from sha_buffer.
22094         * lib/sha1.c: Likewise; renamed from sha.c.
22095         Do not include <sys/types.h>.
22096         Include <stddef.h> rather than <stdlib.h>.
22097
22098 2004-08-08  Bruno Haible  <bruno@clisp.org>
22099
22100         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
22101         FILESYSTEM_PREFIX_LEN.
22102         * lib/progreloc.c: Likewise.
22103         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
22104
22105 2004-08-06  Simon Josefsson  <jas@extundo.com>
22106
22107         * modules/progname (Depends-on): Don't depend on stdbool.
22108
22109 2004-08-06  Simon Josefsson  <jas@extundo.com>
22110
22111         * modules/getsubopt: New file.
22112         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22113         getsubopt.
22114
22115 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22116
22117         More merge from coreutils.
22118
22119         * m4/utimens.m4, m4/utimecmp.m4: New files.
22120         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
22121         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
22122         prereq.m4, sha.m4: Import changes from coreutils.
22123
22124 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22125
22126         More merge from coreutils.
22127         * modules/raise, modules/readtokens0, modules/utimens:
22128         * modules/utimecmp, module/xnanosleep: New files.
22129         * modules/strftime: Add lib/strftime.h.
22130         Change include from <time.h> to "strftime.h".
22131         * modules/yesno: Add lib/yesno.h.
22132         * modules/backupfile: Remove lib/addext.c.
22133         * modules/euidaccess: Add stat-macros.h.
22134         * modules/canonicalize, modules/euidaccess,
22135         modules/filemode, modules/lchown, modules/makepath,
22136         modules/rmdir, modules/stat: Likewise.
22137
22138 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22139
22140         Merge from tar.
22141         * lib/argp-help.c (make_hol, hol_append): Don't assume that
22142         SIZE_MAX is a valid preprocessor constant.
22143         (__argp_basename): Change from "#ifndef _LIBC"
22144         to "#ifndef __argp_short_program_name", so that
22145         we don't compile these functions for tar.
22146
22147         More merges from coreutils.
22148         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
22149         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
22150         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
22151         * lib/addext.c: Remove; no longer needed.
22152         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
22153         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
22154         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
22155         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
22156         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
22157         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
22158         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
22159         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
22160         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
22161         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
22162         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
22163         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
22164         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
22165         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
22166         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
22167         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
22168         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
22169         Import changes from coreutils.
22170
22171 2004-08-05  Simon Josefsson  <jas@extundo.com>
22172
22173         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
22174
22175 2004-08-05  Simon Josefsson  <jas@extundo.com>
22176
22177         * m4/getsubopt.m4: New file.
22178
22179 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22180
22181         Merge from coreutils.
22182
22183         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
22184         * m4/getcwd-path-max.m4: New files.
22185
22186         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
22187         FILESYSTEM_PREFIX_LEN ->
22188         FILE_SYSTEM_PREFIX_LEN.
22189         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
22190         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
22191         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
22192         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
22193
22194         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
22195         prerequisite modules now handle the DOS stuff.
22196         Don't check for unistd.h.
22197
22198 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22199
22200         Merge from coreutils.
22201
22202         * lib/.gdb-history: Remove; this doesn't belong here.
22203
22204         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
22205         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
22206         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
22207         * lib/getcwd.c: New files.
22208
22209         * lib/dirname.h: Include <stdbool.h>.
22210         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
22211         for consistency with POSIX terminology.  All uses changed.
22212         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
22213         (strip_trailing_slashes): Use bool for booleans.
22214         * lib/stripslash.c (strip_trailing_slashes): Likewise.
22215
22216         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
22217         sometimes returns a positive errno value even when it succeeds.
22218         (print_errno_message) [!LIBC]: Fall back on strerror if
22219         __strerror_r fails.
22220
22221         * lib/path-concat.c (mempcpy): Don't define if a system header defines
22222         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
22223         (longest_relative_suffix): New function.
22224         (path_concat): Use it.  Assume first argument is not NULL.
22225         Port to DOS.  Omit redundant separators.
22226         Report an error instead of returning NULL.
22227         Use mempcpy instead of memcpy.
22228         (xpath_concat): Remove: not declared or used.
22229
22230         * lib/same.h: Include <stdbool.h>
22231         (same_name): Return bool, not int.
22232         * lib/same.c (same_name): Likewise.
22233         (errno): Don't declare; we assume C89 or better now.
22234
22235         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
22236         if not already defined.
22237
22238         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
22239         * lib/dup-safer.c (errno): Likewise.
22240
22241 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22242
22243         Merge from coreutils.
22244         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
22245         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
22246         * modules/path-concat: Don't depend on strdup.
22247
22248 2004-08-03  Simon Josefsson  <jas@extundo.com>
22249
22250         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22251         * lib/progname.h: Don't include stdbool.h.
22252
22253 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22254
22255         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22256         * MODULES.html.sh (func_all_modules): Remove fatal.
22257
22258 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22259
22260         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22261
22262 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22263
22264         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22265         working.
22266
22267 2004-08-02  Simon Josefsson  <jas@extundo.com>
22268
22269         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22270         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22271         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22272
22273 2004-08-01  Simon Josefsson  <jas@extundo.com>
22274
22275         * lib/xgetdomainname.c: Include stdlib.h, for free().
22276
22277 2004-07-19  Bruno Haible  <bruno@clisp.org>
22278
22279         * MODULES.html.sh (func_all_modules): Add dummy.
22280
22281 2004-07-16  Simon Josefsson  <jas@extundo.com>
22282
22283         * modules/dummy: New file.
22284
22285 2004-07-16  Simon Josefsson  <jas@extundo.com>
22286
22287         * lib/dummy.c: New file.
22288
22289 2004-07-16  Bruno Haible  <bruno@clisp.org>
22290
22291         * lib/backupfile.h: Add extern "C" for C++.
22292         * lib/closeout.h: Likewise.
22293         * lib/copy-file.h: Likewise.
22294         * lib/findprog.h: Likewise.
22295         * lib/full-write.h: Likewise.
22296         * lib/pathname.h: Likewise.
22297         * lib/progname.h: Likewise.
22298         * lib/stpcpy.h: Likewise.
22299         * lib/stpncpy.h: Likewise.
22300         * lib/strcase.h: Likewise.
22301         * lib/strstr.h: Likewise.
22302         * lib/xalloc.h: Likewise.
22303
22304         * lib/mbswidth.h: Add extern "C" for C++.
22305         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22306
22307 2004-07-13  Robert Millan  <robertmh@gnu.org>
22308
22309         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22310
22311 2004-07-09  Simon Josefsson  <jas@extundo.com>
22312
22313         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22314         failed without this.)
22315
22316 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22317
22318         * modules/chown (Files): Add lib/fchown-stub.c, since
22319         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22320
22321 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22322
22323         * lib/fchown-stub.c: New file.
22324
22325 2004-06-24  Jim Meyering  <jim@meyering.net>
22326
22327         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22328
22329 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22330
22331         * modules/argz: Omit "#include".
22332
22333         * MODULES.html.sh (func_all_modules): Add calloc, to match
22334         2004-06-01 addition of calloc module.
22335
22336 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22337
22338         * m4/argz.m4: New file, which is autoupdated from libtool.
22339
22340 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22341
22342         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22343         libtool.
22344
22345 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22346
22347         * config/srclist-update: Don't insist on "USA." before the
22348         close-comment, as libtool omits the period and puts the */ on a
22349         separate line.
22350         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22351         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22352
22353 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22354
22355         * modules/argz: New file.
22356         * MODULES.html.sh (func_all_modules): Add argz.
22357
22358 2004-06-12  Jim Meyering  <jim@meyering.net>
22359         and  Paul Eggert  <eggert@cs.ucla.edu>
22360
22361         * modules/hash (Files): Add lib/xalloc.h.
22362         * modules/pipe (Depends-on): Add wait-process.
22363         * modules/stat (Depends-on): Add xalloc.
22364         * modules/userspec (Files): Add lib/userspec.h.
22365         * modules/xstrto
22366
22367         Upgrade from gettext-0.13.
22368         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22369         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22370         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22371
22372 2004-06-10  Jim Meyering  <jim@meyering.net>
22373
22374         * lib/calloc.c: New file.
22375
22376 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22377
22378         * lib/getdate.y (yylex): Allow space between sign and number.
22379         Problem reported by Dan Jacobson.
22380
22381 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22382
22383         Merge from coreutils CVS.
22384
22385         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22386         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22387         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22388         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22389         xstrtol.m4: Fix copyright date and/or serial number.
22390
22391         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22392         See if we need an fchown replacement.
22393         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22394         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22395         and use the replacement function if we detect either defect.
22396
22397         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22398         gl_UTIMECMP.
22399
22400 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22401         and  Jim Meyering  <jim@meyering.net>
22402
22403         Merge from coreutils CVS.
22404
22405         * lib/stat-macros.h: New file, with contents from file-type.h
22406         and coreutils' system.h.
22407         * lib/file-type.c: Include "stat-macros.h".
22408         * lib/file-type.h (file_type): Move all macro definitions to new file,
22409         stat-macros.h.
22410
22411         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22412         Wrap old code with this conditional.
22413         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22414         function that does not dereference symlinks.
22415         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22416
22417         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22418         dependency problems.
22419         (xreadlink): Accept new arg SIZE, for efficiency.
22420         All decls and uses changed.
22421         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22422
22423         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22424         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22425
22426         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22427         sysexits.h.
22428
22429 2004-06-01  Jim Meyering  <jim@meyering.net>
22430
22431         * m4/calloc.m4: New file.
22432
22433 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22434
22435         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22436         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22437         Also, fix a typo in a diagnostic.
22438
22439 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22440
22441         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22442         or AC_FUNC_REALLOC.
22443
22444 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22445
22446         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22447         macros to be defined.
22448         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22449         the allocator returns NULL because the requested size is zero.
22450
22451 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22452
22453         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22454         var.  Add comment explaining why libc still defines it.  This
22455         merges the following patch from glibc:
22456         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22457
22458 2004-05-20  Andreas Schwab  <schwab@suse.de>
22459
22460         * m4/free.m4: Replace free if it not known to work, not the other
22461         way round.
22462
22463 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22464
22465         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22466         present in glibc since revision 1.1 of this file.
22467         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22468         obstack_alignment_mask, obstack_alloc, obstack_base,
22469         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22470         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22471         obstack_grow0, obstack_init, obstack_int_grow,
22472         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22473         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22474         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22475         nonexistent functions.
22476
22477 2004-05-18  Karl Berry  <karl@gnu.org>
22478
22479         * config/srclist.txt: break link for vasnprintf.c.
22480
22481 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22482
22483         Port obstack to the AS/400, where pointers are 16 bytes wide and
22484         you cannot cast an integer to a valid pointer.  This patch is
22485         currently waiting to be integrated into glibc; see
22486         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22487
22488         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22489         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22490         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22491         (struct obstack): temp member is now a union of a pointer and
22492         an integer, instead of an integer.  All integer uses changed.
22493         This does not affect the physical layout of struct obstack,
22494         except on hosts (like the AS/400) where the size or alignment of
22495         void * is greater than that of ptrdiff_t.
22496         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22497         __STDC__)]: Store temporary in pointer member of union, not
22498         integer member.
22499         * lib/obstack.c: Include <stddef.h>, for offsetof.
22500         (struct fooalign): Remove; it doesn't need a name.
22501         (union fooround): Change double to long double, and add void *.
22502         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22503         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22504         not a macro.  Hence the values are always int; so remove all
22505         casts-to-int in uses.
22506
22507 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22508
22509         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22510         we can get this patch merged into glibc.
22511
22512 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22513             Paul Eggert  <eggert@cs.ucla.edu>
22514
22515         * m4/argp: Depend on alloca.
22516
22517 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22518             Paul Eggert  <eggert@cs.ucla.edu>
22519
22520         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22521         freecoding.
22522
22523 2004-05-17  Bruno Haible  <bruno@clisp.org>
22524
22525         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22526         precision that consists of a '.' followed by an empty digit string.
22527         Patch by Tor Lillqvist <tml@iki.fi>.
22528
22529 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22530
22531         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
22532         for backward compatibility with older code.  We need our own
22533         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
22534         it under some other name, and our alloca.h will define it.
22535
22536 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22537             Derek Price  <derek@ximbiot.com>
22538
22539         * lib/alloca.c: Include <alloca.h>, to get our interface.
22540         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
22541         include <alloca.h> first.  Use C89 prototype for alloca; this
22542         requires including <stddef.h> for size_t.  Use extern "C" if C++.
22543         Use #elif for simplicity, since we can assume C89 now.
22544         Don't try to source the system alloca.h since it will not be found
22545         and to prevent recursively including its replacement.
22546         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
22547         * lib/regex.c: Likewise.
22548
22549 2004-05-16  Derek Price  <derek@ximbiot.com>
22550             Paul Eggert  <eggert@cs.ucla.edu>
22551
22552         getline cleanup.  This changes the getndelim2 API: both order of
22553         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
22554         no delimiter).
22555
22556         * lib/getline.c: Don't include stddef.h or stdio.h, since our
22557         interface does that.
22558         (getline): Always use getdelim, so that we don't have two
22559         copies of this code.
22560         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
22561         if available.
22562         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
22563         (GETNDELIM2_MAXIMUM): New macro.
22564         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
22565         instead of the old practice of delim2==0.  All callers changed.
22566         Return -1 on overflow, instead of returning junk.
22567         Do not set *linesize unless allocation succeeds.
22568         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
22569         that we include sys/types.h.
22570         * lib/getnline.h: Likewise.
22571         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
22572         (getndelim2): Reorder arguments.
22573         * lib/getnline.c (getnline, getndelim):
22574         Don't discard the NMAX argument.
22575         (getnline): Invoke getndelim, to avoid code duplication.
22576         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
22577         of (size_t) -1 by callers of the getnline family.
22578
22579 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22580
22581         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
22582         Check for gettimeofday.
22583         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
22584         Check for settimeofday, stime.
22585
22586 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22587
22588         * lib/nanosleep.c (suspended): Change its type from int to
22589         sig_atomic_t volatile.
22590         (first_call): Make it private to rpl_nanosleep, and have it
22591         be zero initially as that's a bit faster.
22592         (my_usleep): Round up fractional times instead of truncating them,
22593         as this is the usual meaning for 'sleep'.
22594
22595         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
22596         doesn't work.
22597         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
22598         (ENOSYS): Define if not defined.
22599         (settime): Fall back on stime if it exists and settimeofday fails.
22600         But don't bother with fallbacks if a method fails with errno == EPERM.
22601
22602 2004-05-11  Jim Meyering  <jim@meyering.net>
22603
22604         Prior to this change, the save_cwd caller required read access to the
22605         current directory on most systems (ones with the fchdir function).
22606
22607         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
22608         fails, try write-only, and finally, resort to using xgetcwd.
22609
22610 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
22611
22612         * lib/obstack.c, obstack.h: Import changes from libc.
22613
22614 2004-04-28  Bruno Haible  <bruno@clisp.org>
22615
22616         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
22617         also implicitly appends .exe to executables.
22618         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
22619         accepts Windows pathnames.
22620         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22621         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22622         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22623         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22624         Reported by Derek Robert Price <derek@ximbiot.com>.
22625
22626 2004-04-21  Karl Berry  <karl@gnu.org>
22627
22628         * config/srclist.txt (localcharset.c): break sync.
22629
22630 2004-04-20  Paul Eggert  <eggert@twinsun.com>
22631
22632         * m4/host-os.m4: Add a copyright notice.
22633
22634 2004-04-20  Jim Meyering  <jim@meyering.net>
22635
22636         Change UTILS_ to gl_ in AC_DEFINE'd names.
22637         Change utils_- and jm_-prefixed variables, too.
22638         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
22639         UTILS_FUNC_MKDIR_TRAILING_SLASH.
22640         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
22641
22642         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
22643         Don't emit trailing blanks.
22644         Also rename jm_-prefixed variables to have gl_ prefix.
22645
22646         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
22647         Also rename jm_-prefixed variables to have gl_ prefix.
22648
22649         * m4/jm-macros.m4: Reflect the renamings.
22650         * m4/prereq.m4: Likewise.
22651
22652 2004-04-20  Jim Meyering  <jim@meyering.net>
22653
22654         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
22655         memory.
22656
22657 2004-04-20  Jim Meyering  <jim@meyering.net>
22658             Bruno Haible  <bruno@clisp.org>
22659
22660         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
22661         memory when realloc fails.
22662
22663 2004-04-19  Jim Meyering  <jim@meyering.net>
22664
22665         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
22666         now that readutmp.c may call `free (0)'.
22667
22668 2004-04-19  Bruno Haible  <bruno@clisp.org>
22669
22670         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
22671         * m4/inttypes_h.m4: Likewise.
22672         * m4/stdint_h.m4: Likewise.
22673         * m4/intmax_t.m4: Likewise.
22674         * m4/uintmax_t.m4: Likewise.
22675
22676 2004-04-18  Jim Meyering  <jim@meyering.net>
22677
22678         * m4/prereq.m4: Don't forbid jm_ prefix.
22679
22680         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
22681         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
22682         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
22683         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
22684         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
22685         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
22686         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
22687         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
22688         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
22689         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
22690         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
22691         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
22692         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
22693         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
22694         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
22695         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
22696         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
22697         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
22698         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
22699
22700 2004-04-18  Jim Meyering  <jim@meyering.net>
22701
22702         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
22703         failure, don't leak memory and do call END_UTMP_ENT.
22704
22705 2004-04-16  Jim Meyering  <jim@meyering.net>
22706
22707         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
22708         coreutils' stat program.
22709         (gl_PREREQ): Don't require jm_PREREQ_STAT.
22710
22711 2004-04-11  Paul Eggert  <eggert@twinsun.com>
22712
22713         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
22714         C89.
22715         (CHAR_BIT): Remove, since we assume C89.
22716         Include <stdint.h> if available, as per current Autoconf CVS advice.
22717
22718 2004-03-31  Jim Meyering  <jim@meyering.net>
22719
22720         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
22721         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
22722         * m4/xalloc.m4: Likewise.
22723
22724 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22725
22726         Merge from coreutils.
22727
22728         * m4/inttostr.m4: New file.
22729         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
22730         Require AM_STDBOOL_H and gl_TIMESPEC instead.
22731         Require gl_CLOCK_TIME.
22732         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
22733
22734 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22735
22736         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
22737         not bool, to be more consistent with Unix conventions.
22738         Suggested by Bruno Haible.
22739
22740         Merge from coreutils.
22741
22742         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
22743         * lib/umaxtostr.c: New files.
22744
22745         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
22746         the usual <time.h> dance.
22747         (get_date): Change signature to support fractional time stamps.
22748         All callers changed.
22749         * lib/getdate.y: Include "getdate.h" first, as we can now
22750         assume C89 and don't need to worry about 'const'.
22751         Similarly, include "unlocked-io.h" near start, not in middle.
22752         Include <limits.h>.
22753         (textint.value): Use long int rather than int.
22754         (textint.digits): Use size_t rather than int.
22755         (BILLION, LOG10_BILLION): New constants.
22756         (parser_control): New member rel_ns.  Members day_ordinal,
22757         time_zone, month, day, hour, minutes, rel_year, rel_month,
22758         rel_day, rel_hour, rel_minutes, rel_seconds
22759         are now long int, not int.  Member seconds is now struct timespec,
22760         not int.  New member timespec_seen.  Members dates_seen, days_seen,
22761         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
22762         not int.
22763         (%union.intval): Now long int, not int.
22764         New member timespec.
22765         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
22766         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
22767         (spec): Now is a timespec or an item list.
22768         (timespec, items): New nonterminals.
22769         (time, rel, relunit, number, get_date):
22770         Add support for fractional seconds.
22771         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
22772         (gmtime, localtime, mktime): Remove decls; not needed with C89.
22773         (to_hour): First arg is now long int, not int.
22774         (to_year): Returns long int, not int.
22775         Don't treat year -70 like 70.
22776         (tm_diff): Returns long int, not int.
22777         (lookup_word): Use bool instead of int when appropriate.
22778         (yylex): Use size_t for count, not int.
22779         Detect overflow when parsing large integer constants.
22780         Add support for fractions.
22781         (get_date): Make pointers 'const' if possible.
22782         Use more-portable code to detect integer overflow.
22783         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
22784         Don't use ctime; it's not reliable if the year has >4 digits.
22785
22786         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
22787         This is for compatibility with BSD.
22788
22789         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
22790         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
22791         From coreutils' system.h.
22792
22793         * lib/userspec.c: Don't include "posixver.h".
22794         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
22795         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
22796         compatible extension.  Simplify code by removing a boolean int
22797         that was always nonzero if a string was nonnull.
22798
22799 2004-03-30  Jim Meyering  <jim@meyering.net>
22800
22801         Merge from coreutils.
22802
22803         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
22804         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
22805         on some systems one must include <grp.h> before it.
22806         Reported by Christian Krackowizer.
22807
22808 2004-03-30  Jim Meyering  <jim@meyering.net>
22809
22810         Merge from coreutils.
22811
22812         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
22813
22814         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
22815         an empty input stream.
22816
22817         * lib/readtokens.c: Include <stdbool.h>.
22818         (readtoken): Use `size_t' rather than int/long.
22819         All callers adjusted.
22820         Use `bool' rather than `int' where appropriate.
22821         Use memset rather than an explicit loop.
22822         Use x2nrealloc rather than xrealloc.
22823         Allow the use of `\0' as a delimiter.
22824         (readtokens): Likewise.
22825         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
22826
22827 2004-03-30  Jim Meyering  <jim@meyering.net>
22828
22829         * m4/realloc.m4: Remove file, since now it does no more than
22830         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
22831         the `configure.ac' section of module/realloc.
22832         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
22833
22834 2004-03-30  Bruno Haible  <bruno@clisp.org>
22835
22836         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
22837         nonnull.
22838
22839 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22840
22841         Merge changes to getloadavg.c from coreutils and Emacs.
22842
22843         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
22844         Define to an expression, not to the empty string.
22845         Include cloexec.h and xalloc.h.
22846         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
22847         Use set_cloexec_flag rather than rolling our own.
22848         * lib/cloexec.c, lib/cloexec.h: New files.
22849
22850 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22851
22852         * m4/cloexec.m4: New file.
22853
22854 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22855
22856         * lib/getopt.h: Sync with libc CVS.
22857
22858 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22859             Bruno Haible  <bruno@clisp.org>
22860
22861         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
22862         mbswidth.
22863
22864 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22865             Bruno Haible  <bruno@clisp.org>
22866
22867         * lib/mbswidth.h: Include <wchar.h> only if
22868         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
22869         <wchar.h>.
22870         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
22871
22872 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22873
22874         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
22875         Sync with libc CVS.
22876         * lib/getopt_int.h: New file, also synced from libc.
22877
22878 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22879
22880         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
22881         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
22882         Bring back getopt.c, getopt.h, getopt1.c.
22883
22884 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22885
22886         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
22887         All uses changed.  Check for sa_sigaction member; this fixes
22888         a bug first reported by Jason Andrade in
22889         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22890
22891 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22892
22893         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
22894         '#if' expressions.  Unlike the code it replaces, it does not
22895         depend on (defined _SC_PAGESIZE).  However, it does depend on
22896         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
22897         first reported by Jason Andrade in
22898         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22899
22900 2004-02-25  Simon Josefsson  <jas@extundo.com>
22901
22902         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
22903
22904 2004-02-25  Simon Josefsson  <jas@extundo.com>
22905
22906         * lib/strdup.h: New file.
22907         * lib/strdup.c: Include it.
22908         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
22909         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
22910
22911 2004-02-23  Karl Berry  <karl@gnu.org>
22912
22913         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
22914         (from fencepost.gnu.org:/gd/gnuorg).
22915
22916 2004-02-23  Karl Berry  <karl@gnu.org>
22917
22918         * config/srclistvars.sh (GNUORG) [karl]: redefine.
22919         * config/srclist.txt: add maintain/standards documents.
22920
22921 2004-02-18  Bruno Haible  <bruno@clisp.org>
22922
22923         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
22924         Reported by Derek Robert Price <derek@ximbiot.com>.
22925
22926 2004-02-16  Karl Berry  <karl@gnu.org>
22927
22928         * config/mkinstalldirs, install-sh: update from automake.
22929
22930 2004-02-06  Karl Berry  <karl@gnu.org>
22931
22932         * m4/po.m4: update from gettext 0.14.1.
22933
22934 2004-02-06  Karl Berry  <karl@gnu.org>
22935
22936         * lib/config.charset: update from gettext 0.14.1.
22937
22938 2004-02-05  Paul Eggert  <eggert@twinsun.com>
22939
22940         Add comments and code, prompted by suggestions from Bruno Haible
22941         for sh-quote.
22942         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
22943         describing the enum quoting_style values.
22944         * lib/quotearg.c (quotearg_alloc): New function.
22945         (quotearg_buffer_restyled): Treat lone { and } as special.
22946         Treat = as special.  Work around bug with older shells
22947         that "see" a '\' that is really the 2nd byte of a multibyte char.
22948         Quote empty string with shell_quoting_style.
22949
22950 2004-02-03  Bruno Haible  <bruno@clisp.org>
22951
22952         * m4/pipe.m4: New file, from GNU gettext.
22953
22954 2004-02-03  Bruno Haible  <bruno@clisp.org>
22955
22956         * lib/pipe.h: New file, from GNU gettext.
22957         * lib/pipe.c: New file, from GNU gettext.
22958
22959 2004-01-27  Bruno Haible  <bruno@clisp.org>
22960
22961         * m4/execute.m4: New file, from GNU gettext.
22962
22963 2004-01-27  Bruno Haible  <bruno@clisp.org>
22964
22965         * lib/execute.h: New file, from GNU gettext.
22966         * lib/execute.c: New file, from GNU gettext.
22967         * lib/w32spawn.h: New file, from GNU gettext.
22968
22969 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22970
22971         Merge from diffutils.
22972
22973         * lib/file-type.c (file_type): Add typed memory objects.
22974         * lib/file-type.h (S_TYPEISTMO): New macro.
22975
22976         * lib/c-stack.h (c_stack_action): Remove argv argument.
22977         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
22978         (die): Don't calculate message unless segv_action returns.
22979         (get_stack_location, min_address_from_argv, max_address_from_argv,
22980         volatile stack_base, volatile_stack_size): Remove.
22981         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
22982         that every segmentation violation is a stack overflow.  (Ouch!)
22983         See Debian bug 136249 (still outstanding) for more info about why
22984         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
22985
22986 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22987
22988         Exit-status fix from coreutils.
22989
22990         Use exit_failure consistently in place of EXIT_FAILURE,
22991         so that program exit statuses are consistent on failure.
22992
22993         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
22994         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
22995         * lib/argmatch.h: Comment fix to match the above.
22996         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
22997         Now a macro referring to exit_failure, instead of a separate
22998         variable.  Include "exitfail.h" to get it.
22999         * lib/xstrtol.h: Include "exitfail.h".
23000         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23001
23002         * lib/long-options.c (parse_long_options): Use prototype
23003         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23004         for clarity.
23005
23006 2004-01-21  Jim Meyering  <jim@meyering.net>
23007
23008         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23009         so as not to conflict with a different-sized __mktime_internal
23010         function in GNU libc.
23011         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23012         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23013
23014 2004-01-20  Karl Berry  <karl@gnu.org>
23015
23016         * config/config.guess: update from config.
23017
23018         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23019
23020 2004-01-20  Bruno Haible  <bruno@clisp.org>
23021
23022         Safer stack allocation.
23023         * lib/setenv.c: Include allocsa.h.
23024         (alloca): Remove fallback definition.
23025         (freea): Remove macro.
23026         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23027         instead of freea.
23028
23029 2004-01-20  Bruno Haible  <bruno@clisp.org>
23030
23031         * m4/eealloc.m4: New file, from GNU gettext.
23032
23033 2004-01-20  Bruno Haible  <bruno@clisp.org>
23034
23035         * m4/allocsa.m4: New file, from GNU gettext.
23036
23037 2004-01-20  Bruno Haible  <bruno@clisp.org>
23038
23039         * lib/xallocsa.h: New file, from GNU gettext.
23040         * lib/xallocsa.c: New file, from GNU gettext.
23041
23042 2004-01-20  Bruno Haible  <bruno@clisp.org>
23043
23044         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23045
23046 2004-01-20  Bruno Haible  <bruno@clisp.org>
23047
23048         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23049         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23050         specially.
23051
23052 2004-01-20  Bruno Haible  <bruno@clisp.org>
23053
23054         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23055         patch.
23056
23057 2004-01-20  Bruno Haible  <bruno@clisp.org>
23058
23059         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23060
23061 2004-01-20  Bruno Haible  <bruno@clisp.org>
23062
23063         * lib/eealloc.h: New file.
23064
23065 2004-01-20  Bruno Haible  <bruno@clisp.org>
23066
23067         * lib/binary-io.h: Avoid warnings on Cygwin.
23068
23069 2004-01-20  Bruno Haible  <bruno@clisp.org>
23070
23071         * lib/allocsa.h: New file, from GNU gettext.
23072         * lib/allocsa.c: New file, from GNU gettext.
23073
23074 2004-01-18  Karl Berry  <karl@gnu.org>
23075
23076         * doc/gpl.texi, doc/lgpl.texi: new files.
23077
23078 2004-01-18  Karl Berry  <karl@gnu.org>
23079
23080         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
23081         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
23082
23083 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23084
23085         Merge from coreutils.
23086
23087         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
23088         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
23089         (gl_DEFAULT_POSIX2_VERSION): Move
23090         the documentation from 'configure' into 'config.hin',
23091         so that 'configure --help' isn't burdened by it and
23092         we don't have to worry about its formatting there.
23093         Reword the documentation so that it's more succinct
23094         and can be run together into a single paragraph.
23095         * m4/same.m4 (gl_SAME): Check for pathconf.
23096
23097 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23098
23099         Merge from coreutils.
23100
23101         * lib/posixver.c: Include posixver.h.
23102
23103         * lib/same.c: Include <stdbool.h>, <limits.h>.
23104         (_POSIX_NAME_MAX): Define if not defined.
23105         (MIN): New macro.
23106         (same_name): If file names are silently truncated, report
23107         that the file names are the same if they are the same after
23108         the silent truncation.
23109
23110         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
23111         conversion function.
23112         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
23113         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
23114         longer needed.
23115
23116 2004-01-15  Jim Meyering  <jim@meyering.net>
23117
23118         Merge from coreutils.
23119
23120         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
23121         if no library is required.
23122         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
23123         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
23124         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
23125         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
23126         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
23127         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
23128         value, $ac_cv_search_crypt, if it's "none required".
23129         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
23130         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
23131         not gl_FUNC_GETLOADAVG.
23132         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
23133         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
23134
23135 2004-01-15  Jim Meyering  <jim@meyering.net>
23136
23137         Merge from coreutils.
23138
23139         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
23140         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
23141         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
23142
23143         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
23144         optional configure-time default.
23145
23146         * lib/version-etc.c (version_etc_copyright): Update copyright date.
23147
23148         * lib/xreadlink.c (xreadlink): Correct outdated comment.
23149
23150 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
23151
23152         Merge from coreutils.
23153
23154         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
23155         value, $ac_cv_search_nanosleep, if it's "none required".
23156
23157 2004-01-14  Paul Eggert  <eggert@twinsun.com>
23158
23159         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
23160         with like-named macro in fnmatch.c.
23161         (EXT): Use an internal constant instead.
23162
23163         Merge fnmatch patches from glibc.
23164         * lib/fnmatch.c (mbsinit): Remove define.
23165         Add libc_hidden_ver (__fnmatch, fnmatch).
23166         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
23167         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
23168
23169 2004-01-14  Karl Berry  <karl@gnu.org>
23170
23171         * config/install-sh: update from automake.
23172
23173 2004-01-13  Karl Berry  <karl@gnu.org>
23174
23175         * config/install-sh: update from automake.
23176
23177 2004-01-09  Karl Berry  <karl@gnu.org>
23178
23179         * config/install-sh: update from automake.
23180
23181 2004-01-05  Karl Berry  <karl@gnu.org>
23182
23183         * config/config.{sub,guess}: update from config.
23184
23185 2003-12-31  Karl Berry  <karl@gnu.org>
23186
23187         * config/depcomp: update from automake.
23188
23189 2003-12-14  Karl Berry  <karl@gnu.org>
23190
23191         * lib/config.charset: update from gettext-runtime.
23192
23193 2003-12-03  Paul Eggert  <eggert@twinsun.com>
23194
23195         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
23196         Bug reported by Alfred M. Szmidt.
23197
23198 2003-12-03  Bruno Haible  <bruno@clisp.org>
23199
23200         * m4/gettext.m4: Upgrade from gettext-0.13.
23201         * m4/po.m4: Upgrade from gettext-0.13.
23202         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
23203         * m4/intmax.m4: New file, from gettext-0.13.
23204         * m4/printf-posix.m4: New file, from gettext-0.13.
23205
23206 2003-11-29  Karl Berry  <karl@gnu.org>
23207
23208         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
23209
23210 2003-11-25  Paul Eggert  <eggert@twinsun.com>
23211             Bruno Haible  <bruno@clisp.org>
23212
23213         * lib/printf-parse.h: Don't include sys/types.h.
23214         (ARG_NONE): New macro.
23215         (char_directive): Change type of *arg_index fields to size_t.
23216         * lib/printf-parse.c: Don't include sys/types.h.
23217         (SSIZE_MAX): Remove macro.
23218         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
23219         Remove unnecessary overflow check.
23220         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
23221         fields.
23222
23223 2003-11-25  Bruno Haible  <bruno@clisp.org>
23224
23225         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
23226
23227 2003-11-25  Bruno Haible  <bruno@clisp.org>
23228
23229         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
23230         gt_TYPE_SSIZE_T.
23231
23232 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23233
23234         * modules/alloca: Remove dependency on xalloc.
23235
23236 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23237
23238         * lib/alloca.c: Remove dependency on xalloc module.
23239         (xalloc_die): Remove.
23240         (memory_full) [!defined emacs]: New macro.
23241         [!defined emacs]: Don't include xalloc.h.
23242         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
23243         address arithmetic overflows.  Change datatypes a bit to avoid
23244         unnecessary casts.
23245
23246 2003-11-22  Jim Meyering  <jim@meyering.net>
23247
23248         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23249         s/size/size_t/.
23250
23251 2003-11-21  Karl Berry  <karl@gnu.org>
23252
23253         * config/config.{sub,guess}: update from config.
23254
23255 2003-11-18  Karl Berry  <karl@gnu.org>
23256
23257         * config/config.{sub,guess}: update from config.
23258
23259         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23260
23261 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23262
23263         * README: Mention that S+T cannot overflow if S is the size of
23264         an existing object and T is sufficiently small.
23265
23266 2003-11-17  Jim Meyering  <jim@meyering.net>
23267
23268         On systems without utime and without a utimes function capable of
23269         dealing with a NULL struct utimbuf* argument, this utime replacement
23270         could -- in unusual circumstances -- leak a file descriptor.
23271         * lib/utime.c: Include <unistd.h> and <errno.h>.
23272         (utime_null): Be sure to close `fd' and to preserve errno.
23273         Reported by Geoff Collyer via Arnold Robbins.
23274
23275 2003-11-17  Bruno Haible  <bruno@clisp.org>
23276
23277         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23278         (Depends-on): Add xsize.
23279
23280 2003-11-17  Bruno Haible  <bruno@clisp.org>
23281
23282         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23283
23284 2003-11-17  Bruno Haible  <bruno@clisp.org>
23285
23286         * lib/vasnprintf.c (alloca): Remove fallback definition.
23287         (freea): Remove definition.
23288         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23289         Reported by Paul Eggert.
23290
23291 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23292             Bruno Haible  <bruno@clisp.org>
23293
23294         Protect against address arithmetic overflow.
23295         * lib/printf-args.h: Include stddef.h.
23296         (arguments): Change type of field 'count' to size_t.
23297         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23298         'unsigned int' where appropriate.
23299         * lib/printf-parse.h: Include sys/types.h.
23300         (char_directive): Change type of *arg_index fields to ssize_t.
23301         (char_directives): Change type of fields 'count', max_*_length to
23302         size_t.
23303         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23304         (SSIZE_MAX): Define fallback value.
23305         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23306         instead of 'int' where appropriate. Check a_allocated, d_allocated
23307         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23308         * lib/vasnprintf.c: Include xsize.h.
23309         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23310         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23311         overflow. Avoid wraparound when converting a width or precision from
23312         decimal to binary.
23313
23314 2003-11-16  Bruno Haible  <bruno@clisp.org>
23315
23316         Update from GNU gettext.
23317         * lib/printf-parse.c: Generalize to it can be compiled for wide
23318         strings.
23319         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23320         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23321         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23322         SNPRINTF): New macros.
23323         Don't include <alloca.h> if the file is used inside libintl.
23324         (local_wcslen): New function, for Solaris 2.5.1.
23325         (VASNPRINTF): Use it instead of wcslen.
23326
23327 2003-11-16  Bruno Haible  <bruno@clisp.org>
23328
23329         * lib/xsize.h (xmax): New function.
23330         (xsum, xsum3, xsum4): Declare as "pure" functions.
23331
23332 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23333
23334         * modules/xalloc (Files): Undo latest change, since xalloc.h
23335         no longer needs SIZE_MAX or PTRDIFF_MAX.
23336
23337 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23338
23339         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23340         gl_PTRDIFF_MAX.
23341
23342 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23343
23344         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23345         "return", to pacify some unknown compiler.  Problem reported
23346         by Joerg Schilling.
23347
23348 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23349
23350         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23351         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23352         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23353         heuristic is just as accurate as far as we know, and it removes a
23354         dependency on size_max.m4 and ptrdiff_max.m4.
23355
23356 2003-11-11  Bruno Haible  <bruno@clisp.org>
23357
23358         * modules/xsize (Files): Add m4/size_max.m4.
23359         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23360
23361 2003-11-11  Bruno Haible  <bruno@clisp.org>
23362
23363         * m4/size_max.m4: New file.
23364         * m4/ptrdiff_max.m4: New file.
23365         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23366         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23367         (gl_XALLOC): Invoke it.
23368
23369 2003-11-11  Bruno Haible  <bruno@clisp.org>
23370
23371         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23372         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23373         defined.
23374
23375 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23376
23377         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23378         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23379         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23380         From Bruno Haible.
23381         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23382         not (size_t) -1, since it's defined here.
23383
23384 2003-11-09  Karl Berry  <karl@gnu.org>
23385
23386         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23387
23388 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23389
23390         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23391         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23392         Reject sizes of exactly SIZE_MAX bytes.
23393         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23394         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23395
23396 2003-11-05  Bruno Haible  <bruno@clisp.org>
23397
23398         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23399         SIZE_MAX defined in <limits.h> on Solaris.
23400
23401 2003-11-04  Jim Meyering  <jim@meyering.net>
23402
23403         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23404         variable names, rather than @VAR@.
23405         * modules/poll: Likewise.
23406
23407 2003-11-04  Bruno Haible  <bruno@clisp.org>
23408
23409         * modules/xsize: New file.
23410         * modules/linebreak: Depend on xsize.
23411         * MODULES.html.sh (func_all_modules): Add xsize.
23412
23413 2003-11-04  Bruno Haible  <bruno@clisp.org>
23414
23415         * m4/xsize.m4: New file.
23416
23417 2003-11-04  Bruno Haible  <bruno@clisp.org>
23418
23419         * lib/xsize.h: New file.
23420         * lib/linebreak.c: Include xsize.h.
23421         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23422         argument for overflow.
23423         Suggested by Paul Eggert.
23424
23425 2003-11-03  Karl Berry  <karl@gnu.org>
23426
23427         * config/config.{guess,sub}: update from config.
23428
23429 2003-11-03  Jim Meyering  <jim@meyering.net>
23430
23431         * modules/userspec (lib_SOURCES): Add userspec.h.
23432         (Include): Add "userspec.h".
23433         Improve description.
23434
23435 2003-11-03  Jim Meyering  <jim@meyering.net>
23436
23437         * lib/userspec.c: Include "userspec.h".
23438         * lib/userspec.h: New file.
23439
23440 2003-11-03  Bruno Haible  <bruno@clisp.org>
23441
23442         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23443
23444 2003-11-03  Bruno Haible  <bruno@clisp.org>
23445
23446         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23447         available, to avoid (extremely rare) race condition.
23448         Suggested by Paul Eggert.
23449
23450 2003-11-02  Karl Berry  <karl@gnu.org>
23451
23452         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23453
23454 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23455
23456         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23457         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23458         (read_filesystem_list): Set and use me_type_malloced.
23459         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23460         whatever the type happens to be), for brevity and consistency.
23461         Check for size calculation overflow on Alphas running OSF/1.
23462
23463 2003-10-31  Jim Meyering  <jim@meyering.net>
23464
23465         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23466
23467         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23468
23469 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23470             Bruno Haible  <bruno@clisp.org>
23471
23472         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23473         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23474
23475 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23476
23477         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23478         netbsd*-gnu*.  Suggested by Robert Millan.
23479
23480 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23481
23482         * modules/group-member: Depend on stdbool.
23483
23484 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23485
23486         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23487
23488 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23489
23490         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23491         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23492         after the 'gnu' in these cases.  This fixes some bugs in the
23493         previous change, and is based on suggestions by Robert Millan.
23494
23495 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23496
23497         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23498         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23499         no longer needed.
23500         * lib/quotearg.c (quotearg_n_options): Use it.
23501         * lib/group-member.c: Include <stdbool.h>.
23502         (free_group_info): Arg is now const *; don't free arg.
23503         (get_group_info): Now returns bool and accepts struct group_info *,
23504         rather than returning a malloc'ed struct group_info *.
23505         All uses changed.  Check for overflow in internal size calculation.
23506
23507         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23508         rather than xmalloc/xrealloc.
23509         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23510         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23511         conformance bug: the old code used a pointer after freeing the
23512         storage that it addressed.
23513         * lib/hash.c (hash_initialize): Simplify the code by using
23514         xalloc_oversized rather than doing it by hand.
23515         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23516         the buffer preserved.  Use free and xmalloc instead.
23517         * lib/quotearg.c (quotearg_n_options): Likewise.
23518         Use a simpler test for size overflow.  Don't use xalloc_oversized
23519         because unsigned int might be wider than size_t (!); this suggests
23520         that we should switch from unsigned int to size_t for slot numbers.
23521
23522 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23523
23524         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23525         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23526         NetBSD kernels.  Requested by Richard Stallman.
23527
23528 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23529
23530         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23531         to allocate the returned structure.  Do not allocate a subarray,
23532         as x2nrealloc will do that.
23533         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
23534         instead of xnrealloc.
23535         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
23536
23537 2003-10-27  Bruno Haible  <bruno@clisp.org>
23538
23539         * lib/stdbool_.h: Better support for BeOS.
23540
23541 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23542
23543         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
23544         now uses inline.
23545
23546 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23547
23548         * lib/xalloc.h (xalloc_oversized): New static inline function, for
23549         callers that want to do their own size-overflow checking.  Include
23550         <stdbool.h>, since xalloc_oversized returns bool.
23551         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
23552         to use xalloc_oversized.
23553
23554         Add two functions x2realloc, x2nrealloc, for programs that grow
23555         arrays dynamically by doubling their sizes.
23556         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
23557         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
23558         New functions.
23559
23560         Port to C99 semantics for 'inline' of external functions.
23561         Bug reported by Bruno Haible.
23562         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
23563         with the old contents of xnmalloc.
23564         (xnmalloc, xmalloc): Use it.
23565         (xnrealloc_inline): New static inline function,
23566         with the old contents of xnrealloc.
23567         (xnrealloc, xrealloc): Use it.
23568
23569         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
23570         that.
23571
23572 2003-10-26  Karl Berry  <karl@gnu.org>
23573
23574         * config/srclist.txt (COPYING.DOC): no longer available from
23575         /gd/gnuorg; don't know where the ultimate source is.
23576
23577 2003-10-25  Paul Eggert  <eggert@twinsun.com>
23578
23579         Fix several address-calculation bugs in the hash modules,
23580         plus some minor code cleanup.
23581
23582         * lib/hash.h: Include <stdbool.h>, for bool.
23583         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
23584         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
23585         hash_get_n_entries, hash_get_max_bucket_length,
23586         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
23587         hash_rehash): Use size_t rather than unsigned.
23588         * lib/hash.c (struct hash_table, hash_get_n_buckets,
23589         hash_get_n_buckets_used, hash_get_n_entries,
23590         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
23591         hash_get_entries, hash_do_for_each, hash_string, is_prime,
23592         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
23593         Likewise.
23594         (SIZE_MAX): Define if not defined.
23595         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
23596         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
23597         hash_print):
23598         Use const * when possible.
23599         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
23600         (check_tuning): Fix bug: if tuning parameters were very close to
23601         0 or 1, rounding errors could have caused subscript violations.
23602         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
23603         (hash_initialize): Add 'fail:' label
23604         to free table and return NULL, and use it to simplify code.
23605         Use calloc rather than clearing the storage ourself.
23606         (hash_initialize, hash_rehash): Check for arithmetic overflow in
23607         buffer size calculations.
23608         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
23609         Include <stddef.h>, for size_t.
23610         * lib/hash-pjw.c (hash_pjw): Likewise.
23611         Switch to method described by Bruno Haible.
23612         Include <limits.h>, for CHAR_BIT.
23613         (SIZE_BITS): New macro.
23614
23615 2003-10-23  Paul Eggert  <eggert@twinsun.com>
23616
23617         * m4/getline.m4 (AM_FUNC_GETLINE):
23618         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
23619         hosts.  Problem reported by Derek Robert Price in
23620         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
23621         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
23622         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
23623
23624 2003-10-21  Paul Eggert  <eggert@twinsun.com>
23625
23626         * lib/getndelim2.c (getndelim2): When size calculation overflows,
23627         ceiling the allocation at NMAX bytes rather than silently
23628         discarding input bytes before NMAX is reached.  This makes
23629         a difference only if NMAX exceeds SIZE_MAX / 2.
23630
23631         * lib/obstack.c: Merge from glibc.
23632         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
23633         Add libc_hidden_def (_obstack_newchunk).
23634         (_obstack_free) [! defined _LIBC]: Remove.
23635         [defined _LIBC]: Make a strong alias from obstack_free, rather than
23636         a clone of the function body.
23637         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
23638         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
23639
23640         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
23641         glibc.
23642         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
23643         arg to memcpy.
23644
23645         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
23646         (obstack_ptr_grow_fast, obstack_int_grow_fast):
23647         Don't use lvalue casts, as GCC plans to remove support for them
23648         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
23649         was also present in the non-GCC version, indicating that this
23650         code had always been buggy and had never been widely used.
23651         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
23652         Use the fast variant of each macro, rather than copying the
23653         definiens of the fast variant; that way, we'll be more likely to
23654         catch future bugs in the fast variants.
23655
23656 2003-10-20  Bruno Haible  <bruno@clisp.org>
23657
23658         * modules/wait-process: New file.
23659         * MODULES.html.sh (func_all_modules): Add wait-process.
23660
23661 2003-10-20  Bruno Haible  <bruno@clisp.org>
23662
23663         * m4/wait-process.m4: New file.
23664
23665 2003-10-20  Bruno Haible  <bruno@clisp.org>
23666
23667         * lib/wait-process.h: New file, from GNU gettext.
23668         * lib/wait-process.c: New file, from GNU gettext.
23669
23670 2003-10-19  Jim Meyering  <jim@meyering.net>
23671
23672         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
23673         HPUX 10.20.
23674
23675 2003-10-18  Karl Berry  <karl@gnu.org>
23676
23677         * config/config.guess: update from config.
23678
23679 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23680
23681         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
23682         (getgroups): First arg is int, not size_t.
23683         Don't let 'free' mangle errno.
23684
23685 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23686
23687         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
23688
23689 2003-10-16  Karl Berry  <karl@gnu.org>
23690
23691         * config/config.{guess,sub}: update from config.
23692
23693 2003-10-16  Jim Meyering  <jim@meyering.net>
23694
23695         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
23696         memcpy.
23697
23698 2003-10-15  Paul Eggert  <eggert@twinsun.com>
23699
23700         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
23701         (SIZE_MAX): Remove.
23702         (new_exclude, add_exclude_file): Initial size no longer needs to
23703         be a power of 2.
23704         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
23705         our own address arithmetic overflow checking.
23706
23707         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
23708         (fnmatch): Do not alloca more than 2000 wide characters;
23709         instead, use malloc for large buffers.
23710         Check for address arithmetic overflow, and return -1
23711         with errno set to ENOMEM in that case.
23712         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
23713         (NEW_PATTERN): Do not alloca more than 8000 bytes;
23714         instead, return -1.  Check for address arithmetic overflow.
23715
23716 2003-10-14  Paul Eggert  <eggert@twinsun.com>
23717
23718         Handle invalid suffixes and overflow independently, so that
23719         callers can treat them independently as needed.  Fix some bugs in
23720         suffix handling, e.g., "100k@" was not diagnosed as an invalid
23721         suffix for a human-readable blocksize.  The major caller-visible
23722         change is the addition of a new
23723         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
23724         that both overflow and suffix chars were found.
23725
23726         * lib/human.c (humblock): Don't check separately for invalid suffix
23727         char; that is xstrtoumax's job (now that its bug is fixed).
23728         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
23729         INTMAX_MAX]: New macros.
23730         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
23731         TYPE_MAXIMUM): New macros.
23732         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
23733         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
23734         if overflow occurs, as it's what __strtol does and it's more useful
23735         in practice.
23736         (__xstrtol): If __strtol reports some error other than ERANGE,
23737         reflect it to the caller as LONGINT_INVALID.  If it reports
23738         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
23739         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
23740         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
23741         value.
23742         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
23743         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
23744         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
23745         [defined UINTMAX_MAX]: New macros.
23746
23747 2003-10-14  Bruno Haible  <bruno@clisp.org>
23748
23749         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
23750
23751 2003-10-14  Bruno Haible  <bruno@clisp.org>
23752
23753         * m4/sig_atomic_t: New file, from GNU gettext.
23754         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
23755
23756 2003-10-14  Bruno Haible  <bruno@clisp.org>
23757
23758         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
23759         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
23760         Also use volatile where needed.
23761
23762 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23763
23764         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
23765         Change maintainer from Bruno Haible to 'all'.
23766
23767 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23768
23769         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
23770
23771 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23772
23773         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
23774         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
23775         and define in terms of the other primitives.
23776         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
23777         (SIZE_MAX): Define if not already defined.
23778         (array_size_overflow): New function.
23779         (xalloc_die): Abort instead of exiting if 'error' returns.
23780         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
23781         (xmalloc, xrealloc): Use them.
23782         (xcalloc): Check for address arithmetic overflow.
23783         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
23784         a bit faster than strcpy.
23785
23786 2003-10-10  Simon Josefsson  <jas@extundo.com>
23787
23788         * modules/argp (Depends-on): Add restrict and strcase.
23789
23790 2003-10-10  Simon Josefsson  <jas@extundo.com>
23791
23792         * m4/argp.m4: Add AC_C_INLINE.
23793
23794 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23795
23796         Merge getpass from libc, plus a few fixes.
23797
23798         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
23799         Include <stdbool.h>.
23800         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
23801         __fsetlocking to empty.
23802         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
23803         do include <bits/libc-lock.h>.
23804         Do not include <fcntl.h>; not needed.
23805         [_LIBC]: Include <wchar.h>.
23806         (NOTCANCEL_MODE): New macro.
23807         (flockfile, funlockfile) [_LIBC]: New macros.
23808         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
23809         [!_LIBC]: New macros.
23810         (call_fclose): New function.
23811         (getpass): Use it.  Save tty stream separately; this simplifies the
23812         code and makes it more reliable if stdin happens to equal stdout.
23813         Invoke __fsetlocking on tty.
23814         Handle thread cancellation if needed.
23815         Namespace cleanup (use __tcgetattr, __getline).
23816         Use bool for Booleans.
23817         [USE_IN_LIBIO]: Handle wide streams.
23818         [!_LIBC]: Unconditionally do the fseek, since we don't know what
23819         stream might go where.
23820
23821         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
23822         doesn't have to include <stdio.h> before us.
23823         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
23824         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
23825         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
23826         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
23827         if not declared, so that we can use getpass.c code from libc without
23828         rewriting it.
23829         (flockfile, ftrylockfile, funlockfile): New macros.
23830
23831 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23832
23833         * modules/getpass: Depend on stdbool.
23834
23835 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23836
23837         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
23838
23839 2003-10-07  Karl Berry  <karl@gnu.org>
23840
23841         * config/config.{guess,sub}: update from config.
23842
23843 2003-10-06  Jim Meyering  <jim@meyering.net>
23844             Bruno Haible  <bruno@clisp.org>
23845
23846         This lets translators provide better translations for the
23847         "Written by ..." part of --version output.
23848         * lib/version-etc.h: Include stdarg.h.
23849         (version_etc_copyright): Declare as readonly.
23850         (version_etc): Make this function variadic with a NULL-terminated list
23851         of author name strings.
23852         (version_etc_va): New declaration.
23853         * lib/version-etc.c: Include stdarg.h, stdlib.h.
23854         (version_etc_copyright): Declare as readonly.
23855         (version_etc_va): New function. Provide a different translatable string
23856         for each possible number of authors < 10. Abbreviate when there are 10
23857         authors or more.
23858         (version_etc): Make this function variadic. Call version_etc_va.
23859         Suggestion from Gary V. Vaughan.
23860
23861         * lib/long-options.h (parse_long_options): Change prototype: the
23862         authors string is moved to the end and becomes variadic.
23863         * lib/long-options.c: Include stdarg.h.
23864         (parse_long_options): Make this function variadic, too.
23865         Call version_etc_va, not version_etc.
23866
23867 2003-10-06  Bruno Haible  <bruno@clisp.org>
23868
23869         * modules/version-etc-2: Remove file.
23870         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
23871
23872 2003-10-06  Bruno Haible  <bruno@clisp.org>
23873
23874         * modules/fatal-signal: New file.
23875         * MODULES.html.sh (func_all_modules): Add fatal-signal.
23876
23877 2003-10-06  Bruno Haible  <bruno@clisp.org>
23878
23879         * m4/fatal-signal.m4: New file.
23880         * m4/signalblocking.m4: New file, from GNU gettext.
23881
23882 2003-10-06  Bruno Haible  <bruno@clisp.org>
23883
23884         * lib/version-etc-2.h: Remove file.
23885         * lib/version-etc-2.c: Remove file.
23886
23887 2003-10-06  Bruno Haible  <bruno@clisp.org>
23888
23889         * lib/fatal-signal.h: New file, from GNU gettext.
23890         * lib/fatal-signal.c: New file, from GNU gettext.
23891
23892 2003-10-05  Paul Eggert  <eggert@twinsun.com>
23893
23894         * README: Rework advice for preventing empty .o files.
23895         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
23896         not <sys/types.h>.
23897
23898 2003-10-04  Karl Berry  <karl@gnu.org>
23899
23900         * lib/argp*: update from libc.
23901
23902 2003-10-04  Karl Berry  <karl@gnu.org>
23903
23904         * config/config.{guess,sub}: update from config.
23905
23906 2003-10-02  Bruno Haible  <bruno@clisp.org>
23907
23908         * modules/lchown (Include): Add lchown.h.
23909         * modules/time_r (Include): Use "..." syntax.
23910         * modules/xgetdomainname (Include): Add xgetdomainname.h.
23911
23912 2003-10-01  Simon Josefsson  <jas@extundo.com>
23913
23914         * MODULES.html.sh (func_all_modules): Move gethostname from section
23915         'based on' to section 'lacking' POSIX:2001.
23916
23917 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
23918
23919         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
23920         to output mode on the same stream.
23921
23922 2003-09-29  Paul Eggert  <eggert@twinsun.com>
23923
23924         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
23925         Fix arg typo in previous patch.
23926
23927 2003-09-28  Jim Meyering  <jim@meyering.net>
23928
23929         * lib/error.c: Correct cpp indentation.
23930
23931 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23932
23933         * modules/free: New file.
23934
23935 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23936
23937         * m4/free.m4: New file.
23938
23939 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23940
23941         * lib/minmax.h (MIN, MAX)
23942         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
23943         Omit the special code that used __typeof__, since we worry that
23944         it could be more trouble than it's worth.  See:
23945         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
23946         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
23947
23948         * lib/free.c: New file.
23949
23950 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
23951
23952         Trivial fixes to Makefile.am parts of module listings.
23953         * modules/strstr: Append strstr.h to lib_SOURCES.
23954         * modules/strcase: Likewise, for strcase.h.
23955
23956 2003-09-27  Karl Berry  <karl@gnu.org>
23957
23958         * config/mkinstalldirs: update from automake.
23959
23960 2003-09-26  Paul Eggert  <eggert@twinsun.com>
23961
23962         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
23963         (error_tail): Do not loop, reallocating temporary buffer, since
23964         the output cannot contain more wide characters than the input
23965         contains bytes, the size must be big enough already.  This avoids
23966         one potential size overflow calculation.  Check for size overflow
23967         when calculating temporary buffer size.  Free temporary buffer
23968         when done, if it was allocated with malloc; this plugs a memory
23969         leak.  Remove casts from void * to pointers, that are no longer
23970         needed now that we're assuming C89 or better.
23971
23972         Merge error changes from glibc.
23973
23974         * lib/error.c, error.h: Update copyright notice header to match glibc.
23975         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
23976         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
23977         Disable cancellation while printing error.
23978         * lib/error.h: Prepend __ to parameter names.
23979
23980 2003-09-26  Jim Meyering  <jim@meyering.net>
23981
23982         * lib/error.c (error_tail): Move some declarations
23983         into inner scope where the local variables are used.
23984
23985 2003-09-26  Bruno Haible  <bruno@clisp.org>
23986
23987         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
23988         stpncpy().
23989         Don't define stpncpy through config.h; it's now done through stpncpy.h.
23990
23991 2003-09-26  Bruno Haible  <bruno@clisp.org>
23992
23993         * lib/stpncpy.h (gnu_stpncpy): New declaration.
23994         (stpncpy): Define as alias for gnu_stpncpy.
23995         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
23996
23997 2003-09-25  Simon Josefsson  <jas@extundo.com>
23998
23999         * lib/xgetdomainname.h: New file.
24000         * lib/xgetdomainname.c: New file.
24001
24002 2003-09-25  Simon Josefsson  <jas@extundo.com>
24003             Bruno Haible  <bruno@clisp.org>
24004
24005         * modules/getdomainname: New file.
24006         * modules/xgetdomainname: New file.
24007         * MODULES.html.sh (func_all_modules): Add getdomainname,
24008         xgetdomainname.
24009
24010 2003-09-25  Simon Josefsson  <jas@extundo.com>
24011             Bruno Haible  <bruno@clisp.org>
24012
24013         * m4/getdomainname.m4: New file.
24014
24015 2003-09-25  Simon Josefsson  <jas@extundo.com>
24016             Bruno Haible  <bruno@clisp.org>
24017
24018         * lib/getdomainname.h: New file.
24019         * lib/getdomainname.c: New file.
24020
24021 2003-09-25  Karl Berry  <karl@gnu.org>
24022
24023         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24024
24025 2003-09-25  Karl Berry  <karl@gnu.org>
24026
24027         * config/install-sh: update from automake.
24028
24029 2003-09-25  Bruno Haible  <bruno@clisp.org>
24030
24031         * modules/version-etc-2: New file, from modules/version-etc with
24032         modifications.
24033         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24034
24035 2003-09-25  Bruno Haible  <bruno@clisp.org>
24036
24037         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24038         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24039
24040 2003-09-24  Simon Josefsson  <jas@extundo.com>
24041
24042         * modules/xgethostname: Add xgethostname.h.
24043
24044 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24045
24046         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24047         the buffer associated with the argument.  Bug reported by
24048         Simon Josefsson.
24049
24050 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24051
24052         * README: Document assumptions that 'int' is at least 32 bits
24053         wide, that integer arithmetic is 2's complement without overflow,
24054         that there are no holes in integer values, that adding sizes of
24055         two nonoverlapping objects can't overflow, and that all-bits-zero
24056         yields scalar zero.  Fix spelling and capitalization typos.
24057
24058 2003-09-19  Karl Berry  <karl@gnu.org>
24059
24060         * lib/argp.h: update from libc.
24061
24062 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24063
24064         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24065         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24066         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24067
24068 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24069
24070         * gnulib-tool: Use "test -h", not "test -L", for portability
24071         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
24072         (tags_regexp): Remove, since \| doesn't conform to POSIX.
24073         (sed_extract_prog): Issue s commands one-by-one, rather than
24074         using \| in one s command.
24075
24076 2003-09-16  Paul Eggert  <eggert@twinsun.com>
24077
24078         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
24079         input error, instead of returning NULL the next time we are called
24080         (and therefore losing track of errno).
24081
24082 2003-09-16  Bruno Haible  <bruno@clisp.org>
24083
24084         * gnulib-tool (func_create_testdir): Warn about duplicated
24085         dependencies.
24086
24087 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24088
24089         * modules/argmatch, modules/fatal, modules/obstack,
24090         modules/xalloc, modules/xgethostname: Sort dependencies by
24091         importance, not alphabetically.
24092
24093 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24094
24095         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
24096         fails, so that the caller gets the proper errno.
24097
24098         * lib/readutmp.c (read_utmp): Likewise.
24099         Check for fstat error.  Close stream and free storage
24100         when failing.
24101
24102 2003-09-14  Karl Berry  <karl@gnu.org>
24103
24104         * config/srclist.txt (strdup.c): disable for c89 changes.
24105
24106 2003-09-14  Jim Meyering  <jim@meyering.net>
24107
24108         * lib/getloadavg.c: Correct cpp indentation.
24109         * lib/strdup.c: Likewise.
24110         * lib/vasnprintf.c: Likewise.
24111
24112 2003-09-14  Bruno Haible  <bruno@clisp.org>
24113
24114         * modules/fwriteerror: New file.
24115         * MODULES.html.sh (func_all_modules): Add fwriteerror.
24116
24117 2003-09-14  Bruno Haible  <bruno@clisp.org>
24118
24119         * lib/fwriteerror.h: New file.
24120         * lib/fwriteerror.c: New file.
24121
24122 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24123
24124         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
24125         modules/xgethostname, modules/xalloc: Depend on exit.
24126
24127 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24128
24129         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
24130
24131         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
24132         and AC_MINIX, too, so that their extensions are available.
24133
24134         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
24135         This macro has been superseded by gl_BACKUPFILE.
24136
24137         More patches to assume C89 or better.
24138
24139         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
24140
24141         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
24142         unconditionally.
24143         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
24144         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
24145         Include <string.h>, <stdlib.h> unconditionally.
24146         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
24147         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
24148         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
24149         headers or for string.h.
24150         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
24151         or strtoul.
24152
24153         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
24154         headers.
24155         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
24156         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24157         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
24158         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
24159         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24160         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
24161         memcpy, memset.
24162         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
24163         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
24164         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
24165         strtol.
24166         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
24167         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
24168         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
24169         strtoul.
24170
24171 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24172
24173         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
24174         * lib/obstack.c [!defined _LIBC]: Likewise.
24175         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
24176         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
24177         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
24178
24179         More changes to assume C89 or better.
24180
24181         * lib/error.c (error_tail): Assume vprintf.
24182
24183         * lib/argmatch.c (getenv): Remove decl.
24184         * lib/progreloc.c (get_full_program_name): Define via prototype.
24185         * lib/setenv.c (clearenv): Likewise.
24186         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
24187         needed.
24188         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
24189         (malloc, memcpy): Remove decls.
24190         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
24191         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
24192         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24193         (memcpy): Remove macro.
24194         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
24195         (__P): Remove.  All uses removed.
24196         (PTR): Remove.  All uses changed to void *.
24197         (CHAR_BIT, NULL): Remove.
24198         (spaces, zeros, memset_space, memset_zero)
24199         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
24200         Remove.
24201         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
24202         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
24203         Define with prototype.
24204         Remove now-unnecessary prototype decl.
24205         (extra_args_spec): Assume ANSI C.  All uses changed.
24206         (extra_args_spec_iso): Remove.
24207         (my_strftime, emacs_strftimeu): Define via prototype.
24208         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
24209         unconditionally.
24210         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
24211         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
24212         (strtoul, strtol): Remove decls.
24213         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
24214         LONG_MAX): Remove.
24215         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24216         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
24217         (LOCALE_PARAM_PROTO): New macro.
24218         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
24219         (INTERNAL (strtol), strtol): Define with a prototype.
24220         (PARAMS): Remove.  All uses removed.
24221         * lib/tempname.c: Include <string.h> unconditionally.
24222         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
24223         * lib/xgethostname.c (main): Define with a prototype.
24224         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
24225         Include <stdlib.h> unconditionally.
24226         (calloc, malloc, realloc, free): Remove decls.
24227         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
24228         Include <stdlib.h> unconditionally.  Sort include file names.
24229         (strtod): Remove.
24230         (xstrtod): Define with a prototype.
24231         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
24232         (strtol, strtoul): Remove decls.
24233
24234 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24235
24236         More patches to assume C89 or better.
24237         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
24238         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
24239         string.h, memchr, STDC_HEADERS.
24240
24241 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24242
24243         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
24244         Include <stdlib.h>, <string.h> unconditionally.
24245         Remove now-unnecessary cast to char *.
24246         * lib/strnlen.c: Include <string.h> unconditionally.
24247         * lib/yesno.c (yesno): Define with a prototype.
24248
24249 2003-09-11  Bruno Haible  <bruno@clisp.org>
24250
24251         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24252
24253 2003-09-10  Jim Meyering  <jim@meyering.net>
24254
24255         * lib/error.c: Correct indentation of cpp directives.
24256
24257 2003-09-10  Bruno Haible  <bruno@clisp.org>
24258
24259         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24260         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24261         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24262         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24263         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24264         <stdlib.h> and <string.h> checks.
24265         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24266         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24267
24268 2003-09-10  Bruno Haible  <bruno@clisp.org>
24269
24270         * lib/strcspn.c: Include <string.h> unconditionally.
24271         * lib/strpbrk.c: Include <string.h> unconditionally.
24272         * lib/strstr.c: Include <string.h> unconditionally.
24273         * lib/unicodeio.c: Include <string.h> unconditionally.
24274         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24275         * lib/unsetenv.c: Likewise.
24276         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24277         * lib/yesno.c: Include <stdlib.h> unconditionally.
24278         (rpmatch): Add prototype.
24279
24280 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24281
24282         More patches to assume C89 or better.
24283         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24284         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24285         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24286         or for string.h.
24287         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24288         stdlib.h.
24289         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24290         C headers.
24291         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24292         string.h.
24293         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24294         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24295         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24296         or for string.h.
24297         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24298         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24299         C headers.
24300         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24301         memcpy.
24302         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24303         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24304         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24305         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24306         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24307         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24308         string.h, free.
24309         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24310         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24311         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24312         C headers, or for string.h.
24313         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24314         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24315         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24316         headers, memory.h, stdlib.h, string.h, strings.h.
24317         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24318         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24319         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24320         strchr.
24321         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24322         headers, memory.h, string.h.
24323         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24324         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24325         free.
24326         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24327         headers.
24328         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24329         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24330         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24331         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24332         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24333
24334 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24335
24336         More K&R removal.
24337
24338         * lib/acosl.c (main): Use a prototype.
24339         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24340         tanl.c: Likewise.
24341
24342         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24343
24344         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24345         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24346         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24347         with a prototype.
24348         * lib/getopt.c (const): Remove macro.
24349         Include <string.h> unconditionally.
24350         (my_index): Remove; all uses changed to strchr.
24351         (strlen): Remove decl.
24352         (exchange): Remove forward decl; no longer needed.
24353         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24354         Define with prototype.
24355         * lib/getopt1.c (const): Remove macro.
24356         (getopt_long, getopt_long_only, main): Define with prototype.
24357
24358         * lib/getugroups.c: Include <string.h> unconditionally.
24359
24360         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24361         (getusershell, setusershell, endusershell, readname, main):
24362         Define with prototypes.
24363
24364         * lib/group-member.c: Include group-member.h first.
24365         Include <stdlib.h> unconditionally.
24366
24367         * lib/hard-locale.c: Include hard-locale.h first.
24368         Include <stdlib.h>, <string.h> unconditionally.
24369
24370         * lib/hash.c (free, malloc): Remove decls.
24371         Include <stdlib.h> unconditionally.
24372
24373         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24374         (getenv): Do not declare.
24375
24376         * lib/idcache.c: Include <string.h> unconditionally.
24377
24378         * lib/long-options.c: Include long-options.h first, to test interface.
24379         Include <stdlib.h> unconditionally.
24380
24381         * lib/makepath.c: Include makepath.h first, to test interface.
24382         Include <stdlib.h> and <string.h> unconditionally.
24383
24384         * lib/linebuffer.c: Include <stdlib.h>.
24385         (free): Remove decl.
24386
24387         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24388         stddef.h. rpl_malloc returns void *, not char *.
24389         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24390         prototype.
24391
24392         * lib/md5.h: Include <limits.h> unconditionally.
24393         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24394         (__P): Remove; all uses removed.
24395         * lib/md5.c: Include "md5.h" first.
24396         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24397         md5_buffer, md5_process_bytes, md5_process_block):
24398         Define with prototypes.
24399         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24400         * lib/sha.c: Include "sha.h" first.
24401         Include <stdlib.h>, <string.h> unconditionally.
24402
24403         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24404         * lib/memcmp.c (__ptr_t): Likewise.
24405         * lib/memrchr.c (__ptr_t): Likewise.
24406         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24407         Include <string.h> unconditionally.
24408         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24409         * lib/memchr.c: Include <stdlib.h> unconditionally.
24410         * lib/memchr.c (LONG_MAX): Remove.
24411         * lib/memrchr.c (LONG_MAX): Likewise.
24412         * lib/memchr.c (__memchr): Define via a prototype.
24413         * lib/memrchr.c (__memrchr): Likewise.
24414         * lib/memcmp.c (__P): Remove, and remove all uses.
24415         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24416         Remove forward decls; no longer needed.
24417         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24418         Use types required by C89 in prototype.
24419
24420         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24421         * lib/savedir.c: Likewise.
24422         * lib/mkdir.c (free): Remove decl.
24423         * lib/rmdir.c (rmdir): Define with a prototype.
24424         * lib/savedir.c: Include savedir.h first, to test interface.
24425
24426         * lib/mktime.c (STDC_HEADERS): Remove.
24427         Include <stdlib.h>, <string.h> unconditionally.
24428
24429         * lib/modechange.c: Include <stdlib.h> unconditionally.
24430         (malloc): Remove decl.
24431
24432         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24433         (free): Remove decl.
24434
24435         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24436         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24437         (This type really should be intptr_t, but that's a C99ism.)
24438         (_obstack_memcpy): Remove: all uses changed to memcpy.
24439         Include <string.h> unconditionally.
24440         (struct obstack): Assume __STDC__ for types of members
24441         chunkfun, freefun, extra_arg.
24442         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24443         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24444         obstack_begin, obstack_specify_allocation,
24445         obstack_specify_allocation_with_arg, obstack_chunkfun,
24446         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24447         Remove unprototyped decls and the macros that use them.
24448         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24449         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24450         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24451         (defined __STDC__ && __STDC__)]:
24452         Remove nonprototyped code.
24453         Include <stdlib.h> unconditionally.
24454         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24455         _obstack_allocated_p, _obstack_free, obstack_free,
24456         _obstack_memory_used, print_and_abort):
24457         Define using prototypes.
24458         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24459         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24460         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24461         obstack_next_free, obstack_object_size, obstack_room) [0]:
24462         Remove unused, unprototyped code.
24463
24464         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24465
24466         * lib/physmem.c (physmem_total, physmem_available, main): Define
24467         with prototypes.
24468
24469         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24470         (main): Define with a prototype.
24471
24472         * lib/posixver.c (getenv): Remove decl.
24473
24474         * lib/putenv.c (malloc): Returns void *, not char *.
24475         Include <string.h> unconditionally.
24476         (strchr, memcpy, NULL): Do not define.
24477
24478         * lib/readtokens.c: Include readtokens.h first, to test interface.
24479         Include <stdlib.h>, <string.h> unconditionally.
24480         (init_tokenbuffer): Define with a prototype.
24481
24482         * lib/regex.c (PARAMS): Remove.  All uses removed.
24483         All uses of _RE_ARGS removed, too.
24484         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24485         unconditionally.
24486         (bzero): Assume memset exists.
24487         (memcmp, memcpy, NULL): Remove.
24488         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24489         char, or assignments to local vars of type signed char.
24490         (init_syntax_once, PREFIX(extract_number_and_incr),
24491         PREFIX(print_partial_compiled_pattern),
24492         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24493         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24494         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24495         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24496         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24497         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24498         wcs_compile_range, byte_compile_range, truncate_wchar,
24499         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24500         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24501         count_mbs_length, wcs_re_match_2_internal,
24502         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24503         PREFIX(alt_match_null_string_p),
24504         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24505         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24506         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24507         now-unnecessary declaration, if any.
24508         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24509         regcomp, regexec):
24510         Remove now-unnecessary casts among pointer types.
24511         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24512
24513         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24514         (free): Remove decl.
24515
24516         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24517
24518         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24519         (free): Remove decl.
24520
24521         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24522         * lib/xgetcwd.c: Likewise.
24523
24524         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24525         (free): Remove decl.
24526
24527         * lib/strchrnul.c (strchrnul): Define with a prototype.
24528         Fix bug: c_in was not converted to char before searching.
24529
24530         The following changes are not K&R related:
24531
24532         * lib/group-member.h: Include <sys/types.h>, so that this file is
24533         self-contained.
24534         * lib/makepath.h: Likewise.
24535
24536         * lib/getusershell.c (readname, default_index, line_size, readname):
24537         Use size_t, not int, for sizes.
24538         (readname): If the size overflows, report an error instead of
24539         looping forever.
24540
24541 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24542
24543         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
24544         libc.
24545
24546 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24547
24548         * README: New section: portability guidelines.
24549
24550 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24551
24552         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
24553         C89 spec.
24554
24555 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24556
24557         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
24558
24559 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24560
24561         Assume C89 or better; remove K&R cruft.
24562         A few of these changes were first proposed by Derek Robert Price
24563         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
24564
24565         * lib/addext.c: Include <string.h> unconditionally.
24566         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
24567         Don't declare getenv or malloc.
24568
24569         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
24570         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
24571         (NULL): Remove.
24572         (find_stack_direction, alloca): Use prototypes.
24573
24574         * lib/atexit.c (atexit): Define using a prototype.
24575
24576         * lib/basename.c, dirname.c, stripslash.c:
24577         Include <string.h> unconditionally.
24578
24579         * lib/bcopy.c: Include <stddef.h>.
24580         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
24581
24582         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
24583
24584         * lib/error.h (error, error_at_line, error_print_progname)
24585         [! (defined (__STDC__) && __STDC__)]: Remove decls.
24586         * lib/error.c: Include error.h first, to check interface.
24587         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24588         (VA_START): Remove; all uses changeed to va_start.
24589         (exit, strerror): Remove decls.
24590         (error_print_progname): Prototype uncondionally.
24591         Don't include <errno.h>; no longer needed.
24592         (private_strerror): Remove.
24593         (error_tail): Always define.
24594         (error, error_at_line): Assume C89 or better; always use prototypes.
24595         * lib/fatal.c: Include "fatal.h" first, to test interface.
24596         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24597         (VA_START): Remove; all uses changed to va_start.
24598         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
24599         this case.
24600         (exit): Remove decl.
24601         (fatal): Prototype unconditionally.  Assume va_start works.
24602         Abort at end, to pacify gcc.
24603
24604         * lib/euidaccess.c (main): Define with a prototype.
24605
24606         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
24607
24608         * lib/exitfail.c: Include <stdlib.h> unconditionally.
24609
24610         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
24611         prototypes.
24612         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
24613         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
24614         (getenv): Remove decl.
24615         (fnmatch): Define using a prototype.
24616         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
24617         (FCT): Define using a prototype.
24618
24619         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
24620
24621         * lib/gethostname.c: Include <stddef.h>.
24622         (gethostname): Define with prototype.  Length is size_t, not int.
24623
24624 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24625
24626         Assume C89 or better; remove K&R cruft.
24627         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
24628         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
24629         string.h, getenv, malloc.
24630         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
24631         headers.
24632         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
24633         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
24634         do not check for strerror.
24635         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
24636         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
24637         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
24638         do not check for doprnt or vprintf.
24639         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
24640         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
24641
24642 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24643
24644         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
24645         getversion.c should have been removed then, but was accidentally
24646         preserved.
24647
24648         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
24649         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
24650
24651 2003-09-08  Karl Berry  <karl@gnu.org>
24652
24653         * config/config.sub, config.guess, srclistvars.sh: update from savannah
24654                 config, forget about prep.
24655
24656         * config/depcomp, missing: update from automake.
24657
24658 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24659
24660         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
24661         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24662
24663 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24664
24665         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
24666         copy_tm_result.  Bug reported by Simon Josefsson in
24667         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24668
24669 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24670
24671         * m4/time_r.m4: New file.
24672         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
24673         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
24674         is. Check for timegm declaration.
24675         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
24676         Do not check for gmtime_r.
24677         Replace mktime if __mktime_internal does not exist and if mktime
24678         hasn't been replaced already.
24679
24680 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24681
24682         * lib/time_r.c, lib/time_r.h: New files.
24683
24684         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
24685         __localtime_r.
24686         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
24687         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
24688
24689         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
24690         __gmtime_r.
24691         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
24692         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
24693         Include <time_r.h>.
24694
24695         * lib/timegm.c: Switch to glibc implementation, with the following
24696         changes:
24697         [defined HAVE_CONFIG_H]: Include <config.h>.
24698         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
24699         (__mktime_internal) [!defined _LIBC]: New decl.
24700         (__gmtime_r) [!defined _LIBC]: New macro and function.
24701         (timegm): Use a prototype, since gnulib assumes C89.
24702         Do not bother declaring tmp to be const, as it's not really usefu.
24703         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
24704         (timegm): Declare only if HAVE_DECL_TIMEGM.
24705
24706 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24707
24708         * MODULES.html.sh (func_all_modules): Add time_r.
24709         * modules/time_r: New file.
24710         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
24711         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
24712
24713 2003-09-03  Paul Eggert  <eggert@twinsun.com>
24714
24715         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
24716         Bug reported by Lute Kamstra in
24717         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
24718
24719         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
24720         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
24721         course with correspondingly smaller numbers for tomorrow and
24722         yesterday.  From Tadayoshi Funaba.  Originally installed into
24723         sh-utils on 1999-08-07, but the patch got lost (I guess during the
24724         coreutils merge?).
24725
24726 2003-08-31  Simon Josefsson  <jas@extundo.com>
24727
24728         * modules/timegm: New file.
24729         * MODULES.html.sh (func_all_modules): Add timegm.
24730
24731 2003-08-31  Simon Josefsson  <jas@extundo.com>
24732
24733         * m4/timegm.m4: New file.
24734
24735 2003-08-31  Simon Josefsson  <jas@extundo.com>
24736
24737         * lib/timegm.h: New file.
24738         * lib/timegm.c: New file.  Based on
24739         wget-1.8.2/src/http.c:mktime_from_utc.
24740
24741 2003-08-31  Karl Berry  <karl@gnu.org>
24742
24743         * lib/argp.h: update from libc.
24744
24745 2003-08-28  Bruno Haible  <bruno@clisp.org>
24746
24747         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
24748         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
24749         followed by '#define fnmatch fnmatch_posix' gives an error.
24750
24751 2003-08-28  Bruno Haible  <bruno@clisp.org>
24752
24753         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
24754         warning on QNX, which defines O_BINARY to 000000.
24755
24756 2003-08-27  Jim Meyering  <jim@meyering.net>
24757
24758         * m4/mkstemp.m4: Require that the system mkstemp be able to create
24759         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
24760         would fail after 32.  Reported by Danny Levinson.  Details here:
24761         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
24762
24763 2003-08-24  Bruno Haible  <bruno@clisp.org>
24764
24765         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
24766         MSVC7 <stdio.h> is included later.
24767
24768 2003-08-22  Simon Josefsson  <jas@extundo.com>
24769
24770         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
24771
24772 2003-08-20  Karl Berry  <karl@gnu.org>
24773
24774         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
24775
24776 2003-08-20  Bruno Haible  <bruno@clisp.org>
24777
24778         * modules/progname: New file.
24779         * MODULES.html.sh (func_all_modules): Add progname.
24780
24781 2003-08-20  Bruno Haible  <bruno@clisp.org>
24782
24783         * lib/progname.h: New file, from GNU gettext.
24784         * lib/progname.c: New file, from GNU gettext.
24785         * lib/progreloc.c: New file, from GNU gettext.
24786
24787 2003-08-19  Jim Meyering  <jim@meyering.net>
24788
24789         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
24790         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
24791
24792 2003-08-19  Bruno Haible  <bruno@clisp.org>
24793
24794         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
24795         more.
24796
24797 2003-08-19  Bruno Haible  <bruno@clisp.org>
24798
24799         * lib/xstrdup.c: Assume <string.h> exists.
24800
24801 2003-08-18  Paul Eggert  <eggert@twinsun.com>
24802
24803         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
24804         in makefile rules.
24805
24806 2003-08-18  Jim Meyering  <jim@meyering.net>
24807
24808         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
24809         * m4/lib-ld.m4: Likewise.
24810
24811 2003-08-18  Jim Meyering  <jim@meyering.net>
24812
24813         * lib/setenv.h: Indent nested cpp directive.
24814         * lib/vasnprintf.c: Remove trailing blanks.
24815
24816 2003-08-17  Simon Josefsson  <jas@extundo.com>
24817
24818         * modules/xstrndup: New file.
24819         * MODULES.html.sh (func_all_modules): Add xstrndup.
24820
24821 2003-08-17  Simon Josefsson  <jas@extundo.com>
24822
24823         * modules/argp: Fix autoconf macro name. Add more dependencies.
24824
24825 2003-08-17  Simon Josefsson  <jas@extundo.com>
24826
24827         * m4/xstrndup.m4: New file.
24828
24829 2003-08-17  Simon Josefsson  <jas@extundo.com>
24830
24831         * m4/argp.m4: New file.
24832
24833 2003-08-17  Simon Josefsson  <jas@extundo.com>
24834             Bruno Haible  <bruno@clisp.org>
24835
24836         * lib/xstrndup.h: New file.
24837         * lib/xstrndup.c: New file.
24838
24839 2003-08-17  Bruno Haible  <bruno@clisp.org>
24840
24841         * modules/strndup (Files, Include): Add lib/strndup.h.
24842
24843 2003-08-17  Bruno Haible  <bruno@clisp.org>
24844
24845         * modules/euidaccess (Files): Add lib/euidaccess.h.
24846
24847 2003-08-17  Bruno Haible  <bruno@clisp.org>
24848
24849         * lib/strndup.h: New file.
24850
24851 2003-08-17  Bruno Haible  <bruno@clisp.org>
24852
24853         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
24854         like AC_GNU_SOURCE.
24855         * modules/extensions (configure.ac): Comment out the invocation of
24856         gl_USE_SYSTEM_EXTENSIONS.
24857
24858 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24859
24860         Merges from coreutils, etc.
24861         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
24862         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
24863         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
24864         fixing a typo.
24865         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
24866         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
24867
24868 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24869
24870         Document merge from coreutils.
24871         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
24872         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
24873         * modules/utime: Add m4/utimes-null.m4.
24874
24875 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24876
24877         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
24878         space, undoing this 2003-08-12 change:
24879         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24880
24881 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24882
24883         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
24884         strtoul.c from libc, undoing this 2003-08-12 change:
24885         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24886
24887 2003-08-16  Jim Meyering  <jim@meyering.net>
24888
24889         Merges from coreutils.
24890         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
24891         prefix.  Adjust cache variables similarly.  Create 500 rather than
24892         just 300 files, to exercise bug on Darwin6.5, too.
24893         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
24894         $missing_dir.
24895         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
24896         AM_SYS_POSIX_TERMIOS.
24897         Reported by mkc@mathdogs.com.
24898         Also change use of $am_cv_sys_posix_termios
24899         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
24900         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
24901         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
24902         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
24903         in /proc/mounts until it finds one with matching device number.  This
24904         is unnecessary when the FILE argument *is* a mount point.  No stat call
24905         is necessary in that case.  So, disable the statvfs-testing code on
24906         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
24907         as RedHat bug# 84846.
24908         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24909         to 1MB, so as not to render systems with no stack size limit (e.g.,
24910         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24911         Include <unistd.h>.  On some systems,
24912         it is required for the definition of _SC_PAGESIZE.
24913
24914 2003-08-16  Jim Meyering  <jim@meyering.net>
24915
24916         Merge from coreutils.
24917         * lib/xstrtoimax.c: #else #if -> #elif.
24918         * lib/xstrtoumax.c: Likewise.
24919
24920 2003-08-16  Jim Meyering  <jim@meyering.net>
24921
24922         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
24923         * m4/utimes.m4: Removed.
24924         * m4/utimes-null.m4: Renamed from utimes.m4.
24925
24926         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24927         to 1MB, so as not to render systems with no stack size limit (e.g.,
24928         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24929         Include <unistd.h>.  On some systems,
24930         it is required for the definition of _SC_PAGESIZE.
24931
24932 2003-08-16  Jim Meyering  <jim@meyering.net>
24933         and Paul Eggert  <eggert@cs.ucla.edu>
24934
24935         Merges from coreutils, etc.
24936
24937         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
24938         using the latest version from cvs.  This avoids problems with #line
24939         directives using a vendor (Sun) compiler.
24940         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
24941         Don't set GETGROUPS_LIB here; now it's
24942         done via getgroups.m4's wrapper function.
24943         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
24944         rather than just in sh-util/configure.in, so that the
24945         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
24946         same.
24947         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
24948         AC_FUNC_GETLOADAVG where to find getloadavg.c.
24949         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
24950         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
24951         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
24952         Remove code that is now done by the newly-required macros.
24953         Append $(EXEEXT) to DF_PROG.
24954         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
24955         Do not invoke or require the following here,
24956         since prereq.m4 or some gnulib .m4 now does this for us:
24957         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
24958         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
24959         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
24960         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
24961         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
24962         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
24963         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
24964         AC_FUNC_OBSTACK.
24965         Do not replace the following functions, as this is now the job
24966         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
24967         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
24968         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
24969         atexit getpass, strdup, getpagesize.
24970         Replace 'raise'.
24971         Do not check for the following functions, as this is now the job
24972         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
24973         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
24974         setregid.
24975         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
24976         Check for sys/sysctl.h.
24977         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
24978         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
24979         of checking for ssize_t ourselves.
24980
24981         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
24982         Require every macro that gnulib/modules/* suggests for us.
24983         (jm_PREREQ_ADDEXT): New macro.
24984         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
24985         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
24986
24987         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
24988         (gl_PHYSMEM): Use it.
24989         Also check for `table' function.
24990         Check for new headers and functions.
24991         Add check for sys/sysmp.h.
24992         With suggestions from Kaveh Ghazi.
24993         Ignore headers that are present but cannot be compiled.  This
24994         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
24995         C 5.4.
24996
24997 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24998
24999         Document merge from coreutils.
25000         * modules/userspec: Depend on posixver.
25001         * modules/strftime: Depend on tzset.
25002
25003 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25004
25005         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25006         rather than tab, after '#' in shell-script copyright notices.
25007         Suggested by Bruno Haible.
25008
25009 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25010
25011         * config/srclist-update: Use three spaces, rather than tab, after '#'
25012         in shell-script copyright notices.  Suggested by Bruno Haible.
25013         Remove unnecessary parenthesization in regular expression.
25014
25015 2003-08-15  Jim Meyering  <jim@meyering.net>
25016
25017         Merge from coreutils.
25018         * lib/xgethostname.c: Include <stdlib.h>.
25019         (xghostname): Don't exit for anything other than memory-related
25020         failure; just return NULL.
25021         * lib/userspec.c: Include "posixver.h".
25022         (parse_user_spec): Accept `.' as a separator only
25023         in pre-POSIX-200112 mode.
25024         * lib/strtoimax.c: Use #elif rather than #else #if.
25025         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25026         Remove function, now that we can rely on a working tzset function.
25027         [!_LIBC]: Ensure that the required autoconf test has been run.
25028         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25029         Use underlying_strftime for %r.
25030         * lib/sha.c: Merge in some clean-up and optimization changes from
25031         glibc.
25032         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25033         Ensure that it is a multiple of 64.
25034         Rearrange loop exit tests so as to avoid performing an
25035         additional fread after encountering an error or EOF.
25036         * lib/realloc.c: Update copyright date.
25037
25038 2003-08-15  Jim Meyering  <jim@meyering.net>
25039         and Paul Eggert  <eggert@twinsun.com>
25040
25041         Merge from coreutils.
25042         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25043         member but strut utmpx does not.  Needed for AIX 4.3.3.
25044         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25045
25046 2003-08-15  Jim Meyering  <jim@meyering.net>
25047         and Paul Eggert  <eggert@cs.ucla.edu>
25048
25049         Merges from coreutils, etc.
25050         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25051         Require gl_FUNC_TZSET_CLOBBER.
25052         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25053         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25054         members.
25055
25056 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25057
25058         Help the merge from coreutils.
25059         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25060         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25061         * m4/tzset.m4: Use it too.
25062
25063 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25064
25065         * modules/tzset: New file.
25066
25067 2003-08-14  Jim Meyering  <jim@meyering.net>
25068
25069         Merges from coreutils.
25070         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
25071         variable names, rather than @FNMATCH_H@.
25072         * modules/alloca: Likewise for $(ALLOCA_H).
25073
25074         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
25075         the three copies of the literal target, `fnmatch.h'.
25076         * modules/alloca (alloca.h): Likewise.
25077
25078 2003-08-14  Jim Meyering  <jim@meyering.net>
25079
25080         Merge from coreutils.
25081         * m4/tzset.m4: New file.
25082         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
25083         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
25084         otherwise, AIX 5.1 systems would end up using the latter.
25085         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
25086         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
25087         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
25088         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
25089
25090 2003-08-14  Jim Meyering  <jim@meyering.net>
25091
25092         Merge from coreutils.
25093         * lib/obstack.h: Whitespace changes.
25094         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
25095         and xcalloc return values.
25096         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
25097         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
25098         hang on OSF/1 5.1 for DIR on both local and remote file systems.
25099         Reported by (and fix confirmed by) Nelson H. F. Beebe.
25100         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25101         error from mntctl.
25102         Use mntctl's return value to drive the entry-processing loop, since
25103         we can't rely on the value of the vmt_length member in the last
25104         entry.  On some systems doing so could result in exhausting
25105         virtual memory.  Based in part on a patch from Mike Jetzer.
25106
25107 2003-08-14  Jim Meyering  <jim@meyering.net>
25108         and Paul Eggert  <eggert@twinsun.com>
25109
25110         Merges from coreutils, plus other fixes.
25111         * lib/physmem.c: Merge in portability changes from gcc/libiberty
25112         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
25113         for credits and details.  Thanks to Kaveh Ghazi for helping
25114         to keep these files in sync.
25115         (ARRAY_SIZE): Define it.
25116         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
25117         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
25118         (memcasecmp): Don't assume size_t fits in unsigned int.
25119         Remove casts and duplicate code.
25120         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
25121         (memcpy): Remove definition.
25122         Merge in some clean-up and optimization changes from glibc.
25123         [BLOCKSIZE]: Move definition to top of file.
25124         Ensure that it is a multiple of 64.
25125         Rearrange loop exit tests so as to avoid performing an
25126         additional fread after encountering an error or EOF.
25127         * lib/md5.h (md5_uintptr): Define.
25128         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
25129         return to the initial working directory.  Preserve errno
25130         for caller.
25131         * lib/idcache.c: Include "xalloc.h".
25132         (xmalloc, xrealloc): Remove decls.
25133         (getuser): Remove casts no longer required in C89.
25134         * lib/human.c: Include stdio.h, for sprintf.
25135         * lib/group-member.c: Include "xalloc.h".
25136         (xmalloc, xrealloc): Remove decls.
25137         (get_group_info): Remove casts no longer required in C89.
25138         * lib/getusershell.c (readname): Remove casts no longer required in
25139         C89.
25140         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
25141         * lib/getline.c: Whitespace fix, from coreutils.
25142
25143 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25144
25145         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
25146         Check for isascii.
25147
25148         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25149         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25150         Undo previous (whitespace-only) change.
25151
25152 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25153
25154         * lib/exclude.c: Include <ctype.h>
25155         (IN_CTYPE_DOMAIN): New macro.
25156         (is_space): New fn.
25157         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
25158         and empty lines.
25159
25160         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25161         Undo previous (whitespace-only) change.
25162
25163 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25164
25165         * config/srclist-update: Change update back to the old behavior,
25166         leaving whitespace alone.  Use one 'sed' command rather than a
25167         pipeline.
25168         (fixlicense): Now a variable, not a function.
25169         (remove_trailing_blanks): Remove.
25170         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
25171         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25172         Undo previous (whitespace-only) change.
25173
25174 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25175
25176         Merge from coreutils.
25177         * modules/euidaccess: Add lib_SOURCES, include for new
25178         file euidaccess.h
25179
25180 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25181
25182         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25183         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25184         Normalize leading white space and remove trailing white space.
25185
25186         Merge from coreutils
25187         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
25188
25189         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
25190         0.12.1.  These files are now being upgraded automatically by
25191         ../config/srclist-update.
25192
25193 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25194
25195         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25196         Normalize leading white space and remove trailing white space.
25197         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
25198         notice, as per ../config/srclist-update.
25199
25200         Merge from coreutils.
25201         * lib/euidaccess.h: New file.
25202         * lib/euidaccess.c: Include it.
25203         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
25204         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
25205         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
25206
25207 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25208
25209         * config/srclist-update: Add copyright notice.
25210         (remove_id_lines, remove_trailing_blanks): New constants.
25211         (fixfile): Use them to normalize spacing a bit in copied files.
25212         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25213         Normalize leading white space and remove trailing white space.
25214
25215         * config/texinfo.tex: Sync with texinfo.
25216
25217         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
25218         strtoul.c from libc, to merge coreutils whitespace changes.
25219
25220         * config/srclist.txt: Get the following m4 files from gettext:
25221         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
25222         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
25223         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
25224         wint_t.m4.
25225
25226 2003-08-12  Karl Berry  <karl@gnu.org>
25227
25228         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
25229         been made.
25230
25231 2003-08-11  Paul Eggert  <eggert@twinsun.com>
25232
25233         * modules/gnu-source, m4/gnu-source.m4:
25234         Remove; we're assuming Autoconf 2.54 or later now.
25235         Suggested by Bruno Haible.
25236         * MODULES.html.sh (func_all_modules): Remove gnu-source.
25237
25238 2003-08-11  Bruno Haible  <bruno@clisp.org>
25239
25240         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
25241
25242 2003-08-11  Bruno Haible  <bruno@clisp.org>
25243
25244         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
25245         (vasnprintf): Use it instead of wcslen.
25246
25247 2003-08-11  Bruno Haible  <bruno@clisp.org>
25248
25249         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25250         value to ensure that _Bool promotes to int. Use #define for _Bool when
25251         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25252
25253 2003-08-10  Karl Berry  <karl@gnu.org>
25254
25255         * lib/regex.h: update from libc (whitespace fix).
25256
25257 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25258
25259         Merge some files from coreutils.  These changes were
25260         originally made by Jim Meyering.
25261         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25262         many older Unixes require this.
25263         * lib/alloca.c (alloca): Remove cast to argument of free;
25264         no longer needed in C89.
25265         * lib/alloca_.h, regex.h: Fix white space to match
25266         what GNU indent does.
25267
25268 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25269
25270         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25271         apparently Emacs's Unicode mode got confused before my 2003-08-05
25272         checkin.
25273
25274 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25275
25276         * m4/extensions.m4: New file.
25277         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25278         Require gl_USE_SYSTEM_EXTENSIONS.
25279         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25280         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25281
25282 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25283
25284         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25285         * modules/extensions, modules/gnu-source: New files.
25286         * modules/timespec, modules/unlocked-io: Depend on extensions.
25287
25288 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25289
25290         * modules/restrict: New file.
25291         * MODULES.html.sh (func_all_modules): Add restrict.
25292         * modules/regex: Depend on restrict.
25293
25294 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25295
25296         * m4/restrict.m4: New file.
25297         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25298
25299 2003-08-07  Bruno Haible  <bruno@clisp.org>
25300
25301         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25302         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25303
25304 2003-08-07  Bruno Haible  <bruno@clisp.org>
25305
25306         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25307         makes the module 'getndelim2' compatible with the module 'getline'.
25308
25309 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25310
25311         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25312         byte with "\201" to avoid glitches when editing that source file
25313         with multi-gnome-terminal.
25314
25315 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25316
25317         * lib/bumpalloc.h: Remove.
25318
25319 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25320
25321         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25322         * modules/bumpalloc: Remove.
25323
25324 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25325
25326         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25327         GNU coding style.
25328
25329         Merge from coreutils.
25330         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25331         1. From glibc.
25332         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25333         from Karl Berry, implemented by Jim Meyering.
25334         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25335         from Dmitry V. Levin.
25336         Remove anachronistic cast of xrealloc.
25337         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25338         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25339         type. Otherwise, it wouldn't compile with at least /bin/cc on
25340         ymp-cray-unicos9.0.2.X.
25341         Combine two mostly-identical uses of alloca into one.
25342         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25343
25344 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25345
25346         [From Emacs.]
25347
25348         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25349         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25350         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25351         obsolete NLIST_NAME_UNION.
25352         [__GNU__]: Undef BSD and FSCALE.
25353         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25354
25355 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25356
25357         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25358         an enum type, so that it's guaranteed to promote to int.  See:
25359         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25360
25361 2003-08-03  Karl Berry  <karl@gnu.org>
25362
25363         * config/depcomp: update from automake.
25364
25365 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25366
25367         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25368         (strerror): Don't assume that a printable int fits in 14 bytes.
25369
25370 2003-07-31  Bruno Haible  <bruno@clisp.org>
25371
25372         * modules/getpass-gnu: New file.
25373         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25374
25375 2003-07-31  Bruno Haible  <bruno@clisp.org>
25376
25377         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25378
25379 2003-07-24  Karl Berry  <karl@gnu.org>
25380
25381         * config/missing: update from automake.
25382
25383 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25384             Bruno Haible  <bruno@clisp.org>
25385
25386         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25387         * lib/getline.c (getline, getdelim): Likewise.
25388         Remove _GNU_SOURCE define; now it's defined in config.h through
25389         m4/getline.m4.
25390
25391 2003-07-23  Karl Berry  <karl@gnu.org>
25392
25393         * config/config.sub: update from prep.
25394
25395 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25396
25397         * modules/xalloc (Depends-on): Add exitfail.
25398         * modules/xmemcoll: Likewise.
25399
25400 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25401
25402         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25403         over-parenthesization in macros.
25404
25405         Sync with coreutils.
25406
25407         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25408         required by C99.
25409
25410         Use `exit_failure' for xalloc and xmemcoll instead of their own
25411         private exit-failure variables.
25412         * lib/xalloc.h (xalloc_exit_failure): Remove.
25413         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25414         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25415         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25416         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25417         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25418
25419 2003-07-20  Jim Meyering  <jim@meyering.net>
25420
25421         * modules/closeout (Depends-on): Add exitfail.
25422         Suggestion from Bruno Haible.
25423
25424 2003-07-19  Karl Berry  <karl@gnu.org>
25425
25426         * config/config.sub: update from prep.
25427
25428 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25429
25430         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25431         Remove.
25432         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25433         to test that it can stand by itself.  Include "exitfail.h".
25434         Clients should set exit_failure instead.
25435         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25436
25437 2003-07-18  Bruno Haible  <bruno@clisp.org>
25438
25439         * modules/getndelim2: New file.
25440         * modules/getline: Share files with module getndelim2.
25441         * modules/getnline: Depend on getndelim2 instead of sharing files with
25442         it. Add getnline.c to lib_SOURCES.
25443         * MODULES.html.sh (func_all_modules): Add getndelim2.
25444
25445 2003-07-18  Bruno Haible  <bruno@clisp.org>
25446
25447         * m4/getndelim2.m4: New file.
25448         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25449         invoke gl_PREREQ_GETNDELIM2.
25450         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25451         gl_PREREQ_GETNDELIM2.
25452         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25453         gl_GETNDELIM2.
25454
25455 2003-07-18  Bruno Haible  <bruno@clisp.org>
25456
25457         * lib/getndelim2.h: New file.
25458         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25459         getndelim2.h.
25460         (getndelim2): Make non-static. Change return type to ssize_t.
25461         * lib/getline.h: Change argument names.
25462         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25463         * lib/getnline.c: Include getndelim2.h.
25464
25465 2003-07-18  Andreas Schwab  <schwab@suse.de>
25466
25467         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25468
25469 2003-07-17  Karl Berry  <karl@gnu.org>
25470
25471         * config/config.sub: update from prep.
25472
25473 2003-07-17  Bruno Haible  <bruno@clisp.org>
25474
25475         * modules/getnline: New file.
25476         * modules/getline: Add lib/getndelim2.c to source file list.
25477         * MODULES.html.sh (func_all_modules): Add getnline.
25478
25479 2003-07-17  Bruno Haible  <bruno@clisp.org>
25480
25481         * m4/getnline.m4: New file.
25482
25483 2003-07-17  Bruno Haible  <bruno@clisp.org>
25484
25485         * m4/Makefile.am.in: Remove file.
25486         * m4/Makefile.am: Remove file.
25487         * m4/Makefile.in: Remove file.
25488
25489 2003-07-17  Bruno Haible  <bruno@clisp.org>
25490
25491         * lib/getnline.h: New file.
25492         * lib/getnline.c: New file.
25493         * lib/getndelim2.c: New file, extracted from getline.c.
25494         (getndelim2): Renamed from getdelim2, with added nmax argument.
25495         * lib/getline.c: Include getndelim2.c.
25496         (getdelim2): Moved out to getndelim2.c.
25497         (getline, getdelim): Update.
25498
25499 2003-07-17  Bruno Haible  <bruno@clisp.org>
25500
25501         * lib/Makefile.am: Remove file.
25502         * lib/Makefile.in: Remove file.
25503
25504 2003-07-17  Bruno Haible  <bruno@clisp.org>
25505
25506         * configure.in: Remove file.
25507         * Makefile.in: Remove file.
25508
25509 2003-07-17  Bruno Haible  <bruno@clisp.org>
25510
25511         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25512
25513 2003-07-16  Karl Berry  <karl@gnu.org>
25514
25515         * config/srclist-update: was running fixlicense twice, which caused
25516                 texinfo.tex to be nullified for some reason.  Simplify,
25517                 $gplsrc is no longer needed as far as I can see?
25518
25519 2003-07-16  Jim Meyering  <jim@meyering.net>
25520
25521         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25522
25523 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25524
25525         * config/srclist.txt: Get the following files from gettext-runtime/intl
25526         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25527         ref-del.sin.  From Bruno Haible.
25528         * config/srclist-update (fixfile): Change grep pattern again, since the
25529         previous fix didn't work (there was another trailing $).  Use
25530         '[$]' to escape the $s.
25531
25532 2003-07-15  Karl Berry  <karl@gnu.org>
25533
25534         * lib/vasnprintf.c: update from gettext.
25535
25536 2003-07-15  Karl Berry  <karl@gnu.org>
25537
25538         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
25539         gets expanded when surrounded by '$'.
25540
25541 2003-07-15  Jim Meyering  <jim@meyering.net>
25542
25543         * modules/save-cwd: Don't depend on error.  From Derek Price.
25544
25545 2003-07-15  Jim Meyering  <jim@meyering.net>
25546
25547         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
25548
25549 2003-07-14  Simon Josefsson  <jas@extundo.com>
25550
25551         * modules/mempcpy: New file.
25552         * MODULES.html.sh (func_all_modules): Add mempcpy.
25553
25554 2003-07-14  Simon Josefsson  <jas@extundo.com>
25555
25556         * m4/mempcpy.m4: New file.
25557
25558 2003-07-14  Simon Josefsson  <jas@extundo.com>
25559
25560         * lib/mempcpy.h: New file.
25561         * lib/mempcpy.c: New file.
25562
25563 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25564
25565         * modules/getdate, modules/posixtm: Depend on mktime.
25566
25567 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25568
25569         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
25570         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
25571         unicodeio.c, unicodeio.h, unlocked-io.h:
25572         Switch from LGPL to GPL.
25573
25574 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25575
25576         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
25577         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
25578         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
25579         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
25580         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
25581         updated automatically by ../config/srclist-update.  This changes
25582         their license from LPGL to GPL.
25583
25584 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25585
25586         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
25587         assumed to refer to the root of the most recent stable gettext version.
25588         * config/srclistvars.sh: Add defaults for eggert.
25589         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
25590         Match "This program" as well as "The program".  This is needed
25591         for gettext.
25592
25593 2003-07-14  Jim Meyering  <jim@meyering.net>
25594
25595         Don't emit diagnostics.  Let callers do that.
25596         * lib/save-cwd.c: Don't include "error.h".
25597         (save_cwd): Don't call error.  Ensure that errno is valid
25598         when returning nonzero.
25599
25600         * lib/save-cwd.h (restore_cwd): Update prototype.
25601         * lib/save-cwd.c (restore_cwd): Remove two parameters.
25602         Simplify.  Don't call error upon failure.  Let callers do that.
25603         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
25604         when auditing is enabled.  But don't bother updating the #if.
25605
25606 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
25607
25608         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
25609         it breaks C++ compilation.
25610         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
25611
25612 2003-07-10  Simon Josefsson  <jas@extundo.com>
25613
25614         * modules/strchrnul (Makefile.am): Add strchrnul.h.
25615
25616 2003-07-10  Jim Meyering  <jim@meyering.net>
25617
25618         * m4/clock_time.m4: Remove trailing blank.
25619         * m4/intmax_t.m4: Likewise.
25620
25621 2003-07-10  Jim Meyering  <jim@meyering.net>
25622
25623         * lib/vasnprintf.c: Remove trailing blanks.
25624         Make cpp indentation consistent.
25625
25626 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25627
25628         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
25629         posixver.c, strftime.c, strnlen.c, strverscmp.c:
25630         Switch from LGPL to GPL.
25631
25632 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25633
25634         * config/srclist.txt: Sort sublists.  Add
25635         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
25636         that differ from gnulib for one reason or another; we'd like this list
25637         to be smaller but for now let's document what we have.
25638
25639 2003-07-08  Paul Eggert  <eggert@twinsun.com>
25640
25641         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
25642         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
25643         and sweeter "eval x=$x".
25644         * config/srclist.txt: Get lib/argp* from glibc.
25645
25646 2003-07-07  Paul Eggert  <eggert@twinsun.com>
25647
25648         * lib/mktime.c: Fix some boundary cases and remove need for floating
25649         point.
25650
25651         Issue a compile-time diagnostic if time_t is floating point, or if
25652         two's complement arithmetic is not in effect, or if arithmetic
25653         right shift does not propagate the sign.  These assumptions were
25654         all in the original code but they weren't checked.
25655
25656         (TIME_T_MIDPOINT, verify): New macros.
25657         (__isleap): Remove; it has integer overflow problems.
25658         (leapyear): New function, without those problems.
25659         (ydhms_tm_diff): Remove; splitting into two parts.
25660         (ydhms_diff): New function, containing the arithmetic part of
25661         the old ydhms_tm_diff function.  Issue a compile-time
25662         diagnostic if we are not using C99 integer division.
25663         Avoid casts when possible.
25664         (guess_time_tm): New function, containing the checking part of
25665         the old ydhms_tm_diff function.  Return the new value, rather than
25666         the difference between it and the old.  Accept a new argument T
25667         so that *T specifies the old value.  Check for overflow in the result.
25668
25669         (__mktime_internal): Use a time_t offset, not a long int offset.
25670         This undoes the 2003-06-04 change, which is no longer needed now
25671         that we have better overflow checking.
25672         (localtime_offset): Likewise.
25673
25674         (__mktime_internal): Avoid harmful overflow on hosts where time_t
25675         and long are 64-bit but int is only 32-bit.
25676         (ydhms_diff): Use long int to store year1 and yday1.
25677         Issue a compile-time diagnostic if long int is not wide enough.
25678
25679         (__mktime_internal): Use long int to store adjusted year and yday.
25680         Use plain C rather than preprocessor commands, if that doesn't
25681         affect efficiency.
25682         Check for overflow (and try to repair) after each probe
25683         rather than checking only at the very end.  This avoids some bugs
25684         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
25685         does not equal GMT offset at maximum time).
25686         Use integer to check for overflow rather than floating point; this
25687         is more portable to non-IEEE hosts, and is a tad faster.
25688         When we detect that we are oscillating between two values,
25689         don't check whether tm_isdst has the requested value, since
25690         we already know the answer.  When tm_isdst has the wrong value,
25691         use a different heuristic to find the right one, based on the
25692         extreme values actually observed in practice in tz2003a,
25693         rather than the (overly optimistic) "previous 3 calendar quarters".
25694
25695         (not_equal_tm, print_tm, check_result): Use "const T" rather than
25696         "T const" to accommodate glibc style.
25697         (check_result): Use less-confusing report format.  "long" -> "long int.
25698         (main): Likewise.
25699         Don't loop if the iteration overflows time_t.
25700         Allow a negative step in the iteration.
25701
25702 2003-07-06  Karl Berry  <karl@gnu.org>
25703
25704         * config/depcomp: update from automake.
25705         * config/config.sub: update from prep.
25706
25707 2003-07-03  Karl Berry  <karl@gnu.org>
25708
25709         * config/config.guess: update from prep.
25710
25711 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25712
25713         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
25714         xreadlink.c now includes it unconditionally.
25715
25716 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25717
25718         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
25719         having it depend on HAVE_SYS_TYPES_H.
25720
25721 2003-07-01  Bruno Haible  <bruno@clisp.org>
25722
25723         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
25724         <sys/types.h> should be sufficient.
25725         Reported by Paul Eggert.
25726
25727 2003-06-26  Karl Berry  <karl@gnu.org>
25728
25729         * config/depcomp: update from automake.
25730
25731 2003-06-26  Bruno Haible  <bruno@clisp.org>
25732
25733         * modules/human: Depend on module stdbool.
25734
25735 2003-06-25  Bruno Haible  <bruno@clisp.org>
25736
25737         * modules/readlink: New file.
25738         * modules/xreadlink: Depend on it.
25739         * MODULES.html.sh (func_all_modules): Add readlink.
25740
25741 2003-06-25  Bruno Haible  <bruno@clisp.org>
25742
25743         * m4/readlink.m4: New file.
25744
25745 2003-06-25  Bruno Haible  <bruno@clisp.org>
25746
25747         * lib/readlink.c: New file.
25748
25749 2003-06-22  Karl Berry  <karl@gnu.org>
25750
25751         * config/srclist.txt: update mkinstalldirs from automake.
25752         * config/mkinstalldirs: update.
25753
25754 2003-06-22  Bruno Haible  <bruno@clisp.org>
25755
25756         Portability to mingw32.
25757         * m4/ssize_t.m4: New file, from GNU gettext.
25758         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
25759         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
25760
25761 2003-06-22  Bruno Haible  <bruno@clisp.org>
25762
25763         * modules/safe-read: Add m4/ssize_t.m4.
25764         * modules/xreadlink: Add m4/ssize_t.m4.
25765
25766 2003-06-20  Bruno Haible  <bruno@clisp.org>
25767
25768         Assume C89, so PARAMS isn't needed.
25769         * lib/unicodeio.h (PARAMS): Remove.
25770         * lib/unicodeio.c: Don't use PARAMS.
25771
25772 2003-06-18  Karl Berry  <karl@gnu.org>
25773
25774         * config/config.{guess,sub}: update from prep.
25775
25776 2003-06-18  Jim Meyering  <jim@meyering.net>
25777
25778         Merge changes from coreutils.
25779         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
25780         Remove explicit declarations of xmalloc and realloc.
25781         Include xalloc.h.
25782         (read_utmp): Remove anachronistic cast of xmalloc.
25783
25784 2003-06-17  Paul Eggert  <eggert@twinsun.com>
25785
25786         Assume C89, so PARAMS isn't needed.
25787         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
25788         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
25789         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
25790         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
25791         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
25792         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
25793         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
25794         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
25795         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
25796         lib/xstrtod.h, lib/xstrtol.h: Likewise.
25797         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
25798         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
25799         no longer needed. Anyway, config.h should always be included before any
25800         other file.
25801
25802 2003-06-11  Simon Josefsson  <jas@extundo.com>
25803
25804         * modules/sysexits: New file.
25805         * MODULES.html.sh (func_all_modules): Add sysexits.
25806
25807 2003-06-11  Simon Josefsson  <jas@extundo.com>
25808
25809         * lib/sysexit_.h: New file.
25810
25811 2003-06-11  Derek Price  <derek@ximbiot.com>
25812
25813         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
25814         necessary.
25815
25816 2003-06-11  Bruno Haible  <bruno@clisp.org>
25817
25818         * m4/sysexits.m4: New file.
25819
25820 2003-06-10  Simon Josefsson  <jas@extundo.com>
25821
25822         * lib/argp.h: New file, from glibc.
25823         * lib/argp-ba.c: New file, from glibc.
25824         * lib/argp-eexst.c: New file, from glibc.
25825         * lib/argp-fmtstream.c: New file, from glibc.
25826         * lib/argp-fmtstream.h: New file, from glibc.
25827         * lib/argp-fs-xinl.c: New file, from glibc.
25828         * lib/argp-help.c: New file, from glibc.
25829         * lib/argp-namefrob.h: New file, from glibc.
25830         * lib/argp-parse.c: New file, from glibc.
25831         * lib/argp-pv.c: New file, from glibc.
25832         * lib/argp-pvh.c: New file, from glibc.
25833         * lib/argp-xinl.c: New file, from glibc.
25834
25835 2003-06-10  Simon Josefsson  <jas@extundo.com>
25836
25837         * modules/strchrnul: New file.
25838
25839 2003-06-10  Simon Josefsson  <jas@extundo.com>
25840
25841         * modules/argp: New file.
25842
25843 2003-06-10  Simon Josefsson  <jas@extundo.com>
25844
25845         * m4/strchrnul.m4: New file.
25846
25847 2003-06-10  Simon Josefsson  <jas@extundo.com>
25848
25849         * lib/strchrnul.h: New file.
25850         * lib/strchrnul.c: New file.
25851
25852 2003-06-10  Bruno Haible  <bruno@clisp.org>
25853
25854         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
25855
25856 2003-06-07  Karl Berry  <karl@gnu.org>
25857
25858         * config/config.{guess,sub}: update from prep.
25859
25860 2003-06-07  Jim Meyering  <jim@meyering.net>
25861
25862         * modules/strtod: Use $(...) notation, not @...@ for
25863         AC_REPLACE'd variables.
25864         * modules/localcharset: Likewise.
25865
25866 2003-06-07  Jim Meyering  <jim@meyering.net>
25867
25868         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
25869         in place of my name in the copyright comment.
25870         Remove definition and uses of __P.
25871
25872         From coreutils.
25873         * lib/stat.c: Don't declare xmalloc explicitly.
25874         Instead, include "xalloc.h".
25875         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
25876         xrealloc, and xcalloc return values.
25877         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
25878         Improve comment.
25879         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
25880
25881 2003-06-07  Bruno Haible  <bruno@clisp.org>
25882
25883         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
25884         avoid AC_CONFIG_LINKS.
25885         * modules/fnmatch (Makefile.am): Use explicit creation rule for
25886         fnmatch.h, to avoid AC_CONFIG_LINKS.
25887         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
25888
25889 2003-06-07  Bruno Haible  <bruno@clisp.org>
25890
25891         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
25892         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
25893         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25894         directory.
25895         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
25896         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25897         directory.
25898
25899 2003-06-06  Jim Meyering  <jim@meyering.net>
25900
25901         Merge from coreutils.
25902         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
25903         Consolidate declarations and initializations of *_base* locals.
25904
25905         Merge from coreutils.
25906         This avoids a core dump on systems without GNU putenv,
25907         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
25908         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
25909         (unsetenv): New static function, from GNU libc.
25910         (rpl_putenv): Use it.
25911
25912         * lib/modechange.c: Remove trailing blanks.
25913
25914         Merge from coreutils.
25915         * lib/fsusage.c: Remove declaration of statfs.
25916         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
25917
25918         * lib/posixtm.c: Include <stdbool.h> unconditionally.
25919
25920 2003-06-06  Jim Meyering  <jim@meyering.net>
25921
25922         * lib/stdbool_.h: Renamed from stdbool.h.in.
25923
25924 2003-06-06  Jim Meyering  <jim@meyering.net>
25925             Bruno Haible  <bruno@clisp.org>
25926
25927         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
25928         Adjust Makefile.am snippet not to redirect directly to target.
25929         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
25930
25931 2003-06-05  Paul Eggert  <eggert@twinsun.com>
25932
25933         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
25934         mismatch, look in future quarters as well as past.  This fixes a
25935         bug when processing fall-backwards gaps immediately after a long
25936         period of daylight-saving time.
25937
25938         * lib/mktime.c: Assume freestanding C89 or better.
25939         (HAVE_LIMITS_H): Remove.  Assume it's 1.
25940         (__P): Remove; not used.
25941         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
25942         (mktime, not_equal_tm, print_tm, check_result,
25943         main): Use prototypes.  Use const * where appropriate.
25944         (main): Fix typo in testing code that uncovered by above changes.
25945         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
25946
25947 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25948
25949         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
25950         locale.h, localeconv.  This merges changes from coreutils.
25951
25952         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
25953         It can be removed after the next Autoconf is released.
25954         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
25955         needed.
25956
25957 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25958
25959         * lib/mktime.c: Fix Debian bug 177940
25960         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
25961         (localtime_offset): Now long int, not time_t, because we want it
25962         to be guaranteed to be signed.  All uses changed.
25963         (__mktime_internal): If overflow would occur when adding offset,
25964         don't add it.
25965
25966         Merge 'human' changes from coreutils.  Rewrite to support
25967         locale-specific notations like thousands separators.
25968         * lib/human.c: Simplify authorship notice.
25969         Include human.h immediately after config.h.
25970         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
25971         <limits.h>: Do not include, since human.h does.
25972         (SIZE_MAX, UINTMAX_MAX): New macros.
25973         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
25974         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
25975         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
25976         (power_letter): Renamed from suffixes.
25977         (generate_suffix_backwards): Remove.
25978         (adjust_value): Now takes int style (because of human.h changes)
25979         and long double value (for greater precision on some platforms).
25980         (group_number): New function.
25981         (human_readable): Use it.  Use integer options, not enum.
25982         Put the options before the sizes in the arg list.
25983         Support all the new options.
25984         The old human_readable function has been removed;
25985         use inttostr.h instead.
25986         (human_readable, default_block_size, humblock):
25987         Use uintmax_t, not int, for block sizes.
25988         (human_readable_inexact, block_size_types): Remove.
25989         (block_size_opts): New constant.
25990         (human_options): Renamed from human_block_size, with new signature
25991         that allows block sizes up to UINTMAX_MAX.  All callers changed.
25992         * lib/human.h: Add copyright and authorship notice.
25993         Include <limits.h> and <stdbool.h> unconditionally.
25994         (PARAMS): Remove.  All uses removed.
25995         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
25996         (enum human_inexact_style): Remove tag; now a nameless enum.
25997         (human_floor, human_ceiling, human_round_to_even): Now have
25998         values 2, 0, 1 rather than -1, 1, 0.
25999         (human_group_digits, human_suppress_point_zero, human_autoscale,
26000         human_base_1024, human_SI, human_B): New constants.
26001         (human_readable_inexact, human_block_size): Remove.
26002         (human_readable): Size args are now uintmax_t, not int.
26003         (human_options): New decl.
26004
26005         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26006         unnecessary now that we assume C89 or better.  This change
26007         imported from coreutils.
26008
26009         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26010         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26011         in the 2003-05-30 sync from glibc.
26012
26013         .h files should stand alone, but we shouldn't include <sys/types.h>
26014         if we can get away with just <stddef.h>.
26015
26016         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26017         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26018         rather than <sys/types.h>, as we merely need size_t.
26019         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26020         to get size_t.
26021         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26022         Include <stdio.h>, to get FILE.
26023         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26024         memcasecmp.h has included <stddef.h> and all we need is size_t.
26025         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26026         our interface, instead of including <sys/types.h>
26027
26028 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26029
26030         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26031         now, as glibc mktime is buggy on non-glibc systems.
26032
26033 2003-06-03  Karl Berry  <karl@gnu.org>
26034
26035         * config/config.sub: update from prep.
26036
26037 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26038
26039         [from coreutils]
26040         Fix some minor time-related bugs with POSIX time arguments.
26041         Some valid time stamps were being rejected (notably -1, and
26042         time stamps before 1900 on 64-bit hosts).  And some invalid
26043         time stamps were being accepted, e.g. September 31.
26044
26045         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26046         that we can return (time_t) -1 successfully.
26047         * lib/posixtm.c: Likewise.
26048         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26049         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26050         (t): Remove static var.
26051         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26052         of static var.  All uses changed.
26053         (year): Do not reject years before 1900; they can occur with
26054         64-bit time_t.
26055         (posix_time_parse): Do not check for out-of-range components;
26056         that is now the caller's responsibility, since our checks were
26057         only approximations.
26058         (posixtime): Use mktime to check for out-of-range components,
26059         since it knows them exactly.
26060         If mktime returns (time_t) -1, check whether an error actually occurred
26061         by invoking localtime on -1.
26062         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26063         posixtime failures better.
26064         Improve the test data (in comments only).
26065
26066 2003-06-02  Karl Berry  <karl@gnu.org>
26067
26068         * config/mkinstalldirs (version): new variable.
26069         (--version): new option.
26070         (usage): improve message.
26071
26072 2003-05-30  Karl Berry  <karl@gnu.org>
26073
26074         * lib/mktime.c: update from libc.
26075
26076 2003-05-30  Bruno Haible  <bruno@clisp.org>
26077
26078         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
26079         * config/config.rpath: Upgrade to gettext-0.12.1.
26080
26081 2003-05-30  Bruno Haible  <bruno@clisp.org>
26082
26083         * m4/gettext.m4: Upgrade to gettext-0.12.1.
26084         * m4/nls.m4: New file, from gettext-0.12.1.
26085         * m4/po.m4: New file, from gettext-0.12.1.
26086         * m4/progtest.m4: Upgrade to gettext-0.12.1.
26087
26088 2003-05-30  Bruno Haible  <bruno@clisp.org>
26089
26090         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
26091         * lib/localcharset.h: Likewise.
26092         * lib/localcharset.c: Likewise.
26093
26094 2003-05-29  Karl Berry  <karl@gnu.org>
26095
26096         * config/config.rpath: update from gettext.
26097
26098 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26099
26100         Assume the headers required for C89 freestanding compilers.
26101         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
26102         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
26103         * m4/human.m4 (gl_HUMAN): Likewise.
26104         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
26105         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
26106         * m4/userspec.m4 (gl_USERSPEC): Likewise.
26107         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
26108         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
26109         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
26110
26111 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26112
26113         Assume the headers required for C89 freestanding compilers.
26114         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
26115         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
26116         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
26117         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
26118         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
26119         define, since <limits.h> is guaranteed to do that.
26120         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
26121         * lib/exclude.c: Include <stdbool.h> unconditionally.
26122         * lib/tempname.c: Include <stddef.h> unconditionally.
26123         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
26124         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
26125         <stddef.h> does that.
26126         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
26127         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
26128         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
26129         needed.
26130         * lib/xstrtol.c: Likewise.
26131         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
26132         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
26133
26134         * lib/addext.c (addext): Use assignment rather than cast, to avoid
26135         warnings on some platforms.
26136
26137         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26138         arbitrarily.
26139
26140 2003-05-26  Jim Meyering  <jim@meyering.net>
26141
26142         Merge in a change from coreutils:
26143         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
26144         that is guaranteed to be `no'.  Use `no_such_member' to indicate
26145         that condition, rather than `-1' which is slightly misleading.
26146         Change the name of the cache variable to have the gl_ prefix.
26147         Prompted by a patch from Richard Dawe for DJGPP.
26148
26149 2003-05-24  Karl Berry  <karl@gnu.org>
26150
26151         * config/config.guess: update from prep.
26152
26153 2003-05-22  Karl Berry  <karl@gnu.org>
26154
26155         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
26156
26157 2003-05-20  Karl Berry  <karl@gnu.org>
26158
26159         * config/config.guess: update from prep.
26160
26161 2003-05-18  Karl Berry  <karl@gnu.org>
26162
26163         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
26164         might actually be set by the user.
26165
26166         * config/depcomp, install-sh, mdate-sh: update from automake.
26167
26168 2003-05-17  Bruno Haible  <bruno@clisp.org>
26169
26170         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
26171         invalid expansion for AC_EGREP_CPP.
26172         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
26173         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
26174         Suggested by Akim Demaille <akim@epita.fr> in
26175         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
26176
26177 2003-05-12  Jim Meyering  <jim@meyering.net>
26178
26179         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
26180         the space-padded-by-default conversion specifiers, %e, %k, %l.
26181
26182 2003-05-12  Bruno Haible  <bruno@clisp.org>
26183
26184         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
26185         the string is longer than 4 KB.
26186
26187 2003-05-11  Karl Berry  <karl@gnu.org>
26188
26189         * config/config.{guess,sub}: update from prep.
26190
26191 2003-05-09  Bruno Haible  <bruno@clisp.org>
26192
26193         * modules/error: Add m4/strerror_r.m4 to file list.
26194
26195 2003-05-03  Bruno Haible  <bruno@clisp.org>
26196
26197         Upgrade to Unicode-4.0.
26198         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
26199         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
26200         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
26201         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
26202         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
26203         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
26204         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
26205         Change width of U+E0100..U+E01EF from 1 to 0.
26206
26207 2003-04-25  Jim Meyering  <jim@meyering.net>
26208
26209         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
26210         of type size_t, not int.
26211
26212 2003-04-25  Bruno Haible  <bruno@clisp.org>
26213
26214         * lib/copy-file.c: Include <stddef.h>, for size_t.
26215
26216 2003-04-21  Paul Eggert  <eggert@twinsun.com>
26217
26218         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
26219         code which expansion is under static control.  Patch imported from
26220         Akim Demaille's patch to Bison; see
26221         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
26222
26223 2003-04-14  Bruno Haible  <bruno@clisp.org>
26224
26225         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
26226
26227 2003-04-11  Jim Meyering  <jim@meyering.net>
26228
26229         Merge changes from Coreutils.
26230
26231         2003-03-22  Jim Meyering  <jim@meyering.net>
26232
26233         * lib/strftime.c (widen): Cast alloca return value to proper type.
26234
26235         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
26236
26237         From GNU libc.
26238         * lib/strftime.c (my_strftime): Handle very large width
26239         specifications for numeric values correctly.  Improve checks for
26240         overflow.
26241
26242         2003-01-19  Jim Meyering  <jim@meyering.net>
26243
26244         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
26245         definitions.
26246         (nl_get_alt_digit) [! defined my_strftime]: Define.
26247         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26248         _nl_get_alt_digit and _nl_get_walt_digit.
26249
26250         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26251         libc. These changes have no effect outside of _LIBC.
26252
26253 2003-04-10  Bruno Haible  <bruno@clisp.org>
26254
26255         * modules/findprog: New file.
26256         * MODULES.html.sh (func_all_modules): Add it.
26257
26258 2003-04-10  Bruno Haible  <bruno@clisp.org>
26259
26260         * m4/findprog.m4: New file.
26261         * m4/eaccess.m4: New file.
26262
26263 2003-04-10  Bruno Haible  <bruno@clisp.org>
26264
26265         * lib/findprog.h: New file, from GNU gettext.
26266         * lib/findprog.c: New file, from GNU gettext.
26267
26268 2003-04-05  Jim Meyering  <jim@meyering.net>
26269
26270         Merge changes from Coreutils.
26271
26272         * lib/exclude.h (PARAMS): Remove definition and uses.
26273         * lib/exclude.c: Remove uses of `PARAMS'.
26274
26275         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26276         Add test-cases for DOS filenames. Declare program_name.
26277         (main): Set up program_name.  Patch by Rich Dawe.
26278
26279         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26280         error from mntctl.
26281         Use mntctl's return value to drive the entry-processing loop, since
26282         we can't rely on the value of the vmt_length member in the last
26283         entry.  On some systems doing so could result in exhausting
26284         virtual memory.  Based in part on a patch from Mike Jetzer.
26285
26286 2003-04-04  Bruno Haible  <bruno@clisp.org>
26287
26288         * modules/linebreak: New file.
26289         * MODULES.html.sh (func_all_modules): Add it.
26290
26291 2003-04-04  Bruno Haible  <bruno@clisp.org>
26292
26293         * m4/linebreak.m4: New file.
26294
26295 2003-04-04  Bruno Haible  <bruno@clisp.org>
26296
26297         * lib/linebreak.h: New file, from GNU gettext.
26298         * lib/linebreak.c: New file, from GNU gettext with slight
26299         modifications.
26300         * lib/lbrkprop.h: New file, from GNU gettext.
26301
26302 2003-04-03  Bruno Haible  <bruno@clisp.org>
26303
26304         * modules/utf8-ucs4: New file.
26305         * modules/utf16-ucs4: New file.
26306         * modules/ucs4-utf8: New file.
26307         * modules/ucs4-utf16: New file.
26308         * MODULES.html.sh (func_all_modules): Add them.
26309
26310 2003-04-03  Bruno Haible  <bruno@clisp.org>
26311
26312         * m4/utf-ucs4.m4: New file.
26313         * m4/ucs4-utf.m4: New file.
26314
26315 2003-04-03  Bruno Haible  <bruno@clisp.org>
26316
26317         * lib/utf8-ucs4.h: New file, from GNU gettext.
26318         * lib/utf16-ucs4.h: New file, from GNU gettext.
26319         * lib/ucs4-utf8.h: New file, from GNU gettext.
26320         * lib/ucs4-utf16.h: New file, from GNU gettext.
26321
26322 2003-04-02  Bruno Haible  <bruno@clisp.org>
26323
26324         * modules/binary-io: New file.
26325         * MODULES.html.sh (func_all_modules): Add it.
26326
26327 2003-04-02  Bruno Haible  <bruno@clisp.org>
26328
26329         * lib/binary-io.h: New file, from GNU gettext.
26330
26331 2003-04-01  Bruno Haible  <bruno@clisp.org>
26332
26333         * modules/pathname: New file.
26334         * MODULES.html.sh (func_all_modules): Add it.
26335
26336 2003-04-01  Bruno Haible  <bruno@clisp.org>
26337
26338         * lib/pathname.h: New file, from GNU gettext.
26339         * lib/concatpath.c: New file, from GNU gettext.
26340
26341 2003-03-30  Bruno Haible  <bruno@clisp.org>
26342
26343         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26344
26345 2003-03-30  Bruno Haible  <bruno@clisp.org>
26346
26347         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26348         function chown() doesn't exist.
26349
26350 2003-03-28  Bruno Haible  <bruno@clisp.org>
26351
26352         * modules/copy-file: New file.
26353         * MODULES.html.sh (func_all_modules): Add it.
26354
26355 2003-03-28  Bruno Haible  <bruno@clisp.org>
26356
26357         * m4/copy-file.m4: New file.
26358
26359 2003-03-28  Bruno Haible  <bruno@clisp.org>
26360
26361         * lib/copy-file.h: New file, from GNU gettext.
26362         * lib/copy-file.c: New file, from GNU gettext.
26363
26364 2003-03-18  Jim Meyering  <jim@meyering.net>
26365
26366         * lib/quote.c (quote_n): Fix typo in comment.
26367
26368 2003-03-18  Bruno Haible  <bruno@clisp.org>
26369
26370         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26371         checking.
26372         * m4/onceonly_2_57.m4: Likewise.
26373
26374 2003-03-17  Bruno Haible  <bruno@clisp.org>
26375
26376         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26377         (m4_quote): Remove macro.
26378         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26379
26380 2003-03-14  Jim Meyering  <jim@meyering.net>
26381
26382         Merge changes from Coreutils.
26383         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26384         to be const, in order to avoid warnings.
26385         (obstack_room): Likewise.
26386         (obstack_empty_p): Likewise.
26387
26388 2003-03-14  Bruno Haible  <bruno@clisp.org>
26389
26390         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26391         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26392
26393 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26394
26395         Merge changes from Bison.
26396         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26397         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26398         when compiling Bison 1.875's `bitset bset = obstack_alloc
26399         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26400         * lib/hash.c: Include <stdbool.h> unconditionally.
26401
26402 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26403
26404         * m4/onceonly.m4 (m4_quote): New macro.
26405         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26406         Quote AC_FOREACH variable-expansions properly.
26407
26408 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26409
26410         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26411
26412 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26413
26414         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26415         Reported by Bruce Becker; see:
26416         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26417
26418 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26419             Bruno Haible  <bruno@clisp.org>
26420
26421         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26422         Reported by John Hughes, see
26423         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26424
26425 2003-02-20  Bruno Haible  <bruno@clisp.org>
26426
26427         * MODULES.html.sh (func_all_modules): Add poll.
26428
26429 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26430
26431         * modules/poll: New file.
26432
26433 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26434
26435         * lib/poll_.h: New file.
26436         * lib/poll.c: New file.
26437
26438 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26439
26440         * m4/poll.m4: New file.
26441
26442 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26443
26444         * modules/mathl: New file.
26445
26446 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26447
26448         * lib/mathl.h: New file.
26449         * lib/acosl.c: New file.
26450         * lib/asinl.c: New file.
26451         * lib/atanl.c: New file.
26452         * lib/ceill.c: New file.
26453         * lib/cosl.c: New file.
26454         * lib/expl.c: New file.
26455         * lib/floorl.c: New file.
26456         * lib/frexpl.c: New file.
26457         * lib/ldexpl.c: New file.
26458         * lib/logl.c: New file.
26459         * lib/sincosl.c: New file.
26460         * lib/sinl.c: New file.
26461         * lib/sqrtl.c: New file.
26462         * lib/tanl.c: New file.
26463         * lib/trigl.c: New file.
26464         * lib/trigl.h: New file.
26465
26466 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26467
26468         * m4/mathl.m4: New file.
26469
26470 2003-02-18  Bruno Haible  <bruno@clisp.org>
26471
26472         * MODULES.html.sh (func_all_modules): Add mathl.
26473
26474 2003-02-17  Bruno Haible  <bruno@clisp.org>
26475
26476         * modules/mkdtemp: New module.
26477         * MODULES.html.sh (func_all_modules): Add it.
26478
26479 2003-02-17  Bruno Haible  <bruno@clisp.org>
26480
26481         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26482
26483 2003-02-17  Bruno Haible  <bruno@clisp.org>
26484
26485         * lib/mkdtemp.h: New file, from GNU gettext.
26486         * lib/mkdtemp.c: New file, from GNU gettext.
26487
26488 2003-02-02  Jim Meyering  <jim@meyering.net>
26489
26490         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26491         e.g. glibc-2.2.93.
26492
26493 2003-01-31  Bruno Haible  <bruno@clisp.org>
26494
26495         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26496         'rpl_rename'.
26497         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26498         'rpl_strnlen'.
26499         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26500         'rpl_strtod'.
26501         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26502         'rpl_utime'.
26503
26504 2003-01-31  Bruno Haible  <bruno@clisp.org>
26505
26506         * lib/rename.c: #undef rename before defining rpl_rename.
26507         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26508
26509 2003-01-30  Bruno Haible  <bruno@clisp.org>
26510
26511         * modules/vasnprintf, modules/vasprintf: New modules.
26512         * MODULES.html.sh (func_all_modules): Add them.
26513
26514 2003-01-30  Bruno Haible  <bruno@clisp.org>
26515
26516         * m4/signed.m4: New file, from GNU gettext.
26517         * m4/longdouble.m4: New file, from GNU gettext.
26518         * m4/wchar_t.m4: New file, from GNU gettext.
26519         * m4/wint_t.m4: New file, from GNU gettext.
26520         * m4/vasnprintf.m4: New file.
26521         * m4/vasprintf.m4: New file.
26522
26523 2003-01-30  Bruno Haible  <bruno@clisp.org>
26524
26525         * lib/printf-args.h: New file, from GNU gettext.
26526         * lib/printf-args.c: New file, from GNU gettext.
26527         * lib/printf-parse.h: New file, from GNU gettext.
26528         * lib/printf-parse.c: New file, from GNU gettext.
26529         * lib/vasnprintf.h: New file, from GNU gettext.
26530         * lib/vasnprintf.c: New file, from GNU gettext.
26531         * lib/asnprintf.c: New file, from GNU gettext.
26532         * lib/vasprintf.h: New file, from GNU gettext with modifications.
26533         * lib/vasprintf.c: New file, from GNU gettext.
26534         * lib/asprintf.c: New file, from GNU gettext.
26535
26536 2003-01-29  Bruno Haible  <bruno@clisp.org>
26537
26538         * modules/stpncpy: New module.
26539         * MODULES.html.sh (func_all_modules): Add it.
26540
26541 2003-01-29  Bruno Haible  <bruno@clisp.org>
26542
26543         * m4/stpncpy.m4: New file.
26544
26545 2003-01-29  Bruno Haible  <bruno@clisp.org>
26546
26547         * lib/stpncpy.h: New file, from GNU gettext with modifications.
26548         * lib/stpncpy.c: New file, from GNU gettext with modifications.
26549
26550 2003-01-28  Bruno Haible  <bruno@clisp.org>
26551
26552         * modules/c-ctype: New module.
26553         * MODULES.html.sh (func_all_modules): Add it.
26554
26555 2003-01-28  Bruno Haible  <bruno@clisp.org>
26556
26557         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
26558         Paul Eggert.
26559         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
26560         Paul Eggert.
26561
26562 2003-01-27  Bruno Haible  <bruno@clisp.org>
26563
26564         * modules/xsetenv: New module.
26565         * MODULES.html.sh (func_all_modules): Add it.
26566
26567 2003-01-27  Bruno Haible  <bruno@clisp.org>
26568
26569         * lib/xsetenv.h: New file, from GNU gettext.
26570         * lib/xsetenv.c: New file, from GNU gettext.
26571
26572 2003-01-23  Jim Meyering  <jim@meyering.net>
26573
26574         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
26575         from working on systems without dirfd (at least Irix and OSF1/Tru64).
26576
26577 2003-01-23  Bruno Haible  <bruno@clisp.org>
26578
26579         * modules/minmax: New module.
26580         * MODULES.html.sh (func_all_modules): Add it.
26581
26582 2003-01-23  Bruno Haible  <bruno@clisp.org>
26583
26584         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
26585         Eggert.
26586
26587 2003-01-22  Bruno Haible  <bruno@clisp.org>
26588
26589         * modules/exit: New module.
26590         * MODULES.html.sh (func_all_modules): Add it.
26591
26592 2003-01-22  Bruno Haible  <bruno@clisp.org>
26593
26594         * lib/exit.h: New file, from GNU gettext.
26595
26596 2003-01-19  Bruno Haible  <bruno@clisp.org>
26597
26598         * gnulib-tool: Recognize option --extract-maintainer.
26599         (func_get_maintainer): New function.
26600         * modules/*: Add Maintainer entry.
26601
26602 2003-01-16  Jim Meyering  <jim@meyering.net>
26603
26604         * m4/regex.m4: The `regex' struct is both input and output.
26605         Initialize it before each use.  Patch by Tim Waugh.
26606
26607 2003-01-16  Bruno Haible  <bruno@clisp.org>
26608
26609         * MODULES.html.sh: Add a table of contents. Add the module name as
26610         leftmost column. Add hyperlinks.
26611
26612 2003-01-15  Bruno Haible  <bruno@clisp.org>
26613
26614         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
26615
26616 2003-01-15  Bruno Haible  <bruno@clisp.org>
26617
26618         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
26619         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
26620         suffix.
26621
26622 2003-01-15  Bruno Haible  <bruno@clisp.org>
26623
26624         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
26625
26626 2003-01-15  Bruno Haible  <bruno@clisp.org>
26627
26628         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
26629         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
26630
26631 2003-01-14  Jim Meyering  <jim@meyering.net>
26632
26633         * lib/same.c (same_name): Tweak a comment.
26634
26635 2003-01-14  Bruno Haible  <bruno@clisp.org>
26636
26637         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
26638         when a string comparison is sufficient.
26639
26640 2003-01-14  Bruno Haible  <bruno@clisp.org>
26641
26642         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
26643         'unsigned int'.
26644
26645 2003-01-14  Bruno Haible  <bruno@clisp.org>
26646
26647         * lib/hash-pjw.c: Add comment about low quality of this function.
26648
26649 2003-01-13  Bruno Haible  <bruno@clisp.org>
26650
26651         * modules/stpcpy: Distribute lib/stpcpy.h.
26652         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
26653
26654 2003-01-13  Bruno Haible  <bruno@clisp.org>
26655
26656         * modules/*: Add a description.
26657         * modules/strpbrk: Fix Makefile.am snippet.
26658         * modules/strtoimax: Fix dependencies.
26659         * modules/strtoumax: Likewise.
26660
26661 2003-01-13  Bruno Haible  <bruno@clisp.org>
26662
26663         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
26664         * modules/alloca (Makefile.am): All object files depend on alloca.h.
26665         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
26666
26667 2003-01-13  Bruno Haible  <bruno@clisp.org>
26668
26669         * gnulib-tool (func_create_testdir): Store config/* files in the main
26670         directory.
26671         * config.rpath: Move to ...
26672         * config/config.rpath: ... here.
26673         * modules/gettext: Contains config/config.rpath, not config.rpath.
26674         * modules/iconv: Likewise.
26675
26676 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26677
26678         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26679         to avoid collisions with libcurses and libreadline.
26680
26681         * m4/getstr.m4: Remove.
26682         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
26683
26684 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26685
26686         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26687         to avoid collisions with libcurses and libreadline.
26688
26689         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
26690         * lib/getstr.h, getstr.c: Remove.
26691         * lib/getline.c: Include "getline.h", to check interface.
26692         Move body of old getstr.c here: this defines MIN_CHUNK and
26693         declares getdelim2, which is renamed from getstr.
26694         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
26695
26696         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
26697         All uses changed.
26698         * lib/linebuffer.h: Likewise.
26699         (readline): Remove backward-compatibility macro.
26700
26701 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26702
26703         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26704         to avoid collisions with libcurses and libreadline.
26705         * getstr: Remove.
26706         * MODULES.html.sh: Remove getstr.
26707         * modules/getline: Depend on unlocked-io, not getstr.
26708
26709 2003-01-12  Jim Meyering  <jim@meyering.net>
26710
26711         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
26712
26713 2003-01-10  Bruno Haible  <bruno@clisp.org>
26714
26715         * modules/alloca: Change Makefile.am requirements. Simplify Include
26716         requirements. Add lib/alloca_.h to file list.
26717
26718 2003-01-10  Bruno Haible  <bruno@clisp.org>
26719
26720         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
26721
26722 2003-01-10  Bruno Haible  <bruno@clisp.org>
26723
26724         * lib/alloca_.h: New file.
26725         * lib/getdate.y: Unconditionally include alloca.h.
26726         * lib/makepath.c: Likewise.
26727         * lib/setenv.c: Likewise.
26728         * lib/userspec.c: Likewise.
26729
26730 2003-01-09  Karl Berry  <karl@gnu.org>
26731
26732         * MODULES.html.sh: include `dirname $0` in PATH, to find
26733         gnulib-tool.
26734
26735 2003-01-09  Bruno Haible  <bruno@clisp.org>
26736
26737         * modules/stdbool: Change configure.ac, Makefile.am requirements.
26738         Simplify Include requirements. Add lib/stdbool.h.in to file list.
26739
26740 2003-01-09  Bruno Haible  <bruno@clisp.org>
26741
26742         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
26743
26744 2003-01-09  Bruno Haible  <bruno@clisp.org>
26745
26746         * lib/stdbool.h.in: New file.
26747
26748 2003-01-09  Bruno Haible  <bruno@clisp.org>
26749
26750         * gnulib-tool (func_all_modules): Ignore files ending in ~.
26751         * MODULES.html.sh: Likewise.
26752
26753 2003-01-08  Jim Meyering  <jim@meyering.net>
26754
26755         * lib/full-write.c: Undefine and define-away `const' after inclusion
26756         of errno.h, not before.  Suggestion from Bruno Haible.
26757
26758 2003-01-08  Bruno Haible  <bruno@clisp.org>
26759
26760         * modules/full-read: Depend on full-write.
26761
26762 2003-01-08  Bruno Haible  <bruno@clisp.org>
26763
26764         * lib/safe-read.c: Include specification header first, to ensure its
26765         selfcontainedness.
26766         * lib/full-write.c: Likewise.
26767
26768 2003-01-07  Jim Meyering  <jim@meyering.net>
26769
26770         * lib/full-write.c: Rework so that it may serve to define full_read,
26771         too.
26772         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
26773
26774 2003-01-07  Bruno Haible  <bruno@clisp.org>
26775
26776         * lib/strtoimax.c: Include <stdint.h> as an alternative to
26777         <inttypes.h>.
26778         * lib/xstrtol.h: Likewise.
26779         * lib/xstrtoimax.c: Likewise.
26780         * lib/xstrtoumax.c: Likewise.
26781         * lib/human.h: Likewise.
26782
26783         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
26784         on systems that have <inttypes.h> but not <stdint.h>.
26785
26786 2003-01-07  Bruno Haible  <bruno@clisp.org>
26787
26788         * MODULES.html.sh: Add copyright notice.
26789         (missed_files): Omit CVS directory entries.
26790         (func_module): Make it work with sed-3.02.
26791         * MODULES.txt: Remove file.
26792
26793 2003-01-06  Jim Meyering  <jim@meyering.net>
26794
26795         * lib/version-etc.c: Update year in translatable copyright string.
26796
26797 2003-01-03  Karl Berry  <karl@gnu.org>
26798
26799         * config/config.{guess,sub}: update from prep.
26800
26801 2003-01-02  Karl Berry  <karl@gnu.org>
26802
26803         * doc/COPYING.DOC: belatedly updated to 1.2.
26804
26805 2003-01-01  Karl Berry  <karl@gnu.org>
26806
26807         * gnulib-tool (func_verify_module): report module name $module in
26808         error message, not $1.
26809         * gnulib-tool (create-testdir): don't complain if destdir couldn't
26810         be created, only if it doesn't exist.
26811         * gnulib-tool (last_checkin_date): don't expand the $Date here.
26812
26813 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26814
26815         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
26816
26817 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26818
26819         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
26820         memcmp if strcoll doesn't work.
26821
26822 2002-12-31  Bruno Haible  <bruno@clisp.org>
26823
26824         * lib/utime.c (utime_null): No need to call ftruncate if the file was
26825         nonempty.
26826
26827 2002-12-31  Bruno Haible  <bruno@clisp.org>
26828
26829         * lib/memcoll.c (STRCOLL): New macro.
26830         (memcoll): Use it.
26831
26832 2002-12-31  Bruno Haible  <bruno@clisp.org>
26833
26834         * lib/localcharset.h: New file.
26835         * lib/localcharset.c: Include it.
26836         * lib/unicodeio.c: Likewise.
26837
26838 2002-12-31  Bruno Haible  <bruno@clisp.org>
26839
26840         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
26841         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
26842
26843 2002-12-31  Bruno Haible  <bruno@clisp.org>
26844
26845         * lib/getline.h: Include <stddef.h>, for size_t.
26846
26847         * lib/unicodeio.h: Include <stddef.h>, for size_t.
26848         * lib/unicodeio.c: Don't include <stddef.h>.
26849
26850 2002-12-31  Bruno Haible  <bruno@clisp.org>
26851
26852         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
26853         HAVE_TM_ZONE.
26854
26855 2002-12-24  Karl Berry  <karl@gnu.org>
26856
26857         * config/config.guess: update from prep.
26858
26859 2002-12-24  Bruno Haible  <bruno@clisp.org>
26860
26861         General infrasructure.
26862         * m4/README: Rewritten.
26863         * m4/onceonly.m4: New file.
26864         * m4/onceonly_2_57.m4: New file.
26865
26866         Module atexit.
26867         * m4/atexit.m4: New file.
26868
26869         Module strtod.
26870         * m4/strtod.m4: New file.
26871
26872         Module strtol.
26873         * m4/strtol.m4: New file.
26874
26875         Module strtoul.
26876         * m4/strtoul.m4: New file.
26877
26878         Module memchr.
26879         * m4/memchr.m4: New file.
26880
26881         Module memcmp.
26882         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
26883         (jm_FUNC_MEMCMP): Invoke it.
26884
26885         Module memcpy.
26886         * m4/memcpy.m4: New file.
26887
26888         Module memmove.
26889         * m4/memmove.m4: New file.
26890
26891         Module memset.
26892         * m4/memset.m4: New file.
26893
26894         Module strcspn.
26895         * m4/strcspn.m4: New file.
26896
26897         Module strpbrk.
26898         * m4/strpbrk.m4: New file.
26899
26900         Module strstr.
26901         * m4/strstr.m4: New file.
26902
26903         Module strerror.
26904         * m4/strerror.m4: New file.
26905
26906         Module mktime.
26907         * m4/mktime.m4: Renamed from jm-mktime.m4.
26908         (gl_PREREQ_MKTIME): New macro.
26909         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
26910
26911         Module malloc.
26912         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
26913         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
26914         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
26915
26916         Module realloc.
26917         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
26918         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
26919         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
26920
26921         Module strftime.
26922         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
26923         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
26924         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
26925         gl_TM_GMTOFF.
26926         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
26927
26928         Module xalloc.
26929         * m4/xalloc.m4: New file.
26930
26931         Module alloca.
26932         * m4/alloca.m4: New file.
26933
26934         Module putenv.
26935         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
26936         (jm_FUNC_PUTENV): Invoke it.
26937
26938         Module setenv.
26939         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
26940         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
26941         when invoked twice.
26942         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
26943         gt_FUNC_SETENV.
26944
26945         Module memrchr.
26946         * m4/memrchr.m4: New file.
26947
26948         Module stpcpy.
26949         * m4/stpcpy.m4: New file.
26950
26951         Module strcase.
26952         * m4/strcase.m4: New file.
26953
26954         Module strdup.
26955         * m4/strdup.m4: New file.
26956
26957         Module strnlen.
26958         * m4/strnlen.m4: New file.
26959
26960         Module strndup.
26961         * m4/strndup.m4: New file.
26962
26963         Module xstrtod.
26964         * m4/xstrtod.m4: New file.
26965
26966         Module xstrtol.
26967         * m4/xstrtol.m4: New file.
26968
26969         Module getdate.
26970         * m4/getdate.m4: New file.
26971
26972         Module unlocked-io.
26973         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
26974         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
26975         * m4/jm-glibc-io.m4n: Remove file.
26976
26977         Module long-options.
26978         * m4/long-options.m4: New file.
26979
26980         Module md5.
26981         * m4/md5.m4: New file.
26982
26983         Module sha.
26984         * m4/sha.m4: New file.
26985
26986         Module getstr.
26987         * m4/getstr.m4: New file.
26988
26989         Module getline.
26990         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
26991         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
26992         <sys/types.h>, for size_t. Use the function name gnu_getline, not
26993         simply getline. Infoke gl_PREREQ_GETLINE.
26994
26995         Module obstack.
26996         * m4/obstack.m4: New file.
26997
26998         Module hash.
26999         * m4/hash.m4: New file.
27000
27001         Module readtokens.
27002         * m4/readtokens.m4: New file.
27003
27004         Module strverscmp.
27005         * m4/strverscmp.m4: New file.
27006
27007         Module stdbool.
27008         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27009         OSF/1.
27010
27011         Module strtoll.
27012         * m4/strtoll.m4: New file.
27013
27014         Module strtoull.
27015         * m4/strtoull.m4: New file.
27016
27017         Module strtoimax.
27018         * m4/strtoimax.m4: New file.
27019
27020         Module strtoumax.
27021         * m4/strtoumax.m4: New file.
27022
27023         Module xstrtoimax.
27024         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27025         jm_AC_PREREQ_XSTRTOIMAX.
27026         Moved the strtol prerequisites to strtol.m4.
27027         Moved the strtoll prerequisites to strtoll.m4.
27028         Moved the strtoimax prerequisites to strtoimax.m4.
27029
27030         Module xstrtoumax.
27031         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27032         jm_AC_PREREQ_XSTRTOUMAX.
27033         Moved the strtoul prerequisites to strtoul.m4.
27034         Moved the strtoull prerequisites to strtoull.m4.
27035         Moved the strtoumax prerequisites to strtoumax.m4.
27036
27037         Module chown.
27038         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27039         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27040
27041         Module dup2.
27042         * m4/dup2.m4: New file.
27043
27044         Module ftruncate.
27045         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27046         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27047
27048         Module getgroups.
27049         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27050         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27051
27052         Module gettimeofday.
27053         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27054         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27055         gl_PREREQ_GETTIMEOFDAY.
27056
27057         Module mkdir.
27058         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27059         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27060
27061         Module mkstemp.
27062         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27063         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27064         jm_AC_TYPE_UINTMAX_T.
27065         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27066
27067         Module stat.
27068         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27069         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
27070
27071         Module lstat.
27072         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
27073         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
27074
27075         Module timespec.
27076         * m4/timespec.m4 (gl_TIMESPEC): New macro.
27077         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
27078         * m4/st_mtim.m4: Indentation.
27079
27080         Module nanosleep.
27081         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
27082         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
27083         gl_PREREQ_NANOSLEEP.
27084
27085         Module regex.
27086         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
27087         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
27088         (gl_REGEX): New macro.
27089
27090         Module rename.
27091         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
27092         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
27093
27094         Module rmdir.
27095         * m4/rmdir.m4: New file.
27096
27097         Module utime.
27098         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
27099         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
27100         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
27101
27102         Module dirname.
27103         * m4/dirname.m4: New file.
27104
27105         Module getopt.
27106         * m4/getopt.m4: New file.
27107
27108         Module unistd-safer.
27109         * m4/unistd-safer.m4: New file.
27110
27111         Module fnmatch.
27112         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
27113         declaration.
27114         (gl_PREREQ_FNMATCH_EXTRA): New macro.
27115         (gl_FUNC_FNMATCH_POSIX): New macro.
27116         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
27117         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
27118         simply fnmatch.
27119
27120         Module exclude.
27121         * m4/exclude.m4: New file.
27122
27123         Module human.
27124         * m4/human.m4: New file.
27125
27126         Module acl.
27127         * m4/acl.m4: Nop.
27128
27129         Module backupfile.
27130         * m4/backupfile.m4: New file.
27131         * m4/d-ino.m4: Indentation.
27132
27133         Module fsusage.
27134         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
27135         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
27136         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
27137
27138         Module dirfd.
27139         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
27140         requirements.
27141
27142         Module euidaccess.
27143         * m4/euidaccess.m4: New file.
27144
27145         Module file-type.
27146         * m4/file-type.m4: New file.
27147
27148         Module fileblocks.
27149         * m4/fileblocks.m4: New file.
27150
27151         Module filemode.
27152         * m4/filemode.m4: New file.
27153
27154         Module isdir.
27155         * m4/isdir.m4: New file.
27156
27157         Module lchown.
27158         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
27159         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
27160
27161         Module makepath.
27162         * m4/makepath.m4: New file.
27163
27164         Module modechange.
27165         * m4/modechange.m4: New file.
27166
27167         Module mountlist.
27168         * m4/mountlist.m4: New file.
27169         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
27170         Indentation.
27171
27172         Module path-concat.
27173         * m4/path-concat.m4: New file.
27174
27175         Module pathmax.
27176         * m4/pathmax.m4: New file.
27177
27178         Module same.
27179         * m4/same.m4: New file.
27180
27181         Module save-cwd.
27182         * m4/save-cwd.m4: New file.
27183
27184         Module savedir.
27185         * m4/savedir.m4: New file.
27186
27187         Module xgetcwd.
27188         * m4/xgetcwd.m4: New file.
27189         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
27190
27191         Module xreadlink.
27192         * m4/xreadlink.m4: New file.
27193
27194         Module safe-read.
27195         * m4/safe-read.m4: New file.
27196
27197         Module safe-write.
27198         * m4/safe-write.m4: New file.
27199
27200         Module closeout.
27201         * m4/closeout.m4: New file.
27202
27203         Module stdio-safer.
27204         * m4/stdio-safer.m4: New file.
27205
27206         Module getpass.
27207         * m4/getpass.m4: New file.
27208
27209         Module getugroups.
27210         * m4/getugroups.m4: New file.
27211
27212         Module group-member.
27213         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
27214         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
27215
27216         Module idcache.
27217         * m4/idcache.m4: New file.
27218
27219         Module userspec.
27220         * m4/userspec.m4: New file.
27221
27222         Module gettime.
27223         * m4/clock_time.m4: New file.
27224         * m4/gettime.m4: New file.
27225
27226         Module settime.
27227         * m4/settime.m4: New file.
27228
27229         Module posixtm.
27230         * m4/posixtm.m4: New file.
27231
27232         Module gethostname.
27233         * m4/gethostname.m4: New file.
27234
27235         Module canon-host.
27236         * m4/canon-host.m4: New file.
27237
27238         Module gettext.
27239         * m4/codeset.m4: New file, from gettext-0.11.5.
27240         * m4/gettext.m4: New file, from gettext-0.11.5.
27241         * m4/glibc21.m4: New file, from gettext-0.11.5.
27242         * m4/iconv.m4: New file, from gettext-0.11.5.
27243         * m4/intdiv0.m4: New file, from gettext-0.11.5.
27244         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
27245         * m4/inttypes.m4: New file, from gettext-0.11.5.
27246         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27247         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27248         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27249         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27250         * m4/lib-link.m4: New file, from gettext-0.11.5.
27251         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27252         * m4/progtest.m4: New file, from gettext-0.11.5.
27253         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27254         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27255         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27256
27257         Module localcharset.
27258         * m4/localcharset.m4: New file.
27259
27260         Module hard-locale.
27261         * m4/hard-locale.m4: New file.
27262
27263         Module mbswidth.
27264         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27265         onceonly macros.
27266         * m4/mbrtowc.m4: Add comment.
27267
27268         Module memcasecmp.
27269         * m4/memcasecmp.m4: New file.
27270
27271         Module memcoll.
27272         * m4/memcoll.m4: New file.
27273
27274         Module unicodeio.
27275         * m4/unicodeio.m4: New file.
27276
27277         Module rpmatch.
27278         * m4/rpmatch.m4: New file.
27279
27280         Module yesno.
27281         * m4/yesno.m4: New file.
27282
27283         Module exitfail.
27284         * m4/exitfail.m4: New file.
27285
27286         Module c-stack.
27287         * m4/c-stack.m4 (gl_C_STACK): New macro.
27288         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27289
27290         Module error.
27291         * m4/error.m4 (gl_ERROR): New macro.
27292         (jm_PREREQ_ERROR): Use onceonly macros.
27293
27294         Module fatal.
27295         * m4/fatal.m4: New file.
27296
27297         Module getloadavg.
27298         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27299         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27300
27301         Module getpagesize.
27302         * m4/getpagesize.m4: New file.
27303
27304         Module getusershell.
27305         * m4/getusershell.m4: New file.
27306
27307         Module physmem.
27308         * m4/physmem.m4: New file.
27309
27310         Module posixver.
27311         * m4/posixver.m4: New file.
27312
27313         Module quotearg.
27314         * m4/quotearg.m4: New file.
27315
27316         Module quote.
27317         * m4/quote.m4: New file.
27318
27319         Module readutmp.
27320         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27321
27322         Module sig2str.
27323         * m4/sig2str.m4: New file.
27324
27325         Other.
27326         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27327         ulonglong.m4.
27328         * m4/intmax_t.m4: New file.
27329         * m4/d-type.m4: Indentation.
27330         * m4/jm-macros.m4: Update.
27331         * m4/prereq.m4 (jm_PREREQ): Update.
27332         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27333         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27334         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27335         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27336         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27337         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27338         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27339         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27340         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27341         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27342         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27343         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27344         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27345         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27346         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27347         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27348         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27349         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27350         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27351
27352 2002-12-24  Bruno Haible  <bruno@clisp.org>
27353
27354         * MODULES.txt: Update according to m4/ changes.
27355
27356         Module gettext.
27357         * config.rpath: New file, from gettext-0.11.5.
27358
27359         * modules/*: New module descriptions.
27360         * gnulib-tool: New file.
27361         * MODULES.html.sh: New file.
27362
27363 2002-12-21  Karl Berry  <karl@gnu.org>
27364
27365         * doc/fdl.texi: update to version 1.2.
27366
27367 2002-12-19  Karl Berry  <karl@gnu.org>
27368
27369         * config/config.guess: update from prep.
27370
27371 2002-12-18  Bruno Haible  <bruno@clisp.org>
27372
27373         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27374         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27375
27376 2002-12-17  Bruno Haible  <bruno@clisp.org>
27377
27378         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27379         stdlib.h, string.h.
27380
27381 2002-12-17  Bruno Haible  <bruno@clisp.org>
27382
27383         * lib/canon-host.c (strdup): Remove unused declaration.
27384
27385         * lib/fsusage.c: Include full_read.h.
27386         (get_fs_usage): Use full_read instead of safe_read.
27387
27388         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27389
27390 2002-12-12  Karl Berry  <karl@gnu.org>
27391
27392         * config/config.guess: update from prep.
27393
27394 2002-12-11  Bruno Haible  <bruno@clisp.org>
27395
27396         * m4/setenv.m4: New file, from gettext-0.11.5.
27397
27398 2002-12-11  Bruno Haible  <bruno@clisp.org>
27399
27400         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27401         not unsetenv().
27402         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27403         modifications:
27404
27405         2002-12-11  Bruno Haible  <bruno@clisp.org>
27406
27407                 * setenv.c (alloca): Fall back to malloc.
27408                 (freea): New macro.
27409                 (setenv): Use freea() to free memory allocated with alloca().
27410
27411         2002-11-13  Bruno Haible  <bruno@clisp.org>
27412
27413                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27414                 function declarations.
27415                 * unsetenv.c (unsetenv): Likewise.
27416
27417         2002-03-04  Bruno Haible  <bruno@clisp.org>
27418
27419                 Portability to AIX 4.3.3.
27420                 * unsetenv.c: New file, extracted from setenv.c.
27421                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27422
27423         2001-12-20  Bruno Haible  <bruno@clisp.org>
27424
27425                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27426                 use malloc instead. For SunOS 4.
27427
27428         2001-12-11  Bruno Haible  <bruno@clisp.org>
27429
27430                 * setenv.c: Declare alloca.
27431                 (compar_fn_t): New typedef.
27432                 (KNOWN_VALUE, STORE_VALUE): Use it.
27433
27434         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27435         setenv.h.
27436
27437 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27438
27439         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27440         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27441         Choose values that are less likely to collide with system fnmatch
27442         options.
27443         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27444         defined (e.g., a pure POSIX system).
27445         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27446         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27447
27448 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27449
27450         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27451         a pain in practice to deal with generated m4 files.  This change
27452         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27453
27454         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27455         and jm-glibc-io.m4, as they are no longer a special case.
27456         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27457         kludge and the auto-generation stuff.  Check only whether the
27458         functions are declared, not whether they exist, since older hosts
27459         that don't declare the functions can't use the optimization anyway.
27460
27461 2002-12-06  Jim Meyering  <jim@meyering.net>
27462
27463         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27464
27465         Merge in changes from libc's misc/error.c, in preparation
27466         for the merge of gnulib's changes back into libc.
27467
27468         * lib/error.c (_): Define only if not already defined.
27469         Move definition to follow all #include directives.
27470         Include unlocked-io.h only if !_LIBC.
27471         [_LIBC]: Include <libio/libioP.h>.
27472         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27473         (fflush): Tweak definition to use INTUSE.
27474         (putc): Define.
27475
27476 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27477
27478         * lib/alloca.c [defined emacs]: Include "lisp.h".
27479         (xalloc_die) [defined emacs]: New macro.
27480         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27481         [! defined emacs]: Include <xalloc.h>.
27482         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27483         (pointer): Typedef to POINTER_TYPE *.
27484         (malloc): Remove decl; we now always use xmalloc.
27485         (alloca): Use old-style definition, since Emacs needs this.
27486         Check for arithmetic overflow when computing combined size.
27487
27488 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27489
27490         Do not generate unlocked-io.h automatically, since it's easier to
27491         maintain it by hand.
27492
27493         * lib/unlocked-io.h: New file, from GNU diffutils,
27494         but with proper copyright notice and attribution.
27495         * lib/gen-uio: Remove.
27496         * lib/Makefile.am: Add copyright notice.
27497         (libfetish_a_SOURCES): Add unlocked-io.h.
27498         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27499         (DISTCLEANFILES, io_functions): Remove macros.
27500         (EXTRA_DIST): Remove gen_uio.
27501         (unlocked-io.h): Remove rule.
27502
27503 2002-12-04  Jim Meyering  <jim@meyering.net>
27504
27505         Reflect the fact that stat.c and lstat.c are no longer generated.
27506         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27507         (DISTCLEANFILES): Likewise.
27508         (EXTRA_DIST): Likewise.
27509         (all_local): Don't depend on stat.c or lstat.c.
27510         (stat.c, lstat.c): Remove rules.
27511         (EXTRA_DIST): Remove xstat.in.
27512
27513         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27514         * lib/stat.c: New file.  Contents mostly from xstat.in.
27515         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27516         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27517
27518         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27519         too.
27520         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27521
27522 2002-12-03  Jim Meyering  <jim@meyering.net>
27523
27524         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27525         but not semantics, to minimize the differences between these two files.
27526         (safe_read): Change comment to mention SAFE_READ_ERROR.
27527
27528         * lib/safe-read.c (IS_EINTR): Define.
27529         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27530
27531 2002-12-02  Jim Meyering  <jim@meyering.net>
27532
27533         * lib/safe-read.c (EINTR): Define.
27534         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27535         (INT_MAX): Provide fallback.
27536         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
27537
27538         * lib/safe-read.h (SAFE_READ_ERROR): Define.
27539
27540 2002-12-02  Bruno Haible  <bruno@clisp.org>
27541
27542         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
27543         Define, taken from safe-read.c.
27544         (INT_MAX): Provide fallback.
27545         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
27546         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
27547
27548         * lib/safe-read.c (EINTR): Remove definition.
27549         (safe_read): Don't use EINTR if it is absent.
27550
27551 2002-12-01  Jim Meyering  <jim@meyering.net>
27552
27553         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
27554         zero.
27555         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
27556
27557 2002-11-27  Paul Eggert  <eggert@twinsun.com>
27558
27559         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
27560         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
27561         with `if (! (value < limit)) abort ();', for readability.
27562
27563 2002-11-26  Karl Berry  <karl@gnu.org>
27564
27565         * lib/strdup.c: copy from libc again, with jim's ok.
27566         * lib/.cppi-disable: re-add strdup.c
27567
27568 2002-11-25  Karl Berry  <karl@gnu.org>
27569
27570         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
27571         instead of "strtol.c".
27572
27573 2002-11-25  Karl Berry  <karl@gnu.org>
27574
27575         * config/install-sh: update from automake for variable quoting, $0 in
27576         error msgs, etc.
27577
27578         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
27579         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
27580         entry.
27581
27582 2002-11-25  Jim Meyering  <jim@meyering.net>
27583
27584         * lib/mktime.c: Sync from libc, now that it has the latest fix.
27585
27586 2002-11-24  Karl Berry  <karl@gnu.org>
27587
27588         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
27589         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
27590
27591 2002-11-24  Jim Meyering  <jim@meyering.net>
27592
27593         Update from coreutils:
27594
27595         * lib/mktime.c: Merge in changes from libc.
27596
27597         Avoid a link-time failure on some Linux systems.
27598         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
27599         (otherwise).
27600         (__mon_yday): Declare with the STATIC attribute.
27601         (__mktime_internal): Likewise.
27602         Based on a report from Greg Schafer.
27603
27604 2002-11-23  Jim Meyering  <jim@meyering.net>
27605
27606         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
27607         Use `unsigned', not `int', as type of index.
27608
27609         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
27610
27611         * lib/fsusage.c: Remove unneeded parentheses around operands of
27612         `defined'.
27613
27614 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27615
27616         * lib/quotearg.h: Allow multiple inclusion by surrounding with
27617         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
27618         so that we can be included first.
27619         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
27620         * lib/quotearg.c: Include quotearg.h immediately after config.h.
27621         No need to include stddef.h or sys/types.h any more.
27622         Surround local include files with "", not "<>".
27623         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
27624         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
27625         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
27626         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
27627         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
27628         (ISPRINT): Remove; no longer needed now that we assume C89.
27629
27630         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
27631         Preserve errno.
27632
27633         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
27634         quotearg_char): Use SIZE_MAX rather than
27635         (size_t) -1 when we are talking about "infinity".
27636
27637         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
27638
27639 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27640
27641         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
27642         hint that one should use `if (! x) abort ();' rather than `assert
27643         (x);', and anyway it's one less thing to worry about configuring.
27644         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
27645         hash_rehash, hash_insert): Use abort rather than assert.
27646
27647 2002-11-22  Bruno Haible  <bruno@clisp.org>
27648
27649         * lib/safe-read.h: Assume C89. Add comments.
27650         (safe_read): Change return type to size_t.
27651         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
27652         byte counts > SSIZE_MAX correctly.
27653         * lib/safe-write.h: New file.
27654         * lib/safe-write.c: New file.
27655         * lib/full-read.h: New file.
27656         * lib/full-read.c: New file.
27657         * lib/full-write.h: Assume C89. Add comments.
27658         * lib/full-write.c: Include safe-write.h.
27659         (full_write): Rewritten to use safe_write.
27660         Suggested by Jim Meyering and Paul Eggert.
27661
27662 2002-11-21  Jim Meyering  <jim@meyering.net>
27663
27664         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
27665
27666         Merge in changes from the coreutils.
27667
27668         2002-09-25  Paul Eggert  <eggert@twinsun.com>
27669         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
27670         <stdint.h>.
27671         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
27672         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
27673         int.  Work more efficiently if X is the same width as uintmax_t.
27674         Do not compare X to -1, to avoid bogus compiler warning.
27675         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
27676         Don't assume that f_frsize and f_bsize are the same type.
27677
27678         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
27679         warning on FreeBSD.
27680
27681         * lib/makepath.c (make_path): Restore umask *before* creating the final
27682         component.
27683         (make_path): Minor reformatting.
27684
27685         * lib/xmalloc.c: Adjust to work with new autoconf macros,
27686         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
27687         HAVE_MALLOC/HAVE_REALLOC.
27688
27689         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
27690         dummy ones.  At least on GNU/Linux systems, `auto' means something
27691         else.
27692         From Michael Stone.
27693
27694 2002-11-21  Bruno Haible  <bruno@clisp.org>
27695
27696         Remove case insensitive option matching.
27697         * lib/argmatch.h (argcasematch): Remove declaration.
27698         (ARGCASEMATCH): Remove macro.
27699         (__xargmatch_internal): Remove case_sensitive argument.
27700         (XARGMATCH): Update.
27701         (XARGCASEMATCH): Remove macro.
27702         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
27703         case_sensitive argument.
27704         (argcasematch): Remove function.
27705         (__xargmatch_internal): Remove case_sensitive argument.
27706         (main): Use XARGMATCH instead of XARGCASEMATCH.
27707
27708         * lib/xmalloc.c: Change compile-time error message. Add comment about
27709         required autoconf version.
27710
27711 2002-11-20  Paul Eggert  <eggert@twinsun.com>
27712
27713         Merge argmatch cleanups from Bison.  Assume C89.
27714
27715         * lib/argmatch.c: Include config.h here, not in argmatch.h.
27716         Include stdlib.h, for EXIT_FAILURE.
27717         Always include <string.h>, since we assume C89.
27718         (EXIT_FAILURE): Remove pre-C89 bug workaround.
27719         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
27720         Include <stddef.h> instead, since it's all we need for size_t.
27721         (PARAMS): Remove.  All uses removed.
27722         (ARRAY_CARDINALITY): Do not bother to #undef.
27723         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
27724         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27725         Remove unnecessary parentheses.
27726         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27727         Insert necessary parentheses.
27728         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
27729         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
27730
27731 2002-11-19  Bruno Haible  <bruno@clisp.org>
27732
27733         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
27734         * lib/mbswidth.h: Include <stddef.h>, for size_t.
27735
27736         * lib/mbswidth.h (PARAMS): Remove macro.
27737         (mbswidth, mbsnwidth): Use ANSI C function declarations.
27738         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
27739
27740         * lib/gcd.h (PARAMS): Remove macro.
27741         (gcd): Use ANSI C function declarations.
27742         * lib/gcd.c (gcd): Likewise.
27743
27744 2002-11-15  Bruno Haible  <bruno@clisp.org>
27745
27746         * lib/strcspn.c: Include <stddef.h>.
27747         (strcspn): Use ANSI C function declaration. Change return type to
27748         size_t. Use NULL.
27749         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
27750         (strpbrk): Use NULL.
27751         * lib/strpbrk.h (PARAMS): Remove macro.
27752         (strpbrk): Use ANSI C function declaration.
27753         * lib/strstr.c: Don't include <sys/types.h>.
27754         * lib/strstr.h (PARAMS): Remove macro.
27755         (strstr): Use ANSI C function declarations.
27756
27757 2002-11-14  Karl Berry  <karl@gnu.org>
27758
27759         * config/mkinstalldirs: `do' on separate line, instead of
27760         `for var; do'.
27761
27762 2002-11-06  Bruno Haible  <bruno@clisp.org>
27763
27764         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
27765         * lib/gcd.c (gcd): Likewise.
27766
27767 2002-11-05  Bruno Haible  <bruno@clisp.org>
27768
27769         * lib/gcd.h: New file, from gettext-0.11.5.
27770         * lib/gcd.c: New file, from gettext-0.11.5.
27771
27772 2002-11-05  Bruno Haible  <bruno@clisp.org>
27773
27774         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27775         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27776         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27777         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27778
27779         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
27780         <libintl.h>.
27781         * lib/makepath.c: Include gettext.h instead of <locale.h> and
27782         <libintl.h>.
27783
27784         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
27785         * lib/human.c: Include gettext.h instead of <libintl.h>.
27786         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
27787         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
27788         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
27789         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
27790         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
27791         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
27792         (textdomain): Remove definition.
27793         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
27794
27795         * lib/long-options.c: Remove include of <libintl.h> and definition of
27796         _.
27797         * lib/same.c: Remove include of <libintl.h> and definition of _.
27798
27799 2002-11-04  Owen Taylor  <otaylor@redhat.com>
27800
27801         * lib/config.charset: A few additions for Solaris.
27802
27803 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27804
27805         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
27806         * lib/localcharset.c (locale_charset): Declare as extern "C".
27807
27808 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27809
27810         * lib/config.charset: msdos in uk_UA uses CP1125.
27811
27812 2002-11-04  Bruno Haible  <bruno@clisp.org>
27813
27814         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
27815         * lib/strcase.h: New file, from GNU gettext-0.11.5.
27816         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
27817         * lib/strstr.h: New file, from GNU gettext-0.11.5.
27818         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
27819
27820 2002-11-04  Bruno Haible  <bruno@clisp.org>
27821
27822         * lib/localcharset.c (locale_charset): Don't return an empty string.
27823
27824 2002-11-04  Bruno Haible  <bruno@clisp.org>
27825
27826         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
27827         aliases.
27828
27829 2002-11-04  Bruno Haible  <bruno@clisp.org>
27830
27831         * lib/config.charset: Update for newest glibc. Add canonical names
27832         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
27833
27834 2002-11-04  Bruno Haible  <bruno@clisp.org>
27835
27836         * lib/config.charset: Add support for NetBSD.
27837
27838 2002-11-04  Bruno Haible  <bruno@clisp.org>
27839
27840         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
27841
27842 2002-11-01  Bruno Haible  <bruno@clisp.org>
27843
27844         * configure.in: Add AC_CONFIG_AUX_DIR call.
27845         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
27846         test/Makefile.
27847         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
27848
27849 2002-09-28  Karl Berry  <karl@gnu.org>
27850
27851         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
27852         installed automake until the next release, since changes have been
27853         made.
27854
27855 2002-09-25  Karl Berry  <karl@gnu.org>
27856
27857         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
27858         * lib/getopt*: copy from libc/posix.
27859         * lib/gettext.h: copy from gettext.
27860         * lib/.cppi-disable: add strdup.c, gettext.h.
27861
27862 2002-09-25  Karl Berry  <karl@gnu.org>
27863
27864         * config/srclist.txt: enable gettext.h check.
27865         * config/config.{guess,sub}: update from prep.
27866         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
27867                 from automake 1.6.3.
27868         See srclist*.
27869
27870 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
27871
27872         * regex.c (PATFETCH): Remove the translating fetch.
27873         (PATFETCH_RAW): Rename to PATFETCH.
27874         (set_image_of_range): New fun.
27875         (SET_RANGE_TABLE_WORK_AREA): Use it.
27876         (regex_compile): Don't translate the pattern chars so eagerly.
27877         Only do it when inserting an `exactn' bytecode or when handling
27878         a char-range.
27879         (mutually_exclusive_p): Avoid empty statement.
27880
27881 2002-07-06  Jim Meyering  <meyering@lucent.com>
27882
27883         * m4/README: Don't mention Makefile.am.in.
27884         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
27885
27886 2002-07-01  Jim Meyering  <meyering@lucent.com>
27887
27888         * lib/c-stack.c: Include sys/time.h.
27889         From Volker Borchert.
27890
27891 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27892
27893         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
27894
27895 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27896
27897         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
27898         New macro.  Use it uniformly instead of
27899         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
27900         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
27901         reported by Vin Shelton.
27902
27903 2002-06-22  Paul Eggert  <eggert@twinsun.com>
27904
27905         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
27906         Do not assume SA_SIGINFO behavior.
27907         Bug reported by Jim Meyering on NetBSD 1.5.2.
27908
27909 2002-06-22  Jim Meyering  <meyering@lucent.com>
27910
27911         * m4/c-stack.m4: New file, from diffutils-2.8.2.
27912         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
27913
27914         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
27915         now that configure.ac uses AC_GNU_SOURCE.
27916         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
27917         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
27918
27919         Update to latest tools.  Suggestions from Paul Eggert.
27920         * m4/stdbool.m4: New file, from diffutils-2.8.2.
27921         * m4/gnu-source.m4: Update from diffutils-2.8.2.
27922         * m4/fnmatch.m4: Likewise.
27923         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
27924         to AC_HEADER_STDBOOL
27925
27926 2002-06-22  Jim Meyering  <meyering@lucent.com>
27927
27928         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
27929         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
27930
27931 2002-06-22  Jim Meyering  <meyering@lucent.com>
27932
27933         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
27934
27935         * lib/exitfail.c, exitfail.h: Likewise.
27936         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
27937
27938         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
27939         of fnmatch.h.
27940         (EXTRA_DIST): Add fnmatch_loop.c.
27941         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
27942
27943         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
27944         * lib/fnmatch.c: Update from diffutils-2.8.2.
27945         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
27946         * lib/fnmatch.h: Remove file.
27947
27948 2002-06-21  Jim Meyering  <meyering@lucent.com>
27949
27950         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
27951         * m4/mbrtowc.m4: Likewise.
27952
27953         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
27954         * m4/mbswidth.m4: Reflect name change:
27955         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
27956         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27957
27958         * m4/lib-link.m4: Update from gettext-0.11.2.
27959         * m4/gettext.m4: Likewise.
27960
27961         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
27962         From Alfred M. Szmidt.
27963
27964 2002-06-18  Paul Eggert  <eggert@twinsun.com>
27965
27966         * lib/file-type.h: Report an error if neither S_ISREG nor
27967         S_IFREG is defined, instead of using a test specific to glibc
27968         2.2.  This should be safe, since POSIX requires S_ISREG and
27969         Unix Version 7 had S_IFREG.  We don't need to check for
27970         <sys/types.h> since we don't use any symbols that it defines.
27971
27972 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
27973
27974         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
27975         $@-t, so that each temporary file name is unique and valid in the first
27976         8 characters, for operation under DOS.
27977
27978 2002-06-15  Paul Eggert  <eggert@twinsun.com>
27979
27980         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
27981
27982 2002-06-15  Jim Meyering  <meyering@lucent.com>
27983
27984         Work even with DJGPP 2.03, which lacks support for symlinks.
27985         From Richard Dawe.
27986         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
27987         is defined.
27988         * lib/lchown.c (S_ISLNK): Likewise.
27989
27990 2002-06-15  Jim Meyering  <meyering@lucent.com>
27991
27992         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
27993         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
27994         have been included before this file.
27995
27996 2002-06-14  Jim Meyering  <meyering@lucent.com>
27997
27998         * lib/file-type.h: Use the version from diffutils-2.8.2.
27999         * lib/file-type.c: Likewise.
28000
28001 2002-06-07  Jim Meyering  <meyering@lucent.com>
28002
28003         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28004         They're needed at least for NetBSD 1.5.2.
28005         ($statxfs_includes): Include those same headers.
28006         ($statxfs_includes): Include sys/vfs.h if available.
28007         ($statxfs_includes): Likewise for sys/statvfs.h.
28008         Check for the following members in both structs statfs and statvfs:
28009         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28010
28011 2002-06-01  Jim Meyering  <meyering@lucent.com>
28012
28013         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28014         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28015
28016 2002-05-28  Jim Meyering  <meyering@lucent.com>
28017
28018         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28019         Reported by Volker Borchert.
28020
28021 2002-05-27  Jim Meyering  <meyering@lucent.com>
28022
28023         Fix a problem seen only on nonconforming systems whereby ls.c's
28024         use of localtime, and then of gettimeofday would cause trouble:
28025         the localtime call used to initialize rpl_gettimeofday's save
28026         mechanism would clobber ls's current local time information so
28027         that in any long listing the first file would always be listed
28028         with date 1970-01-01.  Analysis by Volker Borchert.
28029
28030         * lib/gettimeofday.c (localtime): Undefine.
28031         (rpl_localtime): New function.
28032
28033 2002-05-27  Jim Meyering  <meyering@lucent.com>
28034
28035         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28036         localtime.
28037
28038         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28039         use the replacement function; it wouldn't resolve at link time.
28040         Reported by Volker Borchert.
28041
28042 2002-05-22  Jim Meyering  <meyering@lucent.com>
28043
28044         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28045         file-type.h.
28046         * lib/file-type.h: New file.
28047         * lib/file-type.c (file_type): New file/function.  Extracted from
28048         diffutils.
28049
28050 2002-04-30  Jim Meyering  <meyering@lucent.com>
28051
28052         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28053
28054 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28055
28056         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28057
28058 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28059
28060         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28061         Do not check for alloca.h (no longer used) or stdbool.h (was never
28062         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28063
28064 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28065
28066         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28067
28068 2002-04-29  Jim Meyering  <meyering@lucent.com>
28069
28070         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
28071         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
28072         Use AC_FUNC_STRNLEN here instead.
28073
28074         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
28075         With autoconf-2.53a, it's part of AC_PROG_CC.
28076
28077 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28078
28079         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
28080         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
28081
28082 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28083
28084         * lib/sig2str.h, lib/sig2str.c: New files.
28085         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
28086
28087 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28088
28089         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
28090         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
28091         of 127, since 64 is the largest conceivable number for ancient
28092         nonstandard hosts.
28093         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
28094
28095 2002-04-28  Jim Meyering  <meyering@lucent.com>
28096
28097         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
28098
28099 2002-04-24  Jim Meyering  <meyering@lucent.com>
28100
28101         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
28102         (jm_PREREQ): Use it.
28103
28104         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
28105         mach/mach.h fcntl.h.
28106         Check for this function: setlocale.
28107
28108 2002-04-24  Jim Meyering  <meyering@lucent.com>
28109
28110         * lib/gettext.h: New file, from Gettext.
28111         * lib/Makefile.am (INCLUDES): Remove -I../intl.
28112         (libfetish_a_SOURCES): Add gettext.h.
28113
28114 2002-04-16  Jim Meyering  <meyering@lucent.com>
28115
28116         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
28117         ut_pid, ut_id, ut_exit.
28118
28119 2002-04-16  Jim Meyering  <meyering@lucent.com>
28120
28121         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
28122         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
28123         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
28124
28125 2002-04-12  Jim Meyering  <meyering@lucent.com>
28126
28127         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
28128         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
28129         existence of the getmntinfo function.  Needed for Darwin 5.3.
28130
28131         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
28132         This is necessary at least on Darwin 5.3.
28133
28134         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
28135         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
28136         strnlen.o in the library, and that makes some versions of ranlib
28137         object.
28138
28139 2002-04-12  Jim Meyering  <meyering@lucent.com>
28140
28141         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
28142
28143 2002-04-09  Jim Meyering  <meyering@lucent.com>
28144
28145         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
28146         to be more precise.  Rather than saying we're checking whether the
28147         function `works', say what we're testing.
28148         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
28149         Reported by Bruno Haible.
28150
28151 2002-03-10  Jim Meyering  <meyering@lucent.com>
28152
28153         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
28154         Suggestion from Santiago Vila.
28155
28156 2002-03-08  Jim Meyering  <meyering@lucent.com>
28157
28158         * lib/rename.c: Mention that this wrapper is needed also on
28159         mips-dec-ultrix4.4 systems.
28160
28161 2002-03-02  Jim Meyering  <meyering@lucent.com>
28162
28163         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
28164         not HAVE_CLOCK_SETTIME.
28165
28166 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28167
28168         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
28169         Check for clock_settime.
28170
28171 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28172
28173         * lib/nanosleep.h: Rename to....
28174         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
28175
28176         * lib/gettime.c: New file.
28177         * lib/settime.c: New file.
28178         * lib/stime.c: Remove.
28179
28180         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
28181         timespec.h.  Remove nanosleep.h.
28182
28183 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28184
28185         * m4/acl.m4: New file.
28186         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
28187         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
28188
28189 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28190
28191         * lib/acl.c, lib/acl.h: New files.
28192         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
28193
28194 2002-02-24  Jim Meyering  <meyering@lucent.com>
28195
28196         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
28197         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
28198         cause trouble.  Reported by Nelson Beebe.
28199
28200 2002-02-23  Paul Eggert  <eggert@twinsun.com>
28201
28202         * lib/path-concat.c (xpath_concat): Reorder code to pacify
28203         compilers that don't know that xalloc_die never returns.
28204
28205 2002-02-20  Jim Meyering  <meyering@lucent.com>
28206
28207         * lib/getdate.c: Regenerate using bison-1.33.
28208
28209 2002-02-17  Jim Meyering  <meyering@lucent.com>
28210
28211         * config/config.guess (main): Don't use `head -1'; it's no longer
28212         portable. Use `sed 1q' instead.
28213
28214 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
28215
28216         * m4/codeset.m4: Upgrade to gettext-0.11.
28217         * m4/gettext.m4: Upgrade to gettext-0.11.
28218         * m4/glibc21.m4: Upgrade to gettext-0.11.
28219         * m4/iconv.m4: Upgrade to gettext-0.11.
28220         * m4/isc-posix.m4: Upgrade to gettext-0.11.
28221         * m4/lcmessage.m4: Upgrade to gettext-0.11.
28222         * m4/lib-ld.m4: New file, from gettext-0.11.
28223         * m4/lib-link.m4: New file, from gettext-0.11.
28224         * m4/lib-prefix.m4: New file, from gettext-0.11.
28225         * m4/progtest.m4: Upgrade to gettext-0.11.
28226
28227 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28228
28229         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
28230         (jm_PREREQ): Use it.
28231
28232 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28233
28234         * lib/posixver.c, lib/posixver.h: New files.
28235         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28236
28237 2002-02-02  Paul Eggert  <eggert@twinsun.com>
28238             Bruno Haible  <bruno@clisp.org>
28239
28240         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
28241         (fwrite_success_callback): New declaration.
28242         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
28243         print_unicode_char. Call failure callback instead of error.
28244         (fwrite_success_callback): New function.
28245         (exit_failure_callback): New function.
28246         (fallback_failure_callback): New function.
28247         (print_unicode_char): Call unicode_to_mb.
28248
28249 2002-01-26  Jim Meyering  <meyering@lucent.com>
28250
28251         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28252         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28253
28254 2002-01-26  Jim Meyering  <meyering@lucent.com>
28255
28256         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28257
28258 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28259
28260         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28261
28262 2002-01-22  Jim Meyering  <meyering@lucent.com>
28263
28264         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28265         Otherwise, some versions of automake would omit the rule that makes
28266         Makefile from Makefile.in.
28267
28268 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28269
28270         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28271         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28272         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28273         (memcoll): Set errno to zero if there is no error.
28274
28275         * lib/quotearg.c (quotearg_buffer_restyled):
28276         Fix bug with quoting buffers containing NUL when backslashing escapes.
28277         This bug was exposed by the other changes in this patch.
28278         (quotearg_n_options): New arg ARGSIZE.
28279         All callers changed.
28280         (quoting_options_from_style): New function.
28281         (quotearg_n_style): Use it.
28282         (quotearg_n_style_mem): New function.
28283
28284         * lib/quotearg.h (quotearg_n_style_mem): New function.
28285
28286 2002-01-19  Jim Meyering  <meyering@lucent.com>
28287
28288         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28289         Remove useless quotes: DF_PROG="df".
28290         * m4/strnlen.m4: New file.
28291
28292 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28293
28294         * lib/backupfile.c (ISDIGIT): Comment fix.
28295         * lib/getdate.y (ISDIGIT): Likewise.
28296         * lib/posixtm.c (ISDIGIT, year): Likewise.
28297         * lib/strverscmp.c (ISDIGIT): Likewise.
28298         * lib/userspec.c (ISDIGIT): Likewise.
28299
28300 2002-01-16  Jim Meyering  <meyering@lucent.com>
28301
28302         * lib/getdate.y: Add three semicolons, each just before a closing
28303         brace. Bison (as of version 1.31) no longer papers over that mistake.
28304
28305 2002-01-05  Jim Meyering  <meyering@lucent.com>
28306
28307         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28308
28309 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28310
28311         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28312         not silently exit merely because the output buffer happens to
28313         have nothing pending.
28314
28315 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28316
28317         See the big note in ../ChangeLog.
28318         * lib/human.c (suffixes): Prefer K to k for 1024.
28319         (generate_suffix_backwards): New function.
28320         (human_readable_inexact): Use it.
28321         * lib/xstrtol.c (__xstrtol): If there is no number but there
28322         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28323         Accept 'K' as well as 'k'.
28324
28325 2001-12-15  Jim Meyering  <meyering@lucent.com>
28326
28327         * lib/regex.h (__restrict_arr): Update from libc.
28328
28329         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28330         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28331         (STREQ): Define.
28332
28333 2001-12-14  Jim Meyering  <meyering@lucent.com>
28334
28335         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28336         Suggestion from Bruno Haible.
28337
28338 2001-12-10  Jim Meyering  <meyering@lucent.com>
28339
28340         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28341         xrealloc, Instead, include "xalloc.h".
28342         (initbuffer): Don't cast xmalloc return value to char*.
28343         (readline): Reword comment.
28344         Don't cast xrealloc return value to char*
28345         Return NULL, not 0.
28346
28347 2001-12-09  Jim Meyering  <meyering@lucent.com>
28348
28349         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28350         about `signed and unsigned type in conditional expression'.
28351         * lib/posixtm.c (posix_time_parse): Likewise.
28352
28353         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28354
28355         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28356         to avoid a pedantic warning.
28357
28358         * lib/getstr.c: Don't include assert.h.
28359         (getstr): Remove warning-evoking assertions.
28360         Return -1 if offset parameter is out of bounds.
28361         Change the type of a local from int to size_t.
28362
28363         * lib/strftime.c (my_strftime_localtime_r): Include this function
28364         definition in the `#if ! HAVE_TM_GMTOFF' block.
28365
28366         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28367         Include xalloc.h instead.
28368
28369 2001-12-02  Jim Meyering  <meyering@lucent.com>
28370
28371         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28372         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28373         included.
28374
28375         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28376         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28377
28378 2001-11-30  Akim Demaille  <akim@epita.fr>
28379
28380         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28381         before being defined.
28382
28383 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28384
28385         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28386         First arg is int, not unsigned.
28387         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28388         (SIZE_MAX, UINT_MAX): New macros.
28389         (quotearg_n_options): Abort if N is negative.
28390         Avoid overflow check on hosts where size_t is 64 bits and int
28391         is 32 bits, as overflow is impossible there.
28392         Fix off-by-one typo that caused unnecessary reallocation.
28393
28394 2001-11-27  Jim Meyering  <meyering@lucent.com>
28395
28396         * lib/tempname.c: Merge with version from libc.
28397         * lib/regex.c: Likewise.
28398
28399         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28400         systems for which STDC_HEADERS is 0, it was not included, resulting in
28401         a warning about an integer-to-pointer conversion problem with getenv.
28402         Reported by Volker Borchert.
28403
28404 2001-11-26  Jim Meyering  <meyering@lucent.com>
28405
28406         * lib/gtod.h: Remove file.
28407         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28408         * lib/gettimeofday.c: Don't include gtod.h.
28409         (GTOD_init): Remove function.
28410         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28411         Suggestion from Volker Borchert.
28412
28413 2001-11-23  Jim Meyering  <meyering@lucent.com>
28414
28415         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28416         it.
28417         * lib/hash.c (struct hash_table): Define it here instead.
28418
28419 2001-11-22  Jim Meyering  <meyering@lucent.com>
28420
28421         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28422
28423 2001-11-20  Jim Meyering  <meyering@lucent.com>
28424
28425         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28426         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28427
28428 2001-11-19  Jim Meyering  <meyering@lucent.com>
28429
28430         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28431         directory.  Use "conftestXXXXXX" as the template.
28432         Suggestion from Paul Eggert.
28433
28434         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28435         immediately, so the test doesn't mistakenly hit the max-open-files
28436         limit.
28437
28438 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28439
28440         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28441         (TEMPORARIES): New macro.
28442         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28443         removes an artificial limitation (e.g. HP-UX 10.20, where
28444         TMP_MAX is 17576).
28445
28446 2001-11-18  Jim Meyering  <meyering@lucent.com>
28447
28448         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28449
28450 2001-11-18  Jim Meyering  <meyering@lucent.com>
28451
28452         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28453         on SunOS 4.
28454
28455         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28456         files will be created before anything else.
28457
28458 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28459
28460         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28461         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28462
28463 2001-11-17  Jim Meyering  <meyering@lucent.com>
28464
28465         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28466         Prompted by a report from Bob Proulx.
28467
28468         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28469         Instead, require UTILS_FUNC_MKSTEMP.
28470
28471 2001-11-17  Jim Meyering  <meyering@lucent.com>
28472
28473         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28474         Now, that's done as part of AC_FUNC_STRTOD.
28475
28476 2001-11-17  Jim Meyering  <meyering@lucent.com>
28477
28478         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28479         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28480         rather than group writable.  Patch by Juan F. Codagnone.
28481
28482         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28483         xrealloc, Instead, include "xalloc.h".
28484
28485         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28486         Remove explicit declarations of xmalloc, xrealloc,
28487         and xstrdup.  Instead, include "xalloc.h".
28488
28489         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28490         unlocked-io.h.
28491         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28492         Likewise.
28493         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28494
28495         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28496         Reported by Padraig Brady.
28497
28498         * lib/mkstemp.c: #undef mkstemp.
28499         Include config.h.
28500         (rpl_mkstemp): Rename from mkstemp.
28501         Protoize.
28502
28503 2001-11-16  Jim Meyering  <meyering@lucent.com>
28504
28505         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28506         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28507         determine the amount of total physical memory, use pstat_getstatic.
28508         HPUX-11 doesn't define _SC_PHYS_PAGES.
28509         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28510         If sysconf couldn't be used to determine the amount of available
28511         physical memory, use both pstat_getstatic and pstat_getdynamic.
28512         Based on a patch from Bob Proulx.
28513
28514 2001-11-10  Jim Meyering  <meyering@lucent.com>
28515
28516         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28517         (jm_PREREQ): Use it.
28518
28519 2001-11-09  Jim Meyering  <meyering@lucent.com>
28520
28521         * m4/jm-macros.m4: Require autoconf-2.52f.
28522         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28523         Use these AC_-prefixed names, not the AM_-prefixed ones.
28524
28525         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28526
28527 2001-11-05  Jim Meyering  <meyering@lucent.com>
28528
28529         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28530
28531 2001-11-04  Jim Meyering  <meyering@lucent.com>
28532
28533         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
28534         $DEFS.
28535
28536 2001-11-03  Jim Meyering  <meyering@lucent.com>
28537
28538         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
28539         of AC_DEFUN.
28540
28541         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
28542         know the name of the variable in the macro definition.
28543
28544 2001-11-03  Jim Meyering  <meyering@lucent.com>
28545
28546         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
28547         in argmatch_to_argument call.
28548
28549         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
28550         argument.
28551
28552         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
28553         e.g., a fault due to an attempt to free a NULL pointer.
28554
28555 2001-11-01  Jim Meyering  <meyering@lucent.com>
28556
28557         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
28558         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
28559
28560 2001-11-01  Jim Meyering  <meyering@lucent.com>
28561
28562         * lib/dirfd.c, lib/dirfd.h: New files.
28563         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
28564
28565         * lib/hash.c (hash_print) [TESTING]: Clean up.
28566
28567 2001-10-22  Paul Eggert  <eggert@twinsun.com>
28568
28569         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
28570         to avoid a warning if -Wall.
28571
28572 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
28573
28574         * README: New file
28575         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
28576         (per RMS's instructions, this is now the canonical source)
28577         * lgpl/, gpl/: New directories.
28578
28579 2001-10-21  Paul Eggert  <eggert@twinsun.com>
28580
28581         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
28582
28583 2001-10-21  Jim Meyering  <meyering@lucent.com>
28584
28585         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
28586         this code would end up calling gettext even in packages built
28587         with --disable-nls.
28588         * lib/getopt.c (_): Likewise.
28589         * lib/regex.c (_): Likewise.
28590
28591 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28592
28593         * m4/error.m4 (jm_PREREQ_ERROR):
28594         Do not invoke AC_CHECK_FUNCS with strerror_r, as
28595         AC_FUNC_STRERROR_R does that.
28596         Check for strerror declaration.
28597
28598         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
28599         are supposed to have them these days.
28600         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
28601         Merge changes from latest Autoconf CVS.
28602         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
28603         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
28604         POSIX decided to standardize on the int flavor of strerror_r.
28605
28606 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28607
28608         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
28609         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
28610         Use strerror_r that is only a macro, even if it is not a function.
28611         (strerror): Check for HAVE_DECL_STRERROR before declaring.
28612         (private_strerror): Use prototypes, not old-style function definition.
28613         (print_errno_message): New function.
28614         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
28615         char*-flavored one.
28616         (error_tail, error, error_at_line): Use it.
28617
28618 2001-10-11  Jim Meyering  <meyering@lucent.com>
28619
28620         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
28621         and quote_n (1, ... to avoid clobbering a buffer.
28622
28623 2001-10-05  Jim Meyering  <meyering@lucent.com>
28624
28625         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
28626         hash-pjw.h.
28627         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
28628         * lib/hash-pjw.h: New file.
28629
28630 2001-09-30  Jim Meyering  <meyering@lucent.com>
28631
28632         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
28633         `struct fsstat' has the `f_fstypename' member.
28634         Use that to define FS_TYPE, which is now used to make
28635         the getfsstat link test tighter.
28636
28637 2001-09-30  Jim Meyering  <meyering@lucent.com>
28638
28639         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
28640         Include <sys/ucred.h>, for Apple Darwin.
28641         Include sys/mount.h and sys/fs_types.h only if available.
28642         (FS_TYPE): Define.
28643         (read_filesystem_list): Use FS_TYPE.
28644
28645 2001-09-29  Paul Eggert  <eggert@twinsun.com>
28646
28647         * lib/exclude.c (excluded_filename): 0 -> false, since it's
28648         a boolean context.
28649
28650 2001-09-29  Jim Meyering  <meyering@lucent.com>
28651
28652         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28653         [one-argument getmntent function]): Include stdio.h before mntent.h.
28654         SunOS 4.1.x needs it for the declaration of `FILE'.
28655         Patch by Volker Borchert.
28656
28657         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28658         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
28659         sys/fs_types.h, and make the link-test for getfsstat guard #include
28660         directives with appropriate #if HAVE_*_H tests so that we can
28661         detect getfsstat on Apple Darwin1.3.7 systems.
28662         Reported by Nelson Beebe.
28663         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
28664
28665 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28666
28667         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28668         #defines strtoimax.  Also treat the other strto* functions
28669         like strtoimax.
28670
28671         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28672         Check for strtoul and strtoumax,
28673         as those declarations are made even in the signed case.
28674         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
28675         Likewise, for strtol and strtoimax.
28676
28677 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28678
28679         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28680         #defines strtoimax.  Also treat the other strto* functions
28681         like strtoimax.
28682
28683         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
28684         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
28685         (strtoimax, strtoumax): Do not declare if already defined as a macro.
28686
28687 2001-09-26  Jim Meyering  <meyering@lucent.com>
28688
28689         Most macros in unlocked-io.h had the wrong number of arguments.
28690         * lib/gen-uio: New script.
28691         (USE_UNLOCKED_IO): Define to 1 if not already defined.
28692         * lib/unlocked-io.hin: Remove file.
28693         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
28694         rather than trying to embed it here.
28695         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
28696         Reported by Padraig Brady.
28697
28698 2001-09-25  Volker Borchert  <bt@teknon.de>
28699
28700         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
28701         `result'.
28702
28703 2001-09-24  Jim Meyering  <meyering@lucent.com>
28704
28705         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
28706
28707 2001-09-23  Jim Meyering  <meyering@lucent.com>
28708
28709         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
28710         instead of the mere test for existence of mntent.h.  The latter
28711         would get a false-positive on AIX 3.4 systems.
28712         In the outer getmntent if-block, don't die if neither of the getmntent
28713         tests succeeds.  Instead, just fall through and continue with the
28714         remaining tests.
28715
28716 2001-09-23  Jim Meyering  <meyering@lucent.com>
28717
28718         * lib/mountlist.c: Remove useless parentheses in #if directives.
28719         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
28720         the deprecated MOUNTED symbol is no longer defined in mntent.h.
28721
28722 2001-09-22  Jim Meyering  <meyering@lucent.com>
28723
28724         * m4/gettext.m4: New file.  From gettext.
28725         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
28726         * m4/progtest.m4: Likewise
28727         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
28728         * m4/glibc21.m4: Likewise.
28729
28730         * m4/libintl.m4: Remove.  No longer used.
28731
28732 2001-09-22  Jim Meyering  <meyering@lucent.com>
28733
28734         * lib/localcharset.c: Update from latest gettext.
28735         * lib/config.charset: Likewise.
28736
28737 2001-09-20  Jim Meyering  <meyering@lucent.com>
28738
28739         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
28740         strtoimax.
28741         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
28742         strtoumax.
28743
28744 2001-09-20  Jim Meyering  <meyering@lucent.com>
28745
28746         * lib/xstrtol.c (strtoimax): Guard declaration with
28747         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
28748         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
28749         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
28750         (strtoumax): Likewise, for completeness (it wasn't necessary).
28751
28752 2001-09-17  Paul Eggert  <eggert@twinsun.com>
28753
28754         * lib/strtoimax.c (HAVE_LONG_LONG):
28755         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
28756         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
28757         to work around bug in IBM C compiler.
28758
28759 2001-09-17  Jim Meyering  <meyering@lucent.com>
28760
28761         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
28762         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
28763         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
28764         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
28765         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
28766         whenever the right hand side need not be expanded by the shell.
28767
28768 2001-09-16  Paul Eggert  <eggert@twinsun.com>
28769
28770         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
28771         library.  It's not correct, as some older glibcs are buggy.
28772         fnmatch wasn't fixed until glibc 2.2.
28773
28774         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
28775         special shell magic here.
28776
28777 2001-09-16  Jim Meyering  <meyering@lucent.com>
28778
28779         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
28780         * m4/jm-macros.m4: Require it.
28781
28782 2001-09-16  Jim Meyering  <meyering@lucent.com>
28783
28784         * lib/mkdir.c: New file.
28785
28786 2001-09-15  Jim Meyering  <meyering@lucent.com>
28787
28788         * m4/jm-macros.m4: Check for help2man.
28789
28790 2001-09-11  Jim Meyering  <meyering@lucent.com>
28791
28792         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
28793         The body, by Paul Eggert, was moved here from configure.in.
28794         * m4/jm-macros.m4: Require UTILS_HOST_OS.
28795
28796 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28797
28798         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
28799         (jm_PREREQ): Use it.
28800
28801 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28802
28803         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
28804         Use ssize_t, not int, to store result of readlink.
28805         Check for ssize_t overflow as well as size_t overflow,
28806         as POSIX says the result of readlink is implementation-defined
28807         when ssize_t overflows.
28808         Remove unnecessary cast to char*.
28809         Use free+malloc instead of realloc, as the storage doesn't need
28810         to be preserved and it's clearer and can be more efficient that way.
28811         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
28812         * lib/xreadlink.h (xreadlink): Update prototype.
28813
28814 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28815
28816         * lib/xgetcwd.c: Revert some of the previous change; intead,
28817         fix the HAVE_GETCWD_NULL code to behave more like the
28818         !HAVE_GETCWD_NULL code used to.
28819
28820         Include "xalloc.h".
28821         (xgetcwd): Do not return NULL when memory is exhausted; instead,
28822         invoke xalloc_die.
28823
28824 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28825
28826         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
28827         sys/param.h, as pathmax.h includes them.
28828
28829 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28830
28831         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
28832         (jm_PREREQ_XGETCWD): New macro.
28833
28834         * m4/getcwd.m4: New file.
28835
28836 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28837
28838         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
28839         like the HAVE_GETCWD_NULL code.
28840         Include pathmax.h if not HAVE_GETCWD.
28841         Do not include xalloc.h.
28842         (INITIAL_BUFFER_SIZE): New symbol.
28843         Do not use xmalloc / xrealloc, since the caller is responsible for
28844         handling errors.  Preserve errno around `free' during failure.
28845         Do not overrun buffer when using getwd.
28846
28847 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28848
28849         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
28850         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
28851         getcwd (NULL, 0).
28852
28853 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28854
28855         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
28856         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
28857         spotted by Jim Meyering.
28858
28859 2001-09-03  Jim Meyering  <meyering@lucent.com>
28860
28861         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
28862         failure.
28863
28864 2001-09-02  Jim Meyering  <meyering@lucent.com>
28865
28866         * lib/error.c: Update from GNU libc.
28867
28868 2001-09-01  Jim Meyering  <meyering@lucent.com>
28869
28870         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
28871         Used by df.
28872
28873 2001-09-01  Jim Meyering  <meyering@lucent.com>
28874
28875         * lib/xreadlink.c: New file.
28876         * lib/xreadlink.h: New file.
28877         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
28878         xreadlink.h.
28879
28880         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
28881         doesn't conflict with sparc Solaris 7's definition in
28882         /usr/include/sys/int_types.h.
28883
28884         * lib/exclude.c: Use `""', not `<>' to #include non-system header
28885         files.
28886         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
28887         and strncasecmp as r-values.  Unixware didn't have declarations.
28888
28889 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28890
28891         * lib/xstrtol.h: Add copyright notice.
28892         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
28893         LONGINT_INVALID_SUFFIX_CHAR.
28894
28895 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28896
28897         * lib/xstrtol.c (strtoimax): New decl.
28898
28899 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28900
28901         * lib/xgetcwd.c: Don't include pathmax.h.
28902         Include stdlib.h and unistd.h if available.
28903         Include xalloc.h.
28904         (xmalloc, xstrdup, free): Remove decls.
28905         (xgetcwd): Don't assume sizes fit in unsigned.
28906         Check for overflow when computing sizes.
28907         Simplify reallocation code.
28908
28909 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28910
28911         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
28912         a directory's st_size can have an arbitrary value, so the old
28913         usage could waste an arbitrary amount of memory.  All uses
28914         changed.
28915         * lib/savedir.h: Update prototype.
28916
28917 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28918
28919         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
28920
28921         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
28922         old strtoimax.c.
28923
28924         Also, make the following further changes to make this file's
28925         configuration more similar to that of strtol.c:
28926         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
28927         (strtoumax, uintmax_t, strtoull, strtol): Remove.
28928         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
28929         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
28930         changed to signed values.
28931
28932         And make the following changes as well:
28933         Fix copyright notice, as 1999 was missing.
28934         (verify): New macro.
28935         (strtoimax): Check sizes at compile-time, not run-time.
28936         Prefer strtol to strtoll if both work.
28937         (main): Remove; it was not that useful and was a pain to maintain.
28938
28939         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
28940
28941 2001-08-31  Jim Meyering  <meyering@lucent.com>
28942
28943         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
28944         Use an initial, malloc'd, buffer of length 128 rather than
28945         a statically allocated one of length 1024.
28946
28947 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28948
28949         Simplify code, partly by assuming autoconf 2.52 semantics.
28950
28951         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
28952
28953         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
28954         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
28955         All uses removed.
28956         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
28957         Move AC_REQUIRE to next-to-top level, to avoid confusion.
28958         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
28959         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
28960         jm_AC_HEADER_INTTYPES_H.
28961         * m4/jm-macros.m4 (jm_MACROS): Likewise.
28962
28963         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
28964
28965         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28966         Quote first arg of AC_DEFUN.
28967         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
28968         since they are needed to parse the include file even if we need
28969         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
28970         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
28971         but with opposite signedness.
28972
28973 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28974
28975         Merge 'exclude' changes from tar 1.13.22.
28976         This fixes one or two unlikely storage allocation overflow bugs,
28977         but doesn't change user-visible behavior otherwise.
28978
28979 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28980
28981         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
28982         (jm_PREREQ_EXCLUDE): New macro.
28983
28984 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28985
28986         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
28987         tm to be declared.
28988
28989 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28990
28991         * lib/hash.c: Remove '2001' from copyright notice.
28992
28993 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28994
28995         * lib/full-write.h: New file.
28996         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
28997         * lib/full-write.c: Correct credits, as cccp.c no longer
28998         exists and anyway it was so heavily changed from the old cccp
28999         code as to be unrecognizable.  Include full-write.h.
29000         (full_write) Return size_t, with short writes meaning failure.
29001         All callers changed.  This fixes a bug with large buffers
29002         on 64-bit hosts.
29003         * lib/utime.c: Include full-write.h.
29004
29005 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29006
29007         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29008         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29009         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29010         Include if available.
29011         (<xalloc.h>): Include
29012         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29013         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29014         collide with FNM macros.
29015         (struct patopts): New struct.
29016         (struct exclude): Use it, as exclude patterns now come with options.
29017         (new_exclude): Support above changes.
29018         (new_exclude, add_exclude_file):
29019         Initial size must now be a power of two to simplify overflow checking.
29020         (free_exclude, fnmatch_no_wildcards): New function.
29021         (excluded_filename): No longer requires options arg, as the options
29022         are determined by add_exclude.  Now returns bool, not int.
29023         (excluded_filename, add_exclude):
29024         Add support for the fancy new exclusion options.
29025         (add_exclude, add_exclude_file): Now takes int options arg.
29026         Check for arithmetic overflow when computing sizes.
29027         (add_exclude_file): xrealloc might modify errno, so don't
29028         realloc until after errno might be used.
29029
29030         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29031         New macros.
29032         (free_exclude): New decl.
29033         (add_exclude, add_exclude_file): Now takes int options arg.
29034         (excluded_filename): No longer requires options arg, as the options
29035         are determined by add_exclude.  Now returns bool, not int.
29036
29037 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29038
29039         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29040
29041 2001-08-27  Jim Meyering  <meyering@lucent.com>
29042
29043         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29044
29045         * lib/version-etc.c (N_): Remove definition.
29046         Revert most of last change.
29047         Instead, simply don't mark the `Copyright...' string for translation.
29048         Based on advice from Paul Eggert.
29049
29050         * lib/strtoxmax.c: Tweak comment.
29051
29052 2001-08-26  Jim Meyering  <meyering@lucent.com>
29053
29054         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29055
29056         * m4/xstrtoimax.m4: New file.
29057         * m4/xstrtoumax.m4: Add comments explaining why we
29058         AC_REPLACE_FUNCS(strtol).
29059
29060 2001-08-26  Jim Meyering  <meyering@lucent.com>
29061
29062         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29063         of copyright with `%s' so translators don't get an untranslated
29064         message in 2002.
29065         (COPYRIGHT_YEAR): Define.
29066         (version_etc): Use fprintf rather than fputs.
29067         Suggestion from Ulrich Drepper.
29068
29069         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
29070
29071         * lib/strtoll.c: New file, from GNU libc.
29072         * lib/xstrtoimax.c: New file.
29073
29074         * lib/xstrtol.h: Add xstrtoimax.
29075         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
29076         * lib/strtoimax.c: New file.  Likewise, but first define
29077         STRTOUXMAX_SIGNED.
29078
29079         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
29080         ...
29081         * lib/strtoxmax.c: ... then renamed to this.
29082
29083 2001-08-18  Paul Eggert  <eggert@twinsun.com>
29084
29085         * m4/inttypes.m4: Add AC_PREREQ(2.13).
29086         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
29087         (jm_AC_TYPE_INTMAX_T): New macro.
29088         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
29089
29090         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
29091
29092         * m4/longlong.m4: Renamed from ulonglong.m4.
29093         * m4/inttypes.m4: Renamed from inttypes_h.m4.
29094         * m4/uintmax_t.m4: Removed.
29095
29096 2001-08-13  Paul Eggert  <eggert@twinsun.com>
29097
29098         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
29099         Port to Solaris 8, where 'sed' requires a space after the 'r'
29100         command, and where sh dislikes "$/".  Clean up the spacing a bit.
29101         Redirect output to $tmp just once.
29102
29103 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
29104
29105         * lib/addext.c (<errno.h>): Include.
29106         (errno): Declare if not defined.
29107         (addext): Work correctly when pathconf returns -1 and leaves
29108         errno alone because there is no limit.  Also, work even if
29109         pathconf returns a value greater than SIZE_MAX.
29110
29111 2001-08-12  Jim Meyering  <meyering@lucent.com>
29112
29113         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
29114         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
29115         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
29116         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
29117         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
29118         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
29119         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
29120         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
29121         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
29122         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
29123         utime.m4, utimes.m4, xstrtoumax.m4:
29124         Quote the first argument in each use of AC_DEFUN.
29125
29126 2001-08-12  Jim Meyering  <meyering@lucent.com>
29127
29128         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
29129         Simply `return getcwd (NULL, 0);'.
29130         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
29131         Use 1300 as initial value for length, not PATH_MAX.
29132
29133         * lib/pathmax.h: Clean up cpp syntax.
29134
29135 2001-08-12  Jim Meyering  <meyering@lucent.com>
29136
29137         * lib/gettimeofday.c: New file.
29138         * lib/gtod.h: New file.
29139         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
29140
29141 2001-08-05  Jim Meyering  <meyering@lucent.com>
29142
29143         * m4/jm-macros.m4: Require autoconf-2.52.
29144
29145 2001-08-04  Jim Meyering  <meyering@lucent.com>
29146
29147         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
29148         stmt, to get in sync with glibc.
29149
29150 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29151
29152         The following changes are from gettext 0.10.39 as maintained by
29153         Bruno Haible.
29154
29155         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
29156         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
29157         with inverted sense.  All uses changed.
29158
29159         * lib/mbswidth.c: Don't include <limits.h>.
29160         Include <stdlib.h> and <string.h> unconditionally.
29161         (iswcntrl, mbsinit, ISCNTRL): New macros.
29162         (mbsnwidth): Use K&R style function declarations.
29163         Don't bother checking for MB_LEN_MAX == 1, since the compiler
29164         can optimize it when MB_CUR_MAX == 1.
29165         The width of control characters is zero, not 1.
29166
29167 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29168
29169         The following changes are from gettext 0.10.39 as maintained by
29170         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
29171
29172         * m4/codeset.m4: Upgrade to serial AM1.
29173         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
29174         all uses changed.  Quote first arg of AC_DEFUN.
29175         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
29176
29177         * m4/iconv.m4: Upgrade to serial AM2.
29178         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
29179         Add --with-libconv-prefix.
29180         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
29181         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
29182         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
29183         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
29184         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
29185
29186         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
29187         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
29188         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
29189         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
29190         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
29191         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
29192         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
29193         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
29194         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
29195
29196         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
29197         string.h any more.
29198
29199         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
29200         not the default value.
29201
29202         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
29203         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
29204         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
29205         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
29206         Also check for iswcntrl, used for wcwidth fallback.
29207         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
29208         to Autoconf 2.13.
29209
29210 2001-08-03  Jim Meyering  <meyering@lucent.com>
29211
29212         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
29213         as it was in the original.  Reported by Paul Eggert.
29214
29215 2001-07-16  Jim Meyering  <meyering@lucent.com>
29216
29217         * m4/gettimeofday.m4: New file.
29218         Prompted by a report from Bernhard Baehr.
29219
29220 2001-07-15  Jim Meyering  <meyering@lucent.com>
29221
29222         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
29223         stuff. Now it's in ../Makefile.cfg.
29224
29225 2001-07-15  Jim Meyering  <meyering@lucent.com>
29226
29227         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
29228         (BUILT_SOURCES): Add unlocked-io.h.
29229         (io_functions): Define.
29230         (unlocked-io.h): New rule.
29231         (DISTCLEANFILES): Add unlocked-io.h.
29232         (all-local): Depend on unlocked-io.h, to ensure it is created.
29233
29234         * lib/unlocked-io.hin: New file
29235
29236         * lib/regex.c: Update from glibc.
29237
29238 2001-07-05  Jim Meyering  <meyering@lucent.com>
29239
29240         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
29241         recommendation.
29242         (libfetish_a_SOURCES): Put all .h files here instead.
29243         Remove a thus-exposed (better checks in automake) duplicate and
29244         two unnecessary .h files.
29245
29246 2001-07-04  Jim Meyering  <meyering@lucent.com>
29247
29248         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29249         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29250         distcheck failure.
29251
29252 2001-07-02  Jim Meyering  <meyering@lucent.com>
29253
29254         The following changes were prompted by suggestions from Bruno Haible.
29255
29256         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29257         is now generated.
29258         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29259         definition of EXTRA_DIST.
29260         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29261         ensure that the generated file is created/updated whenever the list
29262         of $(unlocked_functions) is changed.
29263         (jm-glibc-io.m4): New rule.
29264         (unlocked-io.h): New rule -- currently unused.
29265
29266 2001-06-24  Jim Meyering  <meyering@lucent.com>
29267
29268         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29269         unmatched right bracket, rather than kludging it with an extra,
29270         falsely-matching quote in a comment.  Patch by Akim Demaille.
29271
29272 2001-06-11  Jim Meyering  <meyering@lucent.com>
29273
29274         * lib/regex.c: Update from GNU libc.
29275
29276 2001-05-27  Jim Meyering  <meyering@lucent.com>
29277
29278         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29279         Check for ut_type in struct utmp.
29280
29281 2001-05-27  Jim Meyering  <meyering@lucent.com>
29282
29283         * lib/readutmp.h (UT_TYPE): Define.
29284
29285 2001-05-24  Jim Meyering  <meyering@lucent.com>
29286
29287         * lib/argmatch.c: Include "quote.h".
29288         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29289         quote function.  Reported by Göran Uddeborg.
29290
29291 2001-05-22  Jim Meyering  <meyering@lucent.com>
29292
29293         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29294         now that we use the package-supplied version unconditionally.
29295         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29296
29297 2001-05-21  Jim Meyering  <meyering@lucent.com>
29298
29299         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29300         shell syntax errors.
29301
29302 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29303
29304         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29305
29306 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29307
29308         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29309         Don't bother to check library strftime, since
29310         we'll be using our own my_strftime function anyway.
29311         Define my_strftime instead of strftime.
29312
29313 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29314
29315         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29316         which is not yet declared.
29317
29318 2001-05-15  Jim Meyering  <meyering@lucent.com>
29319
29320         * m4/regex.m4: Use proper quoting so brackets appear in the test
29321         program.
29322         Reported by, and with help from, Bruno Haible.
29323
29324 2001-05-13  Jim Meyering  <meyering@lucent.com>
29325
29326         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29327         undefined.
29328
29329 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29330
29331         dirname code cleanup.  base_name now behaves more compatibly
29332         with POSIX basename when given file names that have trailing
29333         slashes, and similarly for dir_name.  Add new primitives
29334         base_len and dir_len.  Put the directory-name-related decls
29335         into dirname.h.
29336
29337         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29338         * lib/backupfile.c (base_name): Likewise.
29339         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29340         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29341         * lib/makepath.c (strip_trailing_slashes): Likewise.
29342         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29343         ISSLASH): Likewise.
29344         * lib/rename.c (strip_trailing_slashes): Likewise.
29345         * lib/same.c (base_name): Likewise.
29346         * lib/stripslash.c (ISSLASH): Likewise.
29347
29348         * lib/addext.c: Include <dirname.h> after size_t is defined.
29349         * lib/backupfile.c: Likewise.
29350
29351         * lib/addext.c (addext): Use base_len to trim redundant
29352         trailing slashes instead of doing it ourselves.
29353         But do not trim the last slash if it is not redundant.
29354
29355         * lib/backupfile.c (find_backup_file_name,
29356         max_backup_version): Use base_len instead of rolling it ourselves.
29357         Handle the case of "" and (on DOS) "C:" correctly.
29358
29359         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29360         needed. Include <string.h>, <dirname.h>.
29361         (base_name): Allow file names ending in slashes, other than names
29362         that are all slashes.  In this case, return the basename followed
29363         by the slashes.  This is more general, and can be used in places
29364         where the original base_name purposely had an assertion failure.
29365         (base_len): New function.
29366
29367         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29368         Do not include <assert.h>; no longer needed.
29369         Include xalloc.h.
29370         (memrchr): Remove decl.
29371         (dir_name_r): Remove.
29372         (dir_len): Renamed from dirlen.  All callers changed.
29373         Rewrite in terms of base_name, for simplicity and consistency.
29374         (dir_name): Never return NULL.  All callers changed.
29375         Do not include <stdlib.h> in test program; no longer needed.
29376         return 0; is fine for test program.
29377
29378         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29379         New macros.
29380         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29381
29382         * lib/path-concat.c (path_concat): Use base_len to compute
29383         base length, not strlen; this means we cannot rely on memcpy
29384         to null-terminate.
29385
29386         * lib/same.c (STREQ): Remove.
29387         (same_name): Handle the case where the basename ends in trailing '/'.
29388
29389         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29390         a slash was stripped.  Do not strip the last slash after a
29391         file system prefix.
29392
29393 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29394
29395         * lib/Makefile.am (libfetish_a_SOURCES):
29396         Add strftime.c, since we now compile it on all hosts.
29397
29398         * lib/strftime.c (my_strftime):
29399         Define to nstrftime if emacs, but only if my_strftime is not defined.
29400         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29401         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29402         Add one more extra argument: a nanoseconds value.
29403         All uses changed.
29404         (ns): New macro.
29405         (my_strftime function): Add %N format.
29406         (emacs_strftimeu): Renamed from emacs_strftime,
29407         with extra ut argument.
29408
29409 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29410
29411         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29412
29413 2001-04-21  Jim Meyering  <meyering@lucent.com>
29414
29415         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29416         doesn't interfere.
29417
29418 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29419
29420         * m4/ftruncate.m4: Check for chsize.
29421         Link with ftruncate.o unconditionally if ftruncate is missing.
29422         This was required when cross-compiling to i586-mingw32msvc.
29423
29424 2001-04-08  Jim Meyering  <meyering@lucent.com>
29425
29426         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29427         recomputed; that's necessary when the offset spans a DST transition.
29428         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29429
29430 2001-04-02  Jim Meyering  <meyering@lucent.com>
29431
29432         * lib/regex.h, regex.c: Update from GNU libc.
29433
29434 2001-03-24  Jim Meyering  <meyering@lucent.com>
29435
29436         * m4/jm-macros.m4: Require autoconf-2.49d.
29437
29438 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29439
29440         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29441
29442 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29443
29444         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29445
29446 2001-03-17  Jim Meyering  <meyering@lucent.com>
29447
29448         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29449         now that the version in autoconf is equivalent.
29450         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29451
29452         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29453         Suggestion from Akim Demaille.
29454
29455         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29456         (jm_PREREQ_TEMPNAME): New function.
29457
29458 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29459
29460         * lib/tempname.c (uint64_t): Define to uintmax_t if
29461         not defined, and if UINT64_MAX is not defined.
29462         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29463         Reported by John David Anglin.
29464
29465 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29466
29467         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29468         resolve alias if codeset is empty.
29469         * lib/config.charset (BeOS): Use wildcard syntax.
29470
29471 2001-03-13  Jim Meyering  <meyering@lucent.com>
29472
29473         * lib/path-concat.c (path_concat)
29474         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29475         concatenating e.g., `C:' and `foo'.
29476         From Bruno Haible.
29477
29478 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29479
29480         * lib/localcharset.c (locale_charset): Don't use
29481         setlocale(LC_CTYPE,NULL). Don't return NULL.
29482         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29483
29484 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29485
29486         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29487         support for DOS/DJGPP.
29488
29489 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29490
29491         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29492         lacks mkstemp.  Compile our own tempname.c if we compile our own
29493         mkstemp.c, as mkstemp relies on tempname.
29494
29495 2001-03-01  Jim Meyering  <meyering@lucent.com>
29496
29497         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29498         AH_VERBATIM really does output its argument verbatim.
29499
29500 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29501
29502         * lib/Makefile.am (libfetish_a_SOURCES):
29503         Add dup-safer.c, fopen-safer.c.
29504         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29505
29506         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29507         * lib/unistd-safer.h: New files.
29508
29509 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29510
29511         The mkstemp replacement is taken from glibc 2.2.2, with some
29512         portability fixes for use outside glibc, as follows:
29513
29514         * lib/tempname.c (struct_stat64): New macro.
29515         (direxists, __gen_tempname): Use it.
29516         This avoids a portability problem with Solaris 8.
29517
29518         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29519         (<stddef.h>, <stdint.h>, <string.h>):
29520         Include only if STDC_HEADERS || _LIBC.
29521         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29522         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29523         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29524         (__set_errno): Define this macro if <errno.h> doesn't.
29525         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29526         Define these macros if <stdio.h> doesn't.
29527         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29528         Define these macros if <sys/stat.h>
29529         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29530         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29531         __xstat64): Define if not _LIBC.
29532         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
29533         (__gen_tempname): Invoke gettimeofday only if
29534         HAVE_GETTIMEOFDAY || _LIBC;
29535         otherwise, fall back on plain "time".
29536         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
29537
29538         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
29539
29540         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
29541
29542 2001-02-18  Paul Eggert  <eggert@twinsun.com>
29543
29544         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
29545
29546 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29547
29548         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
29549         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
29550         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
29551         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
29552
29553 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29554
29555         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
29556         Remove workaround macros for hosts that have mbrtowc but not
29557         mbstate_t, as we now insist on proper declarations for both
29558         before using mbrtowc.
29559
29560 2001-02-17  Jim Meyering  <meyering@lucent.com>
29561
29562         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
29563         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
29564         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
29565         UnixWare 7.1.1.
29566
29567         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
29568         rather than AC_CACHE_VAL.
29569
29570 2001-02-17  Jim Meyering  <meyering@lucent.com>
29571
29572         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
29573         around included file name.
29574
29575         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
29576
29577         * lib/strftime.c: Update from GNU libc (the only changes were to
29578         comments).
29579
29580 2001-02-17  Jim Meyering  <meyering@lucent.com>
29581
29582         * lib/regex.c: Update from libc.
29583
29584 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
29585
29586         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
29587         clash.
29588
29589 2001-02-16  Paul Eggert  <eggert@twinsun.com>
29590
29591         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
29592         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
29593         Reported by Mark Hounschell via Paul Eggert.
29594
29595 2001-02-07  Jim Meyering  <meyering@lucent.com>
29596
29597         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
29598
29599 2001-02-05  Jim Meyering  <meyering@lucent.com>
29600
29601         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
29602         it includes the patch required for `large file' support with at least
29603         HP-UX's 10.20 /bin/cc.
29604
29605 2001-02-03  Jim Meyering  <meyering@lucent.com>
29606
29607         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
29608         AS_IF, now that it works once again (mysteriously).
29609         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29610
29611 2001-01-30  Jim Meyering  <meyering@lucent.com>
29612
29613         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
29614         * m4/chown.m4: Rename conftestchown to conftest.chown.
29615         * m4/rename.m4: s/conftestdir/conftest.d1/ and
29616         s/conftestdir2/conftest.d2/.
29617         * m4/utimes.m4: s/conftestdata/conftest.data/
29618         Inspired by Pavel Roskin's change in autoconf.
29619
29620 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
29621
29622         * lib/config.charset: Update for FreeBSD 4.2.
29623
29624 2001-01-27  Jim Meyering  <meyering@lucent.com>
29625
29626         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
29627         a use of AS_IF.
29628         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29629
29630 2001-01-26  Jim Meyering  <meyering@lucent.com>
29631
29632         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
29633         quotearg.c includes it.
29634
29635 2001-01-26  Jim Meyering  <meyering@lucent.com>
29636
29637         * lib/quotearg.c: Include stddef.h.
29638         * lib/quote.c: Include stddef.h.
29639         Reported by Axel Kittenberger.
29640
29641         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
29642         line in double quotes so that it evokes a better diagnostic.
29643         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
29644         Reported by Axel Kittenberger.
29645
29646 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
29647
29648         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
29649         as if it was a `charset'.
29650
29651 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29652
29653         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
29654         has const.
29655
29656 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29657
29658         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
29659         to avoid a warning.  Add back 'const' to inptr.
29660
29661 2001-01-20  Jim Meyering  <meyering@lucent.com>
29662
29663         Be sure that headers are checked before used in code compiled
29664         for the type checks.
29665         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
29666         In place of that, invoke jm_CHECK_ALL_TYPES.
29667         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
29668         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
29669         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
29670         The check for ssize_t was mistakenly run before the test for unistd.h.
29671
29672         The configure-time check for stdbool.h was missing.
29673         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
29674         (jm_PREREQ_HASH): New function.
29675
29676 2001-01-17  Jim Meyering  <meyering@lucent.com>
29677
29678         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
29679         for autoconf-2.49c.
29680         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
29681
29682 2001-01-16  Jim Meyering  <meyering@lucent.com>
29683
29684         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
29685         From Bruno Haible.
29686
29687 2001-01-14  Jim Meyering  <meyering@lucent.com>
29688
29689         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
29690         foo and bar.  Create conftestdir/ in the script, not in the C code.
29691         Remove directories in the script, not in the C code.
29692         Remove conftestdir{,2} before trying to create the directory.
29693         Make the entire configure script fail if the mkdir fails.
29694
29695 2001-01-14  Jim Meyering  <meyering@lucent.com>
29696
29697         * lib/rename.c: New file.  From Volker Borchert.
29698         Include stdlib.h, string.h or strings.h, and xalloc.h.
29699         Use strip_trailing_slashes rather than open-coding it.
29700
29701 2001-01-03  Paul Eggert  <eggert@twinsun.com>
29702
29703         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
29704
29705 2001-01-03  Jim Meyering  <meyering@lucent.com>
29706
29707         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
29708         of local `inptr' to avoid warning with some system declarations of
29709         iconv.
29710
29711 2001-01-02  Volker Borchert  <bt@teknon.de>
29712
29713         * m4/rename.m4: New file.
29714         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
29715
29716 2001-01-01  Jim Meyering  <meyering@lucent.com>
29717
29718         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
29719         even on systems with utmpx.h.  It's necessary for the declaration of
29720         utmp's ut_user member.  Reported by Andreas Jaeger.
29721
29722         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
29723         available. They are required for the declarations of getgrgid and
29724         getpwuid resp.
29725         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
29726         Reported by Andreas Jaeger.
29727
29728 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
29729
29730         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
29731         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
29732         so `make install' also works in VPATH builds.
29733
29734 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
29735
29736         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
29737         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
29738         can be used in subdirectories.
29739
29740 2000-12-29  Paul Eggert  <eggert@twinsun.com>
29741
29742         * lib/modechange.c: Do not assume that mode_t uses the
29743         traditional octal encoding.  E.g. "chmod 1 FOO" should set
29744         the other-execute bit of FOO even if S_IXOTH != 1.
29745
29746         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
29747         WOTH, XOTH, ALLM): New macros.
29748         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
29749          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
29750         Use them.
29751         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
29752         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
29753         (mode_compile):
29754         No need to use uintmax_t; unsigned long is long enough.
29755         Don't bother to get suffix since we don't use it.
29756
29757 2000-12-26  Jim Meyering  <meyering@lucent.com>
29758
29759         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
29760         better with autoheader.
29761
29762 2000-12-24  Jim Meyering  <meyering@lucent.com>
29763
29764         * lib/hash.c (is_prime): Return explicit boolean values.
29765         (hash_get_first): Return NULL to appease Irix5.6's 89.
29766         Reported by Nelson Beebe.
29767
29768 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
29769
29770         * lib/localcharset.c (locale_charset): Add support for Win32.
29771
29772 2000-12-18  Paul Eggert  <eggert@twinsun.com>
29773
29774         * lib/physmem.h, lib/physmem.c: New files.
29775
29776         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
29777         (noinst_HEADERS): Add physmem.h.
29778
29779         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
29780         't' for compatibility with Solaris 8 sort.
29781
29782 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
29783
29784         * lib/config.charset: Add support for BeOS.
29785
29786 2000-12-17  Jim Meyering  <meyering@lucent.com>
29787
29788         * m4/dos.m4 (jm_AC_DOS): New file and macro.
29789         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
29790
29791 2000-12-16  Jim Meyering  <meyering@lucent.com>
29792
29793         This bug had a serious impact on chown: `chown N:M FILE' (for integer
29794         N and M) would have treated it like `chown N:N FILE'.
29795
29796         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
29797
29798 2000-12-16  Jim Meyering  <meyering@lucent.com>
29799
29800         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
29801         SHELLS_FILE to a file name that's useful on djgpp systems.
29802         Include stdlib.h.
29803         (ADDITIONAL_DEFAULT_SHELLS): Define.
29804         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
29805         Based mostly on a patch from Prashant TR.
29806
29807 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
29808
29809         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
29810         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
29811         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
29812
29813 2000-12-08  Andreas Schwab  <schwab@suse.de>
29814
29815         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
29816         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
29817
29818 2000-12-07  Jim Meyering  <meyering@lucent.com>
29819
29820         * lib/stripslash.c (ISSLASH): Define.
29821         (strip_trailing_slashes): Use ISSLASH rather than comparing against
29822         `/'.
29823         From Prashant TR.
29824
29825         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
29826         (dir_name_r): Declare this function as static.
29827         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
29828         manifest itself on a name containing a mix of slashes and
29829         backslashes.
29830         Make this function work with names starting with a DOS-style
29831         drive letter and colon prefix.
29832         (dir_name): Append `.' if necessary.
29833         Based mostly on patches from Prashant TR and Eli Zaretskii.
29834
29835         * lib/dirname.h (dir_name_r): Remove prototype.
29836
29837 2000-12-06  Paul Eggert  <eggert@twinsun.com>
29838
29839         * m4/off_t-format.m4: Remove this file.
29840         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
29841
29842 2000-12-06  Jim Meyering  <meyering@lucent.com>
29843
29844         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
29845         replacement strtoull, we may well need the replacement strtoul, too.
29846         Check for declarations of strtoul and strtoull.
29847         Check for strtol.  Mainly as a cue to cause automake to include
29848         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
29849         Check for limits.h -- strtol.c needs it.
29850
29851 2000-12-05  Jim Meyering  <meyering@lucent.com>
29852
29853         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
29854
29855 2000-12-04  Jim Meyering  <meyering@lucent.com>
29856
29857         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
29858         Also include memory.h, stdlib.h, unistd.h if appropriate.
29859         Reported by Andreas Jaeger (conflicting declaration of malloc).
29860
29861 2000-12-02  Jim Meyering  <meyering@lucent.com>
29862
29863         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
29864         * m4/jm-macros.m4 (jm_MACROS): require it.
29865
29866 2000-12-02  Jim Meyering  <meyering@lucent.com>
29867
29868         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
29869
29870 2000-12-01  Paul Eggert  <eggert@twinsun.com>
29871
29872         * lib/memrchr.c: Include <config.h> before any system include file.
29873
29874 2000-11-30  Jim Meyering  <meyering@lucent.com>
29875
29876         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
29877
29878 2000-11-30  Jim Meyering  <meyering@lucent.com>
29879
29880         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
29881
29882 2000-11-29  Paul Eggert  <eggert@twinsun.com>
29883
29884         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
29885
29886 2000-11-26  Jim Meyering  <meyering@lucent.com>
29887
29888         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
29889
29890 2000-11-22  Paul Eggert  <eggert@twinsun.com>
29891
29892         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
29893         size of (size_t) -1; it's not portable.
29894
29895 2000-11-17  Jim Meyering  <meyering@lucent.com>
29896
29897         * lib/strstr.c: Update from GNU libc.
29898
29899 2000-11-17  Akim Demaille  <akim@epita.fr>
29900
29901         * lib/obstack.h: Formatting changes.
29902         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
29903         prevent type checking.
29904         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
29905         cast the value to (void *): assigning a `foo *' to a `void *'
29906         variable is valid.
29907         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
29908
29909 2000-11-16  Jim Meyering  <meyering@lucent.com>
29910
29911         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
29912
29913 2000-11-11  Jim Meyering  <meyering@lucent.com>
29914
29915         * lib/error.c: Add a couple #includes, merging from GNU libc version.
29916
29917 2000-11-10  Jim Meyering  <meyering@lucent.com>
29918
29919         * lib/obstack.h: Update from GNU libc.
29920         * lib/obstack.c: Likewise.
29921
29922 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
29923
29924         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
29925
29926 2000-11-06  Paul Eggert  <eggert@twinsun.com>
29927
29928         * lib/getusershell.c (setusershell): Use rewind rather than
29929         fseek/fseeko, to avoid configuration hassles with fseeko.
29930         Don't bother opening SHELLS_FILE if shellstream is NULL;
29931         it's not necessary.
29932
29933 2000-11-05  Jim Meyering  <meyering@lucent.com>
29934
29935         * lib/makepath.h (make_dir): Declare.
29936         * lib/makepath.c (make_dir): Remove `static' attribute.
29937         Tweak a comment.
29938
29939 2000-11-04  Jim Meyering  <meyering@lucent.com>
29940
29941         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
29942
29943 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
29944
29945         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
29946         last one in a bucket, advance to the next bucket.
29947
29948 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
29949
29950         * lib/fnmatch.c: Do not comment out all the code if we are using
29951         the GNU C library, because in some cases we are replacing buggy
29952         code in the GNU C library itself.
29953
29954 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
29955
29956         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
29957         (regex_compile): Catch bogus \(\1\).
29958
29959 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29960
29961         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
29962         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
29963         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
29964
29965 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29966
29967         * lib/error.h, getline.h, modechange.h:
29968         Remove "2000" from Copyright line, as the file hasn't been
29969         changed this year other than in the copyright notice.
29970
29971         * lib/xalloc.h: Add "2000" to Copyright line, as this file
29972         was changed this year.
29973
29974 2000-10-29  Jim Meyering  <meyering@lucent.com>
29975
29976         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
29977         renaming.
29978         * m4/ls-mntd-fs.m4: Likewise
29979
29980 2000-10-29  Jim Meyering  <meyering@lucent.com>
29981
29982         * lib/xstat.in: Fix grammar in comment.
29983
29984 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
29985
29986         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
29987         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
29988         doesn't define __restrict_arr.
29989
29990 2000-10-28  Jim Meyering  <meyering@lucent.com>
29991
29992         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
29993         (jm_PREREQ_MEMCHR): New function.
29994
29995 2000-10-28  Jim Meyering  <meyering@lucent.com>
29996
29997         * lib/memchr.c: Update from libc.
29998         Adjust for portability:
29999         [HAVE_STDLIB_H]: Include stdlib.h.
30000         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30001         Undef __memchr, too.
30002         [!weak_alias]: Define __memchr to memchr.
30003
30004         * lib/regex.c: Update from libc.
30005         * lib/regex.h: Likewise.
30006         * lib/getopt1.c: Likewise.
30007         * lib/memcmp.c: Likewise.
30008
30009         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30010         Avoid using fseek, when possible -- it's broken by design.
30011         Patch by Ulrich Drepper.
30012
30013 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30014
30015         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30016         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30017         Giving in to popular pressure to shut up the compiler with casts.
30018
30019 2000-10-26  Jim Meyering  <meyering@lucent.com>
30020
30021         * lib/strftime.c: Update from libc.
30022
30023 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30024
30025         * regex.c: More `unsigned char' -> `re_char' changes.
30026         Also change several `int' into `re_wchar_t'.
30027         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30028         (PUSH_FAILURE_POINTER): Don't cast any more.
30029         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30030         We want GCC to complain, since this piece of code makes
30031         re_match non-reentrant, which *should* be fixed.
30032         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30033         (EXTEND_BUFFER): Use RETALLOC.
30034         (SET_LIST_BIT): Don't cast.
30035         (re_wchar_t): New type.
30036         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30037         that those two functions will always properly return.
30038         (IMMEDIATE_QUIT_CHECK): Cast to void.
30039         (analyse_first): Use recursion rather than an explicit stack.
30040         (re_compile_fastmap): Can't fail anymore.
30041         (re_search_2): Don't check re_compile_fastmap for failure.
30042         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30043         Now also sets the new value (passed in a new argument).
30044         (re_match_2_internal): Use it.
30045         Also, use a new var `reg' of type size_t when looping through regs
30046         rather than reuse the inappropriate `mcnt'.
30047
30048 2000-10-25  Jim Meyering  <meyering@lucent.com>
30049
30050         * lib/obstack.c: Update from libc.
30051
30052 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30053
30054         * regex.c (regex_compile): Change the way of handling a range from
30055         a char less than 256 to a char not less than 256.
30056
30057 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30058
30059         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30060         NT-Emacs only.
30061         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30062         so that re_search functions only quit when callers expect them to.
30063
30064 2000-10-23  Jim Meyering  <meyering@lucent.com>
30065
30066         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30067         wrong.  That set_locale call must not have any side effects.
30068         From Paul Eggert.
30069
30070 2000-10-22  Jim Meyering  <meyering@lucent.com>
30071
30072         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
30073         [CYCLIC]: Remove now-unused definition.
30074
30075         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
30076         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
30077         Suggestion from Ulrich Drepper.
30078
30079 2000-10-21  Jim Meyering  <meyering@lucent.com>
30080
30081         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
30082         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
30083         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
30084
30085 2000-10-21  Jim Meyering  <meyering@lucent.com>
30086
30087         * lib/dirname.c (memrchr): Declare if necessary.
30088         (dir_name): Remove the restriction that there be no
30089         trailing slashes.  Now, this code skips past them, effectively
30090         ignoring them.
30091         [TEST_DIRNAME] (main): New unit tests.
30092
30093         * lib/memrchr.c: New file from GNU libc.
30094         Undef __memrchr, too.
30095         [!weak_alias]: Define __memrchr to memrchr.
30096         Guard weak_alias use with `#ifdef weak_alias'.
30097
30098 2000-10-21  Jim Meyering  <meyering@lucent.com>
30099
30100         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
30101         (dir_name): Use dir_name_r.
30102         * lib/dirname.h (dir_name_r): Declare it.
30103
30104 2000-10-17  Jim Meyering  <meyering@lucent.com>
30105
30106         * lib/quote.h (PARAMS): Define and use.
30107         Reported by Akim Demaille.
30108
30109         * lib/getopt.c: Update from libc.
30110
30111 2000-10-16  Jim Meyering  <meyering@lucent.com>
30112
30113         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
30114         setlocale.
30115         From Jan Fedak.
30116
30117 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
30118
30119         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
30120
30121 2000-09-25  Jim Meyering  <meyering@lucent.com>
30122
30123         * lib/md5.h (rol): Define (from GnuPG).
30124
30125         * lib/sha.c: Give credit (GnuPG) where due.
30126         (M): Use rol rather than open-coding it.
30127         Add a FIXME comment.
30128
30129 2000-09-21  Jim Meyering  <meyering@lucent.com>
30130
30131         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
30132         Reported by Michael Stone.
30133
30134 2000-09-20  Jim Meyering  <meyering@lucent.com>
30135
30136         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
30137         (noinst_HEADERS): Add sha.h.
30138         Based on code from Scott G. Miller and from GnuPG.
30139
30140 2000-09-18  Jim Meyering  <meyering@lucent.com>
30141
30142         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
30143         LIBS. Otherwise, everyone ends up linking with -lelf for some
30144         configurations.
30145         Reported by Mike Stone.
30146
30147 2000-09-15  Jim Meyering  <meyering@lucent.com>
30148
30149         * lib/regex.c: Update from libc.
30150
30151 2000-09-10  Jim Meyering  <meyering@lucent.com>
30152
30153         * lib/getopt.c (_getopt_internal): Update from glibc.
30154
30155 2000-09-09  Jim Meyering  <meyering@lucent.com>
30156
30157         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
30158         think it should be used as a general replacement for isascii.
30159         * lib/fnmatch.c: Likewise.
30160         * lib/mbswidth.c: Likewise
30161         * lib/regex.c: Likewise.
30162
30163         Don't use atoi.
30164         * lib/userspec.c: Include sys/param.h and limits.h.
30165         Include xstrtol.h.
30166         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
30167         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
30168         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
30169         UID, GID.  Check range.
30170
30171 2000-09-06  Jim Meyering  <meyering@lucent.com>
30172
30173         * lib/getopt.c (_getopt_internal): Update from glibc.
30174
30175 2000-08-30  Jim Meyering  <meyering@lucent.com>
30176
30177         * lib/strftime.c: Merge in changes from GNU libc.
30178
30179 2000-08-26  Jim Meyering  <meyering@lucent.com>
30180
30181         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
30182         * m4/fpending.m4: New file.
30183
30184 2000-08-26  Jim Meyering  <meyering@lucent.com>
30185
30186         * lib/closeout.c: Include "__fpending.h".
30187         (close_stdout_status): Return right away if there's nothing to flush.
30188
30189         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
30190         * lib/__fpending.c: New file.
30191         * lib/__fpending.h: New file.
30192
30193 2000-08-20  Jim Meyering  <meyering@lucent.com>
30194
30195         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
30196         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
30197         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
30198
30199 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
30200
30201         Improve fileutils installation on systems where running
30202         programs (like install) can't be unlinked.
30203         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
30204         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
30205
30206 2000-08-07  Paul Eggert  <eggert@twinsun.com>
30207
30208         Standardize on "memory exhausted" instead of "Memory exhausted"
30209         or "virtual memory exhausted".
30210         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
30211         "virtual memory exhausted".
30212         * lib/same.c (same_name): Invoke xalloc_die instead of printing
30213         our own message.
30214         * lib/userspec.c (parse_user_spec): Likewise.
30215         * lib/bumpalloc.h: comment fix
30216         * lib/same.c, userspec.c: Include xalloc.h.
30217
30218         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
30219         not char *const and pointing to a constant array.
30220         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
30221         (xrealloc): Comment fix.
30222
30223         * lib/userspec.c (parse_user_spec):
30224         Don't translate a message until just before returning,
30225         to avoid unnecessary translation.
30226
30227 2000-08-07  Jim Meyering  <meyering@lucent.com>
30228
30229         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
30230         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
30231         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
30232         getgroups.c, gethostname.c, getopt.h, group-member.c,
30233         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
30234         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
30235         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
30236         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
30237         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
30238         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
30239         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
30240         yesno.c: Back out Copyright date changes for each file with no change
30241         this year.  This eases coordination with other programs using the same
30242         source code modules.  From Paul Eggert.
30243
30244 2000-08-06  Paul Eggert  <eggert@twinsun.com>
30245
30246         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30247         not char, for compatibility with glibc 2.1.3 strftime.c.
30248
30249 2000-08-03  Greg McGary  <greg@mcgary.org>
30250
30251         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30252         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30253         (EXTEND_BUFFER): Use them.
30254
30255 2000-08-01  Jim Meyering  <meyering@lucent.com>
30256
30257         * lib/dirname.c (ISSLASH): Define.
30258         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30259         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30260         both `\' and `/' may be use as path separators.
30261         Based on a patch from Prashant TR.
30262
30263 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30264
30265         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30266         slot vector a constant, since it might get modified.
30267
30268 2000-07-31  Jim Meyering  <meyering@lucent.com>
30269
30270         * lib/xmalloc.c: Use `virtual memory exhausted', not
30271         `Memory exhausted'.
30272         * lib/obstack.c (print_and_abort): Likewise.
30273
30274 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30275
30276         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30277         buffer, so that the caller can always quote one small
30278         component of a "memory exhausted" message in slot 0.
30279         From a suggestion by Jim Meyering.
30280
30281 2000-07-30  Jim Meyering  <meyering@lucent.com>
30282
30283         * lib/makepath.c (make_path): Quote the other instance, too.
30284
30285         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30286         (STATIC_BUF_SIZE): Define.
30287         (quotearg_n_options): Use only statically allocated storage when
30288         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30289         than STATIC_BUF_SIZE.
30290
30291 2000-07-29  Jim Meyering  <meyering@lucent.com>
30292
30293         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30294         * lib/dirname.c (dir_name): Likewise.
30295
30296         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30297         `/'.
30298
30299         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30300         (dir_name): Assert that there are no trailing slashes.
30301
30302 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30303
30304         * lib/mbswidth.h (mbswidth): Add a flags argument.
30305         (mbswidth): New declaration.
30306         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30307         * lib/mbswidth.c (mbswidth): Add a flags argument.
30308         (mbsnwidth): New function.
30309
30310 2000-07-24  Jim Meyering  <meyering@lucent.com>
30311
30312         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30313
30314 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30315
30316         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30317
30318 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30319
30320         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30321         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30322         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30323         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30324         invoke multibyte primitives.
30325
30326 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30327
30328         * lib/quotearg.c:
30329         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30330         so that mbstate_t is always defined.
30331
30332         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30333         be 1 in at least one GCC installation, and this configuration
30334         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30335         performance on hosts that have mbrtowc but have only unibyte
30336         locales, but I assume these hosts are rare.
30337
30338 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30339
30340         * lib/mbswidth.c (_XOPEN_SOURCE):
30341         Don't define; this causes problems on Solaris 7.
30342         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30343
30344 2000-07-23  Jim Meyering  <meyering@lucent.com>
30345
30346         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30347         too: getgrgid, getpwuid, getuid.
30348
30349 2000-07-23  Jim Meyering  <meyering@lucent.com>
30350
30351         * lib/basename.c (base_name): Add an assertion.
30352
30353 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30354
30355         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30356         shadow its mbsinit function.
30357
30358 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30359
30360         * lib/mbswidth.h: New file.
30361         * lib/mbswidth.c: New file.
30362         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30363         (noinst_HEADERS): Add mbswidth.h.
30364
30365 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30366
30367         * lib/config.charset: Add support for FreeBSD. Improve support for
30368         HP-UX and IRIX 6.
30369
30370 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30371
30372         * m4/mbswidth.m4: New file.
30373         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30374
30375 2000-07-15  Jim Meyering  <meyering@lucent.com>
30376
30377         * lib/makepath.c: Include quote.h.
30378         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30379         corresponding argument in a `quote (...)' call.
30380         Give better diagnostics.
30381
30382         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30383         (noinst_HEADERS): Add quote.h.
30384
30385         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30386         from tar's src/misc.c.
30387         * lib/quote.h: New file.  Prototypes for same.
30388
30389 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30390
30391         From a suggestion by Bruno Haible.
30392         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30393         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30394         to decide whether to define the BeOS workaround macro;
30395         this adjusts to the change to AC_MBSTATE_T.
30396
30397 2000-07-14  Jim Meyering  <meyering@lucent.com>
30398
30399         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30400         jm_AC_TYPE_UINTMAX_T.
30401
30402 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30403
30404         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30405
30406         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30407         quotearg_buffer_restyled): Add support for
30408         clocale_quoting_style.  Undo previous change to
30409         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30410         and "{RIGHT QUOTATION MARK}" msgids.
30411
30412 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30413
30414         From a suggestion by Bruno Haible.
30415         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30416         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30417         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30418         and mbstate_t, to a single-part test that simply defines mbstate_t.
30419         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30420         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30421
30422 2000-07-10  Jim Meyering  <meyering@lucent.com>
30423
30424         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30425
30426         * m4/gnu-source.m4: Output to confdefs.h directly.
30427         Suggestion from Akim Demaille.
30428
30429 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30430
30431         The old behavior of quoting `like this' doesn't look good with
30432         newer, ISO-style fonts.  See:
30433         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30434
30435         Instead, quote "like this" by default.  Let the translator
30436         tailor the locale-specific quoting behavior by providing
30437         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30438
30439         * lib/quotearg.c (N_): New macro.
30440         (gettext_default): New function.
30441         (quotearg_buffer_restyled): Use
30442         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30443         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30444
30445 2000-07-09  Jim Meyering  <meyering@lucent.com>
30446
30447         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30448         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30449
30450         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30451         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30452
30453 2000-07-09  Jim Meyering  <meyering@lucent.com>
30454
30455         * lib/Most files: Update copyright dates to include 2000.
30456
30457 2000-07-08  Jim Meyering  <meyering@lucent.com>
30458
30459         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30460         if not defined.
30461         (xgethostname): Remove now-unnecessary #ifdef.
30462         Move declaration of `err' into loop where it's used.
30463
30464 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30465         and Bruno Haible  <haible@clisp.cons.org>
30466
30467         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30468         only if the test for an object-type mbstate_t fails.  This
30469         prevents us from mistakenly reporting that mbstate_t is a
30470         system object type after we "#define mbstate_t int" to work
30471         around its lack.
30472
30473 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30474         and Bruno Haible  <haible@clisp.cons.org>
30475
30476         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30477
30478 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30479
30480         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30481         to strerror_r.
30482         Include <ctype.h> for use of isalpha.
30483
30484 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30485
30486         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30487         by allocating a larger buffer. Test the gethostname return value for
30488         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30489         returns an error and ENAMETOOLONG isn't defined.
30490
30491 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30492
30493         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30494         dimension.
30495
30496 2000-07-04  Jim Meyering  <meyering@lucent.com>
30497
30498         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30499         of the deprecated AC_CHECKING.
30500
30501 2000-07-04  Jim Meyering  <meyering@lucent.com>
30502
30503         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30504         Reported by Bruno Haible.
30505
30506 2000-07-04  Jim Meyering  <meyering@lucent.com>
30507
30508         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30509         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30510         lacks mbrtowc.
30511
30512 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30513
30514         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30515         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30516
30517 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30518         and Bruno Haible  <haible@clisp.cons.org>
30519
30520         * lib/quotearg.c (mbrtowc):
30521         Assign to *pwc, and return 1 only if result is nonzero.
30522         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30523
30524 2000-07-03  Jim Meyering  <meyering@lucent.com>
30525
30526         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30527
30528 2000-07-03  Jim Meyering  <meyering@lucent.com>
30529
30530         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30531         This is necessary to get a definition of e.g., UTMP_FILE on
30532         HP-UX 10.20.
30533         From Bob Proulx.
30534
30535 2000-07-02  Jim Meyering  <meyering@lucent.com>
30536
30537         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
30538
30539         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
30540         AC_LIBOBJ(function_name).
30541         * m4/chown.m4: Likewise.
30542         * m4/fnmatch.m4: Likewise.
30543         * m4/ftruncate.m4: Likewise.
30544         * m4/getgroups.m4: Likewise.
30545         * m4/getline.m4: Likewise.
30546         * m4/group-member.m4: Likewise.
30547         * m4/jm-macros.m4: Likewise.
30548         * m4/lstat.m4: Likewise.
30549         * m4/malloc.m4: Likewise.
30550         * m4/memcmp.m4: Likewise.
30551         * m4/nanosleep.m4: Likewise.
30552         * m4/putenv.m4: Likewise.
30553         * m4/realloc.m4: Likewise.
30554         * m4/regex.m4: Likewise.
30555         * m4/stat.m4: Likewise.
30556         * m4/strftime.m4: Likewise.
30557
30558 2000-07-02  Jim Meyering  <meyering@lucent.com>
30559
30560         * lib/quotearg.c (mbstate_t): Don't define here.
30561
30562 2000-07-02  Jim Meyering  <meyering@lucent.com>
30563
30564         * lib/nanosleep.c (SIGCONT): Define if not already defined.
30565
30566 2000-07-01  Jim Meyering  <meyering@lucent.com>
30567
30568         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
30569
30570 2000-07-01  Jim Meyering  <meyering@lucent.com>
30571
30572         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
30573         problem.
30574
30575 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30576
30577         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
30578         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
30579
30580 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30581
30582         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
30583         per change in ../m4/ls-mntd-fs.m4.
30584         (read_filesystem_list): Ignore symbolic links.
30585
30586 2000-06-29  Jim Meyering  <meyering@lucent.com>
30587
30588         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
30589         for declaration of strcmp.
30590
30591         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
30592
30593         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
30594         Avoid warning by casting result to `char *' to remove `const'.
30595
30596 2000-06-28  Jim Meyering  <meyering@lucent.com>
30597
30598         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
30599         included by quotearg.c, for which we perform this test.  From
30600         Bruno Haible.
30601
30602 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30603
30604         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
30605         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
30606         <utmpx.h> exists, put readutmp.o into LIBOBJS.
30607
30608 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30609
30610         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
30611
30612 2000-06-26  Paul Eggert  <eggert@twinsun.com>
30613
30614         savedir now sets errno on failure and invokes xmalloc to get memory.
30615         Fix a couple of other minor bugs while we're at it.
30616
30617         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
30618         (NAMLEN): Remove macro.
30619         (malloc, realloc): Remove decls.
30620         (stpcpy): Likewise.
30621         ("xalloc.h"): Include.
30622         (NAME_SIZE_DEFAULT): New macro.
30623         (savedir): Use xmalloc / xrealloc to allocate memory.
30624         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
30625         Skip "" directory entries.
30626         Use strlen to calculate directory entry length, since the old method
30627         is rarely used these days and isn't worth supporting.
30628         Don't use a pointer after freeing it.
30629         Check for integer overflow when calculating allocation size.
30630         Use memcpy to copy entries, instead of stpcpy.
30631         Set errno properly when returning NULL.
30632         Check for readdir error.
30633
30634 2000-06-26  Jim Meyering  <meyering@lucent.com>
30635
30636         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
30637
30638 2000-06-25  Jim Meyering  <meyering@lucent.com>
30639
30640         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
30641         Linux header bug when _XOPEN_SOURCE is defined to 500.
30642
30643 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30644
30645         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
30646         deficiency.
30647
30648 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30649
30650         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
30651         Include xalloc.h.
30652         Don't include <stdlib.h>.  Don't declare malloc, realloc.
30653
30654 2000-06-24  Jim Meyering  <meyering@lucent.com>
30655
30656         * m4/strerror_r.m4: Revive this file -- to try out an experimental
30657         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
30658         for which strerror does return char*, but which lacks a conveniently
30659         accessible declaration of the function.  If the compile-test says
30660         strerror_r doesn't work, then resort to a `run'-test that works on
30661         BeOS and segfaults on DEC Unix.
30662
30663 2000-06-24  Jim Meyering  <meyering@lucent.com>
30664
30665         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
30666
30667 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30668
30669         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
30670         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
30671
30672 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30673
30674         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
30675         (mbrtowc, mbstate_t): Define substitutes if
30676         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
30677         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
30678         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
30679
30680 2000-06-23  Jim Meyering  <meyering@lucent.com>
30681
30682         * m4/afs.m4: Add missing AC_MSG_RESULT.
30683         Reported by Bruno Haible.
30684
30685         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
30686         Suggestion from Bruno Haible.
30687
30688 2000-06-23  Jim Meyering  <meyering@lucent.com>
30689
30690         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
30691
30692 2000-06-21  Jim Meyering  <meyering@lucent.com>
30693
30694         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
30695
30696 2000-06-21  Jim Meyering  <meyering@lucent.com>
30697
30698         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
30699         (noinst_HEADERS): Add getstr.h.
30700
30701         * lib/getline.c (getstr): Move into a separate file.
30702         * lib/getstr.c (getstr): New file, extracted from getline.c, with
30703         the following changes: new parameter, delim2; both delim[12]
30704         parameters have type `int', not `char'.  The latter would lose
30705         with 8-bit delimiters.
30706         * lib/getstr.h: New file.
30707
30708 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30709
30710         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
30711         than 1024, return a memory chunk of least possible size, instead
30712         of size PATH_MAX + 2. In the loop, increment the size proportionally.
30713         Use free/xmalloc instead of xrealloc to avoid copying for very long
30714         paths.
30715
30716 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30717
30718         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
30719         the empty string.
30720
30721 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30722
30723         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
30724         address, not strdup.  Include <stdlib.h> and don't declare free().
30725
30726 2000-06-19  Jim Meyering  <meyering@lucent.com>
30727
30728         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
30729
30730 2000-06-18  Jim Meyering  <meyering@lucent.com>
30731
30732         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
30733
30734         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
30735         `checking whether...' message to be consistent with that of the
30736         lstat test.
30737
30738 2000-06-18  Jim Meyering  <meyering@lucent.com>
30739
30740         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
30741         Besides, these days every porting target provides a mkdir function.
30742
30743         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
30744         needed. (this snippet comes from src/system.h).
30745
30746 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
30747
30748         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
30749
30750 2000-06-15  Paul Eggert  <eggert@twinsun.com>
30751
30752         * lib/human.c (adjust_value): New function.
30753         (human_readable_inexact): Apply rounding style even when
30754         printing approximate values.
30755
30756 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30757
30758         * lib/human.c (human_readable_inexact): Allow an input block
30759         size that is not a multiple of the output block size, and vice versa.
30760         Reported by Piergiorgio Sartor.
30761
30762 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30763
30764         * lib/getdate.y (get_date): Apply relative times after time
30765         zone indicator, not before.  Reported by Todd A. Jacobs.
30766
30767 2000-06-13  Jim Meyering  <meyering@lucent.com>
30768
30769         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
30770
30771         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
30772
30773 2000-06-12  Paul Eggert  <eggert@twinsun.com>
30774
30775         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
30776
30777 2000-06-12  Jim Meyering  <meyering@lucent.com>
30778
30779         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
30780         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
30781         optional argument.
30782         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
30783         the optional argument, `lib'.
30784
30785 2000-06-08  Jim Meyering  <meyering@lucent.com>
30786
30787         * m4/largefile.m4: Remove file (now that it's part of autoconf).
30788
30789 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30790
30791         Rewrite largefile configuration so that we don't need to run
30792         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
30793         AC_CANONICAL_HOST in configure.in -- jmm]
30794
30795         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
30796         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
30797         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
30798         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
30799         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
30800         All uses changed.
30801         Instead of inspecting the output of getconf, try to compile the
30802         test program without and with the macro definition.
30803         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
30804         for getconf.  Instead, check for the needed flags by compiling
30805         test programs.
30806
30807 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30808
30809         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
30810
30811 2000-06-04  Jim Meyering  <meyering@lucent.com>
30812
30813         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
30814         SunOS 4.1.4 for which gid_t is an unsigned type.
30815
30816 2000-06-03  Jim Meyering  <meyering@lucent.com>
30817
30818         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
30819         now that autoconf requires that.
30820
30821         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
30822         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
30823         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
30824
30825 2000-06-03  Jim Meyering  <meyering@lucent.com>
30826
30827         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
30828
30829 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30830
30831         * m4/glibc21.m4: New file.
30832         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
30833
30834 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30835
30836         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
30837         newer, don't install charset.alias.
30838         * lib/config.charset: Change the Linux/glibc rules so they become empty
30839         on glibc-2.1 or newer.
30840
30841 2000-06-02  Jim Meyering  <meyering@lucent.com>
30842
30843         * lib/mountlist.c: Back out last change.  Instead, do this...
30844         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
30845         me_dummy member using the same `ignore'-testing code.
30846         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
30847         fs_type strings.
30848         From Mark D. Roth.
30849
30850 2000-05-29  Jim Meyering  <meyering@lucent.com>
30851
30852         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
30853         mounts with the `ignore' attribute.  Based on a patch from
30854         Mark D. Roth.
30855
30856 2000-05-28  Jim Meyering  <meyering@lucent.com>
30857
30858         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
30859         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30860         * m4/stat.m4: Likewise.
30861         * m4/lstat.m4: Likewise.
30862         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
30863
30864         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
30865         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
30866
30867 2000-05-26  Jim Meyering  <meyering@lucent.com>
30868
30869         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
30870
30871 2000-05-24  Jim Meyering  <meyering@lucent.com>
30872
30873         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
30874         autoconf requires that.
30875         * m4/lib-check.m4: Likewise.
30876         * m4/jm-macros.m4: Likewise.
30877         * m4/strftime.m4: Likewise.
30878
30879         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
30880         AC_CHECK_DECLS, now that autoconf requires that.
30881
30882 2000-05-22  Jim Meyering  <meyering@lucent.com>
30883
30884         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30885         * m4/lstat.m4: Likewise.
30886
30887 2000-05-22  Jim Meyering  <meyering@lucent.com>
30888
30889         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
30890
30891 2000-05-20  Jim Meyering  <meyering@lucent.com>
30892
30893         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
30894         (jm_PREREQ): Use it.
30895
30896 2000-05-18  Jim Meyering  <meyering@lucent.com>
30897
30898         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
30899         back, too, since it may have been modified by allocate_entry.
30900         (hash_delete): Rewrite to use neither the assignment operator
30901         nor the comma operator in an if-expression.
30902
30903 2000-05-15  Paul Eggert  <eggert@twinsun.com>
30904
30905         * lib/closeout.c:
30906         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
30907         Remove; no longer needed.
30908         "quotearg.h": Add include.
30909         (file_name): Do not bother to explicitly initialize to NULL; it's less
30910         efficient on some hosts.
30911         (close_stdout_status): Remove test as to whether stdout was already
30912         closed; it breaks for the case "echo x | sort >&-".
30913         Quote file name colons.
30914         Do not assume that _("write error") lacks format strings.
30915
30916 2000-05-15  Jim Meyering  <meyering@lucent.com>
30917
30918         * lib/version-etc.c (version_etc_copyright): Update the copyright
30919         string used in all --version output.
30920
30921 2000-05-14  Jim Meyering  <meyering@lucent.com>
30922
30923         * lib/closeout.c (close_stdout_set_file_name): New function.
30924         (close_stdout_status): Use new file-scoped global.
30925         Return right away if fstat says the stdout file descriptor is invalid.
30926         * lib/closeout.h (close_stdout_set_file_name): Declare.
30927
30928 2000-05-10  Jim Meyering  <meyering@lucent.com>
30929
30930         * lib/closeout.c [default_exit_status]: New file-scoped variable.
30931         (close_stdout_set_status): New function.
30932         * lib/closeout.h (close_stdout_set_status): Declare.
30933
30934 2000-05-09  Jim Meyering  <meyering@lucent.com>
30935
30936         * m4/gettext.m4: Rename this...
30937         * m4/libintl.m4: ...to this.
30938
30939 2000-05-08  Jim Meyering  <meyering@lucent.com>
30940
30941         * lib/long-options.c: Don't include closeout.h.
30942         (parse_long_options): Don't call close_stdout for --version.
30943
30944 2000-05-06  Paul Eggert  <eggert@twinsun.com>
30945
30946         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
30947         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
30948         2.1.3 bug.  This avoids a clash when files like regex.c define
30949         _GNU_SOURCE.
30950
30951 2000-05-06  Jim Meyering  <meyering@lucent.com>
30952
30953         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
30954         (AC_REPLACE_FUNCS): Add strnlen.
30955
30956         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
30957         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
30958
30959         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
30960         AC_SEARCH_LIBS call for nanosleep.
30961         (LIB_NANOSLEEP): Set and AC_SUBST.
30962
30963 2000-05-06  Jim Meyering  <meyering@lucent.com>
30964
30965         * lib/strnlen.c: Undefine __strnlen and strnlen.
30966         [!weak_alias]: Define __strnlen to strnlen.
30967
30968         * lib/atexit.c: New file, from libiberty.
30969
30970 2000-05-06  Jim Meyering  <meyering@lucent.com>
30971
30972         * lib/closeout.c (close_stdout_status): Also check for errors on the
30973         stderr stream.
30974
30975 2000-05-05  Jim Meyering  <meyering@lucent.com>
30976
30977         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
30978         AC_SEARCH_LIBS call for clock_gettime.
30979         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
30980
30981         * m4/search-libs.m4: Update from autoconf.
30982
30983         su doesn't work on Solaris 2.6.
30984         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
30985         <shadow.h>.  Reported by Dragos Harabor.
30986
30987 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
30988
30989         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
30990         memcpy instead of xmalloc, xrealloc, path_concat.
30991         (locale_charset): Treat empty environment variables as absent.
30992         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
30993
30994 2000-05-04  Jim Meyering  <meyering@lucent.com>
30995
30996         * lib/getopt.c: Update from glibc.
30997         * lib/obstack.c: Likewise.
30998         * lib/obstack.h: Likewise.
30999         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31000         file
31001
31002         * lib/regex.h: Likewise.
31003         * lib/strndup.c: Likewise.
31004         * lib/strnlen.c: New file, from glibc.
31005
31006 2000-05-03  Jim Meyering  <meyering@lucent.com>
31007
31008         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31009
31010 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31011
31012         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31013         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31014         compile-time test, rather than inspecting host and OS, to
31015         decide whether to define _LARGEFILE_SOURCE.
31016
31017 2000-05-01  Jim Meyering  <meyering@lucent.com>
31018
31019         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31020
31021         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31022         Based on a patch from Bruno Haible.
31023
31024 2000-05-01  Jim Meyering  <meyering@lucent.com>
31025
31026         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31027
31028 2000-04-29  Jim Meyering  <meyering@lucent.com>
31029
31030         * lib/path-concat.c: Declare strdup only if it's not defined.
31031         * lib/canon-host.c: Likewise.
31032
31033 2000-04-28  Jim Meyering  <meyering@lucent.com>
31034
31035         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31036         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31037         is included first, then limits.h is included by locale.h by libintl.h.
31038         From John David Anglin.
31039
31040 2000-04-25  Jim Meyering  <meyering@lucent.com>
31041
31042         * lib/makepath.c (S_IRWXUGO): Define.
31043         (make_path): Always perform explicit chmod if MODE specifies any
31044         of the `special' permission bits.  Prompted by a bug report against
31045         install from Mate Wierdl and Joost van Baal.
31046
31047 2000-04-18  Jim Meyering  <meyering@lucent.com>
31048
31049         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31050         (jm_PREREQ): Use it.
31051
31052 2000-04-18  Jim Meyering  <meyering@lucent.com>
31053
31054         * lib/README: New file.
31055
31056         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31057         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31058
31059 2000-04-17  Jim Meyering  <meyering@lucent.com>
31060
31061         Get it right :-)
31062         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31063         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31064         Suggestion from Akim Demaille.
31065
31066 2000-04-17  Jim Meyering  <meyering@lucent.com>
31067
31068         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31069         the definition of it to rpl_strftime also defined-away the system's
31070         declaration.
31071
31072 2000-04-15  Jim Meyering  <meyering@lucent.com>
31073
31074         Use `C' to denote so-called `contiguous' files, the same way
31075         that tar does.
31076         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
31077         (ftypelet): Use S_ISCTG.
31078         From Michael Deutschmann.
31079
31080 2000-04-14  Jim Meyering  <meyering@lucent.com>
31081
31082         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
31083         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
31084         clobbered.
31085
31086 2000-04-14  Jim Meyering  <meyering@lucent.com>
31087
31088         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
31089
31090 2000-04-13  Jim Meyering  <meyering@lucent.com>
31091
31092         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
31093         AH_VERBATIM to insert required #ifndef into config.h.in.
31094         Suggestion from Akim Demaille.
31095
31096 2000-04-12  Jim Meyering  <meyering@lucent.com>
31097
31098         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
31099         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
31100         Christian Krackowizer.
31101
31102         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
31103         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
31104         (AC_SYS_LARGEFILE): Require.
31105         (AM_C_PROTOTYPES): Require.
31106
31107 2000-04-08  Jim Meyering  <meyering@lucent.com>
31108
31109         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
31110         names don't conflict.  Reported by Eli Zaretskii.
31111
31112 2000-04-07  Jim Meyering  <meyering@lucent.com>
31113
31114         * lib/putenv.c: Move inclusion of errno.h so it follows that of
31115         sys/types.h, to work around system header problems on AIX 3.2.5.
31116         From Bruno Haible.
31117
31118 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
31119
31120         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
31121         bug.  Deal with the different error behavior of Irix iconv.
31122
31123 2000-04-05  Paul Eggert  <eggert@twinsun.com>
31124
31125         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
31126         IRIX if the installer said otherwise.
31127
31128 2000-04-05  Jim Meyering  <meyering@lucent.com>
31129
31130         Portability tweaks required for ultrix4.3.
31131         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
31132         (jm_CHECK_DECLS): Add getutent to the list of functions.
31133         (_jm_DECL_HEADERS): Add utmpx.h.
31134         From John David Anglin.
31135
31136         * m4/strftime.m4: Back out the 2000-04-02 change.
31137         Instead of that change, simply undefine putenv in the test program.
31138
31139 2000-04-05  Jim Meyering  <meyering@lucent.com>
31140
31141         Portability tweaks required for ultrix4.3.
31142         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
31143         getutent.
31144         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
31145         * lib/canon-host.c: Declare strdup.
31146         * lib/path-concat.c: Likewise.
31147         From John David Anglin.
31148
31149 2000-04-04  Jim Meyering  <meyering@lucent.com>
31150
31151         Be more DOS 8.3-friendly.
31152         * lib/ref-add.sin: Renamed from ref-add.sed.in.
31153         * lib/ref-del.sin: Renamed from ref-del.sed.in.
31154         * lib/Makefile.am: Reflect renaming.
31155         Reported by Eli Zaretskii.
31156
31157         Use a temporary file name that won't clash with `charset.alias'
31158         in the DOS 8.3 name space.
31159         * lib/Makefile.am (charset_tmp): Define.
31160         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
31161         (uninstall-local): Likewise.
31162         Reported by Eli Zaretskii.
31163
31164 2000-04-03  Jim Meyering  <meyering@lucent.com>
31165
31166         * m4/gettext.m4: Fix typo in comment.
31167
31168         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
31169         textutils/configure.in).  Suggestion from Paul Eggert.
31170         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
31171
31172 2000-04-02  Paul Eggert  <eggert@twinsun.com>
31173
31174         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
31175         variable in the shell rather than using putenv, which isn't
31176         portable.  This avoids the configure-time inter-test dependency
31177         on the potentially-renamed putenv function.
31178
31179 2000-03-30  Paul Eggert  <eggert@twinsun.com>
31180
31181         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
31182         before checking struct stat.st_blksize, so that
31183         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
31184
31185 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31186
31187         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
31188         since strftime.c uses HAVE_STRFTIME to decide whether to use
31189         the underlying strftime.
31190
31191 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31192
31193         * lib/time/strftime.c (my_strftime): Make sure we call the system
31194         strftime, not ourselves, when invoking the underlying strftime.
31195
31196 2000-03-24  Jim Meyering  <meyering@lucent.com>
31197
31198         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
31199         (charset_alias): Define.
31200         (install-exec-local): Factor out common code.
31201         (uninstall-local): Split lines longer than 80.
31202         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
31203         (SUFFIXES): Define.
31204         (.sed.in.sed): New rule.  Don't redirect directly to $@.
31205         (CLEANFILES): Add ref-add.sed and ref-del.sed.
31206
31207 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
31208
31209         * lib/config.charset: Output a line containing "Packages using this
31210         file".
31211         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
31212         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
31213         ref-del.sed): New rules.
31214
31215 2000-03-17  Jim Meyering  <meyering@lucent.com>
31216
31217         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
31218         Otherwise, include <strings.h>
31219
31220 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
31221
31222         * lib/unicodeio.c (utf8_wctomb): New function.
31223         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
31224         format instead of in UCS-4 with platform dependent endianness.
31225
31226 2000-03-10  Jim Meyering  <meyering@lucent.com>
31227
31228         * m4/lib-check.m4: Look for getspnam in -lgen, too.
31229         From Marco Franzen.
31230
31231 2000-03-07  Paul Eggert  <eggert@twinsun.com>
31232
31233         * lib/savedir.c (savedir): Work even if directory size is
31234         negative; this can happen with some screwy NFS configurations.
31235
31236 2000-03-06  Jim Meyering  <meyering@lucent.com>
31237
31238         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
31239         if it's NULL (because we ran out of memory).  From Bruno Haible.
31240
31241 2000-03-05  Jim Meyering  <meyering@lucent.com>
31242
31243         * lib/localcharset.c ("path-concat.h"): Include.
31244         (get_charset_aliases): Use path_concat instead of ANSI string
31245         concatenation.
31246
31247         * lib/unicodeio.h (PARAMS): Define.
31248         Use it to guard prototype.
31249
31250 2000-03-04  Jim Meyering  <meyering@lucent.com>
31251
31252         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31253         for lib/localcharset.c.
31254
31255 2000-03-04  Jim Meyering  <meyering@lucent.com>
31256
31257         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31258         installing into it.
31259         (uninstall-local): Uncomment this rule so `make distcheck' works
31260         once again.
31261
31262         * lib/unicodeio.c (<errno.h>): Include it.
31263         (errno): Declare if not defined.
31264
31265         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31266
31267         * lib/config.charset: New version, incorporating remarks from a linux
31268         i18n mailing list.  From Bruno Haible.
31269
31270 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31271
31272         * m4/codeset.m4: New file.
31273         * m4/iconv.m4: New file.
31274         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31275
31276 2000-03-03  Jim Meyering  <meyering@lucent.com>
31277
31278         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31279
31280 2000-03-02  Jim Meyering  <meyering@lucent.com>
31281
31282         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31283         the messages come out on separate lines.
31284
31285         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31286         rather than jm_CHECK_DECLARATIONS.
31287         * m4/decl.m4: Remove now-unused file.
31288
31289         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31290         geteuid.
31291
31292 2000-03-02  Jim Meyering  <meyering@lucent.com>
31293
31294         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31295
31296 2000-03-01  Jim Meyering  <meyering@lucent.com>
31297
31298         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31299         * lib/unicodeio.c: Likewise.
31300
31301 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31302
31303         * lib/config.charset: New file.
31304         * lib/localcharset.c: New file.
31305         * lib/unicodeio.h, lib/unicodeio.c: New files.
31306         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31307         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31308         (noinst_HEADERS): Add unicodeio.h.
31309         (all-local, install-exec-local, charset.alias): New targets.
31310
31311 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31312
31313         * lib/quotearg.c (ALERT_CHAR): New macro.
31314         (quotearg_buffer_restyled): Use it.
31315
31316 2000-02-27  Jim Meyering  <meyering@lucent.com>
31317
31318         * m4/check-decl.m4: Add getenv to the list.
31319
31320 2000-02-27  Jim Meyering  <meyering@lucent.com>
31321
31322         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31323         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31324
31325         * lib/backupfile.c: Guard inclusion of stdlib.h with
31326         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31327         Declare malloc if needed.
31328
31329         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31330         `#ifndef HAVE_DECL..'
31331         now that autoconf always defines the HAVE_DECL_ symbols.
31332         * lib/human.c: Likewise.
31333         * lib/same.c: Likewise.
31334         * lib/strtoumax.c: Likewise.
31335
31336         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31337         declaration check was not run.
31338         * lib/hash.c: Likewise.
31339         * lib/human.c: Likewise.
31340         * lib/same.c: Likewise.
31341         * lib/strtoumax.c: Likewise.
31342
31343         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31344         `.', then first look up the entire `.'-containing string as a login
31345         name.
31346
31347 2000-02-23  Jim Meyering  <meyering@lucent.com>
31348
31349         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31350         in place of my hack.
31351
31352 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31353
31354         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31355         (textint): New typedef.
31356         (parser_control): Member year changed from int to textint.
31357         All uses changed.
31358         (YYSTYPE): Removed; replaced by %union with int and textint members.
31359         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31360         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31361         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31362         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31363         (date, number, to_year): Use width of number in digits, not its value,
31364         to determine whether it's a 2-digit year, or a 2-digit time.
31365         (yylex): Store number of digits of numeric tokens.
31366         Reported by John Kendall.
31367
31368         (parser_control): Changed from struct parser_control to typedef (for
31369         consistency).  All uses changed.
31370
31371         (tID): Removed; not used.
31372         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31373
31374 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31375
31376         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31377         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31378
31379 2000-02-12  Jim Meyering  <meyering@lucent.com>
31380
31381         * lib/userspec.c (ISDIGIT): Define it.
31382         (isdigit): Remove definition.
31383         (is_number): Use ISDIGIT, not isdigit.
31384         <libintl.h>: Include.
31385         (_ and N_): Define.
31386         (parse_user_spec): Mark translatable strings.
31387
31388 2000-02-10  Jim Meyering  <meyering@lucent.com>
31389
31390         With these changes, nanosleep.[ch] are finally enough like the other
31391         lib/* replacement files to compile on a few more losing systems.
31392
31393         * lib/nanosleep.h: Don't include config.h.
31394         Remove prototype from declaration of nanosleep.
31395         (PARAMS): Remove now-unneeded definition.
31396         * lib/nanosleep.c: #undef nanosleep.
31397         (rpl_nanosleep): Rename from nanosleep.
31398
31399 2000-02-10  Jim Meyering  <meyering@lucent.com>
31400
31401         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31402         gnu_nanosleep to rpl_nanosleep.
31403
31404 2000-02-09  Jim Meyering  <meyering@lucent.com>
31405
31406         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31407         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31408
31409 2000-02-08  Akim Demaille  <akim@epita.fr>
31410
31411         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31412         `[' and `]' and remove uses of `changequote'.
31413         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31414         (AC_SYS_LARGEFILE): Likewise.
31415         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31416         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31417         of changequote.
31418         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31419         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31420         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31421         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31422
31423 2000-02-05  Jim Meyering  <meyering@lucent.com>
31424
31425         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31426         Remove explicit use of AC_HEADER_TIME.  It is required by
31427         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31428         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31429         in autoconf whereby the expansion of the latter ended up preceding
31430         the expansion of its prerequisite, AC_HEADER_TIME.
31431         Reported by Volker Borchert.
31432
31433 2000-02-03  Jim Meyering  <meyering@lucent.com>
31434
31435         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31436
31437 2000-02-03  Jim Meyering  <meyering@lucent.com>
31438
31439         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31440         rather than with `#if HAVE_UTMPNAME'.
31441
31442 2000-02-02  Jim Meyering  <meyering@lucent.com>
31443
31444         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31445         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31446         Reported by Eli Zaretskii.
31447
31448 2000-02-01  Jim Meyering  <meyering@lucent.com>
31449
31450         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31451
31452 2000-01-31  Jim Meyering  <meyering@lucent.com>
31453
31454         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31455         functions.  Add the time.h and sys/time.h headers along with the
31456         AC_REQUIRE'ment of AC_HEADER_TIME.
31457
31458 2000-01-31  Jim Meyering  <meyering@lucent.com>
31459
31460         * lib/nanosleep.h (nanosleep): Guard declaration with
31461         `#if ! HAVE_DECL_NANOSLEEP'.
31462         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31463         the declaration in that vendor's sys/timers.h.
31464         Reported by Christian Krackowizer.
31465
31466         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31467         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31468         (ISPRINT): Likewise.
31469         Reported by Tom Tromey.
31470
31471 2000-01-30  Jim Meyering  <meyering@lucent.com>
31472
31473         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31474
31475         * m4/prereq.m4 (utmp_includes): Define.
31476         Check for ut_user and ut_name members in both struct utmpx
31477         and struct utmp.
31478
31479 2000-01-30  Jim Meyering  <meyering@lucent.com>
31480
31481         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31482         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31483         header files where only utmpx.ut_user is declared.
31484
31485         * lib/readutmp.h (UT_USER): Define.
31486
31487 2000-01-29  Jim Meyering  <meyering@lucent.com>
31488
31489         * m4/lib-check.m4: New file containing library-related checks from
31490         fileutils and sh-utils (textutils had none).
31491
31492 2000-01-28  Jim Meyering  <meyering@lucent.com>
31493
31494         * m4/perl.m4: Change format of warning message to look more like that
31495         from the missing script.  Suggestion from François Pinard.
31496
31497 2000-01-25  Jim Meyering  <meyering@lucent.com>
31498
31499         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31500         well as time.h in the compile check.
31501         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31502         Fix typo in cross-compiling case: s/yes/no/.
31503
31504 2000-01-23  Jim Meyering  <meyering@lucent.com>
31505
31506         * m4/jm-macros.m4: Move df-related tests here from
31507         fileutils/configure.in
31508
31509         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31510         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31511
31512         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31513         s/space/ac_fsusage_space/.
31514         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31515
31516         * m4/ftruncate.m4: New file (derived from part of
31517         fileutils/configure.in).
31518         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31519         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31520
31521         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31522         AC_SUBST these here, rather than just in sh-util/configure.in, so
31523         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31524         all the same.
31525         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31526         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31527         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31528         (AC_SUBST(POW_LIBM)): Likewise.
31529         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31530
31531 2000-01-23  Jim Meyering  <meyering@lucent.com>
31532
31533         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
31534         obstack.c.
31535
31536 2000-01-22  Jim Meyering  <meyering@lucent.com>
31537
31538         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
31539
31540         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
31541
31542         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
31543         configure.in
31544         (AC_CHECK_HEADERS): Likewise for sh-utils.
31545         (AC_CHECK_HEADERS): Likewise for textutils.
31546         Merge the three lists of headers.
31547
31548         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
31549         from fileutils' configure.in.
31550
31551         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
31552         code. Moved tests into their own function (_jm_DECL_HEADERS) in
31553         check-decl.m4.
31554
31555         * m4/check-decl.m4: Use #if rather than #ifdef.
31556         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
31557         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
31558         (_jm_DECL_HEADERS): Define new function.
31559         (jm_CHECK_DECLARATIONS): Require it.
31560
31561 2000-01-22  Jim Meyering  <meyering@lucent.com>
31562
31563         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
31564         [! HAVE_DECL_STRTOULL]: Declare strtoull.
31565         Required for some AIX systems.  Reported by Christian Krackowizer.
31566         [TESTING] (main): New function.
31567
31568         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
31569         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
31570         letters.
31571
31572         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
31573         iswprint.
31574
31575         * lib/strverscmp.c (ISDIGIT): Define.
31576         (strverscmp): Use ISDIGIT, not isdigit.
31577
31578 2000-01-19  Jim Meyering  <meyering@lucent.com>
31579
31580         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
31581         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
31582         defines `struct timespec' in <sys/time.h>
31583
31584         * m4/c-bs-a.m4: Remove uses of changequote altogether.
31585         Thanks to Akim for explaining.
31586
31587 2000-01-17  Paul Eggert  <eggert@twinsun.com>
31588
31589         * lib/nanosleep.c (nanosleep):
31590         Don't use SA_INTERRUPT to decide whether to call sigaction, as
31591         POSIX.1 doesn't require SA_INTERRUPT and some systems
31592         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
31593         it's been part of POSIX.1 since day 1 (in 1988).
31594
31595 2000-01-17  Jim Meyering  <meyering@lucent.com>
31596
31597         * lib/interlock: Remove unused file.  Reported by François Pinard.
31598
31599 2000-01-16  Paul Eggert  <eggert@twinsun.com>
31600
31601         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
31602         alert, backslash, formfeed, and vertical tab unnecessarily in
31603         shell quoting style.
31604
31605 2000-01-16  Jim Meyering  <meyering@lucent.com>
31606
31607         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
31608         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
31609         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
31610         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
31611
31612 2000-01-16  Jim Meyering  <meyering@lucent.com>
31613
31614         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
31615         because the latter didn't work.
31616
31617 2000-01-15  Jim Meyering  <meyering@lucent.com>
31618
31619         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
31620         (AC_REPLACE_FUNCS): Add memcpy and memset.
31621         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
31622         Add strpbrk.
31623         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
31624
31625 2000-01-12  Jim Meyering  <meyering@lucent.com>
31626
31627         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
31628         (jm_PREREQ): Use it.
31629         (jm_PREREQ_READUTMP): New macro.
31630         (jm_PREREQ): Use it.
31631
31632 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31633
31634         Quote multibyte characters correctly.
31635         * m4/c-bs-a.m4: New file.
31636         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
31637         (jm_PREREQ): Use it.
31638
31639 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31640
31641         * m4/uintmax_t.m4: Port to autoconf 2.13.
31642
31643 2000-01-08  Jim Meyering  <meyering@ascend.com>
31644
31645         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
31646         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
31647
31648 2000-01-04  Jim Meyering  <meyering@ascend.com>
31649
31650         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
31651         jm_STRUCT_DIRENT_D_TYPE.
31652         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
31653         jm_STRUCT_DIRENT_D_INO.
31654         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
31655         jm_STRUCT_UTIMBUF.
31656         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
31657         renamings.
31658         * m4/utime.m4: Likewise.
31659
31660         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
31661         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
31662
31663 2000-01-03  Paul Eggert  <eggert@twinsun.com>
31664
31665         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
31666         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
31667
31668 2000-01-02  Jim Meyering  <meyering@ascend.com>
31669
31670         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
31671         remember if this is necessary.
31672
31673 1999-12-26  Jim Meyering  <meyering@ascend.com>
31674
31675         * m4/jm-macros.m4: Use it here.
31676         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
31677
31678 1999-12-23  Jim Meyering  <meyering@ascend.com>
31679
31680         * m4/jm-macros.m4: Check for clock_gettime (moved from
31681         fileutils/configure.in)
31682         Check for gettimeofday.
31683
31684 1999-12-20  Jim Meyering  <meyering@ascend.com>
31685
31686         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
31687         autoconf-2.14a-1999-12-20.
31688
31689 1999-12-19  Jim Meyering  <meyering@ascend.com>
31690
31691         * m4/lstat-slash.m4: New file.
31692         * m4/jm-macros.m4: Use the new macro:
31693         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31694
31695 1999-12-07  Jim Meyering  <meyering@ascend.com>
31696
31697         * m4/perl.m4: Require that File::Compare be available, too.
31698         Too many systems seem to lack it.
31699
31700         * m4/strftime.m4: Add checks for most of the cpp macros tested in
31701         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
31702
31703 1999-11-18  Paul Eggert  <eggert@twinsun.com>
31704
31705         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
31706         problem with the QNX 4.25 shell, which doesn't propagate exit
31707         status of failed commands inside shell assignments.
31708
31709 1999-11-17  Jim Meyering  <meyering@ascend.com>
31710
31711         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
31712
31713 1999-11-07  Jim Meyering  <meyering@ascend.com>
31714
31715         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
31716
31717 1999-11-06  Jim Meyering  <meyering@ascend.com>
31718
31719         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
31720         * m4/jm-macros.m4 (jm_MACROS): Use it here.
31721
31722 1999-11-05  Jim Meyering  <meyering@ascend.com>
31723
31724         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
31725         configure.in of textutils, fileutils, and sh-utils into this one
31726         (shared between those packages) file.
31727         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
31728         AC_STRUCT_ST_BLKSIZE.
31729
31730 1999-11-03  Jim Meyering  <meyering@ascend.com>
31731
31732         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
31733         of AC_CHECK_TYPE checks includes unistd.h.
31734         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
31735         Suggestion from Akim Demaille.
31736
31737 1999-10-30  Jim Meyering  <meyering@ascend.com>
31738
31739         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
31740         m4-quoted string.
31741         * m4/ls-mntd-fs.m4: Likewise.
31742         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
31743         * m4/jm-winsz1.m4: Likewise.
31744
31745         * m4/const.m4: Remove file, since the fix made it into the experimental
31746         version of autoconf.
31747         * m4/mktime.m4: Likewise.
31748
31749         * m4/check-type.m4: Remove file, now that the latest version of
31750         AC_CHECK_TYPE takes a third arg to specify additional #includes.
31751
31752         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
31753         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
31754         AC_CHECK_TYPE.
31755
31756 1999-10-04  Jim Meyering  <meyering@ascend.com>
31757
31758         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
31759
31760 1999-09-22  Paul Eggert  <eggert@twinsun.com>
31761
31762         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
31763         2.95.1 bug with HP-UX 10.20.
31764
31765 1999-09-17  Jim Meyering  <meyering@ascend.com>
31766
31767         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
31768         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
31769         due to missing strdup (against sh-utils-2.0).
31770
31771 1999-08-29  Jim Meyering  <meyering@ascend.com>
31772
31773         * m4/jm-macros.m4: Require jm_BISON.
31774         * m4/bison.m4: New file.
31775
31776 1999-08-17  Paul Eggert  <eggert@twinsun.com>
31777
31778         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
31779         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
31780
31781 1999-08-05  Jim Meyering  <meyering@ascend.com>
31782
31783         * m4/getline.m4: Rename test file from conftestdata to conftest.data
31784         to avoid conflicts with `conftest' on 8+3 filesystems.
31785         Suggestion from Eli Zaretskii.
31786
31787 1999-08-04  Jim Meyering  <meyering@ascend.com>
31788
31789         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
31790         fileutils and sh-utils (textutils's getline test was inadequate).
31791         (AM_FUNC_GETLINE): Run this test.
31792         (AC_CHECK_FUNCS): Check for getdelim.
31793         Reported by Bob Proulx.
31794
31795 1999-08-02  Jim Meyering  <meyering@ascend.com>
31796
31797         * m4/jm-macros.m4: Add a comment.
31798
31799 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31800
31801         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
31802         <inttypes.h> defines strtoumax as a macro (and not as a
31803         function).
31804
31805 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31806
31807         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
31808         that we can shift, multiply and divide unsigned long long
31809         values; Ultrix cc can't do it.
31810
31811 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31812
31813         * m4/mktime.m4: New file, which is a preview of what should appear
31814         in the next public autoconf release.
31815
31816 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31817
31818         * m4/lfs.m4: Remove this file.
31819         * m4/largefile.m4: New file.  It contains the old contents of
31820         lfs.m4, except that all names with prefix AC_LFS have been
31821         changed to use the prefix AC_SYS_LARGEFILE instead, to be
31822         compatible with future autoconf versions.  Also, some minor m4
31823         quoting problems have been fixed.
31824
31825 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31826
31827         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
31828         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
31829         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
31830         and simplify the shell code.
31831
31832 1999-08-01  Jim Meyering  <meyering@ascend.com>
31833
31834         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
31835         m4.
31836
31837 1999-07-20  Jim Meyering  <meyering@ascend.com>
31838
31839         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
31840
31841 1999-07-15  Jim Meyering  <meyering@ascend.com>
31842
31843         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
31844
31845 1999-05-22  Jim Meyering  <meyering@ascend.com>
31846
31847         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
31848
31849 1999-05-20  Jim Meyering  <meyering@ascend.com>
31850
31851         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
31852         Add a colon after each `then' in case $4 is empty.
31853
31854 1999-05-16  Jim Meyering  <meyering@ascend.com>
31855
31856         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
31857
31858 1999-05-10  Jim Meyering  <meyering@ascend.com>
31859
31860         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
31861
31862         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
31863         AC_FUNC_MKTIME.
31864
31865 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
31866
31867         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
31868
31869 1999-05-04  Paul Eggert  <eggert@twinsun.com>
31870
31871         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
31872         not CPPFLAGS, so that linking works correctly in IRIX.
31873
31874 1999-04-30  Paul Eggert  <eggert@twinsun.com>
31875
31876         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
31877
31878 1999-04-20  Paul Eggert  <eggert@twinsun.com>
31879
31880         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
31881         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
31882         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
31883         jm_AC_TYPE_UNSIGNED_LONG_LONG.
31884         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
31885
31886         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
31887
31888 1999-04-20  Jim Meyering  <meyering@ascend.com>
31889
31890         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
31891         AC_REPLACE xstroull if necessary.  From Paul Eggert.
31892         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
31893
31894 1999-04-18  Jim Meyering  <meyering@ascend.com>
31895
31896         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
31897         * m4/jm-macros.m4: Use it.
31898
31899 1999-04-06  Jim Meyering  <meyering@ascend.com>
31900
31901         * m4/strftime.m4: Remove test for %f.
31902
31903 1999-03-29  Jim Meyering  <meyering@ascend.com>
31904
31905         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
31906         superset of the AC_TYPE_* checks in the textutils, fileutils,
31907         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
31908         AC_TYPE_PID_T.
31909
31910 1999-03-28  Jim Meyering  <meyering@ascend.com>
31911
31912         * m4/jm-macros.m4: Define GNU_PACKAGE here.
31913         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
31914         replaced e.g., in the *.sh files of the sh-utils.
31915
31916 1999-03-20  Jim Meyering  <meyering@ascend.com>
31917
31918         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
31919         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
31920         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
31921
31922 1999-03-19  Jim Meyering  <meyering@ascend.com>
31923
31924         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
31925
31926 1999-03-12  Jim Meyering  <meyering@ascend.com>
31927
31928         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
31929
31930 1999-03-07  Jim Meyering  <meyering@ascend.com>
31931
31932         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
31933         declared.
31934
31935 1999-02-17  Jim Meyering  <meyering@ascend.com>
31936
31937         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
31938         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
31939
31940 1999-02-07  Jim Meyering  <meyering@ascend.com>
31941
31942         * m4/group-member.m4: New file -- extracted from sh-utils'
31943         configure.in.
31944
31945         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
31946         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
31947
31948 1999-02-06  Jim Meyering  <meyering@ascend.com>
31949
31950         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
31951         * m4/fnmatch.m4: Likewise.
31952         * m4/getgroups.m4: Likewise.
31953         * m4/lstat.m4: Likewise.
31954         * m4/malloc.m4: Likewise.
31955         * m4/putenv.m4: Likewise.
31956         * m4/realloc.m4: Likewise.
31957         * m4/regex.m4: Likewise.
31958         * m4/stat.m4: Likewise.
31959         * m4/strftime.m4: Likewise.
31960         Suggestion from Alain Magloire.
31961
31962         * m4/chown.m4: Use `.$ac_objext', not `.o'.
31963         * m4/fnmatch.m4: Likewise.
31964         * m4/getgroups.m4: Likewise.
31965         * m4/getline.m4: Likewise.
31966         * m4/lstat.m4: Likewise.
31967         * m4/malloc.m4: Likewise.
31968         * m4/memcmp.m4: Likewise.
31969         * m4/putenv.m4: Likewise.
31970         * m4/realloc.m4: Likewise.
31971         * m4/regex.m4: Likewise.
31972         * m4/stat.m4: Likewise.
31973         * m4/strftime.m4: Likewise.
31974         Suggestion from Alain Magloire.
31975
31976         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
31977         an argument.
31978
31979         * m4/regex.m4: Add a run-time Test for proper operation of
31980         re_compile_pattern.
31981
31982 1999-01-31  Jim Meyering  <meyering@ascend.com>
31983
31984         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
31985
31986 1999-01-30  Jim Meyering  <meyering@ascend.com>
31987
31988         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
31989
31990         * m4/jm-mktime.m4: Make this a wrapper around the official
31991         AM_FUNC_MKTIME rather than my private copy, now that the official one
31992         is up to date.
31993         * m4/mktime.m4: Remove file.
31994
31995         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
31996         * m4/uptime.m4: Likewise.
31997         * m4/uintmax_t.m4: Likewise.
31998
31999 1999-01-28  Jim Meyering  <meyering@ascend.com>
32000
32001         * m4/jm-macros.m4: Use jm_AFS.
32002         * m4/afs.m4: New file (from fileutils' configure.in).
32003
32004         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32005         * m4/chown.m4: Likewise.
32006         * m4/d-ino.m4: Likewise.
32007         * m4/d-type.m4: Likewise.
32008         * m4/fnmatch.m4: Likewise.
32009         * m4/getgroups.m4: Likewise.
32010         * m4/gettext.m4: Likewise.
32011         * m4/jm-mktime.m4: Likewise.
32012         * m4/jm-winsz2.m4: Likewise.
32013         * m4/lcmessage.m4: Likewise.
32014         * m4/ls-mntd-fs.m4: Likewise.
32015         * m4/malloc.m4: Likewise.
32016         * m4/memcmp.m4: Likewise.
32017         * m4/putenv.m4: Likewise.
32018         * m4/realloc.m4: Likewise.
32019         * m4/st_mtim.m4: Likewise.
32020         * m4/strftime.m4: Likewise.
32021
32022 1999-01-16  Jim Meyering  <meyering@ascend.com>
32023
32024         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32025         (ARGMATCH_DIE_DECL): Define.
32026
32027 1999-01-12  Jim Meyering  <meyering@ascend.com>
32028
32029         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32030         Reported by Lars Hecking.
32031
32032 1999-01-10  Jim Meyering  <meyering@ascend.com>
32033
32034         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32035         gross kludge.
32036         * m4/inttypes_h.m4: Likewise.
32037         * m4/lstat.m4: Likewise.
32038         * m4/malloc.m4: Likewise.
32039         * m4/readdir.m4: Likewise.
32040         * m4/realloc.m4: Likewise.
32041         * m4/st_dm_mode.m4: Likewise.
32042         * m4/stat.m4: Likewise.
32043         * m4/utimbuf.m4: Likewise.
32044         * m4/utimes.m4: Likewise.
32045
32046         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32047         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32048         comments in config.h.in are meaningful.
32049
32050         * m4/jm-macros.m4: Require autoconf-2.13 here.
32051
32052         * m4/regex.m4: By default, don't use the included regex.c on systems
32053         with glibc 2.  Suggestion from Uli Drepper.
32054
32055 1999-01-02  Jim Meyering  <meyering@ascend.com>
32056
32057         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32058
32059 1998-12-18  Jim Meyering  <meyering@ascend.com>
32060
32061         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32062         Based on a suggestion from Lars Hecking.
32063
32064 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32065
32066         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32067
32068 1998-11-16  Jim Meyering  <meyering@ascend.com>
32069
32070         * m4/lfs.m4: Double-quote the `uname...` expression.
32071
32072 1998-11-14  Jim Meyering  <meyering@ascend.com>
32073
32074         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
32075         * m4/stat.m4: Likewise.
32076
32077 1998-11-03  Jim Meyering  <meyering@ascend.com>
32078
32079         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
32080         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
32081
32082 1998-10-18  Jim Meyering  <meyering@ascend.com>
32083
32084         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
32085
32086 1998-10-17  Jim Meyering  <meyering@ascend.com>
32087
32088         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
32089         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
32090         calls for those previously hard-coded headers.  Instead, take a new
32091         parameter.
32092         (jm_CHECK_DECLARATIONS): Reflect interface change.
32093         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
32094         (jm_CHECK_DECL_LOCALTIME_R): New macro.
32095
32096         * m4/mktime.m4: Test for spring-forward gap before long-running test.
32097
32098 1998-10-14  Jim Meyering  <meyering@ascend.com>
32099
32100         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
32101         instead of "TZ=America/Vancouver".  From Paul Eggert.
32102
32103 1998-10-11  Jim Meyering  <meyering@ascend.com>
32104
32105         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
32106         This adds a test for a recently added compatibility fix for mktime.c.
32107         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
32108
32109 1998-09-27  Jim Meyering  <meyering@ascend.com>
32110
32111         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
32112
32113         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
32114         ../configure.in, including a change from Gordon Matzigkeit to allow
32115         cross-compiling for the Hurd.
32116
32117         * m4/glibc.m4: New file/macro to test for the GNU C Library
32118         versions 1 and 2.  From Gordon Matzigkeit.
32119         Indent.
32120
32121 1998-09-21  Jim Meyering  <meyering@ascend.com>
32122
32123         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
32124
32125 1998-08-18  Paul Eggert  <eggert@twinsun.com>
32126
32127         Port nanosecond-resolution times to UnixWare 2.1.2 and
32128         pedantic Solaris 2.6.
32129
32130         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
32131         AC_STRUCT_ST_MTIM.
32132         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
32133         Generate name of ns member, instead of just 1 or undef.
32134         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
32135
32136 1998-08-15  Jim Meyering  <meyering@ascend.com>
32137
32138         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
32139         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
32140         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
32141         instead of jm_TYPE_SSIZE_T.
32142
32143 1998-08-12  Jim Meyering  <meyering@ascend.com>
32144
32145         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
32146
32147 1998-08-02  Jim Meyering  <meyering@ascend.com>
32148
32149         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
32150         in acconfig.h manually.
32151
32152 1998-07-31  Paul Eggert  <eggert@twinsun.com>
32153
32154         * m4/st_mtim.m4: New file.
32155
32156 1998-07-28  Jim Meyering  <meyering@ascend.com>
32157
32158         * m4/utimes.m4: Undef stat.
32159
32160 1998-07-25  Jim Meyering  <meyering@ascend.com>
32161
32162         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
32163         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
32164
32165 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
32166
32167         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
32168         uid and gid actually remain unchanged.
32169
32170 1998-07-07  Jim Meyering  <meyering@ascend.com>
32171
32172         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
32173
32174 1998-07-04  Jim Meyering  <meyering@ascend.com>
32175
32176         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
32177         to prove that this macro can be used in packages without regex.c.
32178
32179 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
32180
32181         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
32182         is to be used.
32183
32184 1998-07-03  Jim Meyering  <meyering@ascend.com>
32185
32186         * m4/gettext.m4: Add -lintl if it's found to be necessary.
32187
32188         * m4/gettext.m4: New file -- from gettext-0.10.35.
32189         * m4/lcmessage.m4: Likewise.
32190         * m4/progtest.m4: Likewise.
32191
32192         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
32193         * m4/jm-macros.m4: Require the new macro.
32194
32195 1998-06-29  Jim Meyering  <meyering@ascend.com>
32196
32197         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
32198         for the definition of NGROUPS (used in a system header included
32199         by sys/mount.h).
32200
32201 1998-06-28  Jim Meyering  <meyering@ascend.com>
32202
32203         * m4/ls-mntd-fs.m4: New file.
32204         * m4/fstypename.m4: New file.
32205
32206         * m4/jm-macros.m4: Require the new macro.
32207         * m4/jm-glibc-io.m4: New file.
32208
32209 1998-05-19  Jim Meyering  <meyering@ascend.com>
32210
32211         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
32212         * m4/lchown.m4: New file.
32213
32214         * m4/Makefile.am.in: New file.
32215         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
32216
32217 1998-05-14  Jim Meyering  <meyering@ascend.com>
32218
32219         * m4/Makefile.am (EXTRA_DIST): Add them.
32220         * m4/jm-macros.m4: New file.
32221         * m4/utimbuf.m4: New file.
32222
32223 1998-05-12  Jim Meyering  <meyering@ascend.com>
32224
32225         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
32226
32227 1998-05-11  Jim Meyering  <meyering@ascend.com>
32228
32229         * m4/isc-posix.m4: New file.
32230
32231 1998-05-10  Jim Meyering  <meyering@ascend.com>